I am trying to select all of the links in a xhtml document in xsl. Some of the anchor tags have the namespace declaration xmlns="http://www.w3.org/1999/xhtml"
in them. These are not selected. e.g. with this xml doc:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="xsl.xsl"?>
<root>
<item>
this iz sum text and it haz sum <a xmlns="http://www.w3.org/1999/xhtml" href="http://cheezburger.com/">linx</a> in it.
Teh linx haz piks of <a href="http://icanhascheezburger.com/">kittehs</a> in dem.
</item>
</root>
and this xsl:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<dl>
<xsl:for-each select="//root/item/a">
<dd><xsl:value-of select="."/></dd>
<dt><xsl:value-of select="@href"/></dt>
</xsl:for-each>
</dl>
</html>
</xsl:template>
</xsl:stylesheet>
Only the second link is selected. Can someone explain what is going on here and how I might fix it?