Skip to content

Commit

Permalink
xslt update based on metanorma/mn-native-pdf@2d373da
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 authored Jan 3, 2025
1 parent 70cf9f4 commit 4a6ff36
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 10 deletions.
17 changes: 15 additions & 2 deletions lib/isodoc/bipm/bipm.brochure.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -3983,8 +3983,21 @@

<!-- <xsl:strip-space elements="bipm:xref"/> -->

<xsl:variable name="namespace_full" select="namespace-uri(/*)"/> <!-- example: https://www.metanorma.org/ns/iso -->
<xsl:variable name="root_element" select="local-name(/*)"/> <!-- example: iso-standard -->
<xsl:variable name="namespace_full_">
<xsl:choose>
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
</xsl:choose>
</xsl:variable>
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>

<xsl:variable name="root_element_">
<xsl:choose>
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
</xsl:choose>
</xsl:variable>
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>

<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'])"/>

Expand Down
17 changes: 15 additions & 2 deletions lib/isodoc/bipm/bipm.guide.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -3983,8 +3983,21 @@

<!-- <xsl:strip-space elements="bipm:xref"/> -->

<xsl:variable name="namespace_full" select="namespace-uri(/*)"/> <!-- example: https://www.metanorma.org/ns/iso -->
<xsl:variable name="root_element" select="local-name(/*)"/> <!-- example: iso-standard -->
<xsl:variable name="namespace_full_">
<xsl:choose>
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
</xsl:choose>
</xsl:variable>
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>

<xsl:variable name="root_element_">
<xsl:choose>
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
</xsl:choose>
</xsl:variable>
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>

<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'])"/>

Expand Down
17 changes: 15 additions & 2 deletions lib/isodoc/bipm/bipm.mise-en-pratique.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -3983,8 +3983,21 @@

<!-- <xsl:strip-space elements="bipm:xref"/> -->

<xsl:variable name="namespace_full" select="namespace-uri(/*)"/> <!-- example: https://www.metanorma.org/ns/iso -->
<xsl:variable name="root_element" select="local-name(/*)"/> <!-- example: iso-standard -->
<xsl:variable name="namespace_full_">
<xsl:choose>
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
</xsl:choose>
</xsl:variable>
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>

<xsl:variable name="root_element_">
<xsl:choose>
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
</xsl:choose>
</xsl:variable>
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>

<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'])"/>

Expand Down
17 changes: 15 additions & 2 deletions lib/isodoc/bipm/bipm.rapport.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -3983,8 +3983,21 @@

<!-- <xsl:strip-space elements="bipm:xref"/> -->

<xsl:variable name="namespace_full" select="namespace-uri(/*)"/> <!-- example: https://www.metanorma.org/ns/iso -->
<xsl:variable name="root_element" select="local-name(/*)"/> <!-- example: iso-standard -->
<xsl:variable name="namespace_full_">
<xsl:choose>
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
</xsl:choose>
</xsl:variable>
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>

<xsl:variable name="root_element_">
<xsl:choose>
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
</xsl:choose>
</xsl:variable>
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>

<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'])"/>

Expand Down
17 changes: 15 additions & 2 deletions lib/isodoc/bipm/jcgm.standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1798,8 +1798,21 @@

<!-- <xsl:strip-space elements="jcgm:xref"/> -->

<xsl:variable name="namespace_full" select="namespace-uri(/*)"/> <!-- example: https://www.metanorma.org/ns/iso -->
<xsl:variable name="root_element" select="local-name(/*)"/> <!-- example: iso-standard -->
<xsl:variable name="namespace_full_">
<xsl:choose>
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
</xsl:choose>
</xsl:variable>
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>

<xsl:variable name="root_element_">
<xsl:choose>
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
</xsl:choose>
</xsl:variable>
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>

<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'])"/>

Expand Down

0 comments on commit 4a6ff36

Please sign in to comment.