Hi,

I have written a function to return a sequence of elements without parent 
tag.In 
the method calling, after getting the element sequence I want to get the 
individual element value.I tried the following sample.Can any one help me in 
navigating through the sequence of elements?

Note : I have declared a default name  space in the xqy which call the module 
.The module xqy doesn't contain the  default name space.

Whether the default name space may be the reason to block the XML navigation?

declare function tem:create-item(  ) as element()*
{
let $s := "dd"
return (
        element ID { 'ddd' },
        element Item { 'sss' },
        element Volume {'100' }
    )
};

declare default element namespace "http://tem.org/main";;
let $item :=  local:create-item(  ) 
return <x>{$item[2]/text()}</x>

I am able to get the output like this 
<x>sss</x>

But I want to navigate based on the specific element name. I tried the 
following 
code, but its not working. Please help me on this.

        * let $item :=  tem:create-item(  ) 
          return <x>{$item/ID}</x>

Even I have tried with adding a parent element to the sequence of elements with 
the name-space equal to the default name-space. 


Thanks in Advance

Regard,
Mano

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to