Subject: Re: XSLT and XML in the same document
From: Julian Reschke <julian.reschke@xxxxxx>
Date: Tue, 29 May 2007 10:40:32 +0200
|
Andrew Welch wrote:
On 5/28/07, Julian Reschke <julian.reschke@xxxxxx> wrote:
David Carlisle wrote:
>> functionality via msxsl:node-set()[2]. Kind of a pain to work
between the
>> two of them inside of the same transformation file, but a simple check
>
> you can probably just use msxsl:script to define exslt:node set can't
> you,and then just use the exslt version in the actual code.
> I don't think I've tried that though (but I may have done, hard to
> remember:-)
I just tried, and the first hurdle is that I can't define a function
called "node-set" in JScript (it's not a legal identifier). But
otherwise a cool idea :-)
Microsoft: please give us exslt:node-set in IE. Please.
There's msxsl:node-set().... used in combination with
function-available() and exslt:node-set() that should be sufficient
for what you need (if a bit of a pain)?
Sufficient yes, but still a pain. The problem is that you can't do
something like:
<xsl:variable name="foo">
<xsl:choose>
<xsl:when test="function-available(...)">
...
</xsl:choose>
</xsl:variable>
if you need $foo to be a node-set. All this pain and extra case could go
away if Microsoft simply made "exslt:node-set" a synonym for
"msxsl:node-set".
Best regards, Julian
|