[xsd-users] Disable Xerces-C Unique Particle Attribution check

Catalin Roman katalin.roman at gmail.com
Tue Mar 23 04:22:16 EDT 2010


Thank you for the quick reply, even if I don't like the response :). Also,
thanks for the union hint.

Have a nice day,
Catalin

On Mon, Mar 22, 2010 at 5:48 PM, Boris Kolpackov <boris at codesynthesis.com>wrote:

> Hi Catalin,
>
> Catalin Roman <katalin.roman at gmail.com> writes:
>
> > I am trying to use XSD(xsd-3.2.0-i686-windows) in VS2008, with
> > Xerces-C(xerces-c-3.1.0-x86-windows-vc-9.0) to compile a schema that
> > violates UPA; the schema fragment that's responsible for this is:
> >
> > <xs:choice minOccurs="0">
> >             <xs:element name="value" type="boolean"/>
> >             <xs:element name="value" type="byte"/>
> > </xs:choice>
>
> To be precise, this fragment violates the "Consistent Element Declaration"
> rule rather than the "Unique Particle Attribution" rule. In XML Schema
> elements within the same type with the same name should have the same
> type.
>
>
> > I would like to ask if I can "disable" the UPA check performed by the
> > Xerces-C parser and if it's possible, how can I achieve that?
>
> No, unfortunately it is not possible to disable the checking of the
> above fragment.
>
>
> > Any other hints or workarounds are also most welcomed.
>
> The only way forward that I can think of is to fix the schema. You could
> use a single 'value' element whose type is a union of boolean and byte
> to achieve the above behavior in a legal way.
>
> Boris
>


More information about the xsd-users mailing list