Page 1 of 1

Derivation Depth?

Posted: Sat Aug 25, 2012 12:13 pm
by twcook
Is there a limit to derivation levels in XML Schema 1.1?
I get this error:

E [Xerces] rcase-NameAndTypeOK.7: The type of element 'definition', 'ct_013f4560_9b34_4081_9162_e58245cec514', is not derived from the type of the base element, 'DefinitionType'.

When in fact ct_013f4560_9b34_4081_9162_e58245cec514 is a restriction of SlotType which is an extension of ItemType which is an extension of DefinitionType.

Thanks in advance.

--Tim

Re: Derivation Depth?

Posted: Mon Aug 27, 2012 11:15 am
by twcook
After setting the parser to Saxon EE and version to 1.1; this problem disappeared.

Thanks.

Re: Derivation Depth?

Posted: Mon Aug 27, 2012 11:57 am
by adrian
Hi,

I'm glad you have sorted out this problem.

This could be something that we should test against Xerces and report it to the Xerces project.

Could you please send us your schema hierarchy (or a sample of it or even a description) where you reproduced this problem? If possible, please send it to support AT oxygenxml DOT com.

Regards,
Adrian

Re: Derivation Depth?

Posted: Mon Aug 27, 2012 6:11 pm
by twcook
The base schema mlhim2.xsd is available at:
http://www.mlhim.org/xmls/mlhim2/2_3_1/mlhim2.xsd

Here is a derivative schema:
ccd_f9493153_8960_4974_8725_3bf824319ac8.xsd

Code: Select all


<?xml version="1.1" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:mlhim2="http://www.mlhim.org/xmls/mlhim2/2_3_1" elementFormDefault="qualified"
targetNamespace="http://www.mlhim.org/xmls/mlhim2/2_3_1">

<xs:annotation>
<xs:documentation source="http://www.mlhim.org" xml:lang="en-US">
This is a Cluster Example Concept Constraint Definition schema file (CCD).

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">

<rdf:Description rdf:about="http://www.hkcr.net/ccd/ccd_f9493153_8960_4974_8725_3bf824319ac8">
<dc:title>Cluster Example</dc:title>
<dc:creator>Timothy W. Cook <timothywayne.cook@gmail.com> </dc:creator>
<dc:contributor>None</dc:contributor>
<dc:subject>Cluster CCD</dc:subject>
<dc:source>My Brain</dc:source>
<dc:rights>CC-BY http://creativecommons.org/licenses/by/3.0/</dc:rights>
<dc:relation>None</dc:relation>
<dc:coverage>Universal</dc:coverage>
<dc:type>MLHIM Concept Constraint Definition (CCD)</dc:type>
<dc:identifier>ccd_f9493153_8960_4974_8725_3bf824319ac8</dc:identifier>
<dc:description>Experimental Cluster CCD</dc:description>
<dc:publisher>MLHIM</dc:publisher>
<dc:date>2012-08-24</dc:date>
<dc:format>text/xml</dc:format>
<dc:language>en-US</dc:language>
</rdf:Description>

</rdf:RDF>

</xs:documentation>
</xs:annotation>

<xs:include schemaLocation="http://www.mlhim.org/xmls/mlhim2/2_3_1/mlhim2.xsd"/>

<xs:element name="ccd_f9493153_8960_4974_8725_3bf824319ac8"
type="mlhim2:ct_a575df1d_20fd_4d65_aba3_4ad550cd7230"/>

<xs:complexType name="ct_a575df1d_20fd_4d65_aba3_4ad550cd7230">
<xs:complexContent>
<xs:restriction base="mlhim2:CCDType">
<xs:sequence>
<xs:element name="definition" minOccurs="1" maxOccurs="1" type="mlhim2:ct_eb02eb6b_c376_4557_92b2_1d197fc25027"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="ct_eb02eb6b_c376_4557_92b2_1d197fc25027">
<xs:complexContent>
<xs:restriction base="mlhim2:ClusterType">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="cluster_subject" type="xs:string" fixed="Top Cluster"/>
<xs:element maxOccurs="1" minOccurs="1" name="items" type="mlhim2:ct_013f4560_9b34_4081_9162_e58245cec514"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>



<!--Items List-->
<xs:complexType name="ct_013f4560_9b34_4081_9162_e58245cec514">
<xs:complexContent>
<xs:extension base="mlhim2:ItemType">
<xs:sequence>
<xs:element name="String_One" minOccurs="1" maxOccurs="1" type="mlhim2:ct_72081594_72e8_4773_b36d_c41e438a0929"/>
<xs:element name="String_Two" minOccurs="1" maxOccurs="1" type="mlhim2:ct_05363e2b_d67c_4831_b224_7e38d9b283db"/> </xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<!--Element One-->
<xs:complexType name="ct_72081594_72e8_4773_b36d_c41e438a0929">
<xs:complexContent>
<xs:restriction base="mlhim2:ElementType">
<xs:sequence>
<xs:element name="Element_dv" minOccurs="1" maxOccurs="1" type="mlhim2:ct_e6c3c31f_58d3_45d6_8b4d_7694c81c8bcb"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>


<xs:complexType name="ct_e6c3c31f_58d3_45d6_8b4d_7694c81c8bcb">
<xs:complexContent>
<xs:restriction base="mlhim2:DvStringType">
<xs:sequence>
<xs:element name="DvString_dv" minOccurs="1" maxOccurs="1" type="xs:string"/>
<xs:element name="data_name" type="xs:string" maxOccurs="1" minOccurs="1" fixed="String One"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>

<!--Element Two-->
<xs:complexType name="ct_05363e2b_d67c_4831_b224_7e38d9b283db">
<xs:complexContent>
<xs:restriction base="mlhim2:ElementType">
<xs:sequence>
<xs:element name="Element_dv" minOccurs="1" maxOccurs="1" type="mlhim2:ct_90e6df33_fe19_458f_9e3f_2e6ee3db75fa"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>


<xs:complexType name="ct_90e6df33_fe19_458f_9e3f_2e6ee3db75fa">
<xs:complexContent>
<xs:restriction base="mlhim2:DvStringType">
<xs:sequence>
<xs:element name="DvString_dv" minOccurs="1" maxOccurs="1" type="xs:string"/>
<xs:element name="data_name" type="xs:string" maxOccurs="1" minOccurs="1" fixed="String Two"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>

</xs:schema>