Paul R Brown wrote:
Alternatively, this could be easily handled by an xml / object
mapping tool like jaxb2 (or xmlbeans) ...
Jaxb2 is very simple, generates nice pojos (this is not the case with
xmlbeans) and afaik, both handles unspecified extensions to schemas...
Or even a stax based parsing would be great (sax is such a nightmare
compared to pull parsing..).
JAXB v2 wasn't available (with a suitable license) when we were
originally working on PXE, so that was ruled out.
StAX parsing won't permit schema validation, so that's a no-go there.
And schema validation isn't truly enough, as there are valid but
illegal BPEL processes.
Tatu Saloranta has a schema validator for StAX I believe. And I think if
JAXB was used it will ensure that the xml conforms to the schema. Also
JAXB can capture the additional elements via a getAny() accessor. As you
point out, post validation is needed in addition and I think this could
be done just as easily with jaxb as something else.
- Dan
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog