Hello, i have define an entity in the document which is using an schema for validation. When i want to run the sax.SAXCount-example with validation on (-v Option), i get following error-messages:
java.lang.ClassCastException: org.apache.xerces.validators.dtd.DTDGrammar at org.apache.xerces.validators.common.XMLValidator.resolveSchemaGrammar(XMLValidator.java:2680) at org.apache.xerces.validators.common.XMLValidator.parseSchemas(XMLValidator.java:2648) at org.apache.xerces.validators.common.XMLValidator.bindNamespacesToElementAndAttributes(XMLValidator.java:2589) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1142) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1005) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1122) at sax.SAXCount.print(SAXCount.java:158) at sax.SAXCount.main(SAXCount.java:392) Is it a bug? I am using Xerces 1.4.1 and JDK 1.3. Here is the small xml-file: <?xml version="1.0"?> <!DOCTYPE root [ <!ENTITY test "this is a test"> ]> <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation='test.xsd'> <a>Beispiel: &test;</a> </root> And this is the Schema-File: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'> <xs:element name="root"> <xs:complexType> <xs:sequence> <xs:element ref="a" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="a" type="xs:string" /> </xs:schema> In the "XMLSchema Part0: Primer Part C: Using Entities" is descriped how to use entities with XMLSchema. Have somebody an idea? Maik Weber -- * Homepage: www.webis-world.de * mailto : [EMAIL PROTECTED] * ICQ : #57313947 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
