[xquery-talk] suppressing inter-item spaces

Priscilla Walmsley pwalmsley-lists at datypic.com
Wed Jul 6 11:58:25 PDT 2005


How about moving the call to string-join out, as in:

<string-join>
{  string-join(
      let $nums := ( "1", "2", "3" )
      for $word at $i in ( "a", "b", "c" )
      return ( $word, $nums[ $i ] ) 
   , "")
}
</string-join>   

Hope that helps,
Priscilla
---------------------------------------------------------
Priscilla Walmsley                 priscilla at walmsley.com
Author, Definitive XML Schema     (Prentice Hall PTR)
        Definitive XQuery  (Coming in 2005)
--------------------------------------------------------- 
 

> -----Original Message-----
> From: talk-bounces at xquery.com 
> [mailto:talk-bounces at xquery.com] On Behalf Of Howard Katz
> Sent: Wednesday, July 06, 2005 10:18 AM
> To: talk at xquery.com
> Subject: [xquery-talk] suppressing inter-item spaces
> 
> I want to build up a single string by doing a series of string-joins()
> across two parallel string sequences as in the following:
> 
> <string-join>
> {
>       let $nums := ( "1", "2", "3" )
>       for $word at $i in ( "a", "b", "c" )
>       return
> 
>             fn:string-join( ( $word, $nums[ $i ] ), "" )
> }
> </string-join>
> 
> What I want to get back is "a1b2c3".  The above however 
> returns "a1 b2 c3",
> with inter-item spaces automatically inserted between each successive
> evaluation of string-join() in accordance with the rules in 
> 3.7.1.3 Content
> [1].  Is there a way of suppressing these spaces, or 
> alternatively some
> other method of achieving the same result?
> 
> Howard
> 
> [1] http://www.w3.org/TR/xquery/#id-content
> 
> 
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk
> 




More information about the talk mailing list