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

Re: Creating nodes for the source versus the results t

Subject: Re: Creating nodes for the source versus the results tree.
From: "James Fuller" <james.fuller@xxxxxxxxxx>
Date: Mon, 8 Jul 2002 20:51:40 +0100
xalan create node
use EXSLT this will ensure a bit of interoperability

www.exslt.org

cheers, jim fuller

----- Original Message ----- 
From: "Edward L. Knoll" <ed.knoll@xxxxxxxxxxxxxx>
To: "Jeni Tennison" <jeni@xxxxxxxxxxxxxxxx>
Cc: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, July 08, 2002 8:13 PM
Subject: Re:  Creating nodes for the source versus the results tree.


> I'm somewhat adverse to a specific product coupling, since it means the
> stylesheets might not be generically consumable if we want/have to switch
> to a different XSLT processor.   I'm also a bit leary about vendor
> specific extensions with respect to the next generate of XSL.  I was all
> set to take advantage of some XSL 1.1 features of a specific processor
> when I learned that XSL 1.1 had been abandoned and those features were to
> be handled very differently in XSL 2.0.
> 
> With that long-winded preamble, is utilizing this kind of "nodeset()"
> extentsion function type of approach  likely to be
> consistent/compatible/portable moving forward into the next generation of
> XSL?
> 
> Thanks for help,
> Ed
> 
> > Hi Ed,
> >
> > > I know this is something I could do in a two pass process: during
> > > pass1 process of the original/source XML to create the
> > > intermediate/temporary XML elements, during pass2 process both the
> > > original XML and generated XML elements to create the final output.
> > > I'd rather do this in a single pass; is this possible?
> >
> > Only using an extension function. You can store the result of the
> > first pass in a variable, but it's stored as a result tree fragment,
> > which means that you can't go on to process it further without turning
> > it into a node set. You can turn it into a node set with extension
> > functions; most processors have them...
> >
> > > Two other notes/constraints: (1) I'm using the XalanC++ processor,
> >
> > ... and in Xalan-C++ it's called nodeset(), in the namespace
> > http://xml.apache.org/xalan. So do something like:
> >
> > <xsl:stylesheet version="1.0"
> >                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >                 xmlns:xalan="http://xml.apache.org/xalan"
> >                 extension-element-prefixes="xalan">
> >
> > <xsl:template match="/">
> >   <xsl:variable name="pass1-rtf">
> >     <xsl:apply-templates mode="pass1" />
> >   </xsl:variable>
> >   <xsl:apply-templates select="xalan:nodeset($pass1-rtf)"
> >                        mode="pass2" />
> > </xsl:template>
> >
> > ...
> >
> > </xsl:stylesheet>
> >
> > with templates in 'pass1' mode for your first pass and in 'pass2' mode
> > for your second pass.
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 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.