Mr. Buroff, try the building from the latest cvs head.

We fixed a few bugs related to schema.

When running this with sax.SAXCount -v elementManager.xml

I get the following:


[Error] elementManager.xml:5:18: Schema error: complexType 'VariableType' with
a elementOnly or mixed content need to have at least one particle child.


[Error] elementManager.xml:5:18: Schema error: base is ComplexSimple, can't deri
ve by extension in SimpleVariableType.


d:\bugs\elementManager.xml: 7611 ms (2 elems, 4 attrs, 5 spaces, 0 chars)


Which is correct a correct error according to the April 7.

VariableType is a mixed content according to the  structures dtd:

"facets only if derivedBy='restriction' -->
<!-- (element|group|any) only if content=mixed or =elementOnly
    and no base at all, i.e. a root type, or base is a complex type -->
<!-- content defaults to base's if there is a complex base,
    textonly if there's a simple base,
    'mixed' if no base (because that's the urType's content)
            and no content daughters,
    'elementOnly' otherwise -->
<!-- should we replace content='empty' with content='elementOnly'
    final='#all' plus no content? -->"


because content defaults to 'mixed' if no base.

as in:

<complexType name="VariableType">
        <attribute name="name" type="string"/>
</complexType>


Thanks, Jeffrey Rodriguez IBM Cupertino













From: "Steve Buroff" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: "xml apache general" <general@xml.apache.org>, "xerces-dev mailing list" <[EMAIL PROTECTED]>
CC: "Buroff, Steven" <[EMAIL PROTECTED]>
Subject: xerces 1.1.1 exception on type extension
Date: Tue, 6 Jun 2000 09:47:18 -0400


I've attached small xml and xsd files that blow away xerces 1.1.1 with
the exception below. I believe it is caused by the extended type declaration.


Steve Buroff

org.apache.xerces.validators.common.CMException

at org.apache.xerces.validators.common.Grammar.createChildModel(Grammar.java:509)

at org.apache.xerces.validators.common.Grammar.getElementContentModel(Grammar.java:262)

at org.apache.xerces.validators.common.XMLValidator.getElementContentModel(XMLValidator.java:1593)

at org.apache.xerces.validators.common.XMLValidator.getContentModel(XMLValidator.java:1283)

at org.apache.xerces.validators.common.XMLValidator.checkContent(XMLValidator.java:2613)

at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:814)

at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1855)

at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1233)

at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:380)

at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:817)

at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:856)

at sax.SAXCount.print(SAXCount.java:135)

at sax.SAXCount.main(SAXCount.java:331)

java.lang.NullPointerException

at org.apache.xerces.validators.common.XMLValidator.checkContent(XMLValidator.java:2614)

at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:814)

at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1855)

at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1233)

at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:380)

at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:817)

at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:856)

at sax.SAXCount.print(SAXCount.java:135)

at sax.SAXCount.main(SAXCount.java:331)

Process Exit...

<< elementManager.xsd >>
<< elementManager.xml >>

________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com



Reply via email to