Altova XMLSpy 2025 Enterprise Edition

The XSLT 3.0 Engine of XMLSpy conforms to the World Wide Web Consortium's (W3C's) XSLT 3.0 Recommendation of 8 June 2017 and XPath 3.1 Recommendation of 21 March 2017.

 

The XSLT 3.0 engine has the same implementation-specific characteristics as the XSLT 2.0 engine. Additionally, it includes support for a number of new XSLT 3.0 features: XPath/XQuery 3.1 functions and operators, and the XPath 3.1 specification.

 

Note:The optional streaming feature is not supported currently. The entire document will be loaded into memory regardless of the value of the streamable attribute. If enough memory is available, then: (i) the entire document will be processed—without streaming, (ii) guaranteed-streamable constructs will be processed correctly, as if the execution used streaming, and (iii) streaming errors will not be detected. In 64-bit apps, non-streaming execution should not be a problem. If memory does turn out to be an issue, a solution would be to add more memory to the system.

 

Namespaces

Your XSLT 3.0 stylesheet should declare the following namespaces in order for you to be able to use all the type constructors and functions available in XSLT 3.0. The prefixes given below are conventionally used; you could use alternative prefixes if you wish.

 

Namespace Name

Prefix

Namespace URI

XML Schema types

xs:

http://www.w3.org/2001/XMLSchema

XPath/XQuery 3.1 functions

fn:

http://www.w3.org/2005/xpath-functions

Math functions

math:

http://www.w3.org/2005/xpath-functions/math

Map functions

map:

http://www.w3.org/2005/xpath-functions/map

Array functions

array:

http://www.w3.org/2005/xpath-functions/array

XQuery, XSLT, and XPath Error Codes

err:

http://www.w3.org/2005/xpath-functions/xqt-errors

Serialization functions

output

http://www.w3.org/2010/xslt-xquery-serialization

 

Typically, these namespaces will be declared on the xsl:stylesheet or xsl:transform element, as shown in the following listing:

 

<xsl:stylesheet version="3.0"

  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

  xmlns:xs="http://www.w3.org/2001/XMLSchema"

  xmlns:fn="http://www.w3.org/2005/xpath-functions"

  ...

</xsl:stylesheet>

 

 

The following points should be noted:

 

The XSLT 3.0 engine uses the XPath and XQuery Functions and Operators 3.1 namespace (listed in the table above) as its default functions namespace. So you can use the functions of this namespace in your stylesheet without any prefix. If you declare the Functions namespace in your stylesheet with a prefix, then you can additionally use the prefix assigned in the declaration.

When using type constructors and types from the XML Schema namespace, the prefix used in the namespace declaration must be used when calling the type constructor (for example, xs:date).

Some XPath/XQuery functions have the same name as XML Schema datatypes. For example, for the XPath functions fn:string and fn:boolean there exist XML Schema datatypes with the same local names: xs:string and xs:boolean. So if you were to use the XPath expression string('Hello'), the expression evaluates as fn:string('Hello')—not as xs:string('Hello').

 

© 2018-2024 Altova GmbH