Hi Florent,
use  

for $e in .../some-element
     return        <id>{ fn:data($e/@id) }</id>

--- On Tue, 12/8/09, Florent Georges <[email protected]> wrote:


From: Florent Georges <[email protected]>
Subject: Re: [MarkLogic Dev General] Return Attribute Data
To: "Tony Mariella" <[email protected]>
Cc: "MarkLogic General ML" <[email protected]>
Date: Tuesday, December 8, 2009, 12:43 PM


Florent Georges wrote:

>     for $e in .../some-element
>       return
>         <id>{ $e/text(@id) }</id>
 
or
 
 
string-join(
       for $i in $docs/results/interface
        return concat( fn:data($i/@id),"-",string($i/description) )
       ,"&#xa;" )


  As Ken pointed out to me off-list, that's of course $e/string(@id) instead.  
There is no such thing as a text($item) function.

  Regards,

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

























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



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

Reply via email to