You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Stuart A. Malone" <sa...@llamagraphics.com> on 2003/03/08 13:23:07 UTC
Validating against a fixed schema file
I've got Xerces successfully parsing and validating XML files using the
XercesDOMParser interface. What I can't figure out is how to force the
validation to always use a specific XSD file stored on my local drive.
I have found the setExternalSchemaLocation function and I can use it to
map my namespace to my XSD file. But that assumes that the author of
the XML document has specified the correct namespace in the XML file.
Is there some way for me to validate against a particular schema
regardless of what namespace is specified in the XML file?
--Stuart A. Malone
Llamagraphics, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Validating against a fixed schema file
Posted by Gareth Reakes <ga...@decisionsoft.com>.
Hi,
check out EntityResolver, it does what you want.
Gareth
On Sat, 8 Mar 2003, Stuart A. Malone wrote:
>
> I've got Xerces successfully parsing and validating XML files using the
> XercesDOMParser interface. What I can't figure out is how to force the
> validation to always use a specific XSD file stored on my local drive.
>
> I have found the setExternalSchemaLocation function and I can use it to
> map my namespace to my XSD file. But that assumes that the author of
> the XML document has specified the correct namespace in the XML file.
> Is there some way for me to validate against a particular schema
> regardless of what namespace is specified in the XML file?
>
> --Stuart A. Malone
> Llamagraphics, Inc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
--
Gareth Reakes, Head of Product Development +44-1865-203192
DecisionSoft Limited http://www.decisionsoft.com
XML Development and Services
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Working example using schemaLocation
Posted by Shirish Kulkarni <sh...@yahoo.com>.
Hi,
I am looking for a working example application code ,
which clearly demonstrates how the XML document
instance having a "global location" for Schema with
namespaces, could be controlled / remapped to the
"application indended" location.
Any inputs will be welcome.
Thanks,
Shirish
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org