[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Qexo-general] string function in 1.7 beta1
From: |
Seshukumar Venkata Adiraju |
Subject: |
RE: [Qexo-general] string function in 1.7 beta1 |
Date: |
Mon, 19 May 2003 09:02:13 +0530 |
I have an "books.xml"
as
<books>
<book id="book1"/>
<book id="book2"/>
</books>
and I have an xquery
<html>
{
let $books := document("books.xml")/books
for $book in $books/book
return
<p>{ string($book/@id)}</p>
}
</html>
this yields
<html>
<p>book1</p><p>book2</p>
</html>
but when I remove "line feeds" in the xml as
<books><book id="book1"/><book id="book2"/></books>
the result is
<html>
<p>book1</p><p></p>
</html>
there seems to be some error in the parsing.
cheers
Seshu Kumar Adiraju
SETLabs, Infosys Technologies Limited
In all chaos there is a cosmos,
in all disorder a secret order."
-- Carl Jung
-----Original Message-----
From: Per Bothner [mailto:address@hidden
Sent: Saturday, May 17, 2003 6:45 AM
To: Seshukumar Venkata Adiraju
Cc: address@hidden
Subject: Re: [Qexo-general] string function in 1.7 beta1
Seshukumar Venkata Adiraju wrote:
> now (with 1.7)
> string($book/@id) ==> ""
> i.e. empty
>
> Is this a bug?
Well, the following does work in the CVS version:
$ java kawa.repl --xquery
(: 1:) let $book := <book id="book1"/>
(: l2:) return string($book/@id)
book1
(: 3:)
I'm aiming for the second (and last) beta this wekend.
--
--Per Bothner
address@hidden http://per.bothner.com/