forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iss...@cocoondev.org
Subject [JIRA] Updated: (FOR-308) docbook2document xref support
Date Mon, 04 Oct 2004 22:59:58 GMT
The following issue has been updated:

    Updater: David Crossley (mailto:crossley@apache.org)
       Date: Mon, 4 Oct 2004 5:59 PM
    Comment:
Changing description to be concise.
    Changes:
             description changed from docbook2document was unable to support the docbook xref
element.

This patch adds xref support.

Index: docbook2document.xsl
===================================================================
--- docbook2document.xsl	(revision 53728)
+++ docbook2document.xsl	(working copy)
@@ -707,9 +707,44 @@
                   </xsl:choose>
             </tt>
       </xsl:template>
+    <xsl:template match="xref">
+        <xsl:param name="linkend">
+            <xsl:value-of select="@linkend"/>
+        </xsl:param>
+        <xsl:param name="endterm">
+            <xsl:value-of select="@endterm"/>
+        </xsl:param>
+        <xsl:param name="linkendvalue">
+            <xsl:if test="$linkend">
+                <xsl:value-of select="//*[@id=$linkend]/title"/>
+            </xsl:if>
+        </xsl:param>
+        <xsl:param name="endtermvalue">
+            <xsl:if test="$endterm">
+                <xsl:value-of select="//*[@id=$endterm]"/>
+            </xsl:if>
+        </xsl:param>
+        <xsl:choose>
+            <xsl:when test="//xref[not(@endterm)]">
+                <xsl:element name="a">
+                    <xsl:attribute name="href">
+                        <xsl:value-of select="$linkend"/>
+                    </xsl:attribute>
+                    <xsl:value-of select="$linkendvalue"/>
+                </xsl:element>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:element name="a">
+                    <xsl:attribute name="href">
+                        <xsl:value-of select="$linkend"/>
+                    </xsl:attribute>
+                    <xsl:value-of select="$endtermvalue"/>
+                </xsl:element>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
 
 
-
       <xsl:template match="node()|@*" priority="-1">
             <xsl:copy>
                   <xsl:apply-templates select="node()|@*"/>
 to docbook2document was unable to support the docbook xref element.

The patch "docbook2document.xsl.diff" adds xref support.


    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.cocoondev.org//browse/FOR-308?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.cocoondev.org//browse/FOR-308

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: FOR-308
    Summary: docbook2document xref support
       Type: Improvement

     Status: Unassigned
   Priority: Minor

    Project: Forrest
 Components: 
             Core operations
   Versions:
             HEAD

   Assignee: 
   Reporter: Sean Wheller

    Created: Mon, 4 Oct 2004 5:03 PM
    Updated: Mon, 4 Oct 2004 5:59 PM

Description:
docbook2document was unable to support the docbook xref element.

The patch "docbook2document.xsl.diff" adds xref support.




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message