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

Re: Testing if an attribute name is in a list of names

Subject: Re: Testing if an attribute name is in a list of names
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Thu, 19 May 2005 13:47:09 +0000
Re:  Testing if an attribute name is in a list of names
Paul,


That's getting closer to what I want, at least in terms of neatness.
I'm just wondering if we can get rid of the nested for-each.


For what it's worth, the following does not have explicit nested loops, but that's just a matter of syntax.


<?xml version="1.0" encoding="iso8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>


<xsl:variable name="meta-col-names" select="/data/outcomes/column/@attName"/>

   <xsl:template match="/">
       <xsl:apply-templates select="data/rows/row"/>
   </xsl:template>

   <xsl:template match="row">
       <xsl:apply-templates select="@*[name() = $meta-col-names]"/>
       <xsl:text>&#xa;</xsl:text>
   </xsl:template>

   <xsl:template match="row/@*">
       <xsl:value-of select="."/>
   </xsl:template>

</xsl:stylesheet>

_________________________________________________________________
Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


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.