<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in LICENSE$ -->

<!-- Custom list view config file for display:hasElement property (used for menu system)

     See guidelines at https://wiki.lyrasis.org/display/VIVODOC112x/Custom+List+View+Configurations -->

<list-view-config>
    <query-select>
        PREFIX display: &lt;http://vitro.mannlib.cornell.edu/ontologies/display/1.1#&gt;


        SELECT ?menuItem
               (REPLACE(STR(?menuItem),"^.*(#)(.*)$", "$2") AS ?menuItemName)
               ?linkText
               ?menuPosition
        WHERE {
            ?subject ?property ?menuItem .
            OPTIONAL {
                <precise-subquery>?subject ?property ?menuItem .</precise-subquery>
                ?menuItem display:linkText ?linkText .
            }
            OPTIONAL {
                <precise-subquery>?subject ?property ?menuItem .</precise-subquery>
                ?menuItem display:menuPosition ?menuPosition .
            }
        } ORDER BY ?menuPosition
    </query-select>

    <template>propStatement-hasElement.ftl</template>
</list-view-config>
