Xerces schema validation

O

Ole Hedegaard

Hi,

I've been looking into the Xerces documentation, and to my surprise it seems
that it is impossible to validate an XML document againts an XML Schema
without having a schemaLocation (or noNameSpaceSchemaLocation) reference in
the XML document. I basically just want to validate some "foreign" XML,
which I did not generate myself, against my own Schemas.

Is that really impossible with Xerces, or am I missing something?

Thanks,
Ole Hedegaard
 
S

Sudsy

Ole said:
Hi,

I've been looking into the Xerces documentation, and to my surprise it seems
that it is impossible to validate an XML document againts an XML Schema
without having a schemaLocation (or noNameSpaceSchemaLocation) reference in
the XML document. I basically just want to validate some "foreign" XML,
which I did not generate myself, against my own Schemas.

Is that really impossible with Xerces, or am I missing something?

Thanks,
Ole Hedegaard

You're not missing anything: it's not there! I ended up using xdk
from Oracle to address this glaring omission. To Oracle's credit,
it's a fine package which performs well.

<disclaimer>
I do not work now, nor have ever worked for Oracle.
[Of course if Larry was to offer me a job tomorrow...;-)]
</disclaimer>
 
E

Esmond Pitt

It is possible but you have to use Xerces XNI. Have a look at the
XMLGrammarBuilder example. There is a whoilw FAQ page on grammar pools.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top