This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XSL Problem for expert
- To: xsl-list at mulberrytech dot com
- Subject: Re: XSL Problem for expert
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Wed, 10 May 2000 09:55:51 +0100 (BST)
- References: <20000510074641.4952.qmail@web4104.mail.yahoo.com>
- Reply-To: xsl-list at mulberrytech dot com
> <xsl:template match="div[@type='chapter']>
> <div style="font-size:72pt">
> <xsl:apply-templates/>
> <!-- We don't close the div tag -->
> </xsl:template>
actually you did, the > is the tag close character in XML.
You meant that you didn't include the end tag of the div element.
The distinction between tags and elements (or more particularly element
nodes) is important. In XSL you do not generate tags, you generate nodes
and you can't have half a node, so no you can't do anything equivalent
to the above. There would be no way in XSL to allow the above syntax
even if you wanted that feature, as it is not well formed XML so would
not get past the XML parser.
If you said what you wanted to achieve perhaps someone could give more
useful help. possibly it is something like
<xsl:template match="div[@type='chapter']>
<div style="font-size:72pt">
<xsl:apply-templates select="*[1]"/>
</div>
<xsl:apply-templates select="*[position() > 1]"/>
</xsl:template>
If you know the first child is a pb, which is your situation I would
guess from your example.
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list