You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Benson Margulies <bi...@basistech.com> on 2007/09/21 02:29:32 UTC
Fun with XML schema validation
I'm hoping that the following makes some sense to someone reading this.
I acquire a schema for Aegis files via:
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).
newSchema(new StreamSource(is));
I stick this into a DocumentBuilderFactory.
I use a builder from that factory to read the file.
Blam:
[main] ERROR org.apache.cxf.aegis.type.XMLTypeCreator - Error loading
file /org/apache/cxf/aegis/type/map/fortest/MapTest.aegis.xml
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of
element 'mappings'.
Then I validate the very same file with the very same schema from inside
eclipse.
No errors.
Anyone else ever used this stuff?