|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Handling Tree Fragments
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.
|
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








