logo       

Re: Problem with SubFlowr-Expr: msg#00018

Subject: Re: Problem with SubFlowr-Expr
This is an operator precedence problem - you need to enclose the two element constructors in the return expression with parentheses and use a comma operator to concatenate them into a sequence:

                return (
                    <description>{$a/description/text()}</description>,
                    <review>This is the Error</review>)

John

florianwendland-KuiJ5kEpwI6ELgA04lAiVw@xxxxxxxxxxxxxxxx wrote:
Hi all,
I have some wierd problems with a xquery syntax. The query lokks like this:

declare variable $book external;
declare variable $books external;

<Books>
    {
    for $bid in $book/books/book
    let $b := $books/Import/Row
    return
        <Book>
            <id>{$bid/id/text()}</id>
            <ddd>jj</ddd>
            {
for $a in $b[xs:integer(./id/text()) eq xs:integer($bid/id/text())]
                return
                    <description>{$a/description/text()}</description>
                    <review>This is the Error</review>
            }
        </Book>
    }
</Books>


The Query could not be parsed, because after the element description, in the subflowr, the parser expects an }. I didn't know, what ist wrong with it! Can anyone help me? I would be grateful!

Thx
mfw
_______________________________________________
talk-9zRdbLeNGsRBDgjK7y7TUQ@xxxxxxxxxxxxxxxx
http://x-query.com/mailman/listinfo/talk



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
python.cheetah/...    linux.altlinux....    qnx.openqnx.dev...    horde.cvs/2002-...    os.openbsd.misc...    web.zope.cvs/20...    fsf.proofreader...    emulators.wine....    kde.promotion/2...    yellowdog.gener...    creativecommons...    user-groups.lin...    xfree86.fonts/2...    ietf.ips/2006-1...    jakarta.velocit...    redhat.fedora.c...    text.xml.cocoon...    security.ossim....    games.mud.devel...    bacula.user/200...    video.videodb.d...    netbsd.devel.ww...    apache.webservi...    db.mysql.c++/20...    music.equipment...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe