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

RE: Nested Documents (was: XML 2.0)

  • From: "Michael Kay" <mike@s...>
  • To: "'Richard Salz'" <rsalz@u...>,"'COUTHURES Alain'" <alain.couthures@a...>
  • Date: Wed, 27 Feb 2008 18:21:39 -0000

RE:  Nested Documents (was: XML 2.0)
Thanks, but I still don't understand what you mean by "more tightly linked". You're just repeating the assertion that a final end tag is good for me because it enables me to detect more errors - which I have already explained is the wrong tradeoff in my case. In fact, if my log file really is broken for some reason, then I would rather be able to read most of it than none of it.
 
 


From: Richard Salz [mailto:rsalz@u...]
Sent: 27 February 2008 18:07
To: COUTHURES Alain
Cc: Michael Kay; xml-dev@l...
Subject: Re: Nested Documents (was: XML 2.0)


> I don't understand what you mean by "more tightly linked"...

In a single-rooted document, <a>...</a>, when I see that final closing bracket I can be pretty sure that I've got everything.  (Yes, trailing comments and PI's I handwave aside.)  If the input stream ends before that closing bracket, then I know something went wrong.  My XML consuming application can pretty much treat the input as a stream of bytes and not care where how or why something went wrong; at least at the first level.  See the bracket, things ok; don't see the bracket, something broke.

Now, let's imagine a multi-rooted document like <a>...</a><b>...</b>.  How do I know when I hit the end? Suppose the network drops after the </a>?  If you're using something like TCP socket API, you have no idea how many bytes were in-flight when the connection dropped.  (TCP is realiable only when its working; it's failures modes are pretty pitiful.)  Suppose I'm reading a log file and there's no free space on the disk but I do see the closing </b>.  Is that coincidence -- did the producer just get lucky and take the last bits of the disk, or am I missing <c>...</c> and friends?

There's no way to know, in a generic way, without doing very specific things depending on when where why and how the XML is transported.  Right now, you don't have to.  Yes, that's a simplification, 80/20, whatever you want to call it.  I'd call it a trade-off and say the current design is the right one. :)

It has issues in the real world, too.  Suppose you're writing a book and someone inserts a pagebreak between <a> and <b> in a multi-root document.  Are they gonna get confused or misled if they're not explicitly told to turn the page?

        /r$

--
STSM, DataPower Chief Programmer
WebSphere DataPower SOA Appliances
http://www.ibm.com/software/integration/datapower/


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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-2007 All Rights Reserved.