users@jaxb.java.net

Re: Problem with BPMI Schema

From: Sekhar Vajjhala <sekhar.vajjhala_at_sun.com>
Date: Fri, 17 Jan 2003 18:19:17 -0500

Kohsuke Kawaguchi wrote:

> > Thank you,
> > That not only worked, but now I also have a better understanding of the process.
>
> You are welcome. The good part of using a list is that once we provide a support,
> everyone can search it. This saves our effort over time.
>
> > The second error on the process definition continues to occur. This
> > relates to existence of 'minOccurs' in the choice element. I am reading
> > the JAXB specification and this seems to be supported. Am I missing
> > something. Do I need a customization for this too. (apologize if I am
> > being too dense).
>
> This is a bug of BPMI schema. You cannot have the minOccurs/maxOccurs at
> the first particle of a model group definition.
>
> <xsd:group name="activityList">
> <xsd:choice minOccurs="1" maxOccurs="unbounded">
> <xsd:element name="action" type="bpml:action"/>
>
> A lot of schema authoring tool fails to catch this bug, but if you
> really really read the schema spec carefully, this is not allowed.

The releavant section from XML Schema Part 1 specification is (this is useful
for schema authors) is:

Section 3.7.2, "XML Representation of Model Group Definition Schema Components".



>
>
> The best you can do is to contact the schema authors and tell them that
> their schema is incorrect and they should learn not to trust their tools.
>
> Meanwhile, a workaround you can do is to add a meaningless sequence like
> this:
>
> <xsd:group name="activityList">
> <xsd:sequence> <!-- workaround -->
> <xsd:choice minOccurs="1" maxOccurs="unbounded">
> <xsd:element name="action" type="bpml:action"/>
>
> The similar problem for UPS constraint violation.
>
> P.S. Start to hate XML Schema?
>
> regards,
> --
> Kohsuke KAWAGUCHI 408-276-7063 (x17063)
> Sun Microsystems kohsuke.kawaguchi_at_sun.com

Sekhar