Re: [xsl] multiple input sources to Saxon

Subject: Re: [xsl] multiple input sources to Saxon
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 10 Oct 2001 19:04:45 +0100
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


Current Thread