in reply to xml::xslt xpath bug?

That code doesn't produce any output for me

Replies are listed 'Best First'.
Re^2: xml::xslt xpath bug?
by Anonymous Monk on Jul 07, 2009 at 14:49 UTC
    Did you try it with the exact value of one of the element's attributes (case # 3, I think)? BTW, thanks for commenting.
    <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Tr +ansform"> <xsl:template match="/"> <xsl:for-each select="/PLMXML/Form"> <xsl:if test="/PLMXML/Form[@id=id24]"> <xsl:value-of select="@id"/> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet>
      Yes, I used the download link.
        I've found I get different results with xsl:for-each. Would you try the following which uses xsl:for-each instead of xsl:if?
        <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Tr +ansform"> <xsl:template match="/"> <xsl:for-each select="/PLMXML/Form[@id=id24]"> <xsl:value-of select="@id"/> </xsl:for-each> </xsl:template> </xsl:stylesheet>
        This xslt returns id36 for me.