newlines in basex 7.1.1
Wednesday, 18 April 2012 · 8 messages · last reply 19 Apr 2012
J
jidanni18 Apr 2012 06:26 #
OK, I have found a way that works every time:
... return concat($members," ",$id," ",$name,"\n")
$ make -n
basex g.xq|perl -pwle 's/\\n ?/\n/g'J
jidanni19 Apr 2012 11:45 #
Quoted text · jidanni · 1 line
>>>>> "CG" == Christian Grün <christian.gruen at gmail.com> writes:
CG> Did you have a look at the separator output option which I've added for you [1]?
CG> [1] http://docs.basex.org/wiki/Serialization
I'm sorry but it just doesn't work.
declare option output:method "text";
declare option output:newline "\n";
for $m in (1,2,3,4) return "a b c"does not output any newlines in 7.1.1.
CG
Christian Grün19 Apr 2012 11:52 #
Quoted text · jidanni · 7 lines
> I'm sorry but it just doesn't work. > > declare option output:method "text"; > declare option output:newline "\n"; > for $m in (1,2,3,4) return "a b c" > > does not output any newlines in 7.1.1.
Please take notice of the documentation, which says you need at Version 7.2 to get this working. Feedback on our latest snapshot will be appreciated:
http://files.basex.org/releases/latest/
J
jidanni19 Apr 2012 12:01 #
Quoted text · Christian Grün · 1 line
>>>>> "CG" == Christian Grün <christian.gruen at gmail.com> writes:
CG> Please take notice of the documentation, which says you need at CG> Version 7.2 to get this working.
But http://docs.basex.org/wiki/Serialization#Version_7.1 says newline is in. You might want to revise that.
CG
Christian Grün19 Apr 2012 12:05 #
Quoted text · jidanni · 2 lines
> But http://docs.basex.org/wiki/Serialization#Version_7.1 says newline is > in. You might want to revise that.
Yep, the "newline" parameter only specifies if \r, \n or \r\n will be chosen as end-of-line marker. Instead, you'll need to work with the "separator" parameter, which allows you to change the character which is used as item delimiter.
AH
Alexander Holupirek19 Apr 2012 12:07 #
I'll provide the Debian package in a minute.
Quoted text · Christian Grün · 12 lines
On 19.04.2012, at 12:05, Christian Grün wrote: >> But http://docs.basex.org/wiki/Serialization#Version_7.1 says newline is >> in. You might want to revise that. > > Yep, the "newline" parameter only specifies if \r, \n or \r\n will be > chosen as end-of-line marker. Instead, you'll need to work with the > "separator" parameter, which allows you to change the character which > is used as item delimiter. > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
AH
Alexander Holupirek19 Apr 2012 12:33 #
Hi Jidanni,
for a quick shot you could update your /etc/apt/sources.list with
deb http://files.basex.org/debian unstable/
deb-src http://files.basex.org/debian unstable/
Official upload will happen in a few hours.
Thanks,
Alex
Quoted text · Alexander Holupirek · 12 lines
On 19.04.2012, at 12:07, Alexander Holupirek wrote: > I'll provide the Debian package in a minute. > > On 19.04.2012, at 12:05, Christian Grün wrote: > >>> But http://docs.basex.org/wiki/Serialization#Version_7.1 says newline is >>> in. You might want to revise that. >> >> Yep, the "newline" parameter only specifies if \r, \n or \r\n will be >> chosen as end-of-line marker. Instead, you'll need to work with the >> "separator" parameter, which allows you to change the character which >> is used as item delimiter.
J
jidanni19 Apr 2012 12:57 #
OK... I got it working!
[got WARNING: untrusted versions of the following packages will be installed!] $ cat e.xq
declare option output:separator "\n";
for $m in (1,2,3,4) return "a b c"
$ basex -L e.xq
a b c
a b c
a b c
a b c
$ < /dev/null basex -v|sed q #no --version option yet
BaseX 7.2 [Standalone]
OK Thanks!
Written for BaseX 7.2. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery