Hi all,

I've been trying to use NSXMLDocument to validate stuff with an XML Schema rather than a DTD, and have run into a problem. It doesn't seem to be correctly implementing the substitutionGroup 'polymorphism' aspect of XSD. The pattern goes like this:

-- in schema
 <xs:element name="base" type="xs:string"/>
 <xs:element name="firstSubtype" substitutionGroup="base"/>
 <xs:element name="secondSubtype" substitutionGroup="base"/>

 <xs:element name="container">
   <xs:complexType>
     <xs:sequence>
       <xs:element minOccurs="0" maxOccurs="unbounded" ref="base"/>
     </xs:sequence>
   </xs:complexType>
 </xs:element>

-- in XML document
        <container>
                <base>Node of base type - this works</base>
<firstSubtype>Node of substituted type - this does not work</ firstSubtype>
        </container>

If I have that firstSubtype element in there, NSXMLDocument init/ validation returns the error
"Element 'container' [CT local]: The element content is not valid."

Is this a bug/limitation of NSXML, or am I doing something wrong?

Thanks,
Thomas Castiglione
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to