reverse axis and constructed nodes in xquery

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

reverse axis and constructed nodes in xquery

David Carlisle

Michael,

I think the following two xqueries are equivalent (they are the same
apart from the /self::b at the end of the second,) but they report the
ancestor axis in opposite orders.

<b>
{
let $x :=
<a><b><c><x><z/></x></c></b></a>
return
($x//x/ancestor-or-self::*)/name()
}
</b>



<b>
{
let $x :=
<a><b><c><x><z/></x></c></b></a>
return
($x//x/ancestor-or-self::*)/name()
}
</b>/self::b




$ saxon8q axis.xq
<?xml version="1.0" encoding="UTF-8"?>
<b>a b c x</b>

$ saxon8q axis2.xq
<?xml version="1.0" encoding="UTF-8"?>
<b>x c b a</b>


David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


-------------------------------------------------------
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. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: reverse axis and constructed nodes in xquery

Michael Kay
Thanks, this bug is now logged with a source fix at

https://sourceforge.net/tracker/index.php?func=detail&aid=1362691&group_id=2
9872&atid=397617

Michael Kay
Saxonica

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> David Carlisle
> Sent: 18 November 2005 22:54
> To: [hidden email]
> Subject: [saxon] reverse axis and constructed nodes in xquery
>
>
> Michael,
>
> I think the following two xqueries are equivalent (they are the same
> apart from the /self::b at the end of the second,) but they report the
> ancestor axis in opposite orders.
>
> <b>
> {
> let $x :=
> <a><b><c><x><z/></x></c></b></a>
> return
> ($x//x/ancestor-or-self::*)/name()
> }
> </b>
>
>
>
> <b>
> {
> let $x :=
> <a><b><c><x><z/></x></c></b></a>
> return
> ($x//x/ancestor-or-self::*)/name()
> }
> </b>/self::b
>
>
>
>
> $ saxon8q axis.xq
> <?xml version="1.0" encoding="UTF-8"?>
> <b>a b c x</b>
>
> $ saxon8q axis2.xq
> <?xml version="1.0" encoding="UTF-8"?>
> <b>x c b a</b>
>
>
> David
>
> ______________________________________________________________
> __________
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ______________________________________________________________
> __________
>
>
> -------------------------------------------------------
> 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. For more info visit:
> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>




-------------------------------------------------------
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. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

Re: reverse axis and constructed nodes in xquery

David Carlisle

Thanks

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


-------------------------------------------------------
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. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help