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

Re: Building RTF variable

Subject: Re: Building RTF variable
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Fri, 25 Oct 2002 10:41:48 -0700
bullet point rtf
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 25 October 2002 00:47, Ragulf Pickaxe wrote:
> >"xxx:node-set($Test)/node[1]".
>
> But... is it then not possible to build a nodeset directly in the XSL? What
> is the difference between doing thus and the example that I had in the
> orriginal mail?

No, it's not currently possible with standard processors.  The difference is 
that you were creating a Result Tree Fragment (RTF), which is not the same as 
a node-set.

All you can do with an RTF is <xsl:copy-of/> and <xsl:value-of/>.  The idea is 
(was) that you can create an RTF as the value of a variable and re-use it 
throughout your stylesheet.  For example, in HTML you might have some special 
code to output a bullet point with pretty graphics, and you want to re-use 
that code with the exact same <img> tag.

You cannot select children of an RTF.  To do that, you have to convert it to a 
node-set.  Processor designers realized the pain of doing this, so they 
provide xxx:node-set() functions to do the conversion.  Unfortunately, the 
functions are not compatible between processors, so you will have to do some 
tricks if you want to use more than one processor.

> With the example I do not need any conversions between anything.

Well, go complain to the XSLT 1.0 designers :).  XSLT 2.0 doesn't have this 
problem, since so many people like yourself have complained.

I believe that Saxon 7.0 is the only browser that supports XSLT 2.0.  You can 
go try that, get RTF to node-set conversion, and a bunch of other new 
features for free.

- -- 
Peter Davis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9uYJchDAgUT1yirARAjWNAJ4tJosh6Gu8Pjiq96JF1ZhmTQ0EPwCghuKW
ofFSnBSdfKZBb0GgoMqWd4Y=
=ck0v
-----END PGP SIGNATURE-----


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.