[MarkLogic Dev General] sequence of elements

Florent Georges lists at fgeorges.org
Mon Sep 6 03:18:16 PDT 2010


mano m wrote:

  Hi,

> return <x>{$item/ID}</x>

  There are two different problems here.  That select any element
with that name which is a child of one of the node in the $item.
There is no such node (one of the node in the sequence itself has
this name though).  The second problem is that this path selects
a child named ID in the namespace ".../main" because of the
default element namespace statement.

  The first problem is solved by using the axis self::.  For the
second one, I am not sure.  I don't think you can write a step
matching an element name in no namespace when using the default
element namespace statement (other than using string comparison
of the local name and/or namespace URI).

  Regards,

-- 
Florent Georges
http://fgeorges.org/



      



More information about the General mailing list