[xquery-talk] Can I use a dynamic text as the name of result node?

=?GB2312?B?1dTA1w==?= zhaolei at gmail.com
Wed May 30 20:23:51 PDT 2007


This is exactly what I want. Thanks, Davidc and Michael Kay.

On 5/30/07, Michael Kay <mike at saxonica.com> wrote:
>
>  Use a computed element constructor:
>
> element {$r} {'something'}
>
> Michael Kay
> http://www.saxonica.com/
>
>  ------------------------------
> *From:* talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] *On
> Behalf Of *??
> *Sent:* 30 May 2007 10:26
> *To:* talk at x-query.com
> *Subject:* [xquery-talk] 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/6e65c91b/attachment.htm


More information about the talk mailing list