xsl-list
[Top] [All Lists]

extract the right elements

2003-09-30 04:03:00
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[(_at_)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



<Prev in Thread] Current Thread [Next in Thread>