In XSD 1.1 you can override anything, using xs:override.
On 30/03/2012 17:13, Andrew Welch wrote:
> Is it possible to override a processContents="skip" to be lax, without
> modifying the xsd?
> Failing that, does anyone know how to set Xerces to validate in lax
> mode from Java?
I'm not sure whether I understand your question very correctly. But
here's my opinion from what I've understood.
> Is it possible to override a processContents="skip" to be lax, without modifying the xsd?
Does this mean, you're looking for a feature like XSD 1.1 xs:override?
xs:override will be able to override (it's an unconditional
replacement of an overridden XSD component by the overriding XSD
component, while constructing the resultant XSD component model for
validation. this is little unlike the XSD 1.0 xs:redefine construct --
but roughly same in principle, which requires a derivation
relationship between the overriding and overridden XSD component) like
an XSD 1.1 element declaration or a type definition (and other XSD
components like "model groups" and so on), included from an overridden
Btw, does using XSD 1.1 xs:override violates your requirement of not
been able to modify the xsd?
> Failing that, does anyone know how to set Xerces to validate in lax mode from Java?
I don't think that any standard API (like using JAXP via Xerces),
offers any control over the behavior of validation primitives (i.e XSD
components and their properties) that are available within an XSD
schema (and I think, that should be the responsibility of the XSD
schema layer). But I guess, an application can be designed to offer
such a behavior (I personally though, would like to use standard XSD
and built-in capabilities of APIs like JAXP).