Title: Validation of an XML against Schema
No nerds around here - only geeks ;-)
 
I've been considering the same issues recently -- and I'm left curious as to why any system would want to play around with the schema reference of an incoming document. If someone sends you a document that references a particular schema, they're doing so for very good reason, they're telling you that their document conforms to that schema. Of course you can use the EntityResolver to point the way to a locally cached version and avoid the network traffic, but in that case you'd better be sure that the cached version is in sync with the referenced one.
 
On the other hand, if you get a document without a schema reference, that may also be telling you something very important -- that the document does not conform to any particular schema, and that you probably shouldn't attempt to validate it at all.
 
It's true that you're at the mercy of the sending systems to get these things right, but I try to avoid making assumptions about the documents I receive, and I never manipulate the schema reference (if it doesn't validate as is -- it gets bounced back to the sender). I'd be interested to get the group's views on how other systems handle schema references.
 
Regards,

Wayne M. Bradney
Wall Street Systems, Inc.
30 Broad Street, 24th Floor
New York, NY 10004
Phone:   +1 (212) 401 8239
E-Mail:    [EMAIL PROTECTED]

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 11:25 AM
To: [EMAIL PROTECTED]
Subject: 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: [EMAIL PROTECTED]
--------------------------------------------------------------

Reply via email to