Sorry in advance if there has been an answer before like mine, but I have checked and haven't found exactly an answer this simple issue:
<self-uri xlink:href="http://www.harmreductionjournal.com/content/1/1/5">
All I want to do is to select the value of the attribute "xlink:href"
Applying the following selector always returns empty result:
<xsl:value-of select="@xlink:href"/>
I have iterated through the attribute values during processing
xlink:href: http://www.harmreductionjournal.com/content/1/1/5
My question is very simple: how can I get the value of an atribute that has a namespace? It was my understanding it should work like this.
If you can point me to the right question on SO that will also suffice.
Thanks in advance.
EDIT:
Based on the answers I have checked my root stylesheet declaration and it looks like this:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
exclude-result-prefixes="xlink mml">
I'm guessing the exclude attribute has something to do with the issue. If I replace it I find that it still doesn't work and the result xml is full with it on random places.
xsl:value-of.