Overriding processContents="skip" to be lax

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Overriding processContents="skip" to be lax

Andrew Welch
Hi,

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?


thanks

--
Andrew Welch
http://andrewjwelch.com

Reply | Threaded
Open this post in threaded view
|

Re: Overriding processContents="skip" to be lax

Michael Kay
In XSD 1.1 you can override anything, using xs:override.

Michael Kay
Saxonica

On 30/03/2012 17:13, Andrew Welch wrote:

> Hi,
>
> 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?
>
>
> thanks
>

Reply | Threaded
Open this post in threaded view
|

Re: Overriding processContents="skip" to be lax

Mukul Gandhi
Hi Andrew,
   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
XSD schema.

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).




--
Regards,
Mukul Gandhi

Reply | Threaded
Open this post in threaded view
|

Re: Overriding processContents="skip" to be lax

Andrew Welch
In reply to this post by Michael Kay
> On 30/03/2012 17:13, Andrew Welch wrote:
>> Is it possible to override a processContents="skip" to be lax, without
>> modifying the xsd?

On 30 March 2012 17:32, Michael Kay <[hidden email]> wrote:
> In XSD 1.1 you can override anything, using xs:override.

xs:override was ideal, thanks.



--
Andrew Welch
http://andrewjwelch.com