[xquery-talk] suppressing inter-item spaces

Howard Katz howardk at fatdog.com
Wed Jul 6 13:56:35 PDT 2005


Thanks Everybody,
That works fine. 

I'm doing some fun regex stuff in connection with this particular problem
and will have another question or two shortly.
Howard

 > -----Original Message-----
 > From: talk-bounces at xquery.com 
 > [mailto:talk-bounces at xquery.com] On Behalf Of Michael Rys
 > Sent: Wednesday, July 06, 2005 8:02 AM
 > To: Howard Katz; talk at xquery.com
 > Subject: RE: [xquery-talk] suppressing inter-item spaces
 > 
 > Try:
 > 
 > <string-join>
 > {
 >       fn:string-join( 
 >          let $nums := ( "1", "2", "3" )
 >          for $word at $i in ( "a", "b", "c" )
 >          return
 >             concat( $word, $nums[ $i ] )
 >       , "" )
 > }
 > </string-join>
 > 
 > > -----Original Message-----
 > > From: talk-bounces at xquery.com [mailto:talk-bounces at xquery.com] On
 > Behalf
 > > Of Howard Katz
 > > Sent: Wednesday, July 06, 2005 7: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
 > 
 > _______________________________________________
 > talk at xquery.com
 > http://xquery.com/mailman/listinfo/talk
 > 



More information about the talk mailing list