[jdom-interest] Validation strategy
mike at saxonica.com
Wed May 10 02:48:15 PDT 2006
It rather depends how the messages are distinguished. If they are all in
disjoint namespaces, you could simply write a superschema that imports all
the others, and then do strict validation against that. If the schemas have
overlapping definitions, it's a bit more complicated. But if you can't tell
us the rules for choosing a schema, then no-one else can!
The fact that you are asking on a JDOM list also suggests that you have made
some decisions about the processing pipeline, and these decisions may
constrain the answer.
From: jdom-interest-bounces at jdom.org [mailto:jdom-interest-bounces at jdom.org]
On Behalf Of Søren Faltz
Sent: 10 May 2006 10:16
To: jdom-interest at jdom.org
Subject: [jdom-interest] Validation strategy
I receive messages in the form of an XML document. I am able to receive up
to 44 different messages, and i therefor also have 44 different xml schemas.
When i receive a message, how do I know which schema to use to validate
my current code is this, and it works smoothly.
SAXBuilder builder = new SAXBuilder(" org.apache.xerces.parsers.SAXParser ",
<http://apache.org/xml/features/validation/schema> ", true);
//Load the xml
document = builder.build("incoming.xml ");
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jdom-interest