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 Sven Bauhan <sv...@ast.dfs.de> on 2008/02/11 09:58:16 UTC

XML validation without attention to the Schema possible?

Hi,

I parse xml data defined after a XML Schema. As this Schema is not available 
via URI, I tried to use an entity resolver, but did not manage to get it 
working.

Without the XML Schema the xml validation gives lots of errors about unknown 
xml tags which are defined in the Schema. Is there a way to validate just 
against pure XML without paying attention to the XMLSchema?

Thanks,
Sven

Re: XML validation without attention to the Schema possible?

Posted by Sven Bauhan <sv...@ast.dfs.de>.
Thanks Boris,

> Using external schema locations properties is probably an easier way, see:
>
> http://xerces.apache.org/xerces-c/program-dom.html#DOMBuilderProperties
>
> for DOMBuilder (there are similar properties for SAX).
>
I already saw these properties, but I do not understand how they can be used. 
Is there an example or guideline available for this feature?

> > Without the XML Schema the xml validation gives lots of errors about
> > unknown xml tags which are defined in the Schema. Is there a way to
> > validate just against pure XML without paying attention to the XMLSchema?
>
> See the validation-related property:
>
> http://xerces.apache.org/xerces-c/program-dom.html#DOMBuilderFeatures
>
What I found were the features:
- http://apache.org/xml/features/validation/schema 
- http://apache.org/xml/features/validation/schema-full-checking 

I'll have to try, if these fulfill my needs.

Greets, Sven

Re: XML validation without attention to the Schema possible?

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Sven,

Sven Bauhan <sv...@ast.dfs.de> writes:

> I parse xml data defined after a XML Schema. As this Schema is not available
> via URI, I tried to use an entity resolver, but did not manage to get it
> working.

Using external schema locations properties is probably an easier way, see:

http://xerces.apache.org/xerces-c/program-dom.html#DOMBuilderProperties

for DOMBuilder (there are similar properties for SAX).


> Without the XML Schema the xml validation gives lots of errors about unknown
> xml tags which are defined in the Schema. Is there a way to validate just
> against pure XML without paying attention to the XMLSchema?

See the validation-related property:

http://xerces.apache.org/xerces-c/program-dom.html#DOMBuilderFeatures

Boris

-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding