If your string XML is going to be run through XSLT like Xalan,
it WILL BE parsed anyway, and most likely it will be parsed using
a SAX parser (the default Xalan behavior).  Therefore there is no
overhead whatsoever compared to what you would do in any other
solution.  In fact, if you look at the code I sent yesterday, the
main issue was not with parsing the original XML (this is given),
but with avoiding the necessity to store the intermediate xsl:fo
document that comes out of the transformer before being fed into
FOP.  By using SAX events at this point you save a lot of memory
and streamline the process.


-----Original Message-----
From: Ulrich Mayring [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 4:24 AM
Subject: Re: Question on XSLTInputHandler

> You can use org.apache.fop.apps.Driver to get the
> org.xml.sax.helpers.DefaultHandler and fire sax events on that.

Well, my XML is unparsed and in the form of a java.lang.String, so
parsing it just to fire SAX events seems to be a bit of an overhead, no?
You're probably wondering where my XML is coming from, if it is
unparsed, a String and not from a file. Well, here goes:

I load an XML document from a file. I receive some XML fragments via a
socket connection and merge it rather unceremoniously with the XML from
the file (via textual replace basically). Then I do some database stuff,
which gives me more XML fragments, and I merge them in as well. So, the
XML document I have in the end is a java.lang.String and it has been
created without any parsing or other standard XML procedures. I'm
looking for speed in this case, not intelligence :-)

Anyway, thanks everyone for the many tips, I think I'll be able to solve
my problem :)


Ulrich Mayring
DENIC eG, Systementwicklung

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to