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

RE: Perpetuating xsl instructions

Subject: RE: Perpetuating xsl instructions
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Tue, 13 May 2003 13:05:33 -0400
RE:  Perpetuating xsl instructions
[Alan Gardner]
> 
> The solution requires dynamically writing a web page by 
> aggregating n number
> of XML docs without writing any code (a one off solution). 
> Essentially a
> chain reaction is initiated where the first XSL document runs 
> up a 'tree' of
> XML documents, merging XML into itself. The terminating transformation
> results in a pure XML document (minus the XSL) with all the 
> content needed
> to build the web page.
> 
> If you can think of another solution, we'd love to hear it.
> 

It depends on how you are supposed to know which xml pieces to
concatenate.  Assuming there is some way to know that beforehand, I
would create a driver file and run the transform against it instead.
Something like this -

driver.xml

<pieces>
 <piece src='file:///piece1.xml'/>
 <piece src='file:///piece2.xml'/>
...
</pieces>

aggregate.xsl

<xsl:stylesheet .....>
<xsl:template match='/pieces'>
<wrapper-element>
   <xsl:for-each select='piece'>
      <xsl:copy-of select='document(@src)'/>
   </xsl:for-each>
</wrapper-element>
</xsl:template>
</xsl:stylesheet>

This is simple and easy to maintain, and very clear as to what it is
doing.

Cheers,

Tom P

 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.