Re: [xerces-j-user] Schema Tutorials....
At 1:26 PM +0200 10/26/01, Joan Pujol wrote: Please can You post the URLs of some Schema Tutorials? http://www.xfront.com /Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recursive DTD error
Hoad, Sandra (Sandra)** CTR ** wrote: !ELEMENT container (class*, attribute*, attribute_list*, #PCDATA) !ELEMENT class (name?, class*, attribute*,attribute_list*, #PCDATA) !ELEMENT attribute (#PCDATA) !ATTLIST attribute value CDATA #REQUIRED !ATTLIST attribute attributeType CDATA #REQUIRED !ELEMENT name (#PCDATA) !ELEMENT attribute_list(class*, attribute*, #PCDATA) !ATTLIST attribute_list attributeType CDATA #REQUIRED This DTD is wrong. The only time you are allowed to use #PCDATA is in a mixed content model that looks like one of the two following examples: !ELEMENT mixed1 (#PCDATA) !ELEMENT mixed2 (#PCDATA|elem1|elem2)* If the parser is not reporting the errors in your DTD, then that is a bug that needs to be fixed. -- Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validation error with Xerces131... bug??.
Hi, I have written a Schema that contains couple of elements and an attribute. When I validate it using one the samples(dom.DOMCount with -v option) it gives me this error. java dom.DOMCount -v account.xml [Error] account.xml:7:51: The content of element type anu:ProductID must match EMPTY. account.xml: 1362 ms (4 elems, 4 attrs, 11 spaces, 12 chars) I guess the parser seems to assume that the content type as empty for ProductID(one of the elements) when it should be elementOnly which is the default. I am enclosing the xml instance file and the schema. Any pointers would be appreciated. !--XML Schema fragment in file schema1.xsd-- schema targetNamespace='anutech.com' xmlns:xsd='http://www.w3.org/2000/10/XMLSchema' xmlns:anu='anutech.com' element name=rootElement complexType !-- default for content is element only -- sequence element ref=anu:InvoiceNo minOccurs='1' maxOccurs='unbounded'/ element ref=anu:ProductID minOccurs='1' maxOccurs='unbounded' / element ref=anu:ProductCode minOccurs='1' maxOccurs='unbounded'/ /sequence /complexType /element !-- Global declarations -- element name='InvoiceNo' type='xsd:integer'/ element name='ProductCode' type='xsd:string' / element name='ProductID' complexType base='xsd:string' derivedBy='extension' content='elementOnly' attribute name='type' type='xsd:string' use='required'/ /complexType /element /schema !-- instance file -- ?xml version=1.0 encoding=UTF-8? anu:rootElement xmlns:anu='anutech.com' xmlns:xsi=http://www.w3.org/2000/10/XMLSchema-instance; xsi:schemaLocation='anutech.com account.xsd' anu:InvoiceNo123456789/anu:InvoiceNo anu:ProductID type='sometype'99/anu:ProductID anu:ProductCodeA/anu:ProductCode /anu:rootElement - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]