|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








