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

Join operation with a csv key in XSL?

Subject: Join operation with a csv key in XSL?
From: drsystems@xxxxxxxx
Date: Fri, 3 Jan 2003 02:59:36 +0500 (IST)
join operation
Hi,

I have a query about getting XSL to do the following.
Given the XML file:

<xml>
<info beforekey="a,b,c" afterkey="d,e">
  <details tag="a" path="t1.gif" />
  <details tag="b" path="t2.gif" />
  <details tag="c" path="t3.htm" />
  <details tag="d" path="t4.jpg" />
  <details tag="e" path="t5.doc" />
</info>
</xml>

I need to loop through the comma separated values of the 
beforekey and afterkey, grabbing the details records containing 
those keys, and putting them into img tags or a/href tags depending
on the extension (img tag for gif/jpg and a for the rest).

The expected output for this file is therefore:

<html>
Before:
    <img src="t1.gif" />
    <img src="t2.gif" />
    <a href="t3.htm" />
After:
    <img src="t4.jpg" />
    <a href="t5.doc" />
</html>

What is the best way to do this in XSL?
The platform is IE5.5 with MSXML3.

I have parts of it figured, (some of them thanks
to this very list!), but am still having trouble
getting the full thing working. For starters, I 
have no idea how to loop through csv key values.
Please help!

Thanks,


 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.