xsl-list
[Top] [All Lists]

Re: [xsl] conditional multiline output

2007-02-06 03:21:22
--On Tuesday, February 06, 2007 10:44:30 +0100 Erwin Kloeck wrote:

Where
does the space in front of the closing bracket come from and how do I
get rid of it?

                    <xsl:value-of
select="concat(current-group()[$i]/@string, ' [',
current-group()[$i]/@count), ']'" />

The ']' is outside the concat so the select is a sequence of two strings and the default space separator is inserted. Fix this by moving the ) that closes the concat to after the ']'.

You should also change this:

       <xsl:variable name="max-count" >
           <xsl:value-of select="max(for $date in $dates return
count(date[(_at_)value = $date]))" />
       </xsl:variable>

to

<xsl:variable name="max-count" select="max(for $date in $dates return
count(date[(_at_)value = $date]))" />

Using value-of causes max-count to be a string which is not what you want.

--
Owen Rees
Hewlett Packard Laboratories, Bristol, UK


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>