Open michaelhkay opened 3 years ago
The content model of xsl:package is given as
<!-- Content: ((xsl:expose | declarations)*) -->
Suggesting that it's a deliberate decision not to classify xsl:expose as a declaration. Presumably the reason is that it can only appear as a child of xsl:package, not of xsl:transform/stylesheet.
It's not actually clear whether classifying an element as a declaration has any normative effect. Section 3.10 contains the text
If the element is in the XSLT namespace and appears as a child of the xsl:stylesheet element, and XSLT 3.0 does not allow the element to appear as a child of the xsl:stylesheet element, then the element and its content must be ignored.
which probably ought to say something about children of xsl:package, but it's not exactly wrong as written.
The xsl:expose element is not classified as a "declaration", either in the element syntax summary, or in the list of declarations appearing in section 3.7 of the spec.
(As a result of this omission, Saxon 10 handles xsl:expose incorrectly when the stylesheet uses forwards compatible mode).