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

RE: nodes or multiple runs?

Subject: RE: nodes or multiple runs?
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 11 Feb 2004 10:58:55 -0000
children pythons for sale
Running multiple transformations in a pipeline is just fine, it helps to
keep the transformation stages modular. Try to chain them in a SAX
pipeline, however, rather than serializing and parsing between each
transformation step.

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Paul Tremblay
> Sent: 11 February 2004 07:51
> To: xsl-list
> Subject:  nodes or multiple runs?
> 
> 
> 
> I will be publishing a set of xslt stylesheets and want to 
> make them easy to use for everyone. My question is whether I 
> should chain several stylesheets together, or try to process 
> the original document with just one run, using temporary trees.
> 
> Right now, my transformation involves chaining together 
> stylesheets. One xslt stylesheet creates a document, and that 
> document is processed with an xslt stylesheet, and so on. 
> 
> This method requries that I create several temporary files. I 
> can write a python script makes the chaining together easy, 
> but then I have to contend with different processors. Saxon 
> will require a different processing command than Xalan. I 
> will have to write a routine for each processor, and that of 
> course gets pretty involved.
> 
> However, I was reading Michael Kay's book, and I realized 
> that I can actually create temporary trees instead of making 
> multiple runs. 
> 
> For example, I can group together all colors in the document 
> and store the result as a temporary tree in a variable. I can 
> then number the nodes in this temporary tree consecutively.
> 
> But not all processors can handle this method of using a 
> temporary tree. For example, xsltproc cannot. 
> 
> In addition, re-writing my stylesheets so that I can process 
> everything at once will take a lot of work. In fact, with my 
> level of skill it may not even be possible. The tricky part 
> is that I have to number nested lists according to attributes 
> in the original XML document. A list that is nested inside 
> another list may require that it inherit the number for its 
> parent, or it may require that it not. The numbering style 
> for the child list may be deciaml, but the numbering style 
> for the parent may be Roman. The top level of each list must 
> have a unique ID, and this ID must be part of an attribute 
> for the paragrphs. But children of lists must not have ids. 
> It is for this reason that I numbered all lists first, and 
> then on a subsequent run concatenated numbers from parent 
> lists when I needed to.
> 
> Is it okay to make a user process the document several times, 
> or should I try to make my xslt stylesheet a one run process?
> 
> Thanks
> 
> Paul
> 
> -- 
> 
> ************************
> *Paul Tremblay         *
> *phthenry@xxxxxxxxxxxxx*
> ************************
> 
>  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.