Skip to content

Commit

Permalink
Merge pull request #789 from metanorma/fix/page_sequence
Browse files Browse the repository at this point in the history
xslt updated for fixing page-sequence issue, metanorma/mn2pdf#314
  • Loading branch information
Intelligent2013 authored Dec 22, 2024
2 parents 9264bb2 + d4823ee commit 2c00857
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions xslt_src/cc.standard.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
</xsl:variable>

<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface/sections -->
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<!-- Copyright, Content, Foreword, etc. pages -->
<fo:page-sequence master-reference="preface" format="i">
Expand Down Expand Up @@ -321,7 +321,7 @@
</xsl:for-each>


<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<!-- Document Pages -->
<fo:page-sequence master-reference="document" format="1" force-page-count="no-force">
Expand Down
2 changes: 1 addition & 1 deletion xslt_src/csa.standard.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
</xsl:variable>

<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface -->
<xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">
<fo:page-sequence master-reference="document" format="1" force-page-count="no-force">

<xsl:attribute name="master-reference">
Expand Down
4 changes: 2 additions & 2 deletions xslt_src/iec.international-standard.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@
<xsl:template name="insertPrefacepages">
<xsl:param name="num"/>

<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<fo:page-sequence master-reference="document" format="1" force-page-count="no-force">

Expand Down Expand Up @@ -1477,7 +1477,7 @@
<xsl:param name="lang" select="'en'"/>
<!-- BODY -->

<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<fo:page-sequence master-reference="document" force-page-count="no-force">

Expand Down
4 changes: 2 additions & 2 deletions xslt_src/iho.standard.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@

<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface/sections -->

<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<!-- Preface Pages -->
<fo:page-sequence master-reference="preface" format="i">
Expand Down Expand Up @@ -292,7 +292,7 @@
</xsl:for-each>


<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<fo:page-sequence master-reference="document" format="1" force-page-count="no-force">

Expand Down
4 changes: 2 additions & 2 deletions xslt_src/iso.international-standard.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@

<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface/sections -->

<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<fo:page-sequence format="i" force-page-count="no-force">

Expand Down Expand Up @@ -1224,7 +1224,7 @@

<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to sections, if top element in 'sections' -->

<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<!-- BODY -->
<fo:page-sequence force-page-count="no-force">
Expand Down
4 changes: 2 additions & 2 deletions xslt_src/itu.recommendation.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@

<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface/sections -->

<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<fo:page-sequence master-reference="document-preface" format="i" force-page-count="no-force">

Expand Down Expand Up @@ -1517,7 +1517,7 @@
</xsl:for-each> <!-- END: preface pages -->


<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<!-- BODY -->
<fo:page-sequence master-reference="document" force-page-count="no-force">
Expand Down
4 changes: 2 additions & 2 deletions xslt_src/jcgm.standard.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@

<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface -->

<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'boilerplate'] or parent::*[local-name() = 'preface']][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'boilerplate'] or parent::*[local-name() = 'preface']][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<fo:page-sequence master-reference="document-jcgm" format="i">

Expand Down Expand Up @@ -413,7 +413,7 @@

<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface -->

<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'boilerplate'] or parent::*[local-name() = 'preface'])][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'boilerplate'] or parent::*[local-name() = 'preface'])][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<!-- JCGM BODY -->
<fo:page-sequence master-reference="document-jcgm" force-page-count="no-force">
Expand Down
4 changes: 2 additions & 2 deletions xslt_src/ogc.standard.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@

<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface/sections -->

<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">
<!-- Copyright, Content, Foreword, etc. pages -->
<fo:page-sequence master-reference="document" format="i" force-page-count="no-force">

Expand Down Expand Up @@ -745,7 +745,7 @@
</xsl:for-each>


<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'] or parent::*[local-name() = 'boilerplate'])][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'] or parent::*[local-name() = 'boilerplate'])][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">


<!-- Document Pages -->
Expand Down
4 changes: 2 additions & 2 deletions xslt_src/ogc.white-paper.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@

<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface/sections -->

<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface' or local-name() = 'boilerplate']][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface' or local-name() = 'boilerplate']][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<!-- Copyright, Content, Foreword, etc. pages -->
<fo:page-sequence master-reference="document" force-page-count="no-force">
Expand Down Expand Up @@ -291,7 +291,7 @@
</fo:page-sequence>
</xsl:for-each>

<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface' or local-name() = 'boilerplate'])][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface' or local-name() = 'boilerplate'])][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<!-- Document Pages -->
<fo:page-sequence master-reference="document" format="1" force-page-count="no-force">
Expand Down
4 changes: 2 additions & 2 deletions xslt_src/plateau.international-standard.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
<!-- ========================== -->

<!-- Preface pages -->
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<xsl:choose>
<xsl:when test="*[local-name() = 'clause'][@type = 'toc']">
Expand Down Expand Up @@ -327,7 +327,7 @@
<!-- END Preface and contents pages -->
<!-- ========================== -->

<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">
<fo:page-sequence master-reference="document" force-page-count="no-force">

<xsl:attribute name="master-reference">
Expand Down
2 changes: 1 addition & 1 deletion xslt_src/ribose.standard.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@

<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface -->

<xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//image or .//svg]">
<xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">

<fo:page-sequence master-reference="document" force-page-count="no-force">

Expand Down

0 comments on commit 2c00857

Please sign in to comment.