1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
Author: Tj <debian@iam.tj>
Last-Update: 2025-08-16
Forwarded: not-needed
Description: Remove XSLT version 2.0 constructs due to libsaxon-java
< v8.9 only supporting version 1.0
diff --git a/demo/fo/cfg/fo/attrs/layout-masters-attr.xsl b/demo/fo/cfg/fo/attrs/layout-masters-attr.xsl
index d30bd9aae..3c35553c2 100644
--- a/demo/fo/cfg/fo/attrs/layout-masters-attr.xsl
+++ b/demo/fo/cfg/fo/attrs/layout-masters-attr.xsl
@@ -26,7 +26,7 @@
<xsl:attribute name="margin-bottom">
<xsl:value-of select="$page-margin-bottom"/>
</xsl:attribute>
- <xsl:attribute name="{if ($writing-mode = 'lr') then 'margin-left' else 'margin-right'}">
+ <xsl:attribute name="margin-left"><!--{if ($writing-mode = 'lr') then 'margin-left' else 'margin-right'}"-->
<xsl:choose>
<!-- support legacy parameter -->
<xsl:when test="normalize-space($page-margin-left)">
@@ -40,7 +40,7 @@
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <xsl:attribute name="{if ($writing-mode = 'lr') then 'margin-right' else 'margin-left'}">
+ <xsl:attribute name="margin-right"><!--{if ($writing-mode = 'lr') then 'margin-right' else 'margin-left'}"-->
<xsl:choose>
<!-- support legacy parameter -->
<xsl:when test="normalize-space($page-margin-right)">
@@ -63,7 +63,7 @@
<xsl:attribute name="margin-bottom">
<xsl:value-of select="$page-margin-bottom"/>
</xsl:attribute>
- <xsl:attribute name="{if ($writing-mode = 'lr') then 'margin-left' else 'margin-right'}">
+ <xsl:attribute name="margin-left"><!--{if ($writing-mode = 'lr') then 'margin-left' else 'margin-right'}"-->
<xsl:choose>
<!-- support legacy parameter -->
<xsl:when test="normalize-space($page-margin-left)">
@@ -77,7 +77,7 @@
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <xsl:attribute name="{if ($writing-mode = 'lr') then 'margin-right' else 'margin-left'}">
+ <xsl:attribute name="margin-right"><!--{if ($writing-mode = 'lr') then 'margin-right' else 'margin-left'}"-->
<xsl:choose>
<!-- support legacy parameter -->
<xsl:when test="normalize-space($page-margin-right)">
diff --git a/demo/fo/xsl/fo/bookmarks_1.0.xsl b/demo/fo/xsl/fo/bookmarks_1.0.xsl
index a9a5d08ea..b6bd9d474 100644
--- a/demo/fo/xsl/fo/bookmarks_1.0.xsl
+++ b/demo/fo/xsl/fo/bookmarks_1.0.xsl
@@ -119,7 +119,7 @@ See the accompanying license.txt file for applicable licenses.
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsl:if test="exists($bookmarks)">
+ <xsl:if test="boolean($bookmarks)">
<fo:bookmark-tree>
<xsl:copy-of select="$bookmarks"/>
</fo:bookmark-tree>
@@ -199,4 +199,4 @@ See the accompanying license.txt file for applicable licenses.
<!--<xsl:template match="*[contains(@class, ' topic/topic ')][opentopic-func:determineTopicType() = 'topicIndexList']" mode="bookmark" priority="10"/>-->
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
diff --git a/demo/fo/xsl/fo/root-processing.xsl b/demo/fo/xsl/fo/root-processing.xsl
index 490ed49f7..9ef4dab9d 100644
--- a/demo/fo/xsl/fo/root-processing.xsl
+++ b/demo/fo/xsl/fo/root-processing.xsl
@@ -40,16 +40,16 @@ See the accompanying license.txt file for applicable licenses.
exclude-result-prefixes="opentopic-index opentopic opentopic-i18n opentopic-func"
version="2.0">
- <xsl:param name="bookmap-order" select="'discard'"/>
+ <!--xsl:param name="bookmap-order" select="'discard'"/-->
- <xsl:variable name="retain-bookmap-order" select="*[contains(@class,' bookmap/bookmap ')] and $bookmap-order eq 'retain'"/>
- <xsl:variable name="writing-mode">
- <xsl:variable name="lang" select="if (contains($locale, '_')) then substring-before($locale, '_') else $locale"/>
+ <xsl:variable name="retain-bookmap-order" select="*[contains(@class,' bookmap/bookmap ')]"/><!-- "and $bookmap-order eq 'retain'"-->
+ <xsl:variable name="writing-mode" select="'lr'"/>
+ <!--xsl:variable name="lang" select="if (contains($locale, '_')) then substring-before($locale, '_') else $locale"/>
<xsl:choose>
<xsl:when test="some $l in ('ar', 'fa', 'he', 'ps', 'ur') satisfies $l eq $lang">rl</xsl:when>
<xsl:otherwise>lr</xsl:otherwise>
</xsl:choose>
- </xsl:variable>
+ </xsl:variable-->
<xsl:variable name="layout-masters">
<xsl:value-of select="'cfg:fo/layout-masters.xml'"/>
@@ -139,19 +139,19 @@ See the accompanying license.txt file for applicable licenses.
<xsl:call-template name="createFrontMatter"/>
- <xsl:if test="not($retain-bookmap-order)">
+ <!--xsl:if test="not($retain-bookmap-order)"-->
<xsl:call-template name="createToc"/>
- </xsl:if>
+ <!--/xsl:if-->
<!-- <xsl:call-template name="createPreface"/>-->
<xsl:apply-templates/>
- <xsl:if test="not($retain-bookmap-order)">
+ <!--xsl:if test="not($retain-bookmap-order)"-->
<xsl:call-template name="createIndex"/>
- </xsl:if>
+ <!--/xsl:if-->
</fo:root>
</xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
diff --git a/demo/fo/xsl/fo/toc.xsl b/demo/fo/xsl/fo/toc.xsl
index a76cfc764..54660b9d8 100644
--- a/demo/fo/xsl/fo/toc.xsl
+++ b/demo/fo/xsl/fo/toc.xsl
@@ -219,7 +219,7 @@ See the accompanying license.txt file for applicable licenses.
<xsl:template match="text()[. = 'topicChapter']" mode="toc-topic-text">
<xsl:param name="tocItemContent"/>
<xsl:param name="currentNode"/>
- <xsl:for-each select="$currentNode">
+ <xsl:for-each select="saxon:node-set($currentNode)" xmlns:saxon="http://icl.com/saxon">
<fo:block xsl:use-attribute-sets="__toc__chapter__content">
<xsl:copy-of select="$tocItemContent"/>
</fo:block>
@@ -229,7 +229,7 @@ See the accompanying license.txt file for applicable licenses.
<xsl:template match="text()[. = 'topicAppendix']" mode="toc-topic-text">
<xsl:param name="tocItemContent"/>
<xsl:param name="currentNode"/>
- <xsl:for-each select="$currentNode">
+ <xsl:for-each select="saxon:node-set($currentNode)" xmlns:saxon="http://icl.com/saxon">
<fo:block xsl:use-attribute-sets="__toc__appendix__content">
<xsl:copy-of select="$tocItemContent"/>
</fo:block>
@@ -239,7 +239,7 @@ See the accompanying license.txt file for applicable licenses.
<xsl:template match="text()[. = 'topicPart']" mode="toc-topic-text">
<xsl:param name="tocItemContent"/>
<xsl:param name="currentNode"/>
- <xsl:for-each select="$currentNode">
+ <xsl:for-each select="saxon:node-set($currentNode)" xmlns:saxon="http://icl.com/saxon">
<fo:block xsl:use-attribute-sets="__toc__part__content">
<xsl:copy-of select="$tocItemContent"/>
</fo:block>
@@ -249,7 +249,7 @@ See the accompanying license.txt file for applicable licenses.
<xsl:template match="text()[. = 'topicPreface']" mode="toc-topic-text">
<xsl:param name="tocItemContent"/>
<xsl:param name="currentNode"/>
- <xsl:for-each select="$currentNode">
+ <xsl:for-each select="saxon:node-set($currentNode)" xmlns:saxon="http://icl.com/saxon">
<fo:block xsl:use-attribute-sets="__toc__preface__content">
<xsl:copy-of select="$tocItemContent"/>
</fo:block>
@@ -267,7 +267,7 @@ See the accompanying license.txt file for applicable licenses.
<xsl:template match="node()" mode="toc-topic-text">
<xsl:param name="tocItemContent"/>
<xsl:param name="currentNode"/>
- <xsl:for-each select="$currentNode">
+ <xsl:for-each select="saxon:node-set($currentNode)" xmlns:saxon="http://icl.com/saxon">
<fo:block xsl:use-attribute-sets="__toc__topic__content">
<xsl:copy-of select="$tocItemContent"/>
</fo:block>
|