Hi Michael, I just took a look through the Woden code base and it looks like we may no longer require Xerces specifically. If I remember correctly, we used to use Xerces for schema validation (that is, validation of inline and imported schemas) but we have since moved to XmlSchema. The only references I found with a search are for setting Xerces specific properties on the parser. (Well, there's also a reference in one of the test classes but this doesn't add a dependency to Woden we can easily fix this.) As you said, we can enable schema validation using the standard interface and I think we can do the same for the namespaces feature.
John - As per the comment below (from DOMWSDLReader), can we remove the schema location property now that Woden includes a URI resolver? parser.setFeature(org.apache.xerces.impl.Constants.SAX_FEATURE_PREFIX + org.apache.xerces.impl.Constants.NAMESPACES_FEATURE, true); parser.setFeature(org.apache.xerces.impl.Constants.SAX_FEATURE_PREFIX + org.apache.xerces.impl.Constants.NAMESPACE_PREFIXES_FEATURE, true); parser.setFeature(org.apache.xerces.impl.Constants.SAX_FEATURE_PREFIX + org.apache.xerces.impl.Constants.VALIDATION_FEATURE, true); parser.setFeature(org.apache.xerces.impl.Constants.XERCES_FEATURE_PREFIX + org.apache.xerces.impl.Constants.SCHEMA_VALIDATION_FEATURE, true); // TODO: This external schema location should be removed once an URI resolution framework // with a catalog is added to Woden. parser.setProperty(org.apache.xerces.impl.Constants.XERCES_PROPERTY_PREFIX + org.apache.xerces.impl.Constants.SCHEMA_LOCATION, "http://www.w3.org/ns/wsdl " + resolveURI( "http://www.w3.org/2007/03/wsdl/wsdl20.xsd") + " http://www.w3.org/ns/wsdl-extensions " + resolveURI( "http://www.w3.org/2007/03/wsdl/wsdl20-extensions.xsd") + " http://www.w3.org/2001/XMLSchema " + resolveURI( "http://www.w3.org/2001/XMLSchema.xsd")); Lawrence Michael Glavassevich/Toronto/[EMAIL PROTECTED] 03/21/2007 02:56 PM Please respond to [email protected] To [email protected] cc Subject Re: WODEN-152, Xerces dependency for schema validation Hi Lawrence, Out of curiosity, why is this dependency required? Both JAXP 1.2 and 1.3+ have standard mechanisms [1] for enabling schema validation during parsing and in memory. Xerces, Saxon, Java 5+ and any other implementation of JAXP 1.2 or 1.3+ supports these. [1] http://xerces.apache.org/xerces2-j/faq-pcfp.html#faq-4 Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] Lawrence Mandel/Toronto/[EMAIL PROTECTED] wrote on 03/21/2007 09:02:52 AM: > > John, > > Correct. However there was a request to use an alternate DOM parser. > Although schema validation currently requires Xerces and we will > need to do some work to support line numbers in multiple parsers in > Woden's current form it can support other DOM parsers provided > schema validation isn't required. In this case I think we can fail > gracefully by either > > 1. Adding a readme item stating that schema validation is only known > to work with Apache Xerces or > 2. Logging an error if a parser besides Xerces is used and > validation is enabled. > > Thoughts? > > Lawrence > > > > John Kaputin <[EMAIL PROTECTED]> > 03/21/2007 06:28 AM > > Please respond to > [email protected] > > To > > [email protected] > > cc > > Subject > > WODEN-152, Xerces dependency for schema validation > > > > > Lawrence, > WODEN-152 refers to our dependency on Xerces in the DOM implementation of > Woden. I think I recall that you had to use the Xerces API to enable > schema validation because of some problem using JAXP. Can you refresh my > memory or correct me on this. Thanks. > > John Kaputin > > > > > > > Unless stated otherwise above: > IBM United Kingdom Limited - Registered in England and Wales with number > 741598. > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
