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

outputting multiple documents based on a variable

Subject: outputting multiple documents based on a variable
From: "James M. Jackson Sanborn" <james_sanborn@xxxxxxxx>
Date: Wed, 15 May 2002 13:52:27 -0400
outputting document
Alright, I've looked through the archives, and can't find anything
that seems directly applicable, so I thought I might try asking:

I have a pile of records in one xml file-- (simplified example below):
<books>
  <book>
    <title>book on animals</title>
    <subject>dogs</subject>
    <subject>cats</subject>
    <subject>snakes</subject>
    <subject>fish</subject>
  </book>
  <book>
    <title>book just on dogs</title>
    <subject>dogs</subject>
  </book>
  <book>
    <title>book just on cats</title>
    <subject>cats</subject>
  </book>
</books>

-- I want to use <xsl:document> to output multiple documents with a
single xsl-- these documents will be pages that list together books
that include a given subject (and are named _subject_.html-- eg.
dogs.html, cats.html, snakes.html, etc.)

In perl, I'd probably put the list of subjects for which I want to
create pages into an array, and then cycle through the values in the
array from start to finish, outputting a new document for each
value--  can I use <xsl:param> like this? is there another array-like
construct? or another simple solution I'm missing? or am I stuck
replicating the xsl file for each different value?

Thanks for any help on this.
-James

 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.