crossley 2002/06/26 21:17:50
Modified: src/resources/library/xslt docv10todocv11.xsl
Log:
Better handling of title attribute for s* section elements.
Submitted by: J.Pietschmann
Revision Changes Path
1.6 +8 -12 xml-forrest/src/resources/library/xslt/docv10todocv11.xsl
Index: docv10todocv11.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/library/xslt/docv10todocv11.xsl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- docv10todocv11.xsl 20 Jun 2002 06:50:08 -0000 1.5
+++ docv10todocv11.xsl 27 Jun 2002 04:17:50 -0000 1.6
@@ -60,23 +60,22 @@
<!-- fixes sections -->
<xsl:template match="s1 | s2 | s3 | s4">
<section>
- <title><xsl:value-of select="@title" /></title>
- <xsl:for-each select="@*">
- <xsl:copy-of select="."/>
- </xsl:for-each>
- <xsl:apply-templates/>
- </section>
+ <xsl:apply-templates select="@*|node()"/>
+ </section>
+ </xsl:template>
+ <xsl:template match="s1/@title | s2/@title | s3/@title | s4/@title">
+ <title><xsl:value-of select="."/></title>
</xsl:template>
<!-- dunnow what to do with connect - maybe just evaporize it? -->
<xsl:template match="connect">
<xsl:message terminate="no">The connect element isn't supported anymore in the
document-v11.dtd, please fix your document.</xsl:message>
- [[connect: <xsl:value-of select="."/> ]]
+ [[connect: <xsl:apply-templates/> ]]
</xsl:template>
<xsl:template match="link/@idref">
<xsl:message terminate="no">The link element has no idref attribute defined in
the document-v11.dtd, please fix your document.</xsl:message>
- [[link/@idref: <xsl:value-of select="."/> ]]
+ [[link/@idref: <xsl:apply-templates/> ]]
</xsl:template>
<xsl:template match="link/@type | link/@actuate | link/@show |
@@ -86,10 +85,7 @@
<!-- 'simple lists' become unordered lists -->
<xsl:template match="sl">
<ul>
- <xsl:for-each select="@*">
- <xsl:copy-of select="."/>
- </xsl:for-each>
- <xsl:apply-templates/>
+ <xsl:apply-templates select="@*|node()"/>
</ul>
</xsl:template>
|