Skip to content

Commit

Permalink
Merge pull request #348 from metanorma/feature/xslt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 7, 2024
2 parents 62f1b9f + 4c8e9c8 commit 0cb92a9
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions lib/isodoc/iec/iec.international-standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -5639,7 +5639,8 @@
</xsl:choose>
</xsl:variable>
<xsl:variable name="current_fn_number_text">
<xsl:value-of select="$current_fn_number"/>

<xsl:value-of select="$current_fn_number"/>

</xsl:variable>

Expand Down Expand Up @@ -6971,9 +6972,19 @@
</fo:inline>
</xsl:template>

<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]" name="smallcaps">
<xsl:param name="txt"/>
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
<xsl:variable name="text" select="."/>
<xsl:variable name="text">
<xsl:choose>
<xsl:when test="$txt != ''">
<xsl:value-of select="$txt"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="ratio_">
0.75
</xsl:variable>
Expand Down Expand Up @@ -11093,12 +11104,14 @@

<xsl:when test="contains(normalize-space($fo_element), 'list')">

<xsl:variable name="provisional_distance_between_starts">
<xsl:variable name="provisional_distance_between_starts_">
7
</xsl:variable>
<xsl:variable name="indent">
<xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
<xsl:variable name="indent_">
0
</xsl:variable>
<xsl:variable name="indent" select="normalize-space($indent_)"/>

<fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
<fo:list-item>
Expand Down Expand Up @@ -11822,14 +11835,17 @@
</xsl:when>
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->

<xsl:variable name="label">
<xsl:variable name="type" select="../@type"/>

<xsl:variable name="type" select="../@type"/>
<xsl:variable name="label">

<xsl:variable name="style_prefix_">
<xsl:if test="$type = 'roman'">
<!-- Example: (i) -->
</xsl:if>
<xsl:if test="$type = 'alphabet'">

</xsl:if>
</xsl:variable>
<xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>

Expand All @@ -11855,13 +11871,15 @@
<xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
<xsl:value-of select="$style_prefix"/>
</xsl:if>

<xsl:value-of select="@label"/>

<xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
<xsl:value-of select="$style_suffix"/>
</xsl:if>
</xsl:variable>

<xsl:value-of select="normalize-space($label)"/>
<xsl:value-of select="normalize-space($label)"/>

</xsl:when>
<xsl:otherwise> <!-- for ordered lists 'ol' -->
Expand Down

0 comments on commit 0cb92a9

Please sign in to comment.