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

extract the right elements

Subject: extract the right elements
From: clemens schrenk <clemens.schrenk@xxxxxxx>
Date: Tue, 30 Sep 2003 13:03:00 +0200
 extract the right elements
i am currently using a for-each loop to extract in re-insert some attributes
of an element, originally called "instance". it looks like this:

<xsl:for-each select="//INSTANCE[@class='Audio' or @class='Web-Site']">
    <xsl:for-each select="key('tracker','Position')">
        <item>
            <xsl:attribute name="identifierref">
                <xsl:value-of select="."/>
            </xsl:attribute>
            <title>
                <xsl:value-of select="parent::INSTANCE/@name"/>
            </title>
        </item>
    </xsl:for-each>
</xsl:for-each>


the problem is, that i don't want to use it on all "instance" elements, but
only on those whose class attributes are either 'Audio' or 'Web-Site', but
the first for-each loop that is meant to fulfill this purpose simply doesn't
work, instead it always runs the loop for all "instance" elements.

can you help me with this ?

thanks clemens


 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.