Bugs item #2716723, was opened at 2009-03-27 11:40
Message generated for change (Comment added) made by vzzzbx
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2716723&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: PF/compiler
Group: Pathfinder CVS Head
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Wouter Alink (vzzzbx)
Assigned to: Nobody/Anonymous (nobody)
Summary: PF: child-steps + replace() fails to compile

Initial Comment:
The following query doesn't seem to get through step 18 of the pathfinder 
compiler (it 'hangs')

What I tried:
- Leaving out the 'replace()' function, the query compiles fine
- Replacing one or more child steps into descendant steps in 
"$rootnode//company/addressbook/name" makes it work fine, for example 
"$rootnode//company//name"

(I used the pf that comes with Feb2009 release)


-----------------------------

declare function local:normCompanyName($name as xs:string) as xs:string {
  normalize-space(replace(
    upper-case(translate($name,",./()-","      "))
  ,"LIMITED","LTD"))
};

declare function local:companyList($rootnode as node()*) {
    let $all := $rootnode//company/addressbook/name 
    let $uniqueNames := distinct-values(for $i in $all
                                        return local:normCompanyName($i))
    for $i in $uniqueNames 
    let $firstNode := $all[local:normCompanyName(.)=$i][1]
    return $firstNode/../..
};

let $col := doc("%SOURCE%")
return local:companyList($col)


----------------------------------------------------------------------

>Comment By: Wouter Alink (vzzzbx)
Date: 2009-03-27 12:12

Message:
oops, for this bug I used by accident a pf-compiler from last months
'current'. I don't know whether the bug is still valid. The
Feb2009-pf-compiler does compile the query fine.

The pf-compiler I used for this query:

$ pf -h
Pathfinder XQuery Compiler ($Revision: 1.113 $, $Date: 2009/02/09 08:29:27
$)
(c) Database Systems Group, Eberhard Karls Universitaet Tuebingen



----------------------------------------------------------------------

Comment By: Wouter Alink (vzzzbx)
Date: 2009-03-27 12:05

Message:
oops, for this bug I used by accident a pf-compiler from last months
'current'. I don't know whether the bug is still valid. The
Feb2009-pf-compiler does compile the query fine.

The pf-compiler I used for this query:

$ pf -h
Pathfinder XQuery Compiler ($Revision: 1.113 $, $Date: 2009/02/09 08:29:27
$)
(c) Database Systems Group, Eberhard Karls Universitaet Tuebingen



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2716723&group_id=56967

------------------------------------------------------------------------------
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to