[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."

George Cristian Bina
Mon Nov 15 02:10:12 CST 2004


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


 wrote:
> 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 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:] 
>>Sent: Friday, 5 November 2004 7:41 PM
>>To: Hockaday John
>>Cc: 
>>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
>>
>> 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:
>>>
>>>http://www.w3.org/TR/xmlschema-1/#rcase-Recurse	E 
>>
>>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-restriction	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
>>>http://www.w3.org/TR/xmlschema-1/#rcase-Recurse	E 
>>
>>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-restriction	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
>>>
>>>http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>>



More information about the oXygen-user mailing list