Validation fails on setAttribute

Katz Guy <[email protected]> Thu, 20 Feb 2003 17:46:25 +0200
Newsgroups gmane.comp.java.sun.xml.general
Message-ID <[email protected]>
Hi;
Hi have a small problem and hope you can assist.
I am using the following code fragment taken from sun's XML tutorial, it is
a validating parser creation code:

static final String JAXP_SCHEMA_LANGUAGE =
"http://java.sun.com/xml/jaxp/properties/schemaLanguage
<http://java.sun.com/xml/jaxp/properties/schemaLanguage> ";
static final String W3C_XML_SCHEMA = "http://www.w3.org/2002/XMLSchema
<http://www.w3.org/2002/XMLSchema> ";
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
dbf.setValidating(true);
try{
          dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
}catch(Exception e){
      e.printStackTrace();
}
DocumentBuilder db = dbf.newDocumentBuilder();

With xerces, there is no problem but oracle and weblogic parsers fail in the
setAttribute method.
Is there something wrong here?
Thanks.

_______________________
Guy Katz
Chief Software Architect, CAP-IFS
Comverse
[email protected]
+972 3 7663686