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

RE: genx - consensus items

  • To: "David Tolpin" <dvd@d...>,<xml-dev@l...>
  • Subject: RE: genx - consensus items
  • From: "Joshua Allen" <joshuaa@m...>
  • Date: Fri, 23 Jan 2004 10:01:42 -0800
  • Thread-index: AcPhkxgPVHctnRzjSvOrv+Ekw+7EtgARWADQ
  • Thread-topic: genx - consensus items

when did gen x begin
> > 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.


> XmlWriter from trang is tailored to the particular use in trang;
namely
> for tree traversal. It is only one test case of many.

FWIW, we discussed this pattern rather extensively in XmlWriter design
for .NET and nearly decided to introduce a WriteStartContent (same as
what you call genxStartTagClose) method for V2, but ultimately decided
against it.  We felt that StartContent was less usable for 80% of users,
who would have regarded it as unnecessary and perhaps confusing.  It's
also more consistent with the way that the XML data model views things
-- anything between a "start" and "end" is a child of that start and end
and increments depth:

StartElement
	StartAttribute
		Text
	EndAttribute
	StartElement
		Text
	EndElement
EndElement

Any state between EndAttribute and StartElement would be a dummy state
that did not represent anything in the data model, but instead
represented a lexical token of "</>"

The main reason we even considered this state was for potential
performance.  The idea was that in pipelining scenarios we could have
the inner writer be a "raw" text writer that always assumes that the
calls will occur in the correct order, and would do absolutely *no*
checking.  The outermost writer would do all of the checking, insert
missing calls to EndAttribute, StartContent, etc. and then each layer of
the pipeline up to the final text output could be "raw".  This would
eliminate need for multiple layers to maintain stack, check for
duplicate attributes, etc.

Another consideration was that, when serializing to alternate private
binary format, we don't actually need a token that represents the end of
an attribute -- we could store "SE:SA:Value:Value:SA:Value:SC:...".
This way, the writer could insert proper SC content for the private
binary format without having to keep track that attributes have closed.

In any case, I doubt that either consideration applies to genx, and even
despite these considerations we did not feel there was enough
justification for StartContent on XmlWriter in .NET.



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.