Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xslt update based on metanorma/mn-native-pdf@d38f4da6e55f285bd36e7e6f6cf1c161d5f51c07 #727

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions lib/isodoc/ogc/ogc.abstract-specification-topic.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -5383,7 +5383,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 @@ -6724,9 +6725,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 @@ -10813,12 +10824,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 @@ -11540,14 +11553,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 @@ -11573,13 +11589,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
34 changes: 26 additions & 8 deletions lib/isodoc/ogc/ogc.best-practice.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -5383,7 +5383,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 @@ -6724,9 +6725,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 @@ -10813,12 +10824,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 @@ -11540,14 +11553,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 @@ -11573,13 +11589,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
34 changes: 26 additions & 8 deletions lib/isodoc/ogc/ogc.change-request-supporting-document.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -5383,7 +5383,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 @@ -6724,9 +6725,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 @@ -10813,12 +10824,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 @@ -11540,14 +11553,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 @@ -11573,13 +11589,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
34 changes: 26 additions & 8 deletions lib/isodoc/ogc/ogc.community-practice.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -5383,7 +5383,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 @@ -6724,9 +6725,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 @@ -10813,12 +10824,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 @@ -11540,14 +11553,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 @@ -11573,13 +11589,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
Loading
Loading