[MarkLogic Dev General] json:config and more than one namespace

2013-07-19 Thread Fernandes, Nivaldo
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

Re: [MarkLogic Dev General] Applying XSLT on XML file using xdmp:xslt-invoke

2013-07-19 Thread Erik Hennum
Hi, Kashif: It seems that the problem occurs when a library or tool tries to interpret your document as HTML. QueryConsole doesn't try to interpret your document as HTML. It processes your document as XML, and the problem never arises in XML processing. My understanding (caveat: I've never

Re: [MarkLogic Dev General] json:config and more than one namespace

2013-07-19 Thread Fernandes, Nivaldo
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

Re: [MarkLogic Dev General] Applying XSLT on XML file using xdmp:xslt-invoke

2013-07-19 Thread Khan, Kashif
Erik, you mentioned in your previous email about assigning a prefix to the name space. But it does not explain why it is working for me when I do the same operation using query console. Here is what I am doing in query console. let $x := xdmp:xslt-invoke("/pipelines/HTML.xsl", doc("/ancillary/2013

Re: [MarkLogic Dev General] Testing for invalid UTF-8 escape sequence?

2013-07-19 Thread Michael Blakeley
If there is another way, it probably won't be any faster for arbitrary values. To find out whether or not a sequence of bytes are valid UTF-8, any program has to check the whole sequence against a set of rules. There are 13 byte values that can't appear, plus potential problems with continuation

Re: [MarkLogic Dev General] json:config and more than one namespace

2013-07-19 Thread Charles Greer
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

Re: [MarkLogic Dev General] Testing for invalid UTF-8 escape sequence?

2013-07-19 Thread David Sewell
Thanks, Mike. Sounds like try/catch is the best approach. We're also using xdmp:url-decode() in a context where we don't have total control over the incoming data (HTTP parameters), so our best option may be to rewrite that part of the code to avoid using the function at all. David On Fri, 19

[MarkLogic Dev General] Testing for invalid UTF-8 escape sequence?

2013-07-19 Thread David Sewell
xdmp:url-decode throws an error if the argument contains an invalid UTF-8 escape sequence. For example, xdmp:url-decode('%C3%2E'). Is there any way besides wrapping the function in a try/catch to evaluate whether a given string is a legitimate candidate for UTF-8 unescaping? -- David Sewell,

Re: [MarkLogic Dev General] Return 0 Count Facet Rows

2013-07-19 Thread matt.broekhuis
I'm looking for the facet values themselves. Trying to create a UI that is driven by the actual data available from the facets. Ok I will look into the two pass approach From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Justin Makeig Sen

[MarkLogic Dev General] unsubscribe

2013-07-19 Thread Fergus, Kenneth G
Please remove this email address. Thanks ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general