Hi Chris, I notice that your root schema has elementFormDefault="qualified" and your included schema has elementFormDefault="unqualified". Thus the local elements in the included schema are in the null namespace, but your instance document has the default namespace bound to a non-null namespace. This is probably the source of your problem.
Cheers, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 416-448-3519, T/L 778-3519 E-mail: [EMAIL PROTECTED] Chris Halverson <[EMAIL PROTECTED]> on 08/30/2001 09:59:26 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Validation and schema hierarchies I'm getting these errors, I think its a namespace thing but I'm not sure. I would appreciate any help in the offing. [Error] :8:33: Element type "version" must be declared. [Error] :8:33: Attribute "major" must be declared for element type "version". [Error] :8:33: Attribute "minor" must be declared for element type "version". [Error] :9:42: Element type "property" must be declared. [Error] :9:42: Attribute "key" must be declared for element type "property". [Error] :9:42: Attribute "value" must be declared for element type "property". With this instance document <?xml version="1.0" encoding="UTF-8"?> <XMLDataSet xmlns="http://www.ncube.com/2001/nable/1.7" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ncube.com/2001/nable/1.7 CMS-DataStructure.xsd" elementId="n_999" name="Test Set" authenticationString="authstring "> <Category elementId="n_1000" name="Action" dvbCode="String" rating ="String" isAdult="1" channelIdent="String"> <version major="2" minor="2"/> <property key="String" value="String"/> <property key="String" value="String"/> <note>String</note> <note>String</note> <CategoryRef>String</CategoryRef> <FileRef>String</FileRef> <FileRef>String</FileRef> <CategoryName elementId="n_1001" language="String" name=" String"> <property key="String" value="String"/> <property key="String" value="String"/> </CategoryName> <CategoryName elementId="n_1002" language="String" name=" String"> <property key="String" value="String"/> <property key="String" value="String"/> </CategoryName> </Category> With this extended schema definition in CMS-DataStructure.xsd <?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://www.ncube.com/2001/nable/1.7" xmlns:nxs="http://www.ncube.com/2001/nable/1.7" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <annotation> <documentation xml:lang="en"> Metadata schema base types for nCUBE Corporation nABLE Metadata API. Copyright 2001 nCUBE Corp. All rights reserved. </documentation> </annotation> <include schemaLocation="TypeLibrary-cms.xsd"/> <element name="Category"> <complexType> <complexContent> <extension base="nxs:Category"> <sequence> <element name="CategoryRef" type="nxs:CategoryRef" minOccurs="0"/> <element name="FileRef" type="nxs:FileRef" minOccurs="0" maxOccurs="unbounded"/> <element name="CategoryName " type="nxs:CategoryName" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> </element> </schema> Based on this underlying schema definition in TypeLibrary-cms.xsd <?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://www.ncube.com/2001/nable/1.7" xmlns:nxs="http://www.ncube.com/2001/nable/1.7" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified "> <complexType name="Version"> <attribute name="major" type="positiveInteger" use=" required"/> <attribute name="minor" type="positiveInteger" use=" required"/> </complexType> <complexType name="Property"> <attribute name="key" type="string" use="required"/> <attribute name="value" type="string" use="required"/> </complexType> <complexType name="Category"> <sequence> <element name="version" type="nxs:Version"/> <element name="property" type="nxs:Property" minOccurs="0" maxOccurs="unbounded"/> <element name="note" type="nxs:Note" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="elementId" type="ID" use="required"/> <attribute name="name" type="string" use="required"/> <attribute name="dvbCode" type="string" use="required"/> <attribute name="rating" type="string" use="required"/> <attribute name="isAdult" type="boolean" use="required"/> <attribute name="channelIdent" type="string"/> </complexType> </schema> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
