This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Attribute test


> > I need to make the XSLT to test every attribute
> > called priority in a document (<document> being the top
> > element) and capture the highest priority of the entire
> > document, and display it at the top and bottom of the
> > document.  (I know how to make it display)

<xsl:variable name="max-priority">
   <xsl:for-each select="//@priority">
      <xsl:sort order="descending" data-type="number"/>
      <xsl:if test="position()=1"><xsl:value-of select="."/></xsl:if>
   </xsl:for-each>
</xsl:variable>

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]