You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Alberto Massari <am...@datadirect.com> on 2007/02/14 09:26:41 UTC
Re: Validate XML schema without instance file?
Hi Tony,
please use c-users@xerces.apache.org for Xerces-related questions:
you reach a wider audience and the answer could be useful for other readers.
At 14.28 14/02/2007 +0800, Wang Tony wrote:
>Hello Alberto,
>
>I am working with Xerces-C 2.7 and I notice one of features in 2.7
>version is " Feature to do schema-only validation even if there is a
>DTD". Does it mean 2.7 support validating schema or DTD without instance file?
No, it means that when validating an XML that has both a DOCTYPE and
a xsi:schemaLocation, the DOCTYPE is ignored and only the XMLSchema
validation is performed.
>If it means this, how to use it in code ? Is there any sample or
>documentation about it? I searched Xerces document and do not find
>anything about it.
If you want to validate a single XMLSchema or a DTD you should use
loadGrammar that loads (and validates) a schema file.
Alberto