Skip to content

Commit

Permalink
template add-id minor fix, metanorma/metanorma-itu#605
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 committed Jan 14, 2025
1 parent b3debf2 commit ca1c3eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xslt_src/common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -19497,7 +19497,7 @@
<!-- 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:variable name="document_suffix" select="ancestor::itu:itu-standard/@document_suffix"/>
<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

0 comments on commit ca1c3eb

Please sign in to comment.