|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: My Intent: Template to generate RTF
Karl,
At 12:08 PM 10/17/2003, you wrote: If you've been following the thread: "Template to return XML" I wanted to explain my intent just a bit more. I did manage to set my variable, not with a template call but a fairly complex *select* Only if you use an extension function such as saxon:eval. Ordinarily a processor is not able to take strings that it creates dynamically and evaluate them as expressions. (Snakes often find their own tails hard to swallow.) Anyways, this is what I ended up with for a variable declaration: <xsl:variable name="xmTmplt" select="$DOC_TEMPLATE_XML//DOC[@id=ancestor-or-self::*[count(current()/ances tor-or-self::*)-1]/@id]"/> I've written much worse. So common ... no ... unheard-of ... not at all. So my intent, was to wrap up the messy expression into a template. The template would be responsible for returning a correct (corresponding) $DOC_TEMPLATE_XML (this is basically a footprint to the data source (uggg... struggling to talk the talk here, sorry). Nope ... see above. This, however, requires an additional line of code, the variable decleration. This could be global... I'm going to play around with this *thinking outloud a bit here* Also look at Mukul's solution. He took you at your word that you needed to return the nodes with a named template, and showed how you could use the node-set() extension function to turn the RTF you get back into a node set you can process. Cheers, Wendell
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
|

Cart








