bug in querying constructed node?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug in querying constructed node?

Adam Retter-7
Hi,

This one is really urgent for me so im not sure if someone could take a
look at it...


I believe there is an XPath/XQuery bug on constructed nodes in eXist, I
have some constructed nodes -


1) When I try a /template/group/service[@name eq "Bathing"] I get
nothing back even though I can clearly see that the constructed nodes
have a name attribute and one has the value "Bathing"

2) If I try doing /template/group/service/@name then I dont see anything
either, although if I do /template/group/service I can see a list of
nodes with name attributes?



Attached -

1) bug.xql that demonstrates the problem, comment out the last line and
uncomment the following line to see the problem.

2) cgschema.xqm, bug.xql calls cgschema:describeTemplate() which
constructs the template node.

3) communitygroup.xsd, this is the data used by cgschema.xqm to
construct the template node.


Thanks Adam


bug.xql (474 bytes) Download Attachment
cgschema.xqm (5K) Download Attachment
communitygroup.xsd (46K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: bug in querying constructed node?

Pierrick Brihaye
Hi,

Adam Retter wrote:

> I believe there is an XPath/XQuery bug on constructed nodes in eXist, I
> have some constructed nodes -

There is indeed a bug with constructed nodes when they need to be
evaluated. Since you don't provide any description of the bug, I don't
know if your problem is related with the same bug.

FYI :

The bug I know may be experienced when applying the test case provided
by bug #1155941
(http://sourceforge.net/tracker/index.php?func=detail&aid=1155941&group_id=17691&atid=117691),
even though the cause is now different.

An exception is raised by org.exist.xquery.BindingExpression, line 148
because contextNode is null.

Cheers,

p.b.



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: bug in querying constructed node?

Adam Retter-7
In reply to this post by Adam Retter-7

Hmmm,

I dont think this is the same as my problem, but it may well be closely
related. - reading the notes it would seem that gvalentino had pointed
out its a type problem? As when you do the where clause and explicitly
specify xs:string types the query works fine?

I did provide a description and attachments with my original post which
will allow you to reproduce the problem? If you need more information
please ask...


Thanks Adam


On Fri, 2005-10-14 at 17:02 +0100, Pierrick Brihaye wrote:

> Hi,
>
> Adam Retter wrote:
>
> > I believe there is an XPath/XQuery bug on constructed nodes in
> eXist, I  
> > have some constructed nodes -
>
> There is indeed a bug with constructed nodes when they need to be  
> evaluated. Since you don't provide any description of the bug, I
> don't  
> know if your problem is related with the same bug.
>
> FYI :
>
> The bug I know may be experienced when applying the test casefor $x in
> $a
where xs:string($x/@id) eq xs:string("id")
return $x

 provided  
> by bug #1155941  
>
(http://sourceforge.net/tracker/index.php?func=detail&aid=1155941&group_id=1
7691&atid=117691),  

> even though the cause is now different.
>
> An exception is raised by org.exist.xquery.BindingExpression, line
> 148  
> because contextNode is null.
>
> Cheers,
>
> p.b.
>


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: bug in querying constructed node?

Adam Retter-7
Okay just to let everyone know (for completeness of the mailing list!) -

The bug I was experiencing is now fixed (thanks again Wolf). It was
related to treeLevelOrder for constructed nodes.

The other constructed node bug mentioned by Pierrick - bug #1155941 - is
still outstanding...

Thanks Adam


On Mon, 2005-10-17 at 10:33 +0100, Adam Retter wrote:

>
> Hmmm,
>
> I dont think this is the same as my problem, but it may well be
> closely
> related. - reading the notes it would seem that gvalentino had
> pointed
> out its a type problem? As when you do the where clause and
> explicitly
> specify xs:string types the query works fine?
>
> I did provide a description and attachments with my original post
> which
> will allow you to reproduce the problem? If you need more information
> please ask...
>
>
> Thanks Adam
>
>
> On Fri, 2005-10-14 at 17:02 +0100, Pierrick Brihaye wrote:
> > Hi,
> >  
> > Adam Retter wrote:
> >  
> > > I believe there is an XPath/XQuery bug on constructed nodes in
> > eXist, I  
> > > have some constructed nodes -
> >  
> > There is indeed a bug with constructed nodes when they need to be  
> > evaluated. Since you don't provide any description of the bug, I
> > don't  
> > know if your problem is related with the same bug.
> >  
> > FYI :
> >  
> > The bug I know may be experienced when applying the test casefor $x
> in
> > $a
> where xs:string($x/@id) eq xs:string("id")
> return $x
>
>  provided  
> > by bug #1155941  
> >
> (http://sourceforge.net/tracker/index.php?func=detail&aid=1155941&group_id=1 
> 7691&atid=117691),  
> > even though the cause is now different.
> >  
> > An exception is raised by org.exist.xquery.BindingExpression, line
> > 148  
> > because contextNode is null.
> >  
> > Cheers,
> >  
> > p.b.
> >
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads,
> discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl 
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open