
George, Well that shows how much I know about the W3C XML Schema specification. ;--) I found DTDs very easy, and RELAXNG not too hard but the XML Schema is just too hard. ;--) I need to attend a course or something to get my head around this one. Thanks for the very good explanation. I think that I followed the explanation in the first archived email hypertext link that you mention below. I know you or someone on this list would know the answer. Thank you again. John
-----Original Message----- From: oxygen-user-bounces@oxygenxml.com [mailto:oxygen-user-bounces@oxygenxml.com] On Behalf Of George Cristian Bina Sent: Monday, 15 November 2004 7:10 PM To: Hockaday John Cc: oxygen-user@oxygenxml.com Subject: Re: [oXygen-user] Please help in interpretingan "derivation-ok-restriction.5.4.2:Error for type 'GridDomainType'. The particle of the type is not avalid restriction of the particle of the base."
Hi John,
The above error is not about ambiguity. The derivation in XML Schema defines an algorithm that causes some types that are intuitively derived from others to be considered not correctly derived. There are some workarounds in these cases, see for instance http://lists.w3.org/Archives/Public/xmlschema-dev/2004Oct/0097.html where surrounding the element with a choice solves the problem. While Michael Key and Henry Thomson consider that a different algorithm than the one described by the specification is ok to allow these cases to be considered valid (see the next messages on the thread) Noah Mendelsohn (one of the XML Schema editors) disagree: http://lists.w3.org/Archives/Public/xmlschema-dev/2004Nov/0023.html
Now, if RectifiedGrid is ok to belong in the substitution group with ImplicitGeometry as head instead of Grid then I guess it is ok. Otherwise it may be possible to find a solution as the one in the above xmlschema-dev message.
Best Regards, George
Hi George,
I'm sorry for not getting back to you earlier. I was sick all last week. Here are some results that was found while I was away:
1. The GML 3.1.1 is still being developed and that is why you couldn't find it.
2. one of the team members found out that the error was caused by the grids.xsd which is part of the GML 3.1.1 suite.
3. The fix is as follows:
Change:
############ <element name="RectifiedGrid" type="gml:RectifiedGridType" substitutionGroup="gml:Grid"/> ############
To:
############ <element name="RectifiedGrid" type="gml:RectifiedGridType" substitutionGroup="gml:_ImplicitGeometry"> <annotation> <documentation>Should be substitutionGroup="gml:Grid" but changed in order to accomplish Xerces-J schema validation</documentation> </annotation> ############
This has fixed the ambiguity error.
I want to thank you for answering my email. I'm sure that you would have been able to track down the problem as you have done so in
John.Hockaday@ga.gov.au wrote: the past when I
post to this list but it seems like someone else looking at GML 3.1.1 beat you to it.
Thanks again.
John
-----Original Message----- From: George Cristian Bina [mailto:george@oxygenxml.com] Sent: Friday, 5 November 2004 7:41 PM To: Hockaday John Cc: oxygen-user@oxygenxml.com Subject: Re: [oXygen-user] Please help in interpreting an "derivation-ok-restriction.5.4.2: Error for type 'GridDomainType'. The particle of the type is not a valid restriction of the particle of the base."
Hi John,
I cannot find GML 3.1.1. Can you point us to that ? The error directs to the GridDomainType and DomainSetType. The first seems not to be a valid restriction of the second. The rcase-Recurse.2 points you to the following part of the spec that is related with the error: *** 2 There is a complete ·order-preserving· functional mapping from the particles in the {particles} of R to the particles in the {particles} of B such that all of the following must be true: 2.1 Each particle in the {particles} of R is a ·valid restriction· of the particle in the {particles} of B it maps to as defined by Particle Valid (Restriction) (§3.9.6). 2.2 All particles in the {particles} of B which are not mapped to by any particle in the {particles} of R are ·emptiable· as defined by Particle Emptiable (§3.9.6). ***
The best thing is allow us to reproduce the error. Otherwise send us at least the DomainSetType definition.
Best Regards, George
John.Hockaday@ga.gov.au wrote:
Hi,
We have been trying to validate the GML version 3.1.1. We
have managed to
track down 140 of the 144 errors in the XML Schema. The
last four errors are
really puzzling. Could someone please help with
interpreting and fixing the
errors?
The errors are:
rcase-Recurse.2: There is
not a complete functional mapping between the particles.
coverage.xsd
file:/E:/downloads/GML3.1/GML2004-10-29/base/coverage.xsd 407:37 http://www.w3.org/TR/xmlschema-1/#derivation-ok-rest riction E derivation-ok-restriction.5.4.2: Error for type
'GridDomainType'. The
particle of the type is not a valid restriction of the
particle of the base.
coverage.xsd
file:/E:/downloads/GML3.1/GML2004-10-29/base/coverage.xsd
rcase-Recurse.2: There is
not a complete functional mapping between the particles.
coverage.xsd
file:/E:/downloads/GML3.1/GML2004-10-29/base/coverage.xsd 407:37 http://www.w3.org/TR/xmlschema-1/#derivation-ok-rest riction E derivation-ok-restriction.5.4.2: Error for type
'GridDomainType'. The
particle of the type is not a valid restriction of the
particle of the base.
coverage.xsd
file:/E:/downloads/GML3.1/GML2004-10-29/base/coverage.xsd
407:37
The section in the coverage.xsd file looks like this: <complexType name="GridCoverageType"> <complexContent> <restriction
base="gml:AbstractDiscreteCoverageType">
<sequence> <group ref="gml:StandardObjectProperties"/> <element ref="gml:boundedBy" minOccurs="0"/> <element ref="gml:gridDomain"/> <element ref="gml:rangeSet"/> <element
ref="gml:coverageFunction"
minOccurs="0"/> </sequence> </restriction> </complexContent> <element name="gridDomain" type="gml:GridDomainType" substitutionGroup="gml:domainSet"/> <!--
=========================================================== -->
<complexType name="GridDomainType"> <complexContent> <restriction base="gml:DomainSetType"> <sequence minOccurs="0"> <element ref="gml:Grid"/> </sequence> <attributeGroup ref="gml:AssociationAttributeGroup"/> </restriction> </complexContent> </complexType>
Can anyone see the problem?
Thanks
John Hockaday Geoscience Australia GPO Box 378 Canberra ACT 2601 (02) 6249 9735 http://www.ga.gov.au/
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user