Re: xslt sorting

Subject: Re: xslt sorting
From: spschrank@xxxxxxx
Date: Mon, 6 Mar 2000 10:57:20 -0700

-- snip
<?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>
-- snip

Your XML file is wrong (aside from the missing </content> tag) for what you
intend.  You have two separate <employees> nodes and each is being processed
separately.  It should look like:

<content>
<employees>
  <employee>
    <name>
       <given>Zoe </given>
       <family>Zeldman</family>
    </name>
  </employee>
  <employee>
    <name>
       <given>Kari </given>
       <family>Scott</family>
    </name>
  </employee>
</employees>
</content>

Steve Schrank
3M Health Information Systems



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


Current Thread