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

Dear Richard and all,

Thanks for your answer.
This tightening of the specification seems good to me.
The last clarification is especially important since it enables any EXI user to select the right amount of schema needed and be sure it will be actually used.
I look forward to read the updated version of the specification.

In the same spirit, it may be good to tighten the wording concerning the typing of global attributes.
Currently, section 8.5.4.4.1 (strict = false section) states that: 
	"when using schemas [...] If a global attribute definition exists for qname, represent the value of the attribute according to its datatype"
First, it seems that only section 8.5.4.4.1 is dealing with this, while this seems quite applicable to strict mode in the case of attribute wildcards.
Second, the "when using schemas" wording seems vague to me, at least for that particular sentence.
A quick reading made me thought that this meant "when some schema information is available to the EXI processor", but I think it is actually meaning "when using a schema-informed grammar".
The last interpretation would also lead to the fact that a schema containing only global attribute definitions would be useless for typing attribute values.

Regards,
	youenn

-----Original Message-----
From: Kuntschke, Richard [mailto:richard.kuntschke@siemens.com] 
Sent: lundi 6 juillet 2009 12:43
To: FABLET Youenn
Cc: public-exi-comments@w3.org
Subject: 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 Tuesday, 7 July 2009 08:29:35 UTC