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

Re: Intermediate XML file creation, was:<no subject>

Subject: Re: Intermediate XML file creation, was:<no subject>
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Sun, 20 Apr 2003 11:30:21 +0200
xslt multiple pass
It is possible to perform multiple-pass transformations without saving the
intermediate results to a file.

Multi-pass transformation is a kind of multiple composition (of functions)
and is fully supported by the FXSL library.

In its simplest form composition can be expressed by the following pattern:

<xsl:variable name="passOne">
  <xsl:apply-templates select="someNodeSet" mode="passOne"/>
</xsl:variable>

<xsl:apply templates select="vendor:node-set($passOne)/node()"
mode="passTwo"/>


In XSLT 2.0 the nasty RTF type has been eliminated and there will be no need
to use the xxx:node-set() extension function.


In some cases it may be possible to optimize multi-pass transformations
(once they are working OK) into a single-pass transformation. This can be
done almost automatically, using wellknown identities like the following:


map  f  (map g  xs)  =  map  (f . g)  xs

This says that if we have to perform a function g() on each element x of a
list xs and then on each element of the resulting list perform a function
f(),  this is the same as performing the functional composition  (f . g) ()
on each element x of the list xs.



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL



"Andrew Kirkpatrick" <ncam_tech@xxxxxxxx> wrote in message
news:BAC58A7E.133B7%ncam_tech@xxxxxxxxxxx
> Reposted with a subject...
>
> I have an XML file that is being transformed by an application that
> incorporates Xalan.  This file will vary in size between 1 and 25 MB.
>
> I need to do multiple transformations (create an SVG graph from the data,
> create a frameset and frames with the data, and create a couple of
overview
> HTML files from the data).
>
> Some of these transformations are complicated due to a couple of
> calculations that need to be performed on the data.  These calculations
> depend on an additional external file.
>
> Is it reasonable or advantageous to create an intermediate XML file that
> incorporates new elements/attributes for the calculations so that each of
> the ultimate transformations don't need to do these calculations, or is
this
> considered bad form?  This is effectively what I would like to be able to
do
> in one shot but am having difficulty making it happen.  It seems that I
can
> lock in the result tree this way, but am interested to hear if this
> generates any reaction (positive or negative).
>
> Thanks in advance,
> AWK
>
> --
> Andrew Kirkpatrick
> CPB/WGBH National Center for Accessible Media
> 125 Western Ave.
> Boston, MA  02134
> E-mail: andrew_kirkpatrick@xxxxxxxx
> Web site: ncam.wgbh.org
>
> 617-300-4420 (direct voice/FAX)
> 617-300-3400 (main NCAM)
> 617-300-2489 (TTY)
>
> WGBH enriches people's lives through programs and services that educate,
> inspire, and entertain, fostering citizenship and culture, the joy of
> learning, and the power of diverse perspectives.
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.