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

RE: Using a pre-processor for dynamic inputs

Subject: RE: Using a pre-processor for dynamic inputs
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 24 Sep 2004 11:20:07 +0100
1
Firstly, the term "node-set" can be confusing. The parameter value will
generally be a node-set containing a single node; but XSLT 1.0 only has
"node-set" as a data-type, not "node". What you typically want to do is to
iterate through the children of that node, which you can do using path
expressions in the normal way, e.g. xsl:for-each
select="$param/params/param[name="size"]/value".

It's useful when you have multiple trees to have a variable pointing to the
root of each one. Set the global variable <xsl:variable name="root"
select="/"/>, and remember to use $root/xxx where you might otherwise have
used /xxx.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: David Adams [mailto:dpadams@xxxxxxxxx] 
> Sent: 24 September 2004 10:55
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  Using a pre-processor for dynamic inputs
> 
> Once I've properly supplied the XSLT processor with a node-set (by
> passing in a reference or a document that gets parsed, etc.), what is
> the best approach for iterating through the node-set that is a
> parameter. Is this no different than working with the nodes of the
> source XML? I'm really curious how people support dynamically sized
> inputs without pre-processing the stylesheet.
> -- 
> ---------------------------------------------
>  David Adams
>   dpadams@xxxxxxxxx
>  Bermagui 2546 NSW
> ---------------------------------------------
> 
> --+------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
> --+--

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.