You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by st...@apache.org on 2002/07/12 09:42:01 UTC
cvs commit: xml-forrest/src/resources/library/xslt flat2document.xsl
stevenn 2002/07/12 00:42:01
Modified: src/resources/library/xslt flat2document.xsl
Log:
chopped pathinfo from dtd filename
Revision Changes Path
1.2 +19 -1 xml-forrest/src/resources/library/xslt/flat2document.xsl
Index: flat2document.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/library/xslt/flat2document.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- flat2document.xsl 11 Jul 2002 08:54:54 -0000 1.1
+++ flat2document.xsl 12 Jul 2002 07:42:01 -0000 1.2
@@ -8,7 +8,11 @@
<document>
<header>
<title>DTD documentation</title>
- <subtitle><xsl:value-of select="@sysid"/></subtitle>
+ <subtitle>
+ <xsl:call-template name="trailingfilename">
+ <xsl:with-param name="string" select="@sysid"/>
+ </xsl:call-template>
+ </subtitle>
</header>
<body>
<section><title>Top-level element(s)</title>
@@ -118,6 +122,20 @@
<br/>
</xsl:if>
</dd>
+</xsl:template>
+
+<xsl:template name="trailingfilename">
+ <xsl:param name="string"/>
+ <xsl:choose>
+ <xsl:when test="contains($string,'/')">
+ <xsl:call-template name="trailingfilename">
+ <xsl:with-param name="string" select="substring-after($string,'/')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$string"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
</xsl:stylesheet>