Проверял на MSXML6, xsltproc (libxml 20627, libxslt 10119 and libexslt 813)
xsltValueOf: select function-available('fn:exists')
Lookup function {http://www.w3.org/2005/xpath-functions}exists
xsltCopyTextString: copy text false
xsltValueOf: result 'false'
Судя по всему, эти функции для XPath 2.0. Но изменил stylesheet version на 2.0, проверил на MSXML — тоже не работает, а xsltproc отказывается от этой версии.
Что я делаю не так?
Re[2]: Как подключить функции XPath в XSLT?
От:
Аноним
Дата:
25.11.09 17:54
Оценка:
Здравствуйте, byleas, Вы писали:
B>Судя по всему, эти функции для XPath 2.0. Но изменил stylesheet version на 2.0, проверил на MSXML — тоже не работает, а xsltproc отказывается от этой версии.
B>Что я делаю не так?
14.2 Extension Functions
If a FunctionName in a FunctionCall expression is not an NCName (i.e. if it contains a colon), then it is treated as a call to an extension function. The FunctionName is expanded to a name using the namespace declarations from the evaluation context.
If the XSLT processor does not have an implementation of an extension function of a particular name available, then the function-available function must return false for that name. If such an extension function occurs in an expression and the extension function is actually called, the XSLT processor must signal an error. An XSLT processor must not signal an error merely because an expression contains an extension function for which no implementation is available.
If the XSLT processor has an implementation of an extension function of a particular name available, then the function-available function must return true for that name. If such an extension is called, then the XSLT processor must call the implementation passing it the function call arguments; the result returned by the implementation is returned as the result of the function call.
основное здесь
If the XSLT processor does not have an implementation of an extension function ...
Current releases
Saxon-EE 9.2
The commercial Enterprise Edition from Saxonica Limited, supporting XSLT 2.0, XPath 2.0, XQuery 1.0, and XML Schema 1.0, together with early support of draft specifications XQuery Update 1.0, XQuery 1.1, XSD 1.1, and XSLT 2.1.
Note that although the download files are linked below, they cannot be used without first obtaining license from the Saxonica site
Information, Evaluation, and Purchasing
Download for Java (2.9Mb)
Download for .NET (7.3Mb)
Documentation and samples (13.1 Mbytes)
Source code for Saxon-HE 9.2.0.3 (3.0 Mbytes)
Здравствуйте, xzxz, Вы писали:
B>>Хорошо, а где найти XSLT процессор с поддержкой функций из XPath 2.0 (вышеупомянутых xpath-functions)?
X>например XSLT процессор в составе .NET 3.5 SP.1
Здравствуйте, xzxz, Вы писали:
X>тогда похоже вот http://saxon.sourceforge.net/
О! Благодарю, оно.
X>вот еще — совсем позабыл — "MVP XML Project" — мы же его сами же в проектах и используем.
Эта ссылка на XInclude, а на главной странице редирект на дорвей какой-то.