Testing XSLT Version Level (V1 or V2)

D

David Blickstein

Is there a way to test what Version of XSLT the transformer in use supports?

I have a key lookup that I think would run way faster using the V2 forms of
the key() function, but I want my stylesheet to run correctly under V1.

<xsl:choose>
<xsl:when test="This is v2">
.... use v2 features
</xsl:when>
<xsl:eek:therwise>
.... use v1 features
</xsl:eek:therwise>
</xsl:choose>
 
D

David Blickstein

Thanks.

I just realized that I'm subject to another limitation that isn't solved
until V2.

I want to compute a result set and assign it to a variable in different ways
based on whether its XSLT V1 or XSLT V2.

I don't think there's a way to do that in V1.

That is (in quasi-XSLT):

<xsl:variable name='nodes' select='system-property(xxx) ? key(x,y) :
key(x,y,z)'/>

No way to do this right?

But that raises another question for me: assuming key(x,y) and key(x,y,z)
return the
same result set (that is, y is unique in key x throughout the entire
document), is one of these any more efficient than the other?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top