]> Lady’s Gitweb - Caudex/blobdiff - parser.xslt
Enable manual ordering
[Caudex] / parser.xslt
index d20da125c5f23fde826be1ba0874dcc98b8f6d43..61d385d808480570f6e9a883861194431b190508 100644 (file)
@@ -22,6 +22,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
        xmlns:exslstr="http://exslt.org/strings"
        xmlns:foaf="http://xmlns.com/foaf/0.1/"
        xmlns:html="&xhtml;"
+       xmlns:ladys="https://vocab.ladys.computer/terms/"
        xmlns:ore="http://www.openarchives.org/ore/terms/"
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns:skos="http://www.w3.org/2004/02/skos/core#"
@@ -50,6 +51,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                <variable name="identifier" select="exslstr:tokenize($IDENTIFIER, '/')[last()-1]"/>
                <for-each select="html:article">
                        <variable name="title" select="html:footer[@class='head']//html:dt[normalize-space()='TITLE']/following-sibling::html:dd"/>
+                       <variable name="order" select="number(html:footer[@class='head']//html:dt[normalize-space()='ORDER']/following-sibling::html:dd)"/>
                        <element name="awol:Category">
                                <apply-templates select="@lang|@xml:lang"/>
                                <attribute name="rdf:nodeID">
@@ -70,12 +72,21 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                                <value-of select="$title"/>
                                        </attribute>
                                </if>
+                               <if test="$order!=number('NaN')">
+                                       <element name="ladys:order">
+                                               <attribute name="rdf:datatype">
+                                                       <text>&xsd;integer</text>
+                                               </attribute>
+                                               <value-of select="$order"/>
+                                       </element>
+                               </if>
                        </element>
                </for-each>
        </template>
        <template match="html:div[html:article/@data-lesml-profile='urn:fdc:ladys.computer:20240204:Caudex:pf:entry']">
                <for-each select="html:article">
                        <variable name="title" select="html:footer[@class='head']//html:dt[normalize-space()='TITLE']/following-sibling::html:dd"/>
+                       <variable name="order" select="number(html:footer[@class='head']//html:dt[normalize-space()='ORDER']/following-sibling::html:dd)"/>
                        <variable name="idstring" select="string(exslstr:tokenize($IDENTIFIER, '/')[last()])"/>
                        <element name="ore:Proxy">
                                <if test="$title">
@@ -88,6 +99,14 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                                <value-of select="exslstr:tokenize($IDENTIFIER, '/')[last()-1]"/>
                                        </attribute>
                                </element>
+                               <if test="$order!=number('NaN')">
+                                       <element name="ladys:order">
+                                               <attribute name="rdf:datatype">
+                                                       <text>&xsd;integer</text>
+                                               </attribute>
+                                               <value-of select="$order"/>
+                                       </element>
+                               </if>
                                <element name="skos:notation">
                                        <attribute name="rdf:datatype">
                                                <text>&xsd;string</text>
This page took 0.025197 seconds and 4 git commands to generate.