Re: [xsl] [XSL]Display Different Results Based on Count of Node Sets

Subject: Re: [xsl] [XSL]Display Different Results Based on Count of Node Sets
From: Abel Braaksma <>
Date: Sun, 23 Sep 2007 19:01:35 +0200
Alice Ju-Hsuan Wei wrote:

Sorry for the confusion. This should be what I am trying to do (The list is supposed to be based on the name of the auhor and their books, and not based on the dimensions of the book titles:

I don't see a difference with your original statement, which I found quite clear, though I still don't understand whether this is the wanted output or input. Our responses were on the output.

The new segment of the XSLT I generated above does not seem to be generating the proper output. All of my titles still follow the rules under the <xsl:otherwise> rule.

Thanks to anyone of those who may be able to help.

Have you tried mine and/or Michael's solution? This is not the kind of problem you want to solve by using xsl:if or xsl:choose. That will make your code less maintainable. You can, however, if you really want to, but it is better to start to set your mind to the template matching system of XSLT. You asked about count() in your first question, I answered that you can use it. Try it. It is no good to use xsl:number there. (but still, the template based solution of Michael and myself will prove more stable in the long run).

-- Abel Braaksma

Current Thread