W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2007

Re: when to validate XML while being created programmatically..

From: <ovisvana@netzero.net>
Date: Thu, 20 Dec 2007 07:38:20 GMT
To: xmlschema-dev@w3.org
Message-Id: <20071220.130820.28337.0@webmail01.vgs.untd.com>

Hi,
   Do you mean validate when you mean 'validate' or only check the well-formedness. Validate implies that there's a DTD or schema associated with the XML against which you are checking the XML. Since you are doing on-the-fly, it means that at instances your XML could be "not well-formed" and the snippet is not wrapped in a root element as required for XML to be well-formed. If needed, you can wrap your XML with a dummy end tag and validate it against the schema or DTD. 

Regards,
V.Omprakash
http://ovisvana.blogspot.com


---------- Forwarded Message ----------


This is related to validating a brand new XML instance
WHILE being created programmatically:
 Do you generally perform validation at the very end
of completely creating an XML instance? If Yes, how
would you correct these validation errors
programmatically? It looks like a daunting task.

 OR

Does it even make sense to perform on-the-fly
validation while constructing a new XML instance? If
Yes, how would you tell the system when the instance
is even incrementally valid before turning ON the
validation. I can imagine there must be an API to
enable/disable on-the-fly validation during the
creation of XML instance. I might be wrong as it may
not make sense.

OR

Does the application design needs to ensure that the
generated XML is always valid?

-D


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
_____________________________________________________________
Play it loud with a new car stereo! Click here!
http://thirdpartyoffers.netzero.net/TGL2211/fc/Ioyw6ijnRjS5R8hSDlysYcOvkYpdJho9obZKEmCCrYVGcCjtvzxvdR/
Received on Friday, 21 December 2007 04:35:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:15:01 GMT