Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#992 Non-primitive built-in types in XSLT

v9.2
closed
Michael Kay
5
2012-10-08
2009-09-29
Michael Kay
No

In the XSLT 2.0 specification, two levels of conformance are defined: a "basic XSLT processor" allows all the XSD primitive types minus xs:NOTATION plus xs:integer; a "schema-aware XSLT processor" additionally allows non-primitive derived types such as xs:int and xs:NCName.

In Saxon 9.2 as issued, types such as xs:int are permitted only in Saxon-EE, and only then if the stylesheet has been declared to be schema-aware, which can be done either by including an xsl:import-schema declaration, or by setting the -sa option on the command line, or the equivalent via the API.

Saxon-B 9.1 had an option saxon:allow-all-built-in-types which could be specified on the xsl:stylesheet element to enable all the built-in types (including derived types such as xs:int) to be used. This option was dropped in 9.2.

It was intended that all facilities available in Saxon-B 9.1 should be available in Saxon-PE 9.2 even if they were no longer available in the open source Saxon-HE. For this facility, this is not the case.

A patch is being raised to module net.sf.saxon.style.ExpressionContext, method isAllowedBuiltInType() to enable the use of all built-in types by Saxon-PE and Saxon-EE, whether or not the stylesheet is schema-aware. (Note that the code to support all these types is already present in the open source product, as it is needed to support XQuery. The restriction for XSLT is an artificial one designed to ensure conformance with the rules in the XSLT 2.0 specification.)

Discussion

  • Michael Kay
    Michael Kay
    2009-10-22

    Fixed in 9.2.0.3