xsl-list
[Top] [All Lists]

Re: [xsl] A Problem with Variables and Xpath

2011-07-25 10:20:49
Christian(_dot_)Sisti(_at_)isti(_dot_)cnr(_dot_)it wrote:
Hi All!

It is possible to gather the value of an attribute using variable in
Xpath? How?

I have a variable like this:

<xsl:variable name="foo">something</xsl:variable>

and I am trying to set an attribute in this way:

<disney>
   <xsl:attribute name="mickey">
    <xsl:value-of select="./$foo"/>
   </xsl:attribute>
</disney>

where $foo is the name of an attribute of the source document.

Then you want
  <xsl:value-of select="@*[local-name() = $foo]"/>


--

        Martin Honnen --- MVP Data Platform Development
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
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>