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]
Other format: [Raw text]

Re: Sorting Problem


Hi Sachi,

> I want to sort AttribValue tag only if AttribName tag is KTIRToolName.
   
It's not especially clear from your description what you're after. I
think that you're probably trying to sort the UserAttribute elements
whose AttribName is KTIRToolName, by their AttribValues. If so, then
you want:

  <xsl:for-each select="UserAttribute[AttribName = 'KTIRToolName']">
    <xsl:sort select="AttribValue" />
    ...
  </xsl:for-each>

Another possibility is that you want to do something with all the
UserAttribute elements, but want those UserAttribute elements whose
AttribName has the value of 'KTIRToolName' to be sorted by their
AttribValue. That would be:

  <xsl:for-each select="UserAttribute">
    <xsl:sort select="AttribValue[../AttribName = 'KTIRToolName']" />
    ...
  </xsl:for-each>

If neither of these are what you're after, I recommend that you post
again with a sample of the result that you're aiming for.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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]