Hi Sini,
Use concat to append the newline, instead of returning a text node and a
string separately, like this:
return
(text{
fn:concat(
fn:string-join(
(xs:string($identifier),
xs:string("4"),
xs:string("TOUGV"),
xs:string("RESS"),
xs:string("MCG")
), "|" )
," ")
}
Kind regards,
Geert
*Van:* [email protected] [mailto:
[email protected]] *Namens *sini narayanan
*Verzonden:* dinsdag 23 april 2013 15:54
*Aan:* MarkLogic Developer Discussion
*Onderwerp:* [MarkLogic Dev General] Space issue - Urgent!!!
Hi All,
I have a problem while creating txt file seperated by "|".
The files is getting inserted into DB but, starting from the second line,
an extra space is getting inserted to each new line.
How do I remove the space in each new line?
My code is as below.
return
(text{
fn:string-join(
(xs:string($identifier),
xs:string("4"),
xs:string("TOUGV"),
xs:string("RESS"),
xs:string("MCG")
), "|" )
}," ")
Sample output file.
124594|4|TOUGV|RESS|MCG
1048466|4|TOUGV|RESS|MCG
1049986|4|TOUGV|RESS|MCG
1007127|4|TOUGV|RESS|MCG
Thanks,
Sini
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general