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

Re: XSLT and XML in the same document

Subject: Re: XSLT and XML in the same document
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Tue, 29 May 2007 11:11:01 +0100
Re:  XSLT and XML in the same document
On 5/29/07, David Carlisle <davidc@xxxxxxxxx> wrote:

> It's been a while since I bothered with this, but I think the pattern > goes something like: > > <xsl:variable name="foo-rtf"> > > and > > <xsl:variable name="foo"> > <xsl:choose> > <xsl:when test="function-available(...)"> > ....

the problem is that that pattern makes $foo into an rtf again so you are
back where you started (or at least you are a line or two further on,
but you have to keep nesting with consequent doubling in code paths
everywhere you need to call the function.

er, yeah. So it should be:

<xsl:variable name="foo-msxml" select="msxsl:node-set()"/>
<xsl:variable name="foo-exslt" select="exslt:node-set()"/>

<xsl:variable name="is-msxml">
   <xsl:when test="function-available(msxsl:node-set())">true</

and then in the body of the code:

 <xsl:when test="$is-msxml">...

or some other long-winded, verbose approach.  Oh don't forget
whitespace.  Then then different versions of MSXML and whether they're
in side-by-side or replace mode.  Then there's whether the result tree
is serialized or parsed directly... and um loads of other
considerations that I don't know because I gave up long ago and move
to the garden of peace and tranquility that is XSLT 2.0.

> I guess its good that people persist with client side XSLT (as one day
> it might be worthwhile), but I reckon its just a hangover from the
> original intentions of XML.


:) pragmatist more like... (but I agree that client side transforms are some kind of religion)

Current Thread


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.
First Name
Last Name
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.