[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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)
Re: XSL Problem for expert
> <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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.