[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xslt sorting

Subject: Re: xslt sorting
From: michael gruber <gruberm@xxxxxx>
Date: Mon, 06 Mar 2000 18:47:48 +0100
xslt sorting

"Kari M. Scott" wrote:

> Hi,

Hi!!

I think you should sort your employees...

michael

>
> ________________________XSL file________________________
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
> <xsl:template match="content">
>    <xsl:processing-instruction
> name="cocoon-format">type="text/html"</xsl:processing-instruction>
>   <html>
>     <head>
>         <title>Sort Example</title>
>     </head>
>     <body bgcolor="#FFFFFF">
>         <h3>Sort Example</h3>
>

<!--sorting HERE-->
<xsl:apply-templates>
        <xsl:sort select="employee/name/family"/>
        <xsl:sort select="employee/name/given"/>
 </xsl:apply-templates>

>
>     </body>
>    </html>
> </xsl:template>
>         <xsl:template match="employees">
>                  <ul>
>                    <xsl:apply-templates select="employee">

<!--NO sorting HERE>

>
>                      <xsl:sort select="name/family"/>
>                      <xsl:sort select="name/given"/

-->

>                    </xsl:apply-templates>
>                  </ul>
>         </xsl:template>
>         <xsl:template match="employee">
>                  <li>
>                    <xsl:value-of select="name/given"/>
>                    <xsl:value-of select="name/family"/>
>                  </li>
>         </xsl:template>
>
> </xsl:stylesheet>
>
> _______________________________XML file_____________________
> <?xml version="1.0"?>
> <?cocoon-process type="xslt"?>
> <?xml-stylesheet href="sort.xsl" type="text/xsl"?>
>
> <content>
> <employees>
>         <employee>
>                 <name>
>                         <given>Zoe </given>
>                         <family>Zeldman</family>
>                 </name>
>         </employee>
> </employees>
> <employees>
>         <employee>
>                 <name>
>                         <given>Kari </given>
>                         <family>Scott</family>
>                 </name>
>         </employee>
> </employees>
>
> Kari M. Scott
> Berbee
> 5520 Research Park Drive
> Madison, WI  53711-5377
> kmscott@xxxxxxxxxx
> 608.288.3000 ext. 1223
> 608.298.1223 direct dial
> 608.288.3037 fax
>
> Berbee...putting the E in business
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

--
***********************
michael gruber
msg systeme, Ismaning
Tel: 089/96101-407
mail: gruberm@xxxxxx
***********************



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


Current Thread
  • xslt sorting
    • Kari M. Scott - Mon, 6 Mar 2000 10:20:57 -0600 (CST)
      • michael gruber - Mon, 06 Mar 2000 18:47:48 +0100 <=
      • <Possible follow-ups>
      • spschrank - Mon, 6 Mar 2000 10:57:20 -0700

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.