468,257 Members | 1,425 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,257 developers. It's quick & easy.

XSL outputting attribute value in select="" clause?

I have no problems outputting the attribute value when the node is in
context, for example, @id when an <status> node is in context.

However, I am having trouble outputting it in a <xsl:value-of />
element:

<xsl:value-of select="procresults/settings@priority />

where it looks like

<procresults>
<settings priority="3" />
</procresults>

I looked through the XPath spec and didn't see anything regarding it,
I've tried using :node() and a few other modifiers with no luck.

Googling doesn't do much good as most articles are talking about the
select="" being an attribute to output instead of using select="" to
output an attribute.

Thanks for any tips,

Eric

Jun 15 '06 #1
2 1241
On Thu, 15 Jun 2006 06:55:15 +0200, <ce*****@gmail.com> wrote:
<xsl:value-of select="procresults/settings@priority />


Mind the slash;-)
<xsl:value-of select="procresults/settings/@priority" />

Of course, this would only work when the context node is the parent of
'procresults'...
--
Joris Gillis (http://users.telenet.be/root-jg/me.html)
Fiat W3C in tenebris
Jun 15 '06 #2
Thanks! I did try that but some of the .NET xslt errors are quite
cryptic, it was a problem elsewhere in my document as well, woops!

Joris Gillis wrote:
On Thu, 15 Jun 2006 06:55:15 +0200, <ce*****@gmail.com> wrote:
<xsl:value-of select="procresults/settings@priority />


Mind the slash;-)
<xsl:value-of select="procresults/settings/@priority" />

Of course, this would only work when the context node is the parent of
'procresults'...
--
Joris Gillis (http://users.telenet.be/root-jg/me.html)
Fiat W3C in tenebris


Jun 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by bill salkin | last post: by
21 posts views Thread by Steven T. Hatton | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.