Subject: Re: [xsl] Handling Tree Fragments From: andrew welch <andrew.j.welch@xxxxxxxxx> Date: Mon, 26 Sep 2005 18:50:09 +0100 |
On 9/26/05, Gustave Stresen-Reuter <tedmasterweb@xxxxxxx> wrote: > Thanks for the reply. I'm sorry, but I'm really a dunce... I had the > exslt extension working for some files but I've since lost them. Can > you give me an example (including how to set the namespace and such)? I wouldn't be too hard on yourself as it's a bit rubbish really, the whole RTF -> nodeset thing. Even when you know you need to convert your "result tree fragment" to a "nodeset" you're not sure why... Anyway, to use the exslt node-set() extension function define the exslt 'common' namespace: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl"> Then when you want to use a variable as a node set just use the function. I used to define a variable as 'name-RTF' and another as 'name' which has had the conversion done: <xsl:variable name="var-RTF"> <node>blah</node> </xsl:variable> <xsl:variable name="var" select="exsl:node-set($var-RTF)"/> This way you can use the variable $var in your code without the conversion getting in the way.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Handling Tree Fragments, Gustave Stresen-Reut | Thread | [xsl] Need help using variable in s, Frank Stoner |
Re: [xsl] Handling Tree Fragments, Gustave Stresen-Reut | Date | [xsl] How to select child elements , Gustave Stresen-Reut |
Month |