Project

Profile

Help

Bug #3105

closed

system-property('xsl:is-schema-aware') called within use-when always returns false

Added by Michael Kay over 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2017-01-11
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
9.7, trunk
Fixed in Maintenance Release:
Platforms:

Description

Raised here: https://saxonica.plan.io/boards/3/topics/6642?pn=1

It seems that system-property('xsl:is-schema-aware') always returns false when called within a static expression.

This happens because static expressions are evaluated with no schema information in the static context, which means that for practical purposes the static expressions themselves are not schema aware. But the intent of using this call is to discover whether the stylesheet as a whole is schema-aware. In fact, in the language of the spec, it is to discover whether the "processor" is schema-aware.

A problem with this is that Saxon, if the user hasn't said anything explicitly, switches schema-awareness on when it encounters an xsl:import-schema declaration - and (a) it may already have processed static expressions before it encounters this, and (b) worse still, the xsl:import-schema may itself be controlled by a use-when="sysProp(schema-aware)" attribute.

Please register to edit this issue

Also available in: Atom PDF