Hi,
I've developed a class to parse a xml file with SAX.
static final String JAXP_SCHEMA_LANGUAGE =
"http://java.sun.com/xml/jaxp/properties/schemaLanguage";
static final String WC3_XML_SCHEMA =
"http://www.w3.org/2001/XMLSchema";
static final String JAXP_SCHEMA_SOURCE =
"http://java.sun.com/xml/jaxp/properties/schemaSource";
public static boolean isValidSax(InputStream source, String schema) {
try {
SAXParserFactory spf =
org.apache.xerces.jaxp.SAXParserFactoryImpl.newInstance();
spf.setNamespaceAware(true);
spf.setValidating(true);
SAXParser sp = spf.newSAXParser();
sp.setProperty(JAXP_SCHEMA_LANGUAGE, WC3_XML_SCHEMA);
sp.setProperty(JAXP_SCHEMA_SOURCE, "C:\\letter.xsd");
MyDefaultHandler dh = new MyDefaultHandler();
sp.parse(source,dh);
...
My problem is in jrun4 this code works fine but when i put this in IBM WSAD 5.1 i get the following error:
org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaSource
Anybody knows what happens?
Thanks
Ricardo Constantino