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

Re: Muenchian method, and keys 'n stuff

Subject: Re: Muenchian method, and keys 'n stuff
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 22 Jan 2002 17:10:40 +0000
Re:  Muenchian method
Hi Dave,

> the problem is now that the template below never
> fires the otherwise clause of the choose, and I can't see why.

The only reason I can see why the xsl:otherwise wouldn't be fired is
if the $auths variable always gets set to a node set that contains
some nodes. That would be true if within your document you have at
least one r element with a Ra/lett equal to each letter of the
alphabet. Which could be the case - it's impossible to tell without
seeing your document.

Note that the way you have it at the moment, it's perfectly possible
for the xsl:when clause to be selected but you to see no output from
it. When you do:

>       <xsl:when test="$auths/node()">
>         <xsl:apply-templates select="r[generate-id(.)=
>                       generate-id(key('auth',Ra/lett)[1])]"/>
>       </xsl:when>

Then you're only applying templates to the r element children of the
current adventure that happen to be the first such r elements in the
document as a whole with that letter in their Ra/lett grandchild.

In fact, the path you're using there is exceedingly strange, since it
will give you the same thing on each recursion, but I guess you're
doing that on purpose?



Jeni Tennison

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

Current Thread


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.
First Name
Last Name
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.