<https://docs.linkeddatahub.com/user-guide/change-layout/>
        a       <https://www.w3.org/ns/ldt/document-hierarchy#Item>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1>
                <https://docs.linkeddatahub.com/user-guide/change-layout/#content>;
        <http://purl.org/dc/terms/created>
                "2026-06-16T20:33:21.911Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
        <http://purl.org/dc/terms/creator>
                <https://admin.linkeddatahub.com/acl/agents/0ab4a0f7-1ab0-4d0c-8efc-63a79a2e9a10/#this>;
        <http://purl.org/dc/terms/description>
                "How to customize the layout of an application and the UI of the resources";
        <http://purl.org/dc/terms/title>
                "Change layout";
        <http://rdfs.org/sioc/ns#has_container>
                <https://docs.linkeddatahub.com/user-guide/>;
        <http://www.w3.org/ns/auth/acl#owner>
                <https://admin.linkeddatahub.com/acl/agents/0ab4a0f7-1ab0-4d0c-8efc-63a79a2e9a10/#this> .

<https://docs.linkeddatahub.com/uploads/e1a566461208a41faee39238f395f2f79fec8421>
        a       <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject>;
        <http://purl.org/dc/terms/format>
                <http://www.sparontologies.net/mediatype/image/png>;
        <http://purl.org/dc/terms/title>
                "change-layout-suppress.png";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName>
                "change-layout-suppress.png";
        <http://xmlns.com/foaf/0.1/sha1>
                "e1a566461208a41faee39238f395f2f79fec8421" .

<https://docs.linkeddatahub.com/uploads/74b49af5c822acf41ad661d0d27a60443151838d>
        a       <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject>;
        <http://purl.org/dc/terms/format>
                <http://www.sparontologies.net/mediatype/image/png>;
        <http://purl.org/dc/terms/title>
                "change-layout-default.png";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName>
                "change-layout-default.png";
        <http://xmlns.com/foaf/0.1/sha1>
                "74b49af5c822acf41ad661d0d27a60443151838d" .

<https://docs.linkeddatahub.com/uploads/38d12825c3927e2d5493ca76f2b744c7b5fe867b>
        a       <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject>;
        <http://purl.org/dc/terms/format>
                <http://www.sparontologies.net/mediatype/image/png>;
        <http://purl.org/dc/terms/title>
                "change-layout-augment.png";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName>
                "change-layout-augment.png";
        <http://xmlns.com/foaf/0.1/sha1>
                "38d12825c3927e2d5493ca76f2b744c7b5fe867b" .

<https://docs.linkeddatahub.com/user-guide/change-layout/#content>
        a       <https://w3id.org/atomgraph/linkeddatahub#XHTML>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n    <p class=\"lead\">How to customize the layout of an application and the UI of the resources</p>\n    <p>LinkedDataHub's user interface is simply a rendering of the underlying Linked Data resource descriptions, which are exposed via the <a href=\"../../reference/http-api/\" target=\"_blank\">HTTP API</a>.</p>\n    <p>LinkedDataHub provides <a href=\"../../reference/stylesheets/\" target=\"_blank\">XSLT stylesheets</a> that render a default UI layout. When building an application you might want to render a custom\n        layout however. The recommended way of doing that is to create a new stylesheet which imports the system stylesheet and only override specific templates, while reusing the rest of the layout.</p>\n    <div>\n        <h2 id=\"create-stylesheet\">Create a stylesheet</h2>\n        <p>First we need to create a new XSLT 3.0 stylesheet and use <code>&lt;xsl:import&gt;</code> to import the system stylesheet <a href=\"https://github.com/AtomGraph/LinkedDataHub/blob/master/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl\" target=\"_blank\"><samp>static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl</samp></a>.</p>\n        <p class=\"lead\">See an <a href=\"https://github.com/AtomGraph/LinkedDataHub-Apps/blob/master/demo/skos/files/skos.xsl\" target=\"_blank\">example in the SKOS demo app</a>.</p>\n    </div>\n    <div>\n        <h2 id=\"configure-dataspace\">Configure the dataspace</h2>\n        <div class=\"tabbable\">\n            <ul class=\"nav nav-tabs\">\n                <li class=\"active\"><a>LinkedDataHub</a></li>\n            </ul>\n            <div class=\"tab-content\">\n                <div class=\"tab-pane active\">\n                    <div>\n                        <p>First, either <a href=\"../upload-file/\" target=\"_blank\">upload the XSLT file</a> or mount it using Docker and <samp>docker-compose.override.yml</samp>:</p>\n                        <pre>version: \"2.3\"\nservices:\n  linkeddatahub:\n    volumes:\n      - ../LinkedDataHub-Apps/demo/skos/files/skos.xsl:/usr/local/tomcat/webapps/ROOT/static/com/atomgraph/linkeddatahub/demo/skos/xsl/index.xsl:ro</pre>\n                        <p>Then change the value of <code>ac:stylesheet</code> on the dataspace with base URI <code>https://localhost:4443/</code> to the relative URI of the stylesheet:</p>\n                        <pre>&lt;urn:linkeddatahub:apps/end-user&gt; a lapp:EndUserApplication ;\n    ...\n    ac:stylesheet &lt;static/com/atomgraph/linkeddatahub/demo/skos/xsl/index.xsl&gt; ;\n    ...</pre>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n    <div>\n        <h2 id=\"default-layout\">Default layout</h2>\n        <p>In the examples below we assume that the graph contains a SKOS taxonomy with concept instances, which can also have broader/narrower concepts.</p>\n        <p>At this point, the default layout of the current document, its topic concept, and narrower/broader concepts looks like this:</p>\n        <div class=\"thumbnail\">\n            <img alt=\"Default layout\" src=\"../../uploads/74b49af5c822acf41ad661d0d27a60443151838d\"></img>\n        </div>\n    </div>\n    <div>\n        <h2 id=\"augment-output\">Augment output</h2>\n        <p>Keep the default output using <code>&lt;xsl:apply-imports&gt;</code> or <code>&lt;xsl:next-match&gt;</code> and add new output before/after it:</p>\n        <pre><code>&lt;xsl:key name=\"resources-by-broader\" match=\"*[@rdf:about] | *[@rdf:nodeID]\" use=\"skos:broader/@rdf:resource\"/&gt;\n        \n&lt;xsl:template match=\"*[foaf:isPrimaryTopicOf/@rdf:resource = $ac:uri][key('resources-by-broader', @rdf:about)]  | *[foaf:isPrimaryTopicOf/@rdf:resource = $ac:uri][key('resources', skos:narrower/@rdf:resource)]\" priority=\"1\"&gt;\n    &lt;xsl:next-match/&gt;\n\n    &lt;h3&gt;Narrower concepts&lt;/h3&gt;\n    &lt;ul&gt;\n        &lt;xsl:apply-templates select=\"key('resources-by-broader', @rdf:about) | key('resources', skos:narrower/@rdf:resource)\" mode=\"bs2:List\"&gt;\n            &lt;xsl:sort select=\"ac:label(.)\"/&gt;\n        &lt;/xsl:apply-templates&gt;\n    &lt;/ul&gt;\n&lt;/xsl:template&gt;</code></pre>\n        <p>The match pattern will match the resource descriptions that:</p>\n        <ul>\n            <li>are the primary topics of the requested document (i.e. its concept) <em>and</em> is a broader concept of some other resources in the RDF graph</li>\n            <li>are the primary topics of the requested document (i.e. its concept) <em>and</em> has narrower concept(s) in the RDF graph</li>\n        </ul>\n        <p>We can render broader concepts by making a copy of the key and the template above and replacing all occurences of <code>skos:narrower</code> with <code>skos:broader</code> and vice versa.</p>\n        <p>With the overriding template, the layout looks like this:</p>\n        <div class=\"thumbnail\">\n            <img alt=\"Augmented output\" src=\"../../uploads/38d12825c3927e2d5493ca76f2b744c7b5fe867b\"></img>\n        </div>\n    </div>\n    <div>\n        <h2 id=\"override-output\">Override output</h2>\n        <p>To completely change the layout without keeping the default one, use the same logic as for <a href=\"#augment-output\">augmenting</a> it, but do not call <code>&lt;xsl:apply-imports&gt;</code>/<code>&lt;xsl:next-match&gt;</code>.</p>\n    </div>\n    <div>\n        <h2 id=\"suppress-output\">Suppress output</h2>\n        <p>In the above example, we have rendered <code>skos:narrower</code> properties in our own special way. Which means that the default output of the same properties from <code>bs2:PropertyList</code> is no longer desired.</p>\n        <p>You can specify an empty template at any level (graph/property/resource) to disable output of that layout mode. For example, this will suppress the default rendering of concepts which are\n            now shown in the customized broader/narrower list:</p>\n        <pre><code>&lt;xsl:template match=\"*[key('resources', skos:narrower/@rdf:resource)/foaf:isPrimaryTopicOf/@rdf:resource = $ac:uri] | *[key('resources', skos:broader/@rdf:resource)/foaf:isPrimaryTopicOf/@rdf:resource = $ac:uri] | *[@rdf:about = key('resources', key('resources', $ac:uri)/foaf:primaryTopic/@rdf:resource)/skos:narrower/@rdf:resource] | *[@rdf:about = key('resources', key('resources', $ac:uri)/foaf:primaryTopic/@rdf:resource)/skos:broader/@rdf:resource]\"/&gt;</code></pre>\n        <p>The match pattern will match the resource descriptions that:</p>\n        <ul>\n            <li>have narrower concept(s) in the RDF graph that are the primary topic of the current document</li>\n            <li>have broader concept(s) in the RDF graph that are the primary topic of the current document</li>\n            <li>are narrower concept of the primary topic of the current document</li>\n            <li>are broader concept of the primary topic of the current document</li>\n        </ul>\n        <pre>&lt;xsl:template match=\"*[foaf:isPrimaryTopicOf/@rdf:resource = $ac:uri][key('resources', skos:broader/@rdf:resource)]/skos:broader | *[foaf:isPrimaryTopicOf/@rdf:resource = $ac:uri][key('resources', skos:narrower/@rdf:resource)]/skos:narrower\" mode=\"bs2:PropertyList\"/&gt;</pre>\n        <p>The match pattern will match the resource properties that:</p>\n        <ul>\n            <li>are <code>skos:broader</code> properties of a resource that is the primary topic of the current document <em>and</em> has broader concepts in the RDF graph</li>\n            <li>are <code>skos:narrower</code> properties of a resource that is the primary topic of the current document <em>and</em> has narrower concepts in the RDF graph</li>\n        </ul>\n        <p>With the supressing templates, the layout now looks like this:</p>\n        <div class=\"thumbnail\">\n            <img alt=\"Suppressed output\" src=\"../../uploads/e1a566461208a41faee39238f395f2f79fec8421\"></img>\n        </div>\n    </div>\n</div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
