Bug #3105
closedsystem-property('xsl:is-schema-aware') called within use-when always returns false
100%
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