- From: santhanakrishnan <santhana@huawei.com>
- Date: Wed, 14 May 2008 20:00:19 +0530
- To: john.schneider@agiledelta.com, public-exi@w3.org
- Message-id: <004801c8b5cf$09c65630$4a18120a@china.huawei.com>
Hi John Thank you very much for your clarification. Some parts are still not clear to me. Consider the following case. Suppose I have the following schema definition. (shown below is a segment of schema) ..... <xs:simpleType name="TypeUri" final="list restriction"> <xs:restriction base="xs:anyURI"/> </xs:simpleType> <xs:element name="MyUri" type="TypeUri" minOccurs="0"/> <xs:element name="MyString" type="xs:string" minOccurs="0"/> ..... For this I would have a grammar like this. For Simple Type Definition TypeUri TypeUri_0: CH [schema-valid-value] TypeUri_1 TypeUri_1: EE TypeUri_Empty_0: EE For element MyUri MyUri_0: TypeUri_0 For element MyString MyString_0: xs:string_0 As there is no grammar available for xs:string we will define one like this xs:string_0: CH [schema-valid-value] xs:string_1 xs:string_0: EE xs:string_Empty_0: EE After all this grammar definitions still there is some ambiguity in the definition of TypeUri. It is lacking the schema basic type information unlike the xs:string type. Only when I know the schema basic type I can perform the low level encoding/decoding of the value as per that. Also the specification talks about adding production AT(xsi:type) to the element grammar when it is of some named sub type. What is the significance of this AT(xsi:type) event ? How and when it has to be generated ? Please clarify me in this regard and help me in resolving the confusion. Thanks in advance, Santhanakrishnan _____ From: public-exi-request@w3.org [mailto:public-exi-request@w3.org] On Behalf Of John Schneider Sent: Thursday, May 01, 2008 11:54 PM To: santhana@huawei.com; public-exi@w3.org Subject: RE: [EXI] Clarification required regarding use of types Hi Santhanakrishnan, You're quite welcome. The grammar for user defined simple types and the simple types built-in to XML Schema is identical. You can find it described in section 8.5.3.1.3.1. Thanks, John _____ From: public-exi-request@w3.org [mailto:public-exi-request@w3.org] On Behalf Of santhanakrishnan Sent: Wednesday, April 30, 2008 11:10 PM To: john.schneider@agiledelta.com; public-exi@w3.org Subject: RE: [EXI] Clarification required regarding use of types Hi John Thank you very much for your clarification. Can you please let me know the grammar for the Simple types or otherwise the alterations required in section 8.5.3.1.3.1 to accommodate the simple types into EXI grammars. Thanks in advance Santhanakrishnan _____ From: public-exi-request@w3.org [mailto:public-exi-request@w3.org] On Behalf Of John Schneider Sent: Thursday, April 10, 2008 9:40 PM To: santhana@huawei.com; public-exi@w3.org Subject: RE: [EXI] Clarification required regarding use of types Santhanakrishnan, Good catch! EXI includes support for all the data types defined in the XML Schema language. It creates grammars for each of these, including the xs:anyURI type used below. The grammars for the simple types defined by the XML Schema Language are created in accordance to section 8.5.3.1.3.1 [1]. We will add text to the next version of the specification to clarify this. Thank you for your very thorough review of the draft specification! Cheers!, John [1] http://www.w3.org/TR/exi/#simpleTypeGrammars _____ From: public-exi-request@w3.org [mailto:public-exi-request@w3.org] On Behalf Of santhanakrishnan Sent: Thursday, April 10, 2008 2:33 AM To: public-exi@w3.org Subject: [EXI] Clarification required regarding use of types Hi John Consider the following two forms of declaring an element in the schema Form1 <xs:simpleType name="tSIP_URL" final="list restriction"> <xs:restriction base="xs:anyURI"/> </xs:simpleType> <xs:element name="MyElement" type="tSIP_URL"/> Form2 <xs:element name="MyElement" type="xs:anyURI"/> As per the EXI specification for the Form1 I would create a Type and TypeEmpty grammar for the tSIP_URL type and MyElement grammar have Type grammar start symbol as RHS. Given below will be the grammar tSIP_URL 0 : CH [schema-valid value ] Type i, 1 tSIP_URL 1 : EE tSIP_URLEmpty 0 : EE MyElement 0: tSIP_URL 0 For Form2 no grammar would be created for MyElement. Just a particle term grammar would be created ParticleMyElement 0 : SE(MyElement) ParticleMyElement 1 ParticleMyElement 1 : EE Is my understanding correct till here? As per the specification we have to Evaluate the element contents using the SE(MyElement) grammar. But we have not created any grammar for MyElement in the Form2. So, how the contents of the MyElement can be encoded in this case? Even in the Schema informed grammar example given in the specification the final grammar has productions of the form SE("description") Term_description1,1 But no grammars defined for "description" element content as such. Please clarify my doubts regarding this Regards Santhanakrishnan
Received on Wednesday, 14 May 2008 14:31:53 UTC