I wanted to have two input documents, one is RNG and it defines the structure of a document. The other one is an instance document. I want to determine a path from the RNG (relax NG) and see if there's an instance value for it in the instance document.
I make use of several non-obvious things in this (IMHO!) although maybe it could be improved further. First, I used a for-each select=document('inst.xml') because you're not allowed to do ... well, I had the document in a variable actually and you can't do $variable/$var2 ... grr! Also, you'll note that instPathStr gets created as a string and then I use dyn:evaluate to turn it back into a node set inside the document context! That's because if I made a node-set in the variable it would implicitly be in the source document (the RNG) instead of in the inst.xml (right?!)
I'd love to know if there's any better ways to do this ... but it works :-D
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
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