Skip to content

Commit

Permalink
Merge pull request #1275 from metanorma/feature/xslt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jan 14, 2025
2 parents e57d175 + 864fd33 commit 048e7e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions lib/isodoc/iso/iso.amendment.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -17299,7 +17299,8 @@
<!-- add @id - first element with @id plus '_element_name' -->
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
<xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
<xsl:attribute name="id"><xsl:value-of select="$prefix_id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
<xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
</xsl:if>
</xsl:template>

Expand Down Expand Up @@ -18665,7 +18666,7 @@
</xsl:template>

<xsl:template name="namespaceCheck">
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
<xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
<xsl:variable name="XSLNS">

<xsl:value-of select="document('')//*/namespace::iso"/>
Expand Down Expand Up @@ -18755,6 +18756,9 @@
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
</xsl:when>
<xsl:when test="string-length($bibdata_updated) != ''">
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
</xsl:when>
<xsl:when test="$formatted = 'true'">
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
</xsl:when>
Expand Down
8 changes: 6 additions & 2 deletions lib/isodoc/iso/iso.international-standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -17299,7 +17299,8 @@
<!-- add @id - first element with @id plus '_element_name' -->
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
<xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
<xsl:attribute name="id"><xsl:value-of select="$prefix_id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
<xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
</xsl:if>
</xsl:template>

Expand Down Expand Up @@ -18665,7 +18666,7 @@
</xsl:template>

<xsl:template name="namespaceCheck">
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
<xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
<xsl:variable name="XSLNS">

<xsl:value-of select="document('')//*/namespace::iso"/>
Expand Down Expand Up @@ -18755,6 +18756,9 @@
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
</xsl:when>
<xsl:when test="string-length($bibdata_updated) != ''">
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
</xsl:when>
<xsl:when test="$formatted = 'true'">
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
</xsl:when>
Expand Down

0 comments on commit 048e7e8

Please sign in to comment.