ソースを参照

Updated docbook-xsl-snapshot to r6823

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/new-xsl@8143 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Manuel Canales Esparcia 18 年 前
コミット
1fb7213040

+ 1 - 1
docbook-xsl-snapshot/VERSION

@@ -17,7 +17,7 @@
 <fm:project>
   <fm:Project>DocBook</fm:Project>
   <fm:Branch>XSL Stylesheets</fm:Branch>
-  <fm:Version>snapshot_6804</fm:Version>
+  <fm:Version>snapshot_6823</fm:Version>
 <!--
   <fm:License>MIT/X Consortium License</fm:License>
 -->

+ 3 - 5
docbook-xsl-snapshot/fo/docbook.xsl

@@ -118,16 +118,14 @@
 
 <xsl:template match="/">
   <xsl:choose>
+    <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
+         toss the namespace and continue.  Use the docbook5 namespaced
+	 stylesheets for DocBook5 if you don't want to use this feature.-->
     <!-- include extra test for Xalan quirk -->
     <xsl:when test="(function-available('exsl:node-set') or
                      contains(system-property('xsl:vendor'),
                        'Apache Software Foundation'))
                     and (*/self::ng:* or */self::db:*)">
-      <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
-           toss the namespace and continue. Someday we'll reverse this logic
-           and add the namespace to documents that don't have one.
-           But not before the whole stylesheet has been converted to use
-           namespaces. i.e., don't hold your breath -->
       <xsl:message>Stripping namespace from DocBook 5 document.</xsl:message>
       <xsl:variable name="nons">
         <xsl:apply-templates mode="stripNS"/>

+ 20 - 3
docbook-xsl-snapshot/fo/lists.xsl

@@ -516,8 +516,10 @@
 </xsl:template>
 
 <xsl:template match="varlistentry" mode="vl.as.list">
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
-  <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing">
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
+  <xsl:variable name="item.contents">
     <fo:list-item-label end-indent="label-end()" text-align="start">
       <fo:block>
         <xsl:apply-templates select="term"/>
@@ -528,9 +530,24 @@
         <xsl:apply-templates select="listitem"/>
       </fo:block>
     </fo:list-item-body>
-  </fo:list-item>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="parent::*/@spacing = 'compact'">
+      <fo:list-item id="{$id}"
+          xsl:use-attribute-sets="compact.list.item.spacing">
+        <xsl:copy-of select="$item.contents"/>
+      </fo:list-item>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:list-item id="{$id}" xsl:use-attribute-sets="list.item.spacing">
+        <xsl:copy-of select="$item.contents"/>
+      </fo:list-item>
+    </xsl:otherwise>
+  </xsl:choose>
 </xsl:template>
 
+
 <xsl:template match="variablelist" mode="vl.as.blocks">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>

+ 3 - 0
docbook-xsl-snapshot/fo/profile-docbook.xsl

@@ -114,6 +114,9 @@
 
 <xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Stripping NS from DocBook 5/NG document.</xslo:message><xslo:variable name="stripped-content"><xslo:apply-templates select="/" mode="stripNS"/></xslo:variable><xslo:message>Processing stripped document.</xslo:message><xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/></xslo:when><xslo:otherwise><xslo:apply-templates select="/" mode="profile"/></xslo:otherwise></xslo:choose></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/><xsl:template match="/">
   <xsl:choose>
+    <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
+         toss the namespace and continue.  Use the docbook5 namespaced
+	 stylesheets for DocBook5 if you don't want to use this feature.-->
     <!-- include extra test for Xalan quirk -->
     <xsl:when test="false()"/>
     <!-- Can't process unless namespace removed -->

+ 1 - 1
docbook-xsl-snapshot/fo/table.xsl

@@ -210,7 +210,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
       </fo:block-container>
     </xsl:when>
     <xsl:when test="@pgwide = 1">
-      <fo:block span="all" start-indent="0pt" end-indent="0pt">
+      <fo:block xsl:use-attribute-sets="pgwide.properties">
         <xsl:copy-of select="$table.block"/>
       </fo:block>
     </xsl:when>

+ 3 - 5
docbook-xsl-snapshot/xhtml/chunk-code.xsl

@@ -381,13 +381,11 @@
 
 <xsl:template match="/">
   <xsl:choose>
+    <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
+         toss the namespace and continue.  Use the docbook5 namespaced
+	 stylesheets for DocBook5 if you don't want to use this feature.-->
     <!-- include extra test for Xalan quirk -->
     <xsl:when test="(function-available('exsl:node-set') or                      contains(system-property('xsl:vendor'),                        'Apache Software Foundation'))                     and (*/self::ng:* or */self::db:*)">
-      <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
-           toss the namespace and continue. Someday we'll reverse this logic
-           and add the namespace to documents that don't have one.
-           But not before the whole stylesheet has been converted to use
-           namespaces. i.e., don't hold your breath -->
       <xsl:message>Stripping namespace from DocBook 5 document.</xsl:message>
       <xsl:variable name="nons">
         <xsl:apply-templates mode="stripNS"/>

+ 3 - 5
docbook-xsl-snapshot/xhtml/docbook.xsl

@@ -303,13 +303,11 @@ var popup_</xsl:text>
 
 <xsl:template match="/">
   <xsl:choose>
+    <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
+         toss the namespace and continue.  Use the docbook5 namespaced
+	 stylesheets for DocBook5 if you don't want to use this feature.-->
     <!-- include extra test for Xalan quirk -->
     <xsl:when test="(function-available('exsl:node-set') or                      contains(system-property('xsl:vendor'),                        'Apache Software Foundation'))                     and (*/self::ng:* or */self::db:*)">
-      <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
-           toss the namespace and continue. Someday we'll reverse this logic
-           and add the namespace to documents that don't have one.
-           But not before the whole stylesheet has been converted to use
-           namespaces. i.e., don't hold your breath -->
       <xsl:message>Stripping namespace from DocBook 5 document.</xsl:message>
       <xsl:variable name="nons">
         <xsl:apply-templates mode="stripNS"/>

+ 10 - 3
docbook-xsl-snapshot/xhtml/footnote.xsl

@@ -49,12 +49,19 @@
 <xsl:template match="footnoteref">
   <xsl:variable name="targets" select="key('id',@linkend)"/>
   <xsl:variable name="footnote" select="$targets[1]"/>
-  <xsl:variable name="href">
-    <xsl:text>#ftn.</xsl:text>
-    <xsl:call-template name="object.id">
+
+  <xsl:variable name="target.href">
+    <xsl:call-template name="href.target">
       <xsl:with-param name="object" select="$footnote"/>
     </xsl:call-template>
   </xsl:variable>
+
+  <xsl:variable name="href">
+    <xsl:value-of select="substring-before($target.href, '#')"/>
+    <xsl:text>#ftn.</xsl:text>
+    <xsl:value-of select="substring-after($target.href, '#')"/>
+  </xsl:variable>
+
   <sup>
     <xsl:text>[</xsl:text>
     <a href="{$href}">

+ 3 - 0
docbook-xsl-snapshot/xhtml/profile-chunk-code.xsl

@@ -381,6 +381,9 @@
 
 <xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Stripping NS from DocBook 5/NG document.</xslo:message><xslo:variable name="stripped-content"><xslo:apply-templates select="/" mode="stripNS"/></xslo:variable><xslo:message>Processing stripped document.</xslo:message><xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/></xslo:when><xslo:otherwise><xslo:apply-templates select="/" mode="profile"/></xslo:otherwise></xslo:choose></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/><xsl:template match="/">
   <xsl:choose>
+    <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
+         toss the namespace and continue.  Use the docbook5 namespaced
+	 stylesheets for DocBook5 if you don't want to use this feature.-->
     <!-- include extra test for Xalan quirk -->
     <xsl:when test="false()"/>
     <!-- Can't process unless namespace removed -->

+ 3 - 0
docbook-xsl-snapshot/xhtml/profile-docbook.xsl

@@ -303,6 +303,9 @@ var popup_</xsl:text>
 
 <xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Stripping NS from DocBook 5/NG document.</xslo:message><xslo:variable name="stripped-content"><xslo:apply-templates select="/" mode="stripNS"/></xslo:variable><xslo:message>Processing stripped document.</xslo:message><xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/></xslo:when><xslo:otherwise><xslo:apply-templates select="/" mode="profile"/></xslo:otherwise></xslo:choose></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/><xsl:template match="/">
   <xsl:choose>
+    <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
+         toss the namespace and continue.  Use the docbook5 namespaced
+	 stylesheets for DocBook5 if you don't want to use this feature.-->
     <!-- include extra test for Xalan quirk -->
     <xsl:when test="false()"/>
     <!-- Can't process unless namespace removed -->