commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeanfrancois Arcand <jfarc...@apache.org>
Subject Re: [Digester] using Schema Validation
Date Fri, 30 Apr 2004 00:39:58 GMT


Thyr wrote:

>Hello,
>
>I have searched the mailing archive and found that Schema Validation
>using Digester is also a problem to others. But all the answers did not
>help me getting digester use my schema to validate the xml-file.
>
>I use the following code (and tried variations of it):
>
>Digester digester = new Digester();
>digester.setValidating(true);
>digester.setNamespaceAware(true);
>digester.setSchemaLanguage("http://www.w3.org/2001/XMLSchema");
>digester.setSchema("aSchema.xsd");
>digester.parse(new File("schemaTest.xml"));
>
>Other tools tell me, the schema is correct and the xml-file corresponds
>to it. 
>Unfortunately Digester says, that nothing is correct:
>
>WARNUNG: org.xml.sax.SAXNotRecognizedException: Property:
>http://java.sun.com/xml/jaxp/properties/schemaLanguage
>And additionally I get at every node a Parse Error, which tells me the
>node isn't declared.
>  
>
Tomcat 5 sucessfully uses XML validation wth the Digester. You get this 
exception probably because your JDK doesn't supports JAXP 1.2 (which is 
the verion that contains schema validation) or your XML parser doesn't 
support validation

-- Jeanfrancois

>Thank you for any help.
>
>Regards,
>Reidar 
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message