How do I enable XInclude processing?
Applications using JAXP 1.3 (and above) can enable XInclude processing by setting XInclude awareness on the parser factory. The following demonstrates how to accomplish this with SAX:
You can also enable XInclude processing by turning on the XInclude feature.
How do the validation features interact with XInclude processing?
If the validation feature is turned on then DTD validation will be performed on each source document (to the XInclude processor) against their respective DTDs.
If both the validation feature and the schema validation feature are turned on then schema validation will be performed on the result infoset generated by the XInclude processor. DTD validation will be performed on each source document which contains a DTD. No DTD validation errors will be reported for source documents which have no DTD.
Why are xml:base attributes added, which make Schema validation fail?
According to the specification for XInclude, processors must add an xml:base
attribute to elements included from locations with a different base URI. Without
these attributes, the resulting infoset information would be incorrect. Unfortunately,
these attributes make XInclude processing not transparent to Schema validation.
One solution to this is to modify your schema to allow xml:base
attributes to appear on elements that might be included from different base URIs.
There is a similar problem with xml:lang
attributes that are added as a result
of language fixup. If the addition of xml:base
and/or xml:lang
is undesired by your application, you can disable
base URI fixup and
language fixup so that
these attributes will not be added.
Does the XInclude processor recognize xml:base attributes?
Yes. The XInclude specification requires processors to use the base URI
(as specified in the
Does the XInclude processor perform language fixup?
Yes. The XInclude processor will preserve language information on a top-level included element
by adding an xml:lang
attribute if its include parent has a different [language]
property. Support for language fixup was added to the XInclude implementation in Xerces-J 2.7.0.
Does the XInclude processor perform references property fixup?
Section
Does the XInclude processor support XPointer?
Yes. The XInclude processor supports the
What types of IDs are currently supported for XPointers?
For shorthand pointers and element() XPointers, currently only
Are the values of the content negotiation attributes used in an HTTP request?
Yes, the values of the accept
and accept-language
attributes
from an
Will the XInclude processor process include elements from the 'http://www.w3.org/2003/XInclude' namespace?
No. The namespace for XInclude was changed back to http://www.w3.org/2001/XInclude
in the http://www.w3.org/2003/XInclude
namespace is no longer recognized.