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>

   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. 


---------- 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.


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.


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


Never miss a thing.  Make Yahoo your home page. 
Play it loud with a new car stereo! Click here!
Received on Friday, 21 December 2007 04:35:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:45 UTC