[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Handling Tree Fragments

Subject: Re: Handling Tree Fragments
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Mon, 26 Sep 2005 18:50:09 +0100
andrew reut
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.