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

Re: conditional multiline output

Subject: Re: conditional multiline output
From: Owen Rees <owen.rees@xxxxxx>
Date: Tue, 06 Feb 2007 10:21:04 +0000
Re:  conditional multiline output
--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[@value = $date]))" />
       </xsl:variable>

to

<xsl:variable name="max-count" select="max(for $date in $dates return
count(date[@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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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