Re: Open content model non-deterministic

Sanjiva Weerawarana wrote:

> "Martin Gudgin" <mgudgin@microsoft.com> writes:
> >
> > I've been updated the schema for our spec[1] and have run into trouble
> > describing out completely open content model. I think we agreed in Paris
> > that EIIs from other namespaces could appear absolutely anywhere.
> > Unfortunately due to the optional nature of, for example, the import and
> > type EIIs this makes the content model for, in this example,
> > definitions, non-deterministic. The operation EIIs inside bindings have
> > a similar problem.
>
> Ouch, non-determinism is bad.

I'm not sure how bad it really is in this case, but then XML schema seems to
obfuscate the problem a little bit (as opposed to simply talking about languages,
grammars and productions, that is).

The strategy of parsing as many extension elements as possible using the first
applicable production of this kind:
    <xs:any namespace="##other" processContents="lax"
        minOccurs="0" maxOccurs="unbounded" />
should allow validation of all WSDL documents without any backtracking.

> > If we make things only extensible at the end ( or at the beginning ),
> > this problem will go away. For definitions we could allow extension
> > elements at any point AFTER import and type...
>
> +1. For consistency sake, should we say that extension elements must
> always appear *after* any WSDL 1.2 elements?

We could also go in the opposite direction and allow all elements under
<wsdl:definitions/> (and everywhere else, most likely) to appear in any
order.

Roberto

Received on Thursday, 11 July 2002 12:57:45 UTC