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: Mon, 24 Sep 2007 07:58:01 +0200
Alice Ju-Hsuan Wei wrote:
Hi, Abel:

I did try the suggestion you and Michael provided, but it does not work at all.

<snip />

<xsl:template match="title">
           <xsl:when test="position() ='1'"/>

However, this still gives me the same kind of output--with each of the titles on separate lines. Any ideas?

This (the above xml) is not what Michael or I suggested. You throw away only the first <title> there, but you are still testing against a string, not a numeric (should work though). Please answer also Tommie's (and Michael's and mine) question: show us the output that you have now and show us the output that you want to have. Unless you provide us with that information, we are unable to help because we are guessing at what you are after.

In addition, it would be nice to see what you mean by "I tried the suggestion" and "did not work at all". "At all", in my idea, means that the stylesheet did not compile. Show us *what* you tried, *what* output you got, "*what* output you expected and with *what* processor you are working and we can help you further.

Please answer all "what" questions above so that we can proceed with helping you.

-- Abel Braaksma

Current Thread