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]

XSL sorting


	Hi!

I've been working on XML/XSL project.
I have the problem with a sorting.

My XML source is:

<Event>
	<attrList>
		<attr id="i0_0">
  			<name>trap type</name> 
  			<data>COLD START</data> 
  		</attr>
		.........................

	</attrList>
</Event>

I'd like to sort all events by attrList/attr/data, where  attrList/attr/name="some value",
						for example: trap type.

I've tried to use key for sorting, but it is not working. For example:

<xsl:key name="sortparam" match="event/attrList/attr/data" use="event/attrList/attr/name"/> 

<xsl:template match="logger">
	<xsl:apply-templates>
		<xsl:sort order="ascending" select="key('sortparam','trap type')"/>
	</xsl:apply-templates>
</xsl:template>

Please, help me with this problem.

Regards,
	Maia.

 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]