"Re: [xml] validation with multiple XML Schemata"



Hi,

Kasimier Buchcik wrote:
Hi Igor,

I sent this to the list, since responding directly to you, I didn't
came through to you. I got:
"your email address is not marked as one of the approved emails
by the recipient(s) IKAPITAN bloomberg net".

IGOR KAPITANKER, BLOOMBERG/ 65E 55TH wrote:
 > Hi Kazimier,
 > I got a new requirement for my project to support multiple schemas.I
 > am looking for the example to parse XML documents to be validated by
 > multiple schemas in one application(server). Where can I find one for
 > libxml2? Thanx in advance  - Igor

A few questions from my side:
1. Do you want an XML document to validate against multiple schemata
    sequentially? --> Create a schema and validate the doc
    sequentially with every schema.
2. Do you need to construct a schema which is composed of multiple
    XML schemata? --> Create a master schema document, which
    <include>s or <import>s the other schema documents, then validate
    against the master schema.

3. If need to validate at different layers in your application, and your
    schemata do not interfere with each other, you could walk the XML doc
    by yourself and apply xmlSchemaValidateOneElement to elements of
    a specific namespace with the corresponding schema. If you get
    problems here, try not to reuse the validation context.

Kasimier




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]