[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsltproc/LibXSLT - non-compliance?
David Carlisle schrieb:
In this case, LibXSLT is, indeed, not in compliance.
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").
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|