OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Fast text output from SAX?

[ Lists Home | Date Index | Thread Index ]

I don't have a problem with the concept of well-formedness, only with the assumption, or requirement, that a document/object must be fully validated every time it is imported into a program before use.  XML 1.1 encoded as text must be parsed and a side effect is that if you are parsing, you can and should fully validate well-formedness when parsing.  The issue is that esXML is designed to avoid parsing.  That means that the library must be the primary driver to enforce well-formedness and that a receiver of esXML must either accept:
  • assumption of overall well-formedness and validation of only those elements visited during manipulation (i.e. the paths through the object to the elements used, but potentially not the whole structure), or
  • overhead of a full validation step before processing.
I think that this choice of whether to fully validate or to accept exception handling for detecting corruption but not assuring that there is no corruption even in areas not 'visited' is the valid situation.
The opposing argument is that there is a strict requirement to fully validate an XML-equivalent object for well-formedness after reading/importing and before any processing is allowed.  While good practice in certain application situations, this is not necessary or appropriate for many applications and is not a valid strict requirement in my view.  It should be detectable when processing, but only when encountered, and otherwise optional just as validation with a schema/DTD is optional, hence my comparison.

esXML does have a complete equivalent to XML 1.1 well formedness and to canonicalization, as I suspect that most XML-equivalent data structures would.  It may even be very efficient to validate, but 'friendly' sets of applications and those that are exception based should be able to live with exceptions thrown when corruption or any violation of well-formedness is found in the course of processing.

If well-formedness validation is pedantically considered a requirement of any XML 1.1 processing, then that will have to be an additional semantic relaxed slightly to "well-formedness validated when encountered during manipulation or full on demand", along with loss of text structuring basis.

sdw

Thomas B. Passin wrote:
Elliotte Rusty Harold wrote:
You're mixing apples and oranges. Schema validation (even DTD validation) is explicitly optional in XML. Furthermore you can process an invalid document. That is definitely not true of a malformed document. Failing to check well-formedness is not an option.

But if the xml "alternative" is not a text format, well-formedness may not have an equivalent.

Cheers,

Tom P

-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://www.oasis-open.org/mlmanage/index.php>


-- 
swilliams@hpti.com http://www.hpti.com Personal: sdw@lig.net http://sdw.st
Stephen D. Williams 703-724-0118W 703-995-0407Fax 20147-4622 AIM: sdw




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS