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: sort by attribute text


Mike,

David missed one teeny detail in his fix: matching on "/" and for-each 
select="*" will still select just one element (the document element).

Better match on the document element, or whatever other element contains 
the node set you want to sort.

Cheers,
Wendell

At 12:57 PM 3/26/2002, David wrote:

>  <xsl:for-each select=".">
>   <xsl:sort
>
>. selects a node set consisting of one node, so it doesn't matter what
>you sort on, since you are only sorting one thing it will come out as it
>went in.
>
>change
>
><xsl:template match="*">
>  <xsl:for-each select=".">
>
>to
>
><xsl:template match="/">
>  <xsl:for-each select="*">


======================================================================
Wendell Piez                            mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


 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]