Skip to content

Commit

Permalink
Merge pull request #457 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 93d4e3f + 80a19d9 commit 2fcd94e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
8 changes: 6 additions & 2 deletions lib/isodoc/bipm/bipm.brochure.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15279,7 +15279,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 @@ -16518,7 +16519,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::bipm"/>
Expand Down Expand Up @@ -16608,6 +16609,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/bipm/bipm.guide.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15279,7 +15279,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 @@ -16518,7 +16519,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::bipm"/>
Expand Down Expand Up @@ -16608,6 +16609,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/bipm/bipm.mise-en-pratique.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15279,7 +15279,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 @@ -16518,7 +16519,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::bipm"/>
Expand Down Expand Up @@ -16608,6 +16609,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/bipm/bipm.rapport.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15279,7 +15279,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 @@ -16518,7 +16519,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::bipm"/>
Expand Down Expand Up @@ -16608,6 +16609,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/bipm/jcgm.standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -13059,7 +13059,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 @@ -14289,7 +14290,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::bipm"/>
Expand Down Expand Up @@ -14379,6 +14380,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 2fcd94e

Please sign in to comment.