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 ea3eef4 commit 59e7421
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
17 changes: 15 additions & 2 deletions lib/isodoc/ieee/ieee.amendment.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -3798,8 +3798,21 @@

<!-- <xsl:strip-space elements="ieee: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/ieee/ieee.standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -3798,8 +3798,21 @@

<!-- <xsl:strip-space elements="ieee: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 59e7421

Please sign in to comment.