[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: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 14 Oct 2005 15:10:48 +0100
merging 2 xml using xmlreader
> > The problem is, I don't know whether the ContentHandler 
> does expect to
> > receive data from an XSL transformation.
> 
> If someone's giving the ContentHandler to TrAX, then I think it's a 
> pretty good bet they expect it to receive output from an XSL 
> transformation.

But they don't necessarily know that the XMLFilter they've invoked is
actually an XSLT transformation. The whole point about pipelines is that you
don't have to have special knowledge about who's before you and after you in
the pipeline. When you call transformerFactory.newXMLFilter() you get an
XMLFilter back, and you can pass that to someone who is expecting an
XMLReader, and who then calls parse() on it thinking that it's a real
parser. That user is entitled to expect that it obeys the contract for
XMLReader, which is is that an XMLReader notifies events representing a
well-formed document, and when it encounters an event that would make the
document ill-formed, it throws an exception.

There are no black-and-white right-and-wrong answers here: it's a matter of
judgment, and there are different use cases where different designs are
optimal. For that reason, Saxon allows you to override the above behavior.
Perhaps the default should be different for the XMLFilter scenario from the
SAXResult scenario. But it's not a bug if it isn't, it's a design that we
can talk about improving.

Michael Kay
http://www.saxonica.com/ 

Current Thread

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
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.