<https://docs.linkeddatahub.com/reference/administration/packages/>
        a       <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#Item>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1>
                <https://docs.linkeddatahub.com/reference/administration/packages/#content>;
        <http://purl.org/dc/terms/created>
                "2026-09-29T09:52:32.678Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
        <http://purl.org/dc/terms/creator>
                <https://admin.linkeddatahub.com/acl/agents/5ba81960-d511-4a3b-8b9a-cb5bb278dd95/#this>;
        <http://purl.org/dc/terms/description>
                "Reusable bundles of an ontology and a stylesheet that add support and custom rendering for an RDF vocabulary";
        <http://purl.org/dc/terms/title>
                "Packages";
        <http://rdfs.org/sioc/ns#has_container>
                <https://docs.linkeddatahub.com/reference/administration/>;
        <http://www.w3.org/ns/auth/acl#owner>
                <https://admin.linkeddatahub.com/acl/agents/5ba81960-d511-4a3b-8b9a-cb5bb278dd95/#this> .

<https://docs.linkeddatahub.com/reference/administration/packages/#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=\"ldh-body-lg\">Reusable bundles of an ontology and a stylesheet that add support and custom rendering for an RDF vocabulary</p>\n    <div class=\"ac-alert va-informative\" role=\"status\">\n        <span class=\"ac-alert-ic\"><span aria-hidden=\"true\" class=\"msi outline\">info</span></span>\n        <div class=\"ac-alert-body\">\n            <p class=\"ac-alert-text\">Packages were introduced in LinkedDataHub 5.2. Since 5.10 a dataspace installs one by declaring a single <code>ldh:import</code> triple in its settings, replacing the <code>packages/install</code> and <code>packages/uninstall</code> endpoints and the file system mutations they performed.</p>\n            <p class=\"ac-alert-text\">Packages are declarative only (RDF + XSLT) — they contain no Java code. See <a href=\"#architecture\">Architecture</a> for how they are composed into the dataspace.</p>\n        </div>\n    </div>\n    <div>\n        <h2 id=\"what-are-packages\">Overview</h2>\n        <p>Packages enable:</p>\n        <ul>\n            <li>Rapid dataspace setup with pre-configured domain vocabularies</li>\n            <li>Sharing and reusing common vocabulary definitions</li>\n            <li>Custom rendering for vocabulary-specific resources</li>\n            <li>Modular extension of dataspace functionality</li>\n        </ul>\n    </div>\n    <div>\n        <h2 id=\"package-structure\">Package structure</h2>\n        <p>Each package consists of two files:</p>\n        <dl>\n            <dt><samp>ns.ttl</samp> — Package ontology</dt>\n            <dd>An RDF ontology file that imports the external vocabulary using <code>owl:imports</code> and attaches views to properties using <code>ldh:view</code> (forward relationships) or <code>ldh:inverseView</code> (inverse relationships). Views are typically <code>ldh:View</code> resources with SPARQL queries that render related data for property values.</dd>\n            <dt>XSLT stylesheet — named by <code>ac:stylesheet</code></dt>\n            <dd>XSLT transformation file with templates that override default rendering using system modes like <code>ac:*</code>, <code>ldh:*</code> and <code>xhtml:*</code>. See the <a href=\"../../stylesheets/\">Stylesheets reference</a> for details on XSLT customization.</dd>\n        </dl>\n        <p>Package files are organized in the LinkedDataHub-Apps repository, where the directory path is the package URI — a package under <samp>packages/a/b/</samp> is published at <samp>https://packages.linkeddatahub.com/a/b/</samp>, so a path carries as many segments as the grouping needs:</p>\n        <pre>packages/\n├── editor/\n│   └── taxonomy/\n│       ├── ns.ttl     # Ontology with views\n│       └── skos.xsl   # XSLT stylesheet</pre>\n        <p>The ontology is always <samp>ns.ttl</samp>; the stylesheet filename is not a convention, it is whatever the package's <code>ac:stylesheet</code> names. The taxonomy editor is named for what it does and its stylesheet for the vocabulary it speaks.</p>\n    </div>\n    <div>\n        <h2 id=\"package-metadata\">Package metadata</h2>\n        <p>Package metadata is published as Linked Data that resolves from the package URI (e.g. <code>https://packages.linkeddatahub.com/editor/taxonomy/#this</code>).\n            A package descriptor is an instance of the <code>lds:Package</code> class with these properties:</p>\n        <dl>\n            <dt><code>rdfs:label</code></dt>\n            <dd>Human-readable package name</dd>\n            <dt><code>dct:description</code></dt>\n            <dd>Package description and purpose</dd>\n            <dt><code>lds:ontology</code></dt>\n            <dd>The package ontology URI (LDT vocabulary)</dd>\n            <dt><code>ac:stylesheet</code></dt>\n            <dd>The package stylesheet URI (AtomGraph Client vocabulary)</dd>\n        </dl>\n        <p>Example package metadata:</p>\n        <pre>@prefix lds: &lt;https://w3id.org/atomgraph/linkeddatahub/dataspaces#&gt; .\n@prefix ac:   &lt;https://w3id.org/atomgraph/client#&gt; .\n@prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; .\n@prefix dct:  &lt;http://purl.org/dc/terms/&gt; .\n\n&lt;https://packages.linkeddatahub.com/editor/taxonomy/#this&gt; a lds:Package ;\n    rdfs:label \"Taxonomy Editor\" ;\n    dct:description \"Taxonomy editing on SKOS, with custom templates\" ;\n    lds:ontology &lt;https://raw.githubusercontent.com/AtomGraph/LinkedDataHub-Apps/master/packages/editor/taxonomy/ns.ttl#&gt; ;\n    ac:stylesheet &lt;https://raw.githubusercontent.com/AtomGraph/LinkedDataHub-Apps/master/packages/editor/taxonomy/skos.xsl&gt; .</pre>\n    </div>\n    <div>\n        <h2 id=\"package-ontology\">Package ontology</h2>\n        <p>The package ontology file contains two parts:</p>\n        <h3 id=\"vocabulary-import\">Vocabulary import</h3>\n        <p>Imports the external vocabulary using <code>owl:imports</code>. See the <a href=\"../ontologies/\">Ontologies reference</a> for ontology management details.</p>\n        <pre>&lt;https://raw.githubusercontent.com/AtomGraph/LinkedDataHub-Apps/master/packages/editor/taxonomy/ns.ttl#&gt; a owl:Ontology ;\n    owl:imports &lt;http://www.w3.org/2004/02/skos/core&gt; .</pre>\n        <h3 id=\"property-views\">Property views</h3>\n        <p>SPARQL-based views attached to properties from the imported vocabulary:</p>\n        <pre>skos:narrower ldh:view ns:NarrowerConcepts .\n\nns:NarrowerConcepts a ldh:View ;\n    dct:title \"Narrower concepts\" ;\n    spin:query ns:SelectNarrowerConcepts .\n\nns:SelectNarrowerConcepts a sp:Select ;\n    sp:text \"\"\"SELECT DISTINCT ?narrower\n    WHERE { GRAPH ?graph { $about skos:narrower ?narrower } }\n    ORDER BY ?narrower\"\"\" .</pre>\n        <p>Views are rendered when displaying resources that have the specified property. Use <code>ldh:view</code> for forward relationships (the resource carries the property) or <code>ldh:inverseView</code> for inverse relationships (other resources point at this resource through the property).</p>\n    </div>\n    <div>\n        <h2 id=\"package-stylesheet\">Package stylesheet</h2>\n        <p>XSLT templates in the platform's <em>open</em> modes, specialising the rendering of the package's own vocabulary:</p>\n        <pre>&lt;!-- The hierarchy predicates render as the concept tree, not as statement rows --&gt;\n&lt;xsl:template match=\"skos:narrower | skos:broader | skos:related | skos:member\" mode=\"ac:PropertyEditor\"/&gt;\n\n&lt;!-- Fill the column beside the content body on a concept scheme's document --&gt;\n&lt;xsl:template match=\"rdf:RDF[...]\" mode=\"ldh:ContentColumn\"&gt;\n    &lt;xsl:param name=\"mode\" as=\"xs:anyURI?\"/&gt;\n    &lt;!-- the concept tree --&gt;\n&lt;/xsl:template&gt;</pre>\n        <p>A package stylesheet is composed into the platform's import tree right after <samp>hooks.xsl</samp>, the module that declares the open modes and their generic fallbacks, and below everything else. Import precedence decides what a package can do: its rule for a node in an open mode outranks the fallback whatever the priorities, and it cannot contradict a sealed rule for the same node — a component mode, a typed rule, a global variable, named template or function — since that rule outranks the package. An open mode is a leaf: it renders or contributes for one node and carries no control flow. The open modes are:</p>\n        <ul>\n            <li><code>ldh:TreeNode</code> — one tree node; replace the default renderer, or decorate it with <code>xsl:next-match</code></li>\n            <li><code>ac:PropertyEditor</code> — one resource's property list, or one statement row; replace or decorate, and an empty rule hides</li>\n            <li><code>ldh:ContentColumn</code> — a slot beside the content body, empty unless a package fills it (the taxonomy editor's concept tree)</li>\n            <li><code>ldh:TreeChildrenLoad</code> and <code>ldh:RowHook</code> — client only: the children fetch for one tree node, and deferred work for one rendered row</li>\n            <li>The value leaves — <code>ac:FormControl</code>, <code>ac:PropertyListValue</code>, <code>ac:ValueAnnotations</code>, <code>ldh:TypeControl</code>, <code>ac:property-label</code>, <code>ac:object-label</code>, <code>ac:lang-tag</code>, <code>ac:ResultsTableHeaderCell</code>, <code>xhtml:Anchor</code> and the unnamed mode's property row and value link. A rule for the package's own property or datatype replaces the generic one, or decorates it</li>\n        </ul>\n        <p>The modes are documented in the <a href=\"../../stylesheets/\">Stylesheets reference</a>. The package stylesheet reaches the browser as well: the platform composes each dataspace's client stylesheet with its package stylesheets and has the <a href=\"../../configuration/#sef-compiler\"><samp>sef-compiler</samp></a> compile the result, so a package's rendering is the same on a direct page load and on client-side navigation.</p>\n    </div>\n    <div>\n        <h2 id=\"installing-packages\">Installing packages</h2>\n        <p>A dataspace imports a package with a single triple in its settings:</p>\n        <pre>&lt;urn:linkeddatahub:apps/end-user&gt; ldh:import &lt;https://packages.linkeddatahub.com/editor/taxonomy/#this&gt; .</pre>\n        <p>That declaration is the installation. Packages are installed into the <strong>end-user dataspace</strong> of a dataspace, and writing the triple requires write access to its <samp>settings</samp> document. See the <a href=\"../../../user-guide/manage-packages/\">step-by-step installation guide</a> for the user interface and command line instructions.</p>\n        <h3 id=\"what-the-declaration-does\">What the declaration does</h3>\n        <p>From the next request onwards, the server resolves the declaration:</p>\n        <ol>\n            <li><strong>Resolves the package description</strong> from the package URI. Bundled descriptions and cached graphs are read from the graph repository; other URIs are dereferenced over HTTP.</li>\n            <li><strong>Materializes the package ontology</strong> (<code>lds:ontology</code>) as a document under the admin dataspace's <samp>ontologies/</samp> container, named after the package path — <samp>ontologies/editor-taxonomy/</samp> for the taxonomy editor. The ontology is copied verbatim and the document names it as its <code>foaf:primaryTopic</code>; the copy is taken once, and the document is skipped on later requests.</li>\n            <li><strong>Adds the package ontology</strong> to the dataspace's ontology imports closure — it is declared as an <code>owl:imports</code> of the namespace ontology and resolves to the materialized document. The package's classes, constructors, constraints and views become available on the <samp>ns</samp> endpoint and in the UI, and are edited in that document like the namespace ontology's own.</li>\n            <li><strong>Copies the package stylesheet</strong> (<code>ac:stylesheet</code>) once under the platform's package root and serves it from the dataspace's own origin under <samp>/static/com/linkeddatahub/packages/</samp>, so what the instance compiles cannot change under it.</li>\n            <li><strong>Composes that copy</strong> into the dataspace stylesheet with an <code>xsl:import</code> right after <samp>hooks.xsl</samp>, so package templates outrank the open modes' fallbacks and nothing else; the client-side stylesheet is composed the same way and compiled by the <samp>sef-compiler</samp>.</li>\n        </ol>\n        <div class=\"ac-alert va-informative\" role=\"status\">\n            <span class=\"ac-alert-ic\"><span aria-hidden=\"true\" class=\"msi outline\">info</span></span>\n            <div class=\"ac-alert-body\">\n                <p class=\"ac-alert-text\">Both copies are taken at import and kept: a change to the published package reaches a dataspace that already imported it only after the materialized ontology document is deleted (the next request materializes it again) and the ontology cache is cleared.</p>\n            </div>\n        </div>\n        <p>Packages are applied in the order of their URIs. A package that declares only an ontology, or only a stylesheet, contributes only that, and one whose description cannot be resolved is skipped. If the composed stylesheet fails to compile — an unreachable package stylesheet URL, for instance — the dataspace falls back to its own stylesheet.</p>\n        <p>On the Northwind Traders dataspace the taxonomy editor package pays off immediately: the product categories that the\n            <a href=\"../../imports/rdf/\">UNESCO mapping import</a> doubled as <code>skos:Concept</code>s pick up the package's concept rendering and views,\n            and their mapping relations link into the UNESCO Thesaurus dataspace.</p>\n        <img alt=\"A Northwind category page with the taxonomy editor package installed, concept rendering and UNESCO mappings visible\" src=\"/uploads/c4008b5f82a762aea0f0e4dbde03ab0428fee726\"></img>\n    </div>\n    <div>\n        <h2 id=\"uninstalling-packages\">Uninstalling packages</h2>\n        <p>Removing the <code>ldh:import</code> triple uninstalls the package: from the next request onwards its ontology is out of the imports closure and its stylesheet is no longer composed in.</p>\n        <pre>DELETE\n{\n    &lt;urn:linkeddatahub:apps/end-user&gt; ldh:import &lt;https://packages.linkeddatahub.com/editor/taxonomy/#this&gt; .\n}\nWHERE {}</pre>\n        <div class=\"ac-alert va-informative\" role=\"status\">\n            <span class=\"ac-alert-ic\"><span aria-hidden=\"true\" class=\"msi outline\">info</span></span>\n            <div class=\"ac-alert-body\">\n                <p class=\"ac-alert-text\">Uninstalling a package does not remove user-created data that uses the package's vocabulary. That data stays in the dataspace but may not display or function correctly without the package.</p>\n                <p class=\"ac-alert-text\">Nor does it remove the materialized ontology document under <samp>ontologies/</samp>, so edits made to it survive an uninstall and a later re-import picks the document up as it is.</p>\n            </div>\n        </div>\n    </div>\n    <div>\n        <h2 id=\"architecture\">Architecture</h2>\n        <h3 id=\"runtime-composition\">Runtime composition</h3>\n        <p>Packages are composed at <strong>request time</strong> out of the declaration, not integrated into the dataspace ahead of it:</p>\n        <ul>\n            <li>The dataspace settings hold one <code>ldh:import</code> triple per package and nothing else</li>\n            <li>The ontology closure and the stylesheet imports are assembled from the resolved package descriptions</li>\n            <li>Installing and uninstalling take effect on the next request — no restart, and nothing is written into the webapp: the ontology copy is a document in the admin store and the stylesheet copy lives under the package root outside the war</li>\n        </ul>\n        <div class=\"ac-alert va-warning\" role=\"status\">\n            <span class=\"ac-alert-ic\"><span aria-hidden=\"true\" class=\"msi outline\">warning</span></span>\n            <div class=\"ac-alert-body\">\n                <p class=\"ac-alert-text\">Packages installed before 5.10 were applied by copying files into the webapp; those installations do not carry over. Re-declare them with <code>ldh:import</code>.</p>\n            </div>\n        </div>\n    </div>\n    <div>\n        <h2 id=\"creating-packages\">Creating custom packages</h2>\n        <p>Developers can create custom packages for their own domain vocabularies. The process has four steps.</p>\n        <h3 id=\"write-ontology\">Write package ontology</h3>\n        <p>Create <samp>ns.ttl</samp> with vocabulary import and views:</p>\n        <pre>&lt;https://raw.githubusercontent.com/you/repo/master/packages/schema.org/ns.ttl#&gt; a owl:Ontology ;\n    owl:imports &lt;https://schema.org/&gt; .\n\n# Attach view to a property\nschema:knows ldh:view :PersonKnows .\n\n:PersonKnows a ldh:View ;\n    dct:title \"Knows\" ;\n    spin:query :SelectPersonKnows .\n\n:SelectPersonKnows a sp:Select ;\n    sp:text \"\"\"\n    SELECT DISTINCT ?person\n    WHERE { GRAPH ?graph { $about schema:knows ?person } }\n    ORDER BY ?person\n    \"\"\" .</pre>\n        <h3 id=\"write-stylesheet\">Write XSLT stylesheet</h3>\n        <p>Create the stylesheet — name the file for the vocabulary it covers — with XSLT templates using system modes like <code>ac:*</code>, <code>ldh:*</code> and <code>xhtml:*</code>. See the <a href=\"../../stylesheets/\">Stylesheets reference</a> for template customization patterns.</p>\n        <pre>&lt;xsl:template match=\"schema:knows\" mode=\"ac:PropertyEditor\"/&gt;</pre>\n        <h3 id=\"publish-metadata\">Publish package metadata</h3>\n        <p>Publish package metadata as Linked Data at your package URI:</p>\n        <pre>&lt;https://packages.linkeddatahub.com/schema.org/#this&gt; a lds:Package ;\n    rdfs:label \"Schema.org Package\" ;\n    dct:description \"Schema.org vocabulary support\" ;\n    lds:ontology &lt;https://raw.githubusercontent.com/you/repo/master/packages/schema.org/ns.ttl#&gt; ;\n    ac:stylesheet &lt;https://raw.githubusercontent.com/you/repo/master/packages/schema.org/schema.xsl&gt; .</pre>\n        <p>Ensure the metadata contains <code>lds:ontology</code> and <code>ac:stylesheet</code> properties pointing to the package resources.</p>\n        <h3 id=\"test-installation\">Test installation</h3>\n        <p>Declare the <code>ldh:import</code> triple in a test dataspace's <samp>settings</samp> document — see <a href=\"#management\">Management</a> for the command.</p>\n    </div>\n    <div>\n        <h2 id=\"available-packages\">Available packages</h2>\n        <p>Published packages resolve from <a href=\"https://packages.linkeddatahub.com/\" target=\"_blank\">packages.linkeddatahub.com</a>; their sources live in the\n            <a href=\"https://github.com/AtomGraph/LinkedDataHub-Apps/tree/master/packages\" target=\"_blank\">LinkedDataHub-Apps repository</a>, where each package directory\n            contains the package ontology (<samp>ns.ttl</samp>) and the stylesheet its <code>ac:stylesheet</code> names.</p>\n        <dl>\n            <dt>Taxonomy Editor</dt>\n            <dd>Taxonomy editing on SKOS: a concept tree beside the content, hierarchy views in both assertion directions, and constructors and constraints for concepts, schemes and collections. Package URI: <code>https://packages.linkeddatahub.com/editor/taxonomy/#this</code></dd>\n        </dl>\n    </div>\n    <div>\n        <h2 id=\"management\">Management</h2>\n        <p>The <samp>packages</samp> group reads the registry and writes the <code>ldh:import</code> triple:</p>\n        <pre>ldh packages list\nldh packages add --package https://packages.linkeddatahub.com/editor/taxonomy/#this\nldh packages remove --package https://packages.linkeddatahub.com/editor/taxonomy/#this</pre>\n        <p><samp>packages list</samp> prints one tab-separated line per package — state, URI, title — so the listing greps and cuts. The registry\n            defaults to <samp>https://packages.linkeddatahub.com/</samp> and <samp>--registry</samp> overrides it; it is read through the\n            dataspace's Linked Data proxy rather than fetched directly, so <samp>list</samp> needs <samp>--base</samp> as much as the other two do.</p>\n        <p>All three go through <code>PATCH</code> on the <samp>settings</samp> document, which is the live path: the change takes effect on the\n            next request with no restart, but lives in the running dataspace's context dataset. Declaring the same <code>ldh:import</code> triple\n            in <samp>config/dataspaces.trig</samp> is the permanent one, applied on restart. <samp>packages remove</samp> is idempotent.</p>\n    </div>\n    <p class=\"ldh-body-lg\">To install and manage packages step by step, follow the <a href=\"../../../user-guide/manage-packages/\">Manage packages</a> guide.</p>\n</div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
