Thanks Charles, leaving the element namespaces out was actually how I started out...and as you guessed or half-guessed, it does not output anything. (That is not completely accurate, it does output the first occurrence of repeating elements. However, the absence of the appropriate namespace seem to prevent the "full-element-names" mapping entries for repeating elements from expanding said elements properly.)
Using functx:change-element-ns-deep<http://www.xqueryfunctions.com/xq/functx_change-element-ns-deep.html>, for example, to just simply get rid of the namespaces could be an option, as you suggested...but, yes, it will slow things down some. Nivaldo From: Charles Greer <[email protected]<mailto:[email protected]>> Organization: MarkLogic Corporation Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Friday, July 19, 2013 2:35 PM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: [MarkLogic Dev General] json:config and more than one namespace Hi Nivaldo, What happens if you leave "element-namespace" out of the map entirely? I'd expect the transform either to output nothing or to do what you want it to here. (I don't know the answer) It would probably be expensive, but you could transform the XML structure first into one with no namespaces or a single, third namespace. Charles On 07/19/2013 09:54 AM, Fernandes, Nivaldo wrote: Hi, I have an xml structure with elements in 2 different namespaces. While attempting to transform this xml structure to JSON using a custom configuration (json:config function at http://docs.marklogic.com/json:config), I realized that the configuration mapping assumes the existence of only one namespace. For example: map:put($config,"element-namespace","http://some/namespace"<http://some/namespace>) ...and this has the accompanying map:put($config,"element-namespace-prefix","sn") Is it possible to circumvent this apparent limitation in the json:config function so that I can reference the elements in the different namespaces within the same custom transformation? So far, I have not used the lower level functions but have stuck to json:transform-to-json(). Perhaps that will be the right path to follow... Thanks! Nivaldo _______________________________________________ General mailing list [email protected]<mailto:[email protected]>http://developer.marklogic.com/mailman/listinfo/general -- Charles Greer Senior Engineer MarkLogic Corporation [email protected]<mailto:[email protected]> Phone: +1 707 408 3277 www.marklogic.com<http://www.marklogic.com>
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
