[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Fast text output from SAX?


sax dtd check
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@h... http://www.hpti.com Personal: sdw@l... http://sdw.st
Stephen D. Williams 703-724-0118W 703-995-0407Fax 20147-4622 AIM: sdw

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.