Re: XSL Problem for expert

Subject: Re: XSL Problem for expert
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 10 May 2000 09:55:51 +0100 (BST)
> <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() &gt; 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


Current Thread