xsl-list
[Top] [All Lists]

Confused by xsl:for-each

2004-11-25 05:47:16
Hello, 

I am a bit confused how/why I can't get for-each to work here.

Input:

...
<tr>
  <relation name="relatedAddress" type="address">
    <td>
      <a href="external/address.html">Adresse 1</a><br />
      <a href="error/code.html">Adresse 2</a>
    </td>
  </relation>
</tr>
...

From <relation> occurences I want to copy only all HTML a tags to the
output document.
I try this with. Not successfully ;-). I get no copied <a..> tags.

<xsl:template match="relation"> <-- match is fine
        <xsl:for-each select="//a">
                <xsl:copy-of select="."/>
        </xsl:for-each>
</xsl:template>

Thanks for assistence,

Robert

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



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