[jdom-interest] JDOM in memory schema validation
Alessandro Kohler
alessandro.kohler at netcetera.ch
Mon Apr 28 07:00:20 PDT 2003
Hi Jason (or anyone who has the answer:-),
regarding what you wrote some time ago (april 1st I think it was) ..
>The argument for this feature is that when you receive a document across
>the network in a B2B environment, you'll naturally want to check the
>document conforms to a particular schema. Parsing with validation
>turned on is NOT good enough because it only checks the doc against the
>schema declared within the document. It's like virus checking a program
>based on an algorithm declared within the program. No thanks!
>
>So what you want to do is take a doc, take a schema or DTD or set of
>schemas, and ask if the received doc complies against the locally held
>data. Ignore schema decls or doc types within the doc.
I validate incoming xml data against a schema of my choice by setting features
and properties in the parser (I use xerces with a custom content handler to
generate jdom documents representing sections of the incoming xml) and I believe
one can set the same features and properties also when using jdom's builder.
does what you say mean that if the xml I receive declares a schema within the
document, the parser would rather validate against that schema than using mine?
I haven't tried it out, but I guess I could have a little problem here if that
is the case ... :-)
thanks for your any hint
alessandro
------------------------------------------------------------------------
Alessandro Kohler alessandro.kohler at netcetera.ch
Netcetera AG, 8040 Zuerich phone +41 1 247 79 67 fax +41 1 247 70 45
More information about the jdom-interest
mailing list