Follow

<template match="Ontology" priority="2">
<text disable-output-escaping="yes">&lt;owl:Ontology</text>
<for-each select="declare">
<text> xmlns</text>
<if test="normalize-space(prefix)!=''">
<text>:</text>
</if>
<value-of select="normalize-space(prefix)"/>
<text>=&quot;</text>
<value-of select="normalize-space(namespace)"/>
<text>&quot;</text>
</for-each>
<text disable-output-escaping="yes">&gt;</text>
&continue;
<text disable-output-escaping="yes">&lt;/owl:Ontology&gt;</text>
</template>

this is fine

· · Web · 1 · 0 · 0

some OWL processors attach significance to the namespaces which are declared on the root rdf:RDF element so it is important to ensure that all of the namespaces which appear in the ontology are actually declared there

but XSLT 1.0 has very very limited namespace node support, afaict limited only to copying (and even that is a grey area), so you have to do something like this in an earlier stage to create the namespace nodes so that they are there to copy

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.