[MarkLogic Dev General] How to add namespace to an element

Jonna Marry nett77vevi at gmail.com
Wed Sep 1 06:55:46 PDT 2010


Hi ,

How to add *namespace *to an *element *using *xquery *with out prefix?

I tried with the following sample

xquery version "1.0-ml";
element x{
QName('http://aaa.com/prod',  's')
 }

It give output :
  <x xmlns:_1="*http://aaa.com/prod*">_1:s</x>

Unwanted text like :_1 and _1:s is added as prefix. But I want the *namespace
*should be added in the format below:

<x xmlns:="*http://aaa.com/prod*">---Some data------</x>

Regards,
Jonna M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20100901/39a35e27/attachment.html 


More information about the General mailing list