xsl-list
[Top] [All Lists]

Re: Select single node having highest attribute value

2005-10-18 12:02:53
Something like

<xsl:apply-templates select="blocks/block[maximum-value-of(@priority)]" />

would be perfect, but as we know, the world isn't perfect.
...

Anybody got any ideas?

The usual answer.  Sort on the attribute and take the last element.

A quick scan shows some examples in
http://www.xml.com/pub/a/2002/07/03/transform.html

Don't have time to give you a full example, but hopefully this should
get you started.

Jon Gorman

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