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

Re: XSLT 2.0: Definition of a structure and its use


xslt definition

> I am sorry, that is what I don't understand. How to do two transforms in succession?

well the simplest is to write the result of the first transform out as a
file and then just process the file. It's best to do it that way while
debugging as you get to see the intermediate stage.

Most API allow you to avoid the overhead of serialising and writing to a
file and parsing it back, and just pass the output tree from one to the
other, but that depends entirely on the api you are using to call xslt.

You can however do it in one stylesheet if it is more convenient, since
you are using 2.0 you don't need x:node-set() just store the modified
tree in a variable then apply templates to that:


<xsl:template match="/">
<xsl:variable name="x">
 <xsl:apply-templates mode="pass1"/>
</xsl:variable>
</xsl:apply-templates mode="pass2" select="$x"/>
</xsl:template>

Then have templates in pass1 mode that just expand references, and
templates in pass2 mode that do whatever you want to do.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.