detail.php
OW2 Forge: Detail: 303685 different results for same expression used twice (separated by another ref to same table)

Advanced - Powered by Google


   
Log In
New Account
  
 
Home
My Page
Project Tree
Project Openings
XQuare
          
 
 
Summary
Forums
Tracker
Lists
Tasks
Docs
News
CVS
Files
SVN
                    
 

Tracker: Bugs

Submit New | Browse | Admin | ExportToXml

[ #303685 ] different results for same expression used twice (separated by another ref to same table)

Date:
2005-06-22 00:26
Priority:
5
Submitted By:
Eduard Rysavy (erysavy)
Assigned To:
Nobody (None)
Category:
bridge
State:
Open
Summary:
different results for same expression used twice (separated by another ref to same table)

Detailed description:
Using XQBridge 1.1.0 with MS SQLServer 2000: The expression in lines 11..15 works as expected The *same* expression in lines 23..27 never delivers anything. The one in line 28 ("personalTitle2") works; I get output like this: ... <name> <personalTitleNr>1</personalTitleNr> <personalTitle>Dr. </personalTitle> <title>Hofrat</title> <personalTitleNr>1</personalTitleNr> <personalTitle2>Dr.</personalTitle2> <givenName>Erhard</givenName> <surName>SCHWANZER</surName> <maidenName>SCHWANZER</maidenName> </name> ... (The text field "code_text" contains some extra trailing space, only written in the first case) As you can see the attribute ("grd_titel_nr") itself is always retrieved and written correctly. If the code in lines 16..21 is omitted everything's ok. If the blocks that produce "personalTitle1" and "personalTitle2" are exchanged, the *second one* works. Now personalTitle2 is always empty, and personalTitle1 is correct. Any idea what's wrong? Please help me, this is becoming a showstopper.

Add A Comment:

Please login

Followup

Message
Date: 2005-06-24 20:17
Sender: erysavy
Logged In: YES 
user_id=6629

This solved the problem! (and a few others as well)
Remains one (mostly aesthetic) issue:
Why do I get the trailing spaces included with:
{
   for $t in collection("st2code")/st2code
   where $t/tab_nr = 23 and xs:number($t/kurzcode) =
$arzt/grd_titel_nr
   return <personalTitle>{ $t/code_text/text()
}</personalTitle>
}

but not with:
<personalTitle>{ collection("st2code")/st2code[tab_nr
= 23
and xs:number(kurzcode) =
$arzt/grd_titel_nr]/code_text/text() }</personalTitle>

In the latter case the output is probably based on a nodeset
or similar, but since this is a 1:1 relation there shouldn't
be a semantic difference.

Anyway, this is no real problem, I'm using views now to
preprocess the data I want to query, trimming spaces etc.

Thanks for your help!

Eddie Rysavy
Date: 2005-06-24 15:55
Sender: lsmit
Logged In: YES 
user_id=739

Hi,

Have you tried the latest version of the code (HEAD). I 
think this problem has already been detected and corrected 
some times ago.
A new version containing this correction has however not 
been released.

Hope this helps

Lars Smit

Attached Files:

Name Description Download
test.xqy XQuery example to reproduce error Download

Changes:

Field Old Value Date By
File Added248: test.xqy2005-06-22 00:26erysavy

Copyright © 1999-2008, OW2 Consortium | contact | You have a difficulty, a problem ? Please report an issue using your OW2 forge account credentials