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

Re: Dynamic include

Subject: Re: Dynamic include
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Thu, 12 Sep 2002 05:16:20 -0700 (PDT)
dynamic include
--- Peter Davis <pdavis152 at attbi dot com> wrote:

[first option skipped]

> * Or, why not make the source XML with the <include> tag into a
> stylesheet of 
> its own?  This will involve two stages of processing: the first
> outputs
> a 
> stylesheet containing only the <xsl:include> elements, and the second
> uses 
> the newly generated stylesheet to re-process the data using the
> included 
> stylesheets.  For example:
> 
> + Output from first stage:
>   <xsl:stylesheet ...>
>     <xsl:include href="principal.xsl"/>
>     <!-- taken from <include> element -->
>     <xsl:include href="page1.xsl"/>
>   </xsl:stylesheet>
> 
> + Second stage uses the first stage's output stylesheet, and
> processes
> the 
> input XML again (this time ignoring the <include> element).
> 
> It should be possible to optimize the two stages to keep from parsing
> the 
> source XML twice, by reusing the DOM tree if the data will fit into
> RAM.
> 
> HTH
> 
> -- 
> Peter Davis


It would be much more efficient to use a ***stylesheet skeleton***
file, in which to update (using DOM+XPath, e.g. setAttribute()) just
the value of the href attribute of the necessary xsl:import element.




=====
Cheers,

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

__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

 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.