473,387 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Testing XSLT Version Level (V1 or V2)

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:otherwise>
.... use v1 features
</xsl:otherwise>
</xsl:choose>
Sep 13 '05 #1
2 1109


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


Yes, see
<http://www.w3.org/TR/xslt#function-system-property>
you want
system-property('xsl:version')

--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 13 '05 #2
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?
Sep 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ruthless | last post by:
hello. All XML and XSLT are processed by preprocessor as a trees. How can i simply display my XML as some kind of tree. given xml: <struct> <node level="1" no="1">
2
by: poofpoof | last post by:
Dear Experts, I have some problems with XSLT recursivity... here what I want to do XML part : ---------- <struct>
1
by: CES | last post by:
All, Is their a way of testing if their is an XML parser installed and what the version number is with in JavaScript??? Thanks in advance. CES
3
by: Jason S | last post by:
Hello Group, I am just about tearing my hair out with this one and thought someone may have some insight. I have a transform that wasn't working so I grabbed the nearest debugger (xselerator)...
7
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID...
3
by: thomas.porschberg | last post by:
Hi, I want to read records from a database and export it in an arbitrary format. My idea was to feed a class with a String array fetched from the database and let this class fire SAX events as...
6
by: John Bailo | last post by:
Given this XML: <?xml version="1.0" encoding="UTF-8"?> <pallet> <position row="0" bay="0" level="A"> <client id="ABC"></client> </position> <position row="1" bay="1" level="B"> <client...
4
by: saritha2008 | last post by:
Hi, Iam working on converting one of xml file to other form of xml using XSLT. As part of this, I need to count the no. of "component" nodes in the xml file given below. If there is only one...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.