[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: collecting a fileset with XSLT 2.0
Mark,
This is cool. On 2/6/2012 12:50 PM, Mark Giffin wrote: Thanks Wendell, also good to know. In this project I ran out of time and couldn't take the time to work out how to use collection(), so I handled it elsewise. collection() would have required a ton of refactoring on this project. I realized I mainly needed to exclude a couple files, so I embedded a little lookup table in the stylesheet that holds a couple strings: Or you could simply do <xsl:variable name="excluded-files" as="element(st:file)+"> <st:file name="filename1.xml"/> <st:file name="filename2.xml"/> ... </xsl:variable> and take it from there. (The hoary old XSLT 1.0 trick you used is no longer necessary. :-) Then you may not need the key any more either, as exists($excluded-files[@name=$this-file]) will then tell you what you need to know, probably as fast. (Many things can become much simpler under 2.0.) Cheers, Wendell
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|