Anil Shekhar wrote:
> Can there be more than 1 return from 1 FLWOR expression?
No, but the return expression can contains FLOWR expressions
itself:
for $i in $is
return (
<h1>{ $i }</h1>,
$ks/<p>{ . }</p>
)
You can also make things easier and clearer by using a function:
declare function local:handle-doc(
$doc as document-node(),
$speeches as element(SPEECH)+
)
{
<h1>{ document-uri($doc) }</h1>,
for $speech in $speeches
let $speaker := $speech/SPEAKER
let $lines := $speech/LINE
return (
<h3>{ $speaker/text() }</h3>,
<p>{ $lines/text() }</p>
)
};
for $d in doc()
return local:handle-doc($d, $d//SPEECH)
Regards,
--
Florent Georges
http://www.fgeorges.org/
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general