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

Re: xsltproc/LibXSLT - non-compliance?

Subject: Re: xsltproc/LibXSLT - non-compliance?
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Wed, 30 Apr 2008 17:56:00 +0200
Re:  xsltproc/LibXSLT - non-compliance?
David Carlisle schrieb:
In this case, LibXSLT is, indeed, not in compliance.

That is not at all clear to me. The wording of these things is a lot tighter in xpath2 so it's clearer to be definite there, but in xslt 1, then it is not the case that . (evaluating to a node) matches the description "The argument must evaluate to a string that is a QName."

Well, in this case the argument *does* evaluate to a string that is a QName. It consequently matches the quoted description.

I agree a node-set isn't bound to evaluate to a QName-conforming string.
But that doesn't seem to be what the processor is interested in. It all
happens at runtime. There is no compile-time checking going on with
respect to the invocation of element-available(). And we do get a
runtime error, where the argument could have been evaluated to a string
representing a QName.

The xpath1 string functions that take strings also take a node set, in
which case the string value of the first node in document order is
taken, but that is (I think) a feature of the function, rather than a
general calling rule, the rule is given in section 4.2 of the xpath
spec, but the definition of function-available in the xslt spec does
not reference that section explictly or implictly (as it could have
done by using the defined term "string function").

Okay, I think I get it now. Your point is that the automatic conversion business is defined in XPath 1.0, which the part of XSLT 1.0 that is in question here does not reference, and that hence automatic conversion rules cannot legitimately be expected to work for element-available() and function-available(). Is this interpretation of your words correct?

And your statement is corroborated by the fact that, among others, the
definition of key() explicitly states:

    When the second argument to key is of any other type, the
    argument is converted to a string as if by a call to the
    string function [http://www.w3.org/TR/xpath#function-string]
    -- http://www.w3.org/TR/xslt#key

And the definitions of element-available() and function-available()
don't say that much, so you can't rely on automatic conversion to just
happen.

Michael Ludwig

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.