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

RE: Preserve HTML formatting when apply-templates in

Subject: RE: Preserve HTML formatting when apply-templates in variabl
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Mon, 9 Aug 2004 10:37:10 -0400
xslt preserve html
> From: Chris Loschen [mailto:closchen@xxxxxxxxxxxxxxxxxx]
>
>
> Here's the situation: I've got a very large input file which would
> overflow my
> memory if I ran the XSLT all at once. So instead I'm breaking up the
file
> into
> smaller pieces and running each one separately. More specifically, the
> file
> is set up like
>
> <!ELEMENT root (header, bill+, trailer)>
>
> and I need to process the header, each individual bill, and finally
the
> trailer
> in a series of XSLT transforms, usually more than a thousand all told.
> However, I do need to retain some of the data from the transforms as I
go
> because I need to include a grand total of the amount billed and the
total
> number of records in the trailer data.
>
> I'm using XSLT 1 and Xalan-J.
>
> What I've done is use xalan:write when I process the header like so:
>
> <xalan:write file="bills.xml">
> <xsl:text disable-output-escaping="true">&lt;root&gt;</xsl:text>
> </xalan:write>

I think I would either pass a parameter into each invocation of the
stylesheet.  Then I would use the global param to insert the running
total wherever I needed it, presumably at the end.  I might pass in
another parameter that indicates when we are at the last fragment, so
that the running total can be inserted.  You could output the running
total to a separate file (or maybe to an environmental variable,
depending on how you are orchestrating the process), which your driver
could read to pick up the current total.  No partial elements needed
this way.

Cheers,

Tom P

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.