You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by tu...@employease.com on 2001/03/20 17:25:08 UTC

Validation of an XML against Schema

I get XML documents from partners which we want to validate against schema. 
If they do specify any schema refernces thats fine I can use
MyEntityResolver to override resovleEntity and tell the parser to use the
schema based on the public and system ids But If they do not specify any
xsi:schemaLocation attribute then there is no way for my parser to validate
against  a schema. 
i know there will be a hack developed by nerd.

Thanks for your help

--------------------------------------------------------------
Tushar Dave
Employease Inc.
Phone: 404-495-5948
Email: tushar.dave@employease.com
--------------------------------------------------------------


Re: Validation of an XML against Schema

Posted by Ian Roberts <ir...@decisionsoft.com>.
On Tue, 20 Mar 2001 tushar.dave@employease.com wrote:

> 
> I get XML documents from partners which we want to validate against schema. 
> If they do specify any schema refernces thats fine I can use
> MyEntityResolver to override resovleEntity and tell the parser to use the
> schema based on the public and system ids But If they do not specify any
> xsi:schemaLocation attribute then there is no way for my parser to validate
> against  a schema. 
> i know there will be a hack developed by nerd.

We have put code into our internal version of Xerces to allow you to
associate particular schema locations with particular namespace URIs, even
if the document doesn't specify a schemaLocation, but haven't submitted
the patch because a) I don't really understand Xerces string handling that
well, b) I'd want someone who does to double check the code first and c)
we have to work with April 2000 working draft schemas, so the patch is
against version 1.2.3.  When our project finally moves onto CR schemas,
we'll port the code into the latest version and submit it.

In the mean time, if this would be of use to you, let me know off list.
Also, if any committers would be willing to sanity check my code, please
let me know.

Ian

-- 
Ian Roberts, Software Engineer        DecisionSoft Ltd.
tel: +44-1865-203192                  http://www.decisionsoft.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org