Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: dave <ceek63@-----.--->
To: "ovisvana@-------.---" <--------@-------.--->, xmlschema-dev@--.---
Date: 12/20/2007 4:00:00 PM

Am trying to understand the on-the-fly validaiton
behavior. Am afraid I may get Validation exceptions
when I am in the middle of constructing the Instance.
Let's add some Key constraints to the schema. Now,
will get an Validation exception if I were to complete
the definition of the Key (say, made up of 4 elements)
at different times (meaning I may not define all at
once but definitely before the exit from app). How
would one let know the on-the-fly validator about this
so that we don't get premature exceptions?
In other words, Is it that you need to take lot of
precautions while doing this live validatio (like
adding dummy root closing tag,etc)?

-D
--- "ovisvana@n..." <ovisvana@n...>
wrote:

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


      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

From ceek63@y... Fri Dec 21 08:04:36 2007
Received: from lisa.w3.org ([128.30.52.41])
	by frink.w3.org


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent