|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Can I use a dynamic text as the name of result node?Michael Kay mike at saxonica.comWed May 30 11:50:16 PDT 2007
Use a computed element constructor:
element {$r} {'something'}
Michael Kay
http://www.saxonica.com/
_____
From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of ??
Sent: 30 May 2007 10:26
To: http://x-query.com/mailman/listinfo/talk
Subject: Can I use a dynamic text as the name of result node?
Hi,
How to create an xml fragment whose root name is dynamic? The following code is false, of course.
let $a := <a>bbb</a>
let $r := $a/text()
return
<{$r}>something</{$r}>
With namespace?
return
<{QName("http://aaa",concat($prefix,":",$r))}/>
Are there any methods to do this?
Thanks,
Lei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20070530/d9ad62aa/attachment.htm
|
Purchase Stylus Studio Online Today!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






