RE: UPA example

> 
> So I take it that under the XSD 1.1 rules, the instance would 
> be valid and have particle assigment corresponding to:
> 
>  <apple/> validated by element
>  <apple/> validated by any
>  <apple/> validated by any
> 
> Rather than:
> 
>  <apple/> validated by element
>  <apple/> validated by any
>  <apple/> validated by element

No, I think it will take the first parse, because when the next element can
match either an element particle or a wildcard, the element particle will be
chosen.
> 
> Personally I think that, subject to occurrence constraints, 
> the particle that is currently gobbling up input, should have 
> priority (i.e. they're greedy).  That seems a lot easier to 
> implement, it's a lot easier for schema authors/users to 
> understand and has similarities to how regular expressions 
> behave. 

Then I suggest you make the suggestion as a comment on the last call spec
which has just been published.

I can't say I feel strongly about it. Which way is easier for implementors
will depend, as always, on the internal design of the implementation (and in
particular on how counters are implemented). I can see it being tricky to
formalize the notion of "the particle that is currently gobbling up input" -
or perhaps not, it might simply be a case of saying that in the event of an
element matching more than one particle, the preferred one is the particle
to which the previous element was attributed.

Michael Kay
http://www.saxonica.com/

Received on Wednesday, 25 June 2008 23:31:30 UTC