When I create elements using xquery along with the namespace label, It is defining the namespace local in all the elements, can we have it defined once at the top of the doc and use the labels throughout? Or is that something MarkLogic doesn’t do easily? It would cut down the size of the document by more than half.
I have given a sample code which explains the problem. For a huge xml, the data really looks clumsy and gets heavier. Code snippet: declare namespace ns1="http://mycompany.com/hello/1"; declare namespace ns2="http://mycompany.com/hi/2"; declare namespace ns3="http://mycompany.com/data/3"; element ns1:row {for $out in $results element ns2:column element ns3:data{string("I am that I am")} } For the above code snippet in my xquery, the response got is as below: <ns1:row xmlns:ns1="http://mycompany.com/hello/1"> <ns2:column xmlns:ns2="http://mycompany.com/hi/2"> <ns3:data xmlns:ns3="http://mycompany.com/data/3">I am that I am 1</ns3:data> </ns2:column> <ns2:column xmlns:ns2="http://mycompany.com/hi/2"> <ns3:data xmlns:ns3="http://mycompany.com/data/3">I am that I am 2</ns3:data> </ns2:column> </ns1:row> _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
