Hello,

I have two schema's (with different namespaces) that are almost identical, and my application
must be able to process documents that conform to either of both schema's.
Since the two schemas are logically almost identical, I want to re-use code as much as possible.

One solution I see is this:

1) create schema3.xsd that is a sort of merger of schema1.xsd and schema2.xsd => all documents that validate against schema1.xsd or schema2.xsd should validate against schema3.xsd

2) validate the document against its schema (either schema1 or schema2)
3) if document is valid, use String.replaceAll() to change namespaces to those of schema3 4) parse the modified document against schema3, and use the classes generated by xmlbeans for schema3 to manipulate the infoset 5) use use String.replaceAll() to change namespaces back to those of schema1 or schema2

This looks a bit like a hack, to say the least.
Does anyone know a better solution ?

Thanks,
Maarten


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to