[xquery-talk] "While" in xquery

David Lee dlee at calldei.com
Tue Mar 22 07:32:17 PST 2011


Use "for"

assuming $node is  <node value="100"/>

 

 

for $num in 1 to xs:integer( $node/@value ) 

return

                <element>{ $num} </element>

 

 

 

----------------------------------------

David A. Lee

dlee at calldei.com

http://www.xmlsh.org

 

From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On Behalf
Of Julio de la Vega
Sent: Tuesday, March 22, 2011 7:15 AM
To: talk at x-query.com
Subject: [xquery-talk] "While" in xquery

 

 

Hi *,

 

I have an xquery development where I need to repeat an element as many times
as a value of an specific node

I am trying to use a "while" expression in my xquery development but I am
not sure if it is possible or if it is an extension that depends of my
xquery engine.

 

Could you please help me to understand if it is possible to use it? Any
idea?

 

Thank you

 

Regards

 

 

Julio

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20110322/004e493e/attachment.htm


More information about the talk mailing list