[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Difficulty with document() and for-each scope
It might be because key() selects only nodes in the document containing the context node, which you've made into the stylesheet itself with your xsl:for-each. So there are no nodes matching /items/item to be selected. That's the conclusion I reached too. I'm guessing that you are stuck using XSLT 1.0, because you don't need to do the document('') shenanigans in XSLT 2.0, so the latter's three-argument version of key() likely won't help. Yes, that's correct - XSLT 1.0 > You could wrap the above-quoted xsl:apply-templates in another xsl:for-each that puts the context node back to the document that you want to process: Aha, that was just what I was looking for - it didn't click that doing a for-each on the root node would only cause one "iteration". At this point I'm only using it in one place, so I can live with the messiness (it's still cleaner than copying and pasting the same block 12 times!) Thanks for your help! Cheers, Adam.
|
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
|