Matt,

My question is what's the way to validate JUST an XSD schema file, not
how to validate an XML file that has a schema.  For the latter case your
example is helpful; however, the need I have is to validate only the XSD
file.  Your method would imply that one needs to create a dummy XML file
as a holder so that you can validate the XSD.  There must be a better
way.

On another note, in your example I think your method of finding the
schemaLocation attribute needs to be corrected because it makes to many
assumptions about the character encoding (8 bit).  I believe a better
way to get the information is to use the Progressive Parse interface of
the SAX2XMLReader class which will work with any XML character encoding
that Xerces accepts.

Elisha

 
> Xerces will check out the schema before you parse an XML file with it.
> If there are problems, it prints detailed errors, then attempts to
process
> the XML file if the errors are not fatal.
> 
> http://ultrasparcy.mhcomputing.net/~mhall/validator.zip might help
you.
> 
> HTH!
> Matt
> 
> -----Original Message-----
> From: Elisha Berns [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 23, 2005 7:15 PM
> To: Xerces C++ Development
> Subject: Validating XSD(s)
> 
> 
> A question, not a bug:
> 
> What is the best way to validate XSD schemas using Xerces?
> 
> I know I can use SAX2XMLReader:: loadGrammar () to load a schema file
> and get a Grammar object.  That's perhaps the simplest way,  and I
can't
> tell whether it's the best way to get detailed errors.
> 
> Thanks,
> 
> Elisha Berns
> [EMAIL PROTECTED]
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> ___________________________________________________________________
> The information contained in this message and any attachment may be
> proprietary, confidential, and privileged or subject to the work
> product doctrine and thus protected from disclosure.  If the reader
> of this message is not the intended recipient, or an employee or
> agent responsible for delivering this message to the intended
> recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is strictly prohibited.
> If you have received this communication in error, please notify me
> immediately by replying to this message and deleting it and all
> copies and backups thereof.  Thank you.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to