# Changes to Schema-Aware XSLT and XQuery Processing

A new option `-vw` is added to the schema-aware versions of the command line interfaces for XSLT and XQuery processing, with an equivalent option `VALIDATION_WARNINGS` in the Java API. This option causes validation errors encountered in processing a final result tree to be treated as warnings, allowing processing to continue. This allows more than one error to be reported in a single run. The result document is serialized as if validation were successful, but with XML comments inserted to show where the validation errors were found. This option does not necessarily recover from all validation errors, for example at present it does not recover from errors in uniqueness or referential constraints. In the case of XSLT it applies only to result trees validated using the `validation` attribute of `xsl:result-document`.

The syntax for `declare validation` in the Query prolog is replaced by `declare construction`, as defined in the July 2004 draft specification. The syntax for the `validate{}` expression has also been updated to the latest draft. This removes the ability to validate any element other than one having a global element declaration in the schema.

DTD-defined attribute types are no longer retained automatically as type annotations in the data model. They will only be retained if the method `setRetainDTDAttributeTypes` is called on the `Configuration` object. This setting is available only in the schema-aware product, which means that with the basic product, nodes will always be annotated as untyped or untypedAtomic. ID attributes marked as such are still recognized for the purposes of the `id()` function, but they will be annotated as untypedAtomic.

Expand | Up Next