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

Re: Merging 2 XML's in to 1 output XML (Performance I

Subject: Re: Merging 2 XML's in to 1 output XML (Performance Issue)
From: Elliotte Harold <elharo@xxxxxxxxxxxxxxx>
Date: Thu, 13 Oct 2005 11:13:02 -0400
contenthandler output xml
Michael Kay wrote:

That's not a bug then, it's a design decision, or more particularly a
question of interpretation of the SAX specification. Does the ContentHandler
specification imply a contract that the sequence of events you pass to it is
well-formed? There's no right answer; but there are ContentHandlers out
there that make that assumption and that fall over in a messy heap if you
pass them two top-level element nodes.

My ContentHandler is ready to handle that. More to the point, any ContentHandler that expects to receive data from an XSL transformation had better be ready to handle that without falling over and dying, because as we all know XSL transformations don't always generate singly-rooted trees.

I don' t think it's unreasonable to expect that one can use the published API to receive the results of an XSL transformation without losing any pieces.

Moving beyond XSLT, I think any generic ContentHandler had better be ready to handle a lot worse things than a multiply rooted tree. While driving a ContentHandler through a real XML parser may produce a nicely well-formed event sequence, once SAX filters are applied anything can and does happen. End-tags can be missing. Elements can overlap. Element names can contain spaces. Binary data can appear. Almost anything can happen. A ContentHandler that does not control its parser should be ready for this.

o;?Elliotte Rusty Harold  elharo@xxxxxxxxxxxxxxx
XML in a Nutshell 3rd Edition Just Published!

Current Thread


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.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
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.