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

RE: creating a node-set at run-time

Subject: RE: creating a node-set at run-time
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 5 Feb 2003 08:57:53 -0000
RE:  creating a node-set at run-time
It's much easier than you think.

item[document(@ref)/*/@specific-attribute = $certain-value]/@ref

will create the required set of @ref attribute nodes, assuming that's
what you really want.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Shea, Michael
> Sent: 05 February 2003 03:46
> To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'
> Subject:  creating a node-set at run-time
> 
> 
> Hi everyone,
> 
> We have this xml as our input document:
> 
> <list>
>     <item ref="item1.xml"/>
>     <item ref="item2.xml"/>
>     <item ref="item3.xml"/>
>     <item ref="item4.xml"/>
> </list>
> 
> We want to go through each of the item elements and using 
> the document function, load each item?.xml file and check 
> a specific attribute in the root node of that loaded document 
> to see if it matches a certain value. If it does match we want 
> to add the value of the ref attribute to a node-set.  We want 
> to have a variable to which this node-set is assigned, so we 
> can do some processing on it at a later time (we want to run 
> a diff on it against another node-set amongst other things).
> 
> Basically this is like storing items into a variable (eg
> var = var + new_item), but as we know, you can't reassign values 
> to a variable.  
> 
> So can this be done using XSLT?  I was trying to come up with a 
> recursive algorithm to do this, but am not sure how.
> 
> Thanks in advance.
> 
> Mike.
> 
>  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.