]> granicus.if.org Git - docbook-dsssl/commitdiff
Finish support for @xml:id everywhere @id is used.
authorBob Stayton <bobs@sagehill.net>
Sun, 12 Nov 2006 08:24:40 +0000 (08:24 +0000)
committerBob Stayton <bobs@sagehill.net>
Sun, 12 Nov 2006 08:24:40 +0000 (08:24 +0000)
xsl/common/gentext.xsl
xsl/common/titles.xsl

index 975c427ca3356aa1a45365f3bd25ec0b46299349..b134fe6e1aa810b5648a48afaf2ea498896f9bd0 100644 (file)
     <xsl:message>
       <xsl:text>object.xref.markup: empty xref template</xsl:text>
       <xsl:text> for linkend="</xsl:text>
-      <xsl:value-of select="@id"/>
+      <xsl:value-of select="@id|@xml:id"/>
       <xsl:text>" and @xrefstyle="</xsl:text>
       <xsl:value-of select="$xrefstyle"/>
       <xsl:text>"</xsl:text>
       <xsl:message>
         <xsl:text>Xref is only supported to listitems in an</xsl:text>
         <xsl:text> orderedlist: </xsl:text>
-        <xsl:value-of select="@id"/>
+        <xsl:value-of select="@id|@xml:id"/>
       </xsl:message>
       <xsl:text>???</xsl:text>
     </xsl:when>
index 7805dbcf0fc7b46abaf8a46606a3a5e9d9f3e650..3ec4bc376c3479bc9641f606eda97eb9af4809de 100644 (file)
@@ -48,11 +48,18 @@ title of the element. This does not include the label.
         <xsl:message>
           <xsl:text>Request for title of element with no title: </xsl:text>
           <xsl:value-of select="local-name(.)"/>
-          <xsl:if test="@id">
-            <xsl:text> (id="</xsl:text>
-            <xsl:value-of select="@id"/>
-            <xsl:text>")</xsl:text>
-          </xsl:if>
+          <xsl:choose>
+            <xsl:when test="@id">
+              <xsl:text> (id="</xsl:text>
+              <xsl:value-of select="@id"/>
+              <xsl:text>")</xsl:text>
+            </xsl:when>
+            <xsl:when test="@xml:id">
+              <xsl:text> (xml:id="</xsl:text>
+              <xsl:value-of select="@xml:id"/>
+              <xsl:text>")</xsl:text>
+            </xsl:when>
+          </xsl:choose>
         </xsl:message>
       </xsl:if>
       <xsl:text>???TITLE???</xsl:text>
@@ -230,7 +237,7 @@ title of the element. This does not include the label.
               mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:variable name="title" select="(info/title
-                                     |sectioninfo/title
+                                      |sectioninfo/title
                                       |sect1info/title
                                       |sect2info/title
                                       |sect3info/title
@@ -450,7 +457,7 @@ title of the element. This does not include the label.
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:variable name="title" select="(info/title|
                                       blockinfo/title|
-                                     title)[1]"/>
+                                      title)[1]"/>
   <xsl:choose>
     <xsl:when test="$title">
       <xsl:apply-templates select="$title" mode="title.markup">
@@ -562,16 +569,16 @@ title of the element. This does not include the label.
   <xsl:param name="verbose" select="1"/>
 
   <xsl:variable name="titleabbrev" select="(info/titleabbrev
-                                           |sectioninfo/titleabbrev
-                                           |sect1info/titleabbrev
-                                           |sect2info/titleabbrev
-                                           |sect3info/titleabbrev
-                                           |sect4info/titleabbrev
-                                           |sect5info/titleabbrev
-                                           |refsect1info/titleabbrev
-                                           |refsect2info/titleabbrev
-                                           |refsect3info/titleabbrev
-                                           |titleabbrev)[1]"/>
+                                            |sectioninfo/titleabbrev
+                                            |sect1info/titleabbrev
+                                            |sect2info/titleabbrev
+                                            |sect3info/titleabbrev
+                                            |sect4info/titleabbrev
+                                            |sect5info/titleabbrev
+                                            |refsect1info/titleabbrev
+                                            |refsect2info/titleabbrev
+                                            |refsect3info/titleabbrev
+                                            |titleabbrev)[1]"/>
 
   <xsl:choose>
     <xsl:when test="$titleabbrev">
@@ -668,23 +675,23 @@ title of the element. This does not include the label.
       <xsl:variable name="etargets" select="key('id',@endterm)"/>
       <xsl:variable name="etarget" select="$etargets[1]"/>
       <xsl:choose>
-       <xsl:when test="count($etarget) = 0">
-         <xsl:message>
+        <xsl:when test="count($etarget) = 0">
+          <xsl:message>
             <xsl:value-of select="count($etargets)"/>
             <xsl:text>Endterm points to nonexistent ID: </xsl:text>
             <xsl:value-of select="@endterm"/>
-         </xsl:message>
-         <xsl:text>???</xsl:text>
-       </xsl:when>
-       <xsl:otherwise>
-         <xsl:apply-templates select="$etarget" mode="endterm"/>
-       </xsl:otherwise>
+          </xsl:message>
+          <xsl:text>???</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="$etarget" mode="endterm"/>
+        </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
 
     <xsl:when test="$target/@xreflabel">
       <xsl:call-template name="xref.xreflabel">
-       <xsl:with-param name="target" select="$target"/>
+        <xsl:with-param name="target" select="$target"/>
       </xsl:call-template>
     </xsl:when>
 
@@ -692,17 +699,17 @@ title of the element. This does not include the label.
       <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
 
       <xsl:apply-templates select="$target" mode="xref-to">
-       <xsl:with-param name="referrer" select="."/>
-       <xsl:with-param name="xrefstyle">
-         <xsl:choose>
-           <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0">
-             <xsl:value-of select="@role"/>
-           </xsl:when>
-           <xsl:otherwise>
-             <xsl:value-of select="@xrefstyle"/>
-           </xsl:otherwise>
-         </xsl:choose>
-       </xsl:with-param>
+        <xsl:with-param name="referrer" select="."/>
+        <xsl:with-param name="xrefstyle">
+          <xsl:choose>
+            <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0">
+              <xsl:value-of select="@role"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="@xrefstyle"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:with-param>
       </xsl:apply-templates>
 
       <xsl:apply-templates select="$target" mode="xref-to-suffix"/>