RE: Questions on selecting a grammar after a SE(*)

Hello Youenn,

thank you very much for your questions and comments.

> 0) A schema with several element definitions for the same QName.
> We can have a schema with several local element definitions and at 
> most one global element definition with the same QName.
> I assume that we generate as many grammars as needed for the same 
> QName element and that the selection of the right grammar in 
> schema-informed mode  is done using scope information. Is that assumption right or is a different approach being used?

Your assumption here is correct.

> 1) Wildcard SE(*).
> Which grammar should I peak for a SE(*) belonging to a wildcard term?
> 
> - If I have a global element definition and one or more local element 
> definition, should I peak the global element grammar?
> 
> - If I have only one local element definition, should I peak the local 
> element grammar or peak/create a built-in grammar?
> I did not found  much description on the wildcard section related to 
> that. Some guidance may be good there.

This follows essentially the same rules as wildcard matching in the XML Schema spec with process-content value of lax. That is, you should use the matching global element grammar if present. Local element grammars, however, never match wildcards. This is due to the fact that local element declarations can be ambiguous and may not provide what was intended outside the specific context where they are defined.

If no matching global element grammar exists, you should pick or create a matching built-in grammar.

> 2) Built in SE(*).
> Which grammar should I peak for a SE(*) belonging to a built-in grammar?
> If I have a global element definition (plus maybe local element 
> definitions), should I peak/create  built-in grammar or the global element grammar ?
> If I have a local element definition, should I peak a built-in grammar 
> or the local element grammar ?
> My understanding of the current spec (see the semantics section of 
> 8.4.3) is that a SE(*) belonging to a built-in grammar may only lead 
> to a built-in grammar for its content but my understanding may be too restrictive?
> Since we can go from built-in grammar to schema-informed grammar using 
> xsi:type, I would hope that at least when we have a GED grammar, we 
> are able to go from built-in to schema-informed grammar directly through the SE mechanism.

Indeed, you should pick a matching global element grammar if present in this case. If no matching global element grammar is present, you should pick or create a matching built-in grammar.

We have changed the spec to clarify the points you brought up in your questions.

Thanks again for making us aware of this.

-- Richard

-- 
Dr. Richard Kuntschke         Siemens AG
Tel.: +49 (0)89 636-41193     Corporate Technology, CT IC 2
Fax:  +49 (0)89 636-52225     D-81730 Munich, Germany


Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Gerhard Cromme; Vorstand: Peter Löscher, Vorsitzender; Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Jim Reid-Anderson, Hermann Requardt, Siegfried Russwurm, Peter Y. Solmssen; Sitz der Gesellschaft: Berlin und München; Registergericht: Berlin Charlottenburg, HRB 12300, München, HRB 6684; WEEE-Reg.-Nr. DE 23691322

Received on Monday, 6 July 2009 21:49:26 UTC