This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: multiple input sources to Saxon
- To: "Pollington, Lee (ELSLON)" <lee dot pollington at biomednet dot com>
- Subject: Re: [xsl] multiple input sources to Saxon
- From: Jeni Tennison <jeni at jenitennison dot com>
- Date: Wed, 10 Oct 2001 19:04:45 +0100
- CC: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Organization: Jeni Tennison Consulting Ltd
- References: <54A600C436EA694581B93E4BD4D4788A0150D92D@elslonexc004.wins.epress.co.uk>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Lee,
> I looking for direction in terms of an effective strategy for
> "munging" several input sources togethor to supply as a "super
> document" to Saxon. We have multiple javax.xml.transform.sources, we
> want to combine them togethor under a given root element and supply
> them to the transformer. It's an obvious DOM app, but we didn't want
> the expense of DOMing them and then turning them back. What can we
> do?
Ideas:
- implement an XMLFilter that generates SAX events to fake the
document element, have it pass through (or generate) SAX events
from the sources that you want to combine (but swallow the
start/endDocument events). Use it as the source for the
transformation.
- use an XSLT transformation to take the sources and combine them
together using document() and xsl:copy. Use an EntityResolver if
the sources aren't accessible by URI.
- don't bother creating one big file - have the transformation access
each of the sources separately (again using an EntityResolver).
(In general I think Mike says that small is beautiful and big is
ungainly, so the latter *might* give you a bit better efficiency [I
don't know if it's the parse that's the problem or storing
information], but I don't know enough about the details of what you're
doing to know whether it's practical.)
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list