#413 xsi: attributes rejected by static type checking

v8.5.1
closed
nobody
5
2012-10-08
2005-10-25
Michael Kay
No

In both XSLT and XQuery, static type checking of an
expression that constructs elements and attributes with
a declared schema type will reject constructs that
create attributes such as xsi:type and
xsi:schemaLocation, complaining that these attributes
are not permitted by the schema. (In fact such
attributes are always allowed and do not need to be
declared in the schema).

Circumvention: create these attributes using dynamic
constructors that create the attribute name at run-time
(dynamic attribute constructors in XQuery, xsl:attribute
in XSLT) to prevent the static checking.

Discussion