Re: [MarkLogic Dev General] Search for Sub Tag Text

2015-10-20 Thread Geert Josten
Hi Ashutosh, Did you look into Phrase-Throughs, and Element-Word-Query-Throughs? Kind regards, Geert From: > on behalf of Ashutosh Trivedi

[MarkLogic Dev General] Query on fragmentation of xml document

2015-10-20 Thread Reecha Bhandari
Dear All, We have xml files of this form wherein we have repetitive node. Can you please guide as how I should fragment this xml file. I have posted question in stackoverflow and below is the link: http://stackoverflow.com/questions/33229968/fragment-xml-files

[MarkLogic Dev General] error in fn:concate

2015-10-20 Thread Anoop Khetan
Hi All, I am using similar XML as below, it has multiple tags, but I need to fn:concat of such XMLs which has abc. Could anyone help me, how to phrase this in fn:concat which will only populate abc. fn:concat (/catalog/book/ comments/comment/Text) Error which I am getting is : arg is not

Re: [MarkLogic Dev General] Query on fragmentation of xml document

2015-10-20 Thread Geert Josten
Hi Reecha, http://stackoverflow.com/questions/33229968/fragment-xml-files/33233119#33233119 Cheers, Geert From: > on behalf of Reecha Bhandari

[MarkLogic Dev General] Search for Sub Tag Text

2015-10-20 Thread Ashutosh Trivedi
Hi, I am trying to search below xml document which contains co2 in which 2 is sub tags of the text co2 highlighted in yellow. http://sometext.com/ns/core; xmlns:f="http://sometext.com/ns/fields; xmlns:a="http://sometext.com/ns/assets;> id1 Henkel has increased its stake in

Re: [MarkLogic Dev General] cdata-section-elements option doesn't produce CDATA-values

2015-10-20 Thread Florent Georges
On 20 October 2015 at 15:45, Schouten, Edgar J. (RB-NL) wrote: Hi, > This application requires

Re: [MarkLogic Dev General] cdata-section-elements option doesn't produce CDATA-values

2015-10-20 Thread Schouten, Edgar J. (RB-NL)
Hi Florent Thanks for your reply. I can temporarily bypass the problem by manually changing replacing 'fake' -fields by

Re: [MarkLogic Dev General] cdata-section-elements option doesn't produce CDATA-values

2015-10-20 Thread Ron Hitchens
If you’re checking your XQuery’s output in the Query Console, it may actually be doing what you want. But the result of your XQuery is re-formatted for display in the browser. As Florent said, CDATA is not real XML, it’s just an escaping mechanism. So your CDATA output may have been

[MarkLogic Dev General] Specific data types in sam:triple

2015-10-20 Thread b
I’ve inserted a bunch of triples using code similar to this below. import module namespace sem = "http://marklogic.com/semantics; at "/MarkLogic/semantics.xqy”; sem:rdf-insert( ( sem:triple( sem:iri("http://example.com/ns/blue/154397;),

Re: [MarkLogic Dev General] cdata-section-elements option doesn't produce CDATA-values

2015-10-20 Thread David Lee
1) +1 to "it should make no difference" No conforming XML processor should produce different results with or without CDATA sections. 2) +1 to "how did you evaluate the query" If your expecting QConsole or any other method that *parses* the result it wont see the CDATA (see #2) TO validate

Re: [MarkLogic Dev General] cdata-section-elements option doesn't produce CDATA-values

2015-10-20 Thread David Lee
re: Apps folder that I run through the browser (http://localhost:8000/export.xqy ) Could you post that xquery and instead of using a brower use curl or some other direct HTTP method ? It should not require 'post processing'

Re: [MarkLogic Dev General] error in fn:concate

2015-10-20 Thread Danny Sokolsky
And you should really create a sequence of strings instead of a sequence of elements. For example: fn:string-join(/catalog/book/ comments/comment/Text/fn:string(),"") -Danny From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of

[MarkLogic Dev General] Invalid content RESTAPI-INVALIDCONTENT: (err:FOER0000) - when installing rest-api extension for backups in MarkLogic 7

2015-10-20 Thread Gulik, Ernest
Hello everyone, There's simple xquery function for backups that works pretty great. I wanted to automate it, knowing that we can install new extensions. My code, error and command can be found on stackoverflow.

Re: [MarkLogic Dev General] Invalid content RESTAPI-INVALIDCONTENT: (err:FOER0000) - when installing rest-api extension for backups in MarkLogic 7

2015-10-20 Thread Danny Sokolsky
It looks like your function has a syntax error in it: let $dbname := map:get($params, $dbname) let $s3bucket := map:get($params, $s3bucket) xdmp:database-backup( (:xdmp:database-forests(xdmp:database($dbname)), $s3bucket ):) xdmp:database-forests(xdmp:database($dbname)),

Re: [MarkLogic Dev General] Invalid content RESTAPI-INVALIDCONTENT: (err:FOER0000) - when installing rest-api extension for backups in MarkLogic 7

2015-10-20 Thread Danny Sokolsky
Additionally, there is no need to import the admin library. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Danny Sokolsky Sent: Tuesday, October 20, 2015 2:40 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General]

Re: [MarkLogic Dev General] Invalid content RESTAPI-INVALIDCONTENT: (err:FOER0000) - when installing rest-api extension for backups in MarkLogic 7

2015-10-20 Thread Gulik, Ernest
Thank you for a quick reply. I commented out import of admin library, Added simple return line, so the code looks like this: { let $dbname := map:get($params, $dbname) let $s3bucket := map:get($params, $s3bucket) xdmp:database-backup( xdmp:database-forests(xdmp:database($dbname)),

Re: [MarkLogic Dev General] Invalid content RESTAPI-INVALIDCONTENT: (err:FOER0000) - when installing rest-api extension for backups in MarkLogic 7

2015-10-20 Thread Gulik, Ernest
Danny, Your answer helped me. Thank you for that and as it was expressed in stackoverflow post I'll be updating it there. Ernest Gulik From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Danny Sokolsky Sent: Tuesday, October 20, 2015

Re: [MarkLogic Dev General] Invalid content RESTAPI-INVALIDCONTENT: (err:FOER0000) - when installing rest-api extension for backups in MarkLogic 7

2015-10-20 Thread David Lee
Is RESTAPI-INVALIDCONTENT The extent of the messaging for syntax errors for installing REST extensions ? Was this error on installing the extension or executing it ? Was there more to it them this ? Which library or SDK did you use ? ( maybe it was dropping details ?) I wouldn't have guessed

Re: [MarkLogic Dev General] Invalid content RESTAPI-INVALIDCONTENT: (err:FOER0000) - when installing rest-api extension for backups in MarkLogic 7

2015-10-20 Thread Danny Sokolsky
That return is in the wrong place. It should be after the let statements: { let $dbname := map:get($params, $dbname) let $s3bucket := map:get($params, $s3bucket) return xdmp:database-backup( xdmp:database-forests(xdmp:database($dbname)), "s3://bucketname/folder" ) }; I'm not sure what

Re: [MarkLogic Dev General] Specific data types in sam:triple

2015-10-20 Thread Dave Cassel
An object can be any type of value -- it doesn't have to be an IRI. This might work: import module namespace sem = "http://marklogic.com/semantics; at "/MarkLogic/semantics.xqy”; sem:rdf-insert( ( sem:triple( sem:iri("http://example.com/ns/blue/154397;),

Re: [MarkLogic Dev General] cdata-section-elements option doesn't produce CDATA-values

2015-10-20 Thread Florent Georges
On 20 October 2015 at 16:28, Schouten, Edgar J. (RB-NL) wrote: > declare option xdmp:output "cdata-section-elements=rules"; > [...] > xdmp:save( This will have no effect on your query because it affects the results of your query, which is the empty sequence (xdmp:save returns nothing). >

[MarkLogic Dev General] cdata-section-elements option doesn't produce CDATA-values

2015-10-20 Thread Schouten, Edgar J. (RB-NL)
Hi, I am generating an XML file to be used as an import file for an application This application requires According to https://docs.marklogic.com/guide/xquery/langoverview#id_71572 (xdmp:output) I can specify elements to be exported as CDATA-values I have this in my prolog: xquery version

[MarkLogic Dev General] using index on sort with more complex searchable expression

2015-10-20 Thread Holger APEL
Hi, we are using ML 7.0-2.3 and I have a query where sorting creates XDMP-EXPNTREECACHEFULL. To tune the sorting we have already created a range index on the sorting element let $t := xdmp:query-trace(true()) let $res := (for $result in cts:search(/(standard|standard-enquiry),

Re: [MarkLogic Dev General] using index on sort with more complex searchable expression

2015-10-20 Thread Geert Josten
Hi Holger, I think you’ll be interested in this section from the Performance guide: http://docs.marklogic.com/guide/performance/order_by Otherwise no immediate thoughts.. Cheers, Geert From: > on behalf