- From: George Cristian Bina <george@oxygenxml.com>
- Date: Wed, 01 Feb 2006 06:24:04 +0200
- To: oknam park <ponda7777@hotmail.com>
- CC: mike@saxonica.com, xmlschema-dev@w3.org
Hi Oknam, The content of your app element is ambiguous and XML Schema does not accept ambiguous content. You have in gemapplication.xsd: ... <xs:element name="app"> <xs:complexType> <xs:sequence> <xs:element ref="dcq:audience" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="gemq:age" minOccurs="0" maxOccurs="unbounded"/> ... Now suppose the document contains inside app a gemq:age element. This element can be matched by <xs:element ref="dcq:audience" minOccurs="0" maxOccurs="unbounded"/> because the age element can substitute audience, see the definition of the age element in gemq.xsd: <xs:element name="age" substitutionGroup="dcq:audience"/> Also, as minOccurs on <xs:element ref="dcq:audience" minOccurs="0" maxOccurs="unbounded"/> is zero the age element can be also matched by the second particle: <xs:element ref="gemq:age" minOccurs="0" maxOccurs="unbounded"/> which refers directly to the age element, thus the ambiguity. For more details in the spec about this see http://www.w3.org/TR/xmlschema-1/#cos-nonambig http://www.w3.org/TR/xmlschema-1/#non-ambig In general the solutions to solve ambiguity problems are: 1. rewrite the content model in a non ambiguous way, for instance instead of (a,b)|(a,c) one can write (a, (b|c)) 2. relax the content model to allow more and enforce the constraint at some other level (for instance you can use embedded Schematron rules or place the constraint at application level). Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com oknam park wrote: > > I'm still waiting for your help. > > Thanks a lot, > > Best regards, > Oknam Park > > >> From: "oknam park" <ponda7777@hotmail.com> >> To: mike@saxonica.com, xmlschema-dev@w3.org >> Subject: RE: Schema Help >> Date: Sun, 29 Jan 2006 00:04:21 +0000 >> >> Here they are. >> >> Thanks, >> Oknam >> >> >>> From: "Michael Kay" <mike@saxonica.com> >>> To: "'oknam park'" <ponda7777@hotmail.com>,<xmlschema-dev@w3.org> >>> Subject: RE: Schema Help >>> Date: Sun, 29 Jan 2006 00:02:10 -0000 >>> >>> Sorry, but gemq still contains these lines which make it impossible to >>> validate your schema: >>> >>> <xs:import namespace="http://purl.org/dc/elements/1.1/" >>> schemaLocation="dc.xsd"/> >>> <xs:import namespace="http://purl.org/dc/dcmitype/" >>> schemaLocation="dcmitype.xsd"/> >>> <xs:import namespace="http://purl.org/dc/terms/" >>> schemaLocation="dcterms.xsd"/> >>> >>> Michael Kay >>> http://www.saxonica.com/ >>> >>> > -----Original Message----- >>> > From: oknam park [mailto:ponda7777@hotmail.com] >>> > Sent: 28 January 2006 21:54 >>> > To: mike@saxonica.com; xmlschema-dev@w3.org >>> > Subject: RE: Schema Help >>> > >>> > So, I revised gemp. and uploaded again. >>> > >>> > I really need your help. ^^ >>> > >>> > >>> > >From: "Michael Kay" <mike@saxonica.com> >>> > >To: "'oknam park'" <ponda7777@hotmail.com>,<xmlschema-dev@w3.org> >>> > >Subject: RE: Schema Help >>> > >Date: Sat, 28 Jan 2006 08:59:17 -0000 >>> > > >>> > > >>> > >gemq contains references to schemas that you haven't >>> > provided, so I can't >>> > >help you with this. >>> > > >>> > >Michael Kay >>> > >http://www.saxonica.com/ >>> > > >>> > > > -----Original Message----- >>> > > > From: xmlschema-dev-request@w3.org >>> > > > [mailto:xmlschema-dev-request@w3.org] On Behalf Of oknam park >>> > > > Sent: 27 January 2006 22:53 >>> > > > To: xmlschema-dev@w3.org >>> > > > Subject: Schema Help >>> > > > >>> > > > I developed a xml schema for a set of element and a set of >>> > > > qualifiers as >>> > > > well as application profile. >>> > > > >>> > > > Seems that Schemas for element and qualifier do not have any >>> > > > problem. But, a >>> > > > schema for an application profile is against validation. >>> > > > >>> > > > I have no idea about this. >>> > > > >>> > > > Could you give me a tip? Here are attached files. >>> > > > >>> > > > Thanks a lot, >>> > > > >>> > > > Cheers, >>> > > > Oknam >>> > > > >>> > > > >>> > > >>> > > >>> > > >>> > >>> > >>> >>> >> > > >> << dc.xsd >> > > >> << dcterms.xsd >> > > >> << dcmitype.xsd >> > > >
Received on Wednesday, 1 February 2006 04:19:43 UTC