xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto Massari <amass...@datadirect.com>
Subject Re: validating XML Schema files
Date Wed, 03 Jan 2007 08:57:14 GMT
Hi Uwe,

At 23.22 02/01/2007 +0000, 4pzbrog02@sneakemail.com wrote:
>Hello folks,
>
>My application processes XML Schema files on the DOM level (.xsd 
>files are parsed with XercesDOMParser::parse()). However, to detect 
>user errors in the schema files, I'd like to turn on validation for them.
>
>Is that at all possible?

The only way you can test for a grammar to be valid is by loading it 
using loadGrammar.
Using the DTD or the XMLSchema provided by the specs will in any case 
result in less validation checks than the ones listed in the specs itself.

Alberto


>I ran some tests with the schema for schemas, which XercesDOMParser 
>rejects (I assume that's because its built-in types are redefined). 
>I also tried to feed the schema DTD into the parser, without success 
>(Xerces seems to expect a schema rather than a DTD when it requests 
>a resource for a namespace identifier)
>
>Can anyone point me into the right direction?
>
>I can post my test code as well if that helps.
>
>Cheers,
>
>Uwe
>
>
>
>--------------------------------------
>Protect yourself from spam,
>use http://sneakemail.com


Mime
View raw message