Sorry, typo:

 

element { QName("http://aaa.com/prod","x";) } { "s" }

 

Produces:

 

<x xmlns="http://aaa.com/prod";>s</x>

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Lee, David
Sent: Wednesday, September 01, 2010 11:03 AM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] How to add namespace to an element

 

try:

 

element { QName("http://aaa.com/prod","x"; } { "s" }

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Jonna
Marry
Sent: Wednesday, September 01, 2010 9:56 AM
To: General Mark Logic Developer Discussion
Subject: [MarkLogic Dev General] How to add namespace to an element

 

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

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to