DOMDocument::schemaValidate() - group nodes inside choice nodes

From: Date: Thu, 11 Nov 2004 23:07:15 +0000
Subject: DOMDocument::schemaValidate() - group nodes inside choice nodes
Groups: php.xml.dev 
Request: Send a blank email to php-xml-dev+get-500@lists.php.net to get a copy of this message
here's a simple schema and document that illustrates my problem- for the life of me i cannot see why this document is not valid against the schema. i simplified it a lot- i do need to use the group tag because customer-info contains a lot more than just a name. DOMDocument::schemaValidate() method says this is invalid. BUT if i cut the customer-info group and paste it over top of <xs:group ref="customer-info"/> ... then everything is fine!?! now, this is a (big) stretch but- could it be a bug in schemaValidate()? Schema: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="customer"> <xs:complexType> <xs:choice> <xs:element ref="customer-id"/> <xs:group ref="customer-info"/> </xs:choice> </xs:complexType> </xs:element> <xs:element name="customer-id" type="xs:long" /> <xs:group name="customer-info"> <xs:sequence> <xs:element ref="name" minOccurs="1" maxOccurs="1"/> <xs:element ref=" </xs:sequence> </xs:group> </xs:schema> XML document: <customer> <name>Bob Eubanks</name> </customer>

« previous php.xml.dev (#500) next »