[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: dynamically applying templates
Hi again Bruce,
At 02:45 PM 9/14/2004, you wrote: On Sep 14, 2004, at 2:13 PM, Wendell Piez wrote: Oops! I meant: <xsl:apply-templates> <xsl:with-param name="source" select="$source"/> </xsl:apply-template> ...which is where the tunneling could help you. (Remember the $source parameter is bound to the "original" context node, where your source data is, while you traverse this other tree.) I confess even I find all this rather bewildering, however (hence easy typo/glitches like the above), so I can only imagine how you're feeling. This way, not only the content, but also the structure of your cs:reftype can drive processing, without fancy tests. Good: so I'm not *completely* off base. I think I find it hard to wrap my head around the context stuff; it's where I consistently get confused. Program your brain to recognize that in a template (which could be inside a for-each iteration), the context node is always the node that was matched (or in a for-each, selected), i.e. the "current node". (Within a predicate in an XPath expression the context node has changed: that's why we distinguish between context node and current node.) I'm going to leave the deeper look-see for later (being rather snowed myself), if you don't mind, and hope that the correction above will confirm that you're on the right track.... 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
|