goba            Sat Feb  9 13:26:49 2002 EDT

  Modified files:              
    /phpdoc/xsl htmlhelp.xsl.in 
  Log:
  Adding customizations for <ulink>
  
  
Index: phpdoc/xsl/htmlhelp.xsl.in
diff -u phpdoc/xsl/htmlhelp.xsl.in:1.7 phpdoc/xsl/htmlhelp.xsl.in:1.8
--- phpdoc/xsl/htmlhelp.xsl.in:1.7      Sat Feb  9 11:56:42 2002
+++ phpdoc/xsl/htmlhelp.xsl.in  Sat Feb  9 13:26:49 2002
@@ -3,7 +3,7 @@
 
   HTML Help specific stylesheet
 
-  $Id: htmlhelp.xsl.in,v 1.7 2002/02/09 16:56:42 goba Exp $
+  $Id: htmlhelp.xsl.in,v 1.8 2002/02/09 18:26:49 goba Exp $
 
 -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
@@ -18,6 +18,8 @@
 <xsl:param name="default.encoding" select="'@HTMLHELP_ENCODING@'"/>
 <xsl:param name="saxon.character.representation" select="'native'"/>
 
+<xsl:param name="ulink.target" select="'_top'"/>
+
 <!-- ======================================================================
      Custom XSL code for PHP CHM Nanual 
  -->
@@ -130,6 +132,33 @@
       <xsl:text> : </xsl:text>
     </xsl:otherwise>
   </xsl:choose>
+</xsl:template>
+
+<!-- This is the same as in DocBook XSL, except that we
+     print out a &raquo; HTML entity before the link -->
+<xsl:template match="ulink" name="ulink">
+  <a>
+    <xsl:text disable-output-escaping="yes">&amp;raquo; </xsl:text>
+    <xsl:if test="@id">
+      <xsl:attribute name="name">
+        <xsl:value-of select="@id"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
+    <xsl:if test="$ulink.target != ''">
+      <xsl:attribute name="target">
+        <xsl:value-of select="$ulink.target"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:choose>
+      <xsl:when test="count(child::node())=0">
+       <xsl:value-of select="@url"/>
+      </xsl:when>
+      <xsl:otherwise>
+       <xsl:apply-templates/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </a>
 </xsl:template>
 
 </xsl:stylesheet>


Reply via email to