Altova Mailing List Archives


Re: [xml-dev] genx - consensus items

From: Bob Foster <bob@------.--->
To: David Tolpin <dvd@----------.--->
Date: 1/23/2004 9:06:00 AM
David Tolpin wrote:
 > David Tolpin:
 >
 >>Rich Salz:
 >>
 >>>>I'm inclined to agree.  A teeny bit more complexity in the
 >>>>implementation but probably worth it.  Anyone want to push back? -Tim
 >>>
 >>>asymnmetry is bad.  open-close, begin-end, etc.
 >>
 >>The idea was to improve asymmetry, not to defeat it, I think.
 >>
 >>startTag
 >>  attribute*
 >>  text
 >>endTag
 >>
 >>But in this case startTag is not start 'Tag', it is 
startElement/endElement.
 >>
 >>Not that I like this approach, just explaining. Simple logic is 
better than
 >>complex.
 >
 >
 > That is, startElement/endElement are good for building a tree, but 
inadequate
 > for serializing,
 >
 > startTagOpen
 >   attribute
 > startTagClose
 >
 >   Text
 >
 > endTag
 >
 > are simpler and more natural for serialization tasks. I'd keep the 
startTagClose

Conversely, James Clark has written several serializers, e.g., XmlWriter 
in trang, in which the convention is:

startElement*
   attribute*

   (text | startElement)*

endElement

No explicit end-start-tag is used or needed. The writer can tell when a 
start tag needs to end; in fact, the convention helps to produce empty 
element tags without backtracking. Use is simple and natural.

Bob Foster
http://xmlbuddy.com/

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.