]> Lady’s Gitweb - Vocab/blob - transforms/data/cleanup.xslt
Initial commit; initial set of vocabs
[Vocab] / transforms / data / cleanup.xslt
1 <?xml version="1.0"?>
2 <!--
3 SPDX-FileCopyrightText: 2024 Lady <https://www.ladys.computer/about/#lady>
4 SPDX-License-Identifier: MPL-2.0
5 -->
6 <!--
7 © 2024 Lady [@ Ladys Computer].
8
9 This Source Code Form is subject to the terms of the Mozilla Public License, v 2.0.
10 If a copy of the M·P·L was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0/>.
11 -->
12 <transform
13 xmlns="http://www.w3.org/1999/XSL/Transform"
14 xmlns:exsl="http://exslt.org/common"
15 xmlns:html="http://www.w3.org/1999/xhtml"
16 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
17 xmlns:owl="http://www.w3.org/2002/07/owl#"
18 xmlns:shacl="http://www.w3.org/ns/shacl#"
19 xmlns:xlink="http://www.w3.org/1999/xlink"
20 xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
21 extension-element-prefixes="exsl"
22 version="1.0"
23 >
24 <书社:id>urn:fdc:vocab.ladys.computer:20240731:transforms:cleanup.xslt</书社:id>
25 <template match="/rdf:RDF" mode="书社:apply">
26 <variable name="fragment">
27 <书社:raw-text>
28 <text>&lt;?xml version="1.0"?></text>
29 <element name="书社:serialize-xml">
30 <element name="rdf:RDF">
31 <for-each select="owl:Ontology/namespace::*">
32 <copy/>
33 </for-each>
34 <apply-templates mode="书社:apply"/>
35 </element>
36 </element>
37 </书社:raw-text>
38 </variable>
39 <apply-templates select="exsl:node-set($fragment)" mode="书社:apply"/>
40 </template>
41 <template match="/rdf:RDF//@xlink:*|/rdf:RDF//@书社:*|/rdf:RDF//书社:*|/rdf:RDF//text()[not(ancestor::html:*/ancestor::rdf:RDF) and normalize-space()='']|/rdf:RDF//comment()" mode="书社:apply" priority="10"/>
42 <template match="/rdf:RDF//text()[not(ancestor::html:*/ancestor::rdf:RDF) and normalize-space()!='']" mode="书社:apply" priority="10">
43 <value-of select="normalize-space()"/>
44 </template>
45 </transform>
This page took 0.116647 seconds and 5 git commands to generate.