Hi Badari,

Another alternative is to write your own EntityResolver which can map URIs to files or other data sources.  See https://gitlab.com/codelibre/ome/ome-model/-/blob/master/ome-xml/src/main/cpp/ome/xml/OMEEntityResolver.cpp as an example for loading the mappings from XML Catalog files. Also works with Qt5 XML equivalents to Xerces-C++.

Kind regards,

Roger


On 14/04/2020 18:20, Lara Blatchford wrote:
Hi Badari - take a look at the setExternalSchemaLocation method in 
AbstractDOMParser and XercesDOMParser.  Pass it a space-delimited list of 
schema files to use.

https://xerces.apache.org/xerces-c/apiDocs-3/classAbstractDOMParser.html#a0562520a59045e3160eb361098b9a160

Lara

-----Original Message-----
From: Badari Prasad <[email protected]>
Sent: Tuesday, April 14, 2020 1:11 PM
To: [email protected]
Subject: Require info on validating XML using 2 xsd.

Hi All,
   Came across Xerces today, a very nice project in deed. I will be using 
xerces for my module. I have been looking for some sample code for validating 
an XML with 2 XSD, 1 XSD is schema for message types and another is kind of 
common xsd which mentions the format, for example format of email, name etc ... 
is mentioned in 2nd xsd. I could not figure out how to validate using 2 xsd. I 
was thinking of merging both XSD into a single XSD file for validating an XML.

Please let me know if we have another way instead of merging the XSD files.


Thanks
  badari

Reply via email to