Seems you’ve stumbled upon a classic [1]; and the problem is related: Inside “database nodes” we only have a parent, but no reference to the ancestors of main-memory nodes. One more nudge to eventually get this fixed.
[1] https://github.com/BaseXdb/basex/issues/919 On Sat, Aug 29, 2020 at 11:19 AM RobStapper <r.stap...@lijbrandt.nl> wrote: > Hi Christian, > > > > ☹ We’re not there quite yet. See attached snippet. > > > > I’m still loosing my CONTEXT-element when starting the ancestor-axis from > a sub element of the XML-file-element. > > > > Best regards, > > Rob > > > > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows 10 > > > > *From: *Christian Grün <christian.gr...@gmail.com> > *Sent: *Wednesday, August 26, 2020 6:21 PM > *To: *RobStapper <r.stap...@lijbrandt.nl> > *Cc: *basex-talk@mailman.uni-konstanz.de > *Subject: *Re: [basex-talk] ancestor axis i.c.w. fetched XML issue > > > > Hi Rob, > > > > An interesting one. The mixing of external nodes and node fragments (which > have different internal representations) caused some confusion. > > > > The issue has been fixed, a new snapshot is ready to go [1]. > > > > All the best, hope you are fine, > > Christian > > > > [1] https://files.basex.org/releases/latest/ > > > > > > > > On Wed, Aug 26, 2020 at 2:37 PM RobStapper <r.stap...@lijbrandt.nl> wrote: > > Hi Christian, > > > > I encountered some inconsistency when using an fetched XML-node in > combination with xpath’s ancestor-axis. > > I attached a small snippet. I expect an ancestor here. > > > > It works alright if the XML-node is not fetched from a document or in case > of the parent-axis. > > > > Best Regards, > > > > Rob Stapper > > > > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows 10 > > > > > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon> > > Virus-free. www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link> > > > > >