- Timestamp:
- 05/09/2008 01:00:42 PM (16 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- b48899b
- Parents:
- 2262b78
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/lfs-xsl/docbook-xsl-snapshot/common/olink.xsl
r2262b78 r410e228b 35 35 </xsl:variable> 36 36 37 <xsl:variable name="target.database" 37 <xsl:variable name="target.database" 38 38 select="document($target.database.filename,/)"/> 39 39 … … 125 125 $targetptr.att != ''"> 126 126 <xsl:for-each select="$target.database"> 127 <xsl:variable name="key" 128 select="concat($targetdoc.att, '/', 127 <xsl:variable name="key" 128 select="concat($targetdoc.att, '/', 129 129 $targetptr.att, '/', 130 130 $target.lang)"/> … … 148 148 targetptr.att = not blank 149 149 prefer.internal.olink = not zero 150 current.docid = not blank 150 current.docid = not blank 151 151 --> 152 152 <xsl:if test="$targetdoc.att != '' and … … 155 155 $prefer.internal.olink != 0"> 156 156 <xsl:for-each select="$target.database"> 157 <xsl:variable name="key" 158 select="concat($current.docid, '/', 157 <xsl:variable name="key" 158 select="concat($current.docid, '/', 159 159 $targetptr.att, '/', 160 160 $target.lang)"/> … … 177 177 <!-- targetdoc.att = blank 178 178 targetptr.att = not blank 179 current.docid = not blank 179 current.docid = not blank 180 180 --> 181 181 <xsl:if test="string-length($targetdoc.att) = 0 and … … 184 184 <!-- Must use a for-each to change context for keys to work --> 185 185 <xsl:for-each select="$target.database"> 186 <xsl:variable name="key" 187 select="concat($current.docid, '/', 186 <xsl:variable name="key" 187 select="concat($current.docid, '/', 188 188 $targetptr.att, '/', 189 189 $target.lang)"/> … … 206 206 <!-- targetdoc.att = blank 207 207 targetptr.att = not blank 208 current.docid = blank 208 current.docid = blank 209 209 --> 210 210 <!-- This is possible if only one document in the database --> … … 214 214 count($target.database//document) = 1"> 215 215 <xsl:for-each select="$target.database"> 216 <xsl:variable name="key" 217 select="concat(.//document/@targetdoc, '/', 216 <xsl:variable name="key" 217 select="concat(.//document/@targetdoc, '/', 218 218 $targetptr.att, '/', 219 219 $target.lang)"/> … … 253 253 254 254 <xsl:for-each select="$target.database"> 255 <xsl:variable name="key" 256 select="concat($targetdoc.att, '/', 255 <xsl:variable name="key" 256 select="concat($targetdoc.att, '/', 257 257 $rootid, '/', 258 258 $target.lang)"/> … … 276 276 targetptr.att = blank 277 277 prefer.internal.olink = not zero 278 current.docid = not blank 278 current.docid = not blank 279 279 --> 280 280 <xsl:if test="$targetdoc.att != '' and … … 295 295 296 296 <xsl:for-each select="$target.database"> 297 <xsl:variable name="key" 298 select="concat($current.docid, '/', 297 <xsl:variable name="key" 298 select="concat($current.docid, '/', 299 299 $rootid, '/', 300 300 $target.lang)"/> … … 387 387 <xsl:value-of select="$selected.key"/> 388 388 </xsl:when> 389 <xsl:when test="string-length($selected.key) = 0 and 389 <xsl:when test="string-length($selected.key) = 0 and 390 390 string-length($target.lang) = 0"> 391 391 <!-- No match on last try, and we are done --> … … 412 412 413 413 <!-- recurse backwards to find the lang matching the index --> 414 <xsl:variable name="firstlang" 414 <xsl:variable name="firstlang" 415 415 select="substring-before($olink.fallback.sequence, ' ')"/> 416 <xsl:variable name="rest" 416 <xsl:variable name="rest" 417 417 select="substring-after($olink.fallback.sequence, ' ')"/> 418 418 <xsl:choose> … … 436 436 437 437 <!-- Prefer language of the olink element --> 438 <xsl:value-of select="concat(normalize-space(concat($olink.lang, ' ', 438 <xsl:value-of select="concat(normalize-space(concat($olink.lang, ' ', 439 439 $olink.lang.fallback.sequence)), ' ')"/> 440 440 </xsl:template> … … 484 484 <xsl:for-each select="$target.database" > 485 485 <xsl:call-template name="targetpath" > 486 <xsl:with-param name="dirnode" 486 <xsl:with-param name="dirnode" 487 487 select="key('targetdoc-key', $current.docid)/parent::dir"/> 488 488 <xsl:with-param name="targetdoc" select="$targetdoc"/> … … 506 506 </xsl:message> 507 507 </xsl:otherwise> 508 </xsl:choose> 508 </xsl:choose> 509 509 <!-- In either case, add baseuri from its document entry--> 510 510 <xsl:variable name="docbaseuri"> … … 554 554 <xsl:param name="object" select="NotAnElement"/> 555 555 <xsl:param name="object.targetdoc" select="$current.docid"/> 556 <xsl:param name="object.lang" 556 <xsl:param name="object.lang" 557 557 select="concat($object/ancestor::*[last()]/@lang, 558 558 $object/ancestor::*[last()]/@xml:lang)"/> … … 608 608 <xsl:param name="xrefstyle"> 609 609 <xsl:choose> 610 <xsl:when test="@role and not(@xrefstyle) 610 <xsl:when test="@role and not(@xrefstyle) 611 611 and $use.role.as.xrefstyle != 0"> 612 612 <xsl:value-of select="@role"/> … … 627 627 <xsl:variable name="xref.text" > 628 628 <xsl:for-each select="$target.database" > 629 <xsl:copy-of 629 <xsl:copy-of 630 630 select="key('targetptr-key', $olink.key)/xreftext/node()" /> 631 631 </xsl:for-each> … … 647 647 <xsl:variable name="candidate"> 648 648 <xsl:for-each select="$target.database" > 649 <xsl:value-of 649 <xsl:value-of 650 650 select="key('targetptr-key', $olink.key)/@lang" /> 651 651 </xsl:for-each> … … 671 671 contains($xrefstyle, 'nopage')) and 672 672 not(contains($xrefstyle, 'title')) and 673 not(contains($xrefstyle, 'label'))"> 673 not(contains($xrefstyle, 'label'))"> 674 674 <xsl:copy-of select="$xref.text"/> 675 675 </xsl:when> … … 739 739 <xsl:variable name="xref-number-and-title-context"> 740 740 <xsl:call-template name="gentext.template"> 741 <xsl:with-param name="context" 741 <xsl:with-param name="context" 742 742 select="'xref-number-and-title'"/> 743 743 <xsl:with-param name="name" select="$target.elem"/> … … 748 748 <xsl:variable name="styled-xref-number-and-title-context"> 749 749 <xsl:call-template name="gentext.template"> 750 <xsl:with-param name="context" 750 <xsl:with-param name="context" 751 751 select="'xref-number-and-title'"/> 752 752 <xsl:with-param name="name" select="$target.elem"/> … … 757 757 758 758 <xsl:choose> 759 <xsl:when test="$xref-number-and-title-context != 759 <xsl:when test="$xref-number-and-title-context != 760 760 $styled-xref-number-and-title-context and 761 761 $xref.number != '' and 762 762 $xref.with.number.and.title != 0"> 763 <xsl:value-of 763 <xsl:value-of 764 764 select="$styled-xref-number-and-title-context"/> 765 765 </xsl:when> 766 <xsl:when test="$xref-number-context != 766 <xsl:when test="$xref-number-context != 767 767 $styled-xref-number-context and 768 768 $xref.number != ''"> … … 775 775 $xref.number != '' and 776 776 $xref.with.number.and.title != 0"> 777 <xsl:value-of 777 <xsl:value-of 778 778 select="$xref-number-and-title-context"/> 779 779 <xsl:if test="$olink.debug"> … … 859 859 <xsl:with-param name="label"> 860 860 <xsl:for-each select="$target.database" > 861 <xsl:value-of 861 <xsl:value-of 862 862 select="key('targetptr-key', $olink.key)/@number" /> 863 863 </xsl:for-each> … … 865 865 <xsl:with-param name="pagenumber"> 866 866 <xsl:for-each select="$target.database" > 867 <xsl:value-of 867 <xsl:value-of 868 868 select="key('targetptr-key', $olink.key)/@page" /> 869 869 </xsl:for-each> … … 871 871 <xsl:with-param name="docname"> 872 872 <xsl:for-each select="$target.database" > 873 <xsl:value-of 873 <xsl:value-of 874 874 select="key('targetdoc-key', $targetdoc)/div[1]/ttl" /> 875 875 </xsl:for-each> … … 897 897 <xsl:with-param name="label"> 898 898 <xsl:for-each select="$target.database" > 899 <xsl:value-of 899 <xsl:value-of 900 900 select="key('targetptr-key', $olink.key)/@number" /> 901 901 </xsl:for-each> … … 948 948 <xsl:param name="targetdoc" select="''"/> 949 949 950 <!-- 950 <!-- 951 951 <xsl:message>dirnode is <xsl:value-of select="$dirnode/@name"/></xsl:message> 952 952 <xsl:message>targetdoc is <xsl:value-of select="$targetdoc"/></xsl:message> … … 995 995 <xsl:param name="xrefstyle"> 996 996 <xsl:choose> 997 <xsl:when test="@role and not(@xrefstyle) 997 <xsl:when test="@role and not(@xrefstyle) 998 998 and $use.role.as.xrefstyle != 0"> 999 999 <xsl:value-of select="@role"/> … … 1018 1018 </xsl:when> 1019 1019 <xsl:when test="not(starts-with(normalize-space($xrefstyle), 1020 'select:') 1020 'select:') 1021 1021 and (contains($xrefstyle, 'page') 1022 1022 or contains($xrefstyle, 'Page'))) 1023 and $current.docid != '' 1023 and $current.docid != '' 1024 1024 and $current.docid != $targetdoc 1025 1025 and $insert.olink.page.number = 'yes' "> … … 1027 1027 <xsl:variable name="page-number"> 1028 1028 <xsl:for-each select="$target.database" > 1029 <xsl:value-of 1029 <xsl:value-of 1030 1030 select="key('targetptr-key', $olink.key)/@page" /> 1031 1031 </xsl:for-each> … … 1055 1055 <xsl:param name="xrefstyle"> 1056 1056 <xsl:choose> 1057 <xsl:when test="@role and not(@xrefstyle) 1057 <xsl:when test="@role and not(@xrefstyle) 1058 1058 and $use.role.as.xrefstyle != 0"> 1059 1059 <xsl:value-of select="@role"/> … … 1067 1067 <xsl:variable name="page"> 1068 1068 <xsl:for-each select="$target.database" > 1069 <xsl:value-of 1069 <xsl:value-of 1070 1070 select="key('targetptr-key', $olink.key)/@page" /> 1071 1071 </xsl:for-each> … … 1077 1077 1078 1078 <xsl:variable name="targetptr"> 1079 <xsl:value-of 1079 <xsl:value-of 1080 1080 select="substring-before(substring-after($olink.key, '/'), '/')"/> 1081 1081 </xsl:variable> … … 1084 1084 <xsl:variable name="rootptr"> 1085 1085 <xsl:for-each select="$target.database" > 1086 <xsl:value-of 1086 <xsl:value-of 1087 1087 select="key('targetdoc-key', $targetdoc)/div[1]/@targetptr" /> 1088 1088 </xsl:for-each> … … 1091 1091 <xsl:variable name="docname"> 1092 1092 <xsl:for-each select="$target.database" > 1093 <xsl:value-of 1093 <xsl:value-of 1094 1094 select="key('targetdoc-key', $targetdoc)/div[1]/ttl" /> 1095 1095 </xsl:for-each> 1096 1096 </xsl:variable> 1097 1097 1098 <xsl:if test="not(starts-with(normalize-space($xrefstyle), 'select:') 1098 <xsl:if test="not(starts-with(normalize-space($xrefstyle), 'select:') 1099 1099 and (contains($xrefstyle, 'docname'))) 1100 1100 and ($olink.doctitle = 'yes' or $olink.doctitle = '1') 1101 and $current.docid != '' 1101 and $current.docid != '' 1102 1102 and $rootptr != $targetptr 1103 1103 and $current.docid != $targetdoc … … 1124 1124 <xsl:param name="xrefstyle"> 1125 1125 <xsl:choose> 1126 <xsl:when test="@role and not(@xrefstyle) 1126 <xsl:when test="@role and not(@xrefstyle) 1127 1127 and $use.role.as.xrefstyle != 0"> 1128 1128 <xsl:value-of select="@role"/> … … 1137 1137 and (contains($xrefstyle, 'page') 1138 1138 or contains($xrefstyle, 'Page'))) 1139 and ( $insert.xref.page.number = 'yes' 1139 and ( $insert.xref.page.number = 'yes' 1140 1140 or $insert.xref.page.number = '1') 1141 1141 or local-name($target) = 'para'">
Note:
See TracChangeset
for help on using the changeset viewer.