Skip to content

Commit 2d6d9d0

Browse files
xslt update based on metanorma/mn-native-pdf@2d373da
1 parent a0f1a39 commit 2d6d9d0

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

lib/isodoc/plateau/plateau.international-standard.xsl

+15-2
Original file line numberDiff line numberDiff line change
@@ -1906,8 +1906,21 @@
19061906

19071907
<!-- <xsl:strip-space elements="plateau:xref"/> -->
19081908

1909-
<xsl:variable name="namespace_full" select="namespace-uri(/*)"/> <!-- example: https://www.metanorma.org/ns/iso -->
1910-
<xsl:variable name="root_element" select="local-name(/*)"/> <!-- example: iso-standard -->
1909+
<xsl:variable name="namespace_full_">
1910+
<xsl:choose>
1911+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
1912+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
1913+
</xsl:choose>
1914+
</xsl:variable>
1915+
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
1916+
1917+
<xsl:variable name="root_element_">
1918+
<xsl:choose>
1919+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
1920+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
1921+
</xsl:choose>
1922+
</xsl:variable>
1923+
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
19111924

19121925
<xsl:variable name="document_scheme" select="normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
19131926

0 commit comments

Comments
 (0)