Hi, Mircea,
You seem to be trying to use XPath 2.0 functions in a XSLT 1.0 stylesheet. That won''t work, you''ll either have to use EXSLT functions or switch to XSLT 2.0. XSLT 2.0 is much easier for many tasks then XSLT 1.0, so that would be my advice.
Here is an XSLT 2.0 version of your example:
Please notice the following changes:
- stylesheet version is now 2.0
- there is no need to declare the fn namespace prefix, the XSLT 2.0 processor will use that as default
- the max function takes a sequence, so in this case you need an extra set of brackets (you won''t need those of you select a nodeset using XPath expression)
You''ll need to use the XSLT 2.0 accessor in NK (see http://docs.netkernel.org/book/view/book:xml:saxon:book/doc:xml:saxon:xslt2 for NK4, for NK3 I couldn''t find a public website anymore but you can try http://localhost:1060/book/developerreference/doc_ura_xslt2 (notice it''s in the xquery module)).
If you''ve to stick to XSLT 1.0 you find information about EXSLT here: http://www.exslt.org/. It depends a bit on the XSLT processor of some of these functions are already by default available. I''m sorry I haven''t been using XSLT 1.0 for a long time, so I don''t know the current status ...
Hope this helps,
Menzo
You seem to be trying to use XPath 2.0 functions in a XSLT 1.0 stylesheet. That won''t work, you''ll either have to use EXSLT functions or switch to XSLT 2.0. XSLT 2.0 is much easier for many tasks then XSLT 1.0, so that would be my advice.
Here is an XSLT 2.0 version of your example:
|
Please notice the following changes:
- stylesheet version is now 2.0
- there is no need to declare the fn namespace prefix, the XSLT 2.0 processor will use that as default
- the max function takes a sequence, so in this case you need an extra set of brackets (you won''t need those of you select a nodeset using XPath expression)
You''ll need to use the XSLT 2.0 accessor in NK (see http://docs.netkernel.org/book/view/book:xml:saxon:book/doc:xml:saxon:xslt2 for NK4, for NK3 I couldn''t find a public website anymore but you can try http://localhost:1060/book/developerreference/doc_ura_xslt2 (notice it''s in the xquery module)).
If you''ve to stick to XSLT 1.0 you find information about EXSLT here: http://www.exslt.org/. It depends a bit on the XSLT processor of some of these functions are already by default available. I''m sorry I haven''t been using XSLT 1.0 for a long time, so I don''t know the current status ...
Hope this helps,
Menzo