Jakob Fix | 1 Oct 12:01 2014
Picon

[MarkLogic Dev General] any considerations for deploying MarkLogic via Windows sysprep deployment tool?

Hello,

For internal training sessions and potentially general deployment of test machines, we'd like to set up a template for our virtual machines (we're using Microsoft's sysprep tool to deploy on VDI). Are there some known incompatibilities with this approach and MarkLogic? 

I understand that there is no official certification of this scenario, but as I said we're intending to use this for training and tests only.

This may be a question for the support, but I thought I might just as well ask it here.

cheers,
Jakob.
<div><div dir="ltr">Hello,<div><br></div>
<div>For internal training sessions and potentially general deployment of test machines, we'd like to set up a template for our virtual machines (we're using Microsoft's sysprep tool to deploy on VDI). Are there some known incompatibilities with this approach and MarkLogic?&nbsp;</div>
<div><br></div>
<div>I understand that there is no official certification of this scenario, but as I said we're intending to use this for training and tests only.</div>
<div><br></div>
<div>This may be a question for the support, but I thought I might just as well ask it here.</div>
<div>
<br clear="all"><div>cheers,<br>Jakob.</div>
</div>
</div></div>
Kapoor, Shruti | 1 Oct 09:15 2014

[MarkLogic Dev General] Point in time queries

Hi all,


How do I retrieve all the version of the same document(xQuery) if I have enables Point in time queries.


Thanks and Regards
Shruti Kapoor
"This e-mail and any attachments transmitted with it are for the sole use of the intended recipient(s) and may contain confidential , proprietary or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this e-mail or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful."
<div>
<p>Hi all,<br></p>
<p><br></p>
<p>How do I retrieve all the version of the same document(xQuery) if I have enables Point in time queries.<br></p>
<p><br></p>
<div>
<div name="divtagdefaultwrapper">
Thanks and Regards
<div>Shruti Kapoor</div>
</div>
</div>
"This e-mail and any attachments transmitted with it are for the sole use of the intended recipient(s) and may contain confidential , proprietary or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and
 destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this e-mail or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful."
</div>
Abhishek.Srivastav | 1 Oct 02:22 2014

[MarkLogic Dev General] REST URL Exception

<!-- blockquote.cite {margin-left:5px; margin-right:0px; padding-left:10px; padding-right:0px; border-left:1px solid #cccccc} blockquote.cite2 {margin-left:5px; margin-right:0px; padding-left:10px; padding-right:0px; border-left:1px solid #cccccc; margin-top:3px; padding-top:0px} .plain pre, .plain tt {font-family:monospace; font-size:100%; font-weight:normal; font-style:normal} body {font-family:Tahoma; font-size:12pt} .plain pre, .plain tt {font-family:Tahoma; font-size:12pt} --> <!-- #344222867a9348d88a503d210c46c97d blockquote.cite2 {padding-top:0px; padding-left:10px; margin-left:5px; border-left:#cccccc 1px solid; margin-top:3px; padding-right:0px; margin-right:0px} #344222867a9348d88a503d210c46c97d .plain pre, #344222867a9348d88a503d210c46c97d .plain tt {font-size:100%; font-family:monospace; font-weight:normal; font-style:normal} #344222867a9348d88a503d210c46c97d .plain pre, #344222867a9348d88a503d210c46c97d .plain tt, #344222867a9348d88a503d210c46c97d {font-size:12pt; font-family:Tahoma} -->
Hi All,

I am trying to register REST URL using curl command and getting 405 Method not allowed exception. Let me know if there is any thought.

$curl --anyauth --user username -X PUT -H "Content-type: application/xquery" -d <at> "./xquery.xqy" "http://host:8005/v1/config/resources/process?method=put&put:param=xs:string"http://host:8005/v1/config/resources/process?method=put&put:param=xs:string

Exception:

405 Method not found

Thanks
Abhishek
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.
<div>

&lt;!--
blockquote.cite
	{margin-left:5px;
	margin-right:0px;
	padding-left:10px;
	padding-right:0px;
	border-left:1px solid #cccccc}
blockquote.cite2
	{margin-left:5px;
	margin-right:0px;
	padding-left:10px;
	padding-right:0px;
	border-left:1px solid #cccccc;
	margin-top:3px;
	padding-top:0px}
.plain pre, .plain tt
	{font-family:monospace;
	font-size:100%;
	font-weight:normal;
	font-style:normal}
body
	{font-family:Tahoma;
	font-size:12pt}
.plain pre, .plain tt
	{font-family:Tahoma;
	font-size:12pt}
--&gt;

&lt;!--
#344222867a9348d88a503d210c46c97d blockquote.cite2
	{padding-top:0px;
	padding-left:10px;
	margin-left:5px;
	border-left:#cccccc 1px solid;
	margin-top:3px;
	padding-right:0px;
	margin-right:0px}
#344222867a9348d88a503d210c46c97d .plain pre, #344222867a9348d88a503d210c46c97d .plain tt
	{font-size:100%;
	font-family:monospace;
	font-weight:normal;
	font-style:normal}
#344222867a9348d88a503d210c46c97d .plain pre, #344222867a9348d88a503d210c46c97d .plain tt, #344222867a9348d88a503d210c46c97d
	{font-size:12pt;
	font-family:Tahoma}
--&gt;
<div>Hi All,
<div><br></div>
<div>I am trying to register REST URL using curl command and getting 405 Method not allowed exception. Let me know if there is any thought.</div>
<div><br></div>
<div>$curl --anyauth --user username -X PUT -H "Content-type: application/xquery" -d <at> "./xquery.xqy" "http://host:8005/v1/config/resources/process?method=put&amp;put:param=xs:string"<a href="http://host:8005/v1/config/resources/process?method=put&amp;put:param=xs:string" target="_blank">http://host:8005/v1/config/resources/process?method=put&amp;put:param=xs:string</a>
</div>
<div><br></div>
<div>Exception:</div>
<div><br></div>
<div>405 Method not found</div>
<div><br></div>
<div>Thanks</div>
<div>Abhishek</div>
</div>
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original
 message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law,
 this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.
</div>
Paul M | 29 Sep 21:44 2014
Picon

[MarkLogic Dev General] sparql version functions

Does MarkLogics sparql version support MAX (or other aggregate) function? Docs state, "1.0 and some 1.1 sparql"?

Thanks!
<div><div>
<div>Does MarkLogics sparql version support MAX (or other aggregate) function? Docs state, "1.0 and some 1.1 sparql"?</div>
<div><br></div>
<div>Thanks!<br>
</div>
</div></div>
Brent Hartwig | 26 Sep 17:33 2014

[MarkLogic Dev General] unable to merge all deleted fragments out of the database

Hello, and Happy Friday!

 

While attempting to calculate an expansion ratio, a client and I initiated manual merges of a ML 7.0-3 database, then recorded the size.  We did see the database size decrease, as well as merge-related entries in the log; however, the number of deleted fragments never reached zero.  This is different than I remember from previous versions.  A scan of release notes for versions 5, 6, and 7 didn’t turn up anything.

 

The merge timestamp is zero, and the system would have been relatively quiet when merge was requested.

 

The number of remaining deleted fragments was relatively low, and did decrease after some merges, just never to zero.  Given the size of our documents, these few deleted fragments would not have significantly skewed the results.  Nonetheless, curiosity has the better of me.

 

After the second test of the day, there were ~65K documents taking up ~150 MB.  There were 879 deleted fragments after a merge.

 

Might this be a display bug, or does the merge process ultimately decide just how far to go?

 

Thanks much.

 

-Brent

 

Brent Hartwig, Solutions Architect | RSI Content Solutions

<div><div class="WordSection1">
<p class="MsoNormal">Hello, and Happy Friday!<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">While attempting to calculate an expansion ratio, a client and I initiated manual merges of a ML 7.0-3 database, then recorded the size.&nbsp; We did see the database size decrease, as well as merge-related entries in the log; however, the number of deleted fragments never reached zero.&nbsp; This is different than I remember from previous versions.&nbsp; A scan of release notes for versions 5, 6, and 7 didn&rsquo;t turn up anything.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">The merge timestamp is zero, and the system would have been relatively quiet when merge was requested.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">The number of remaining deleted fragments was relatively low, and did decrease after some merges, just never to zero.&nbsp; Given the size of our documents, these few deleted fragments would not have significantly skewed the results.&nbsp; Nonetheless, curiosity has the better of me.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">After the second test of the day, there were ~65K documents taking up ~150 MB.&nbsp; There were 879 deleted fragments after a merge.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Might this be a display bug, or does the merge process ultimately decide just how far to go?<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Thanks much.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">-Brent<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><span>Brent Hartwig, Solutions Architect&nbsp;</span><span>| RSI Content&nbsp;Solutions</span><p></p></p>
</div></div>
Abhishek.Srivastav | 26 Sep 02:56 2014

[MarkLogic Dev General] Schema validation

<!-- <at> font-face {font-family:Calibri} p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif"} a:link, span.MsoHyperlink {color:blue; text-decoration:underline} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif"} span.EmailStyle18 {font-family:"Calibri","sans-serif"; color:windowtext} .MsoChpDefault {font-size:10.0pt} <at> page WordSection1 {margin:1.0in 1.0in 1.0in 1.0in} -->
Hi All,

What should be the best way to schema validate of multiple documents. We have 100+ schema of inbound sources and the data is not tagged with any namespace. 

Earlier I used to write separate module xquery file importing one schema at a time and then calling it from main module. The approach seems not to be scalable with 100+ sources since import schema part of below query can't be made dynamic. Also I am thinking to modify inbound source files to incorporate with schema namespace as last option.

Please advise.

Thanks
Abhishek
-----------------------------------------------------------------------------------------------------------------

xquery version "1.0-ml";

module namespace val= "http://test.com";

import schema default element namespace "" at "/resources/xsd/source1.xsd";

declare function val:validate-document ($xml) {
    validate strict { 
        document{$xml}
    }
};

-----------------------------------------------------------------------------------------------------------------
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.
<div>

&lt;!--
 <at> font-face
	{font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif"}
span.EmailStyle18
	{font-family:"Calibri","sans-serif";
	color:windowtext}
.MsoChpDefault
	{font-size:10.0pt}
 <at> page WordSection1
	{margin:1.0in 1.0in 1.0in 1.0in}
--&gt;
<div>Hi All,
<div>
<div>
<div class="WordSection1"></div>
</div>
</div>
<div><br></div>
<div>What should be the best way to schema validate of multiple documents. We have 100+ schema of inbound sources and the data is not tagged with any namespace.&nbsp;</div>
<div><br></div>
<div>Earlier I used to write separate module xquery file importing one schema at a time and then calling it from main module. The approach seems not to be scalable with 100+ sources since import schema part of below query can't be made dynamic. Also I am thinking
 to modify inbound source files to incorporate with schema namespace as last option.</div>
<div><br></div>
<div>Please advise.</div>
<div><br></div>
<div>Thanks</div>
<div>Abhishek</div>
<div>-----------------------------------------------------------------------------------------------------------------</div>
<div>
<div><br></div>
<div>xquery version "1.0-ml";</div>
<div><br></div>
<div>module namespace val= "http://test.com";</div>
<div><br></div>
<div>import schema default element namespace "" at "/resources/xsd/source1.xsd";</div>
<div><br></div>
<div>declare function val:validate-document ($xml) {</div>
<div>&nbsp; &nbsp; validate strict {&nbsp;</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; document{$xml}</div>
<div>&nbsp; &nbsp; }</div>
<div>};</div>
</div>
<div><br></div>
<div>-----------------------------------------------------------------------------------------------------------------</div>
</div>
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original
 message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law,
 this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.
</div>
Jakob Fix | 25 Sep 15:46 2014
Picon

[MarkLogic Dev General] security database(s)

Hi,

so we're wondering why in MarkLogic's management UI you have a dropdown menu to select your security database for a given database. because everybody we've talked to says to use the generic Security db.

Why am I given a choice if actually I shouldn't (something to do with clusters)? I know we need several and are currently attempting to recreate new security databases that in turn have as their security database the default one ... 

And why can't I view and modify a newly created security database as I can the original one?

Thanks for enlightening us!

cheers,
Jakob.

<div><div dir="ltr">
<div>Hi,</div>
<div><br></div>so we're wondering why in MarkLogic's management UI you have a dropdown menu to select your security database for a given database. because everybody we've talked to says to use the generic Security db.<div><br></div>
<div>Why am I given a choice if actually I shouldn't (something to do with clusters)? I know we need several and are currently attempting to recreate new security databases that in turn have as their security database the default one ...&nbsp;</div>
<div><br></div>
<div>And why can't I view and modify a newly created security database as I can the original one?</div>
<div><br></div>
<div>Thanks for enlightening us!<br>
</div>
<div>
<br clear="all"><div>cheers,<br>Jakob.</div>
<div><br></div>
</div>
</div></div>
Joel Ruisi | 23 Sep 03:42 2014

[MarkLogic Dev General] CPF PDF Conversion Error

I'm attempting to run cpf pdf conversion, and getting the following error:

/Library/MarkLogic/Converters/cvtpdf: No such file or directory

I've looked and cvtpdf is not in this location.  Why would it not be here.  I've enabled/installed cpf, specifically pdf conversion.  Marklogic version is 6.0-5.3 due to customer requirements.  I'm using a developer license if that matters.

Thanks,

Joel
<div><div dir="ltr">I'm attempting to run cpf pdf conversion, and getting the following error:<div><br></div>
<div>/Library/MarkLogic/Converters/cvtpdf: No such file or directory<br>
</div>
<div><br></div>
<div>I've looked and cvtpdf is not in this location.&nbsp; Why would it not be here.&nbsp; I've enabled/installed cpf, specifically pdf conversion.&nbsp; Marklogic version is 6.0-5.3 due to customer requirements.&nbsp; I'm using a developer license if that matters.</div>
<div><br></div>
<div>Thanks,</div>
<div><br></div>
<div>Joel</div>
</div></div>
Gary Russo | 18 Sep 20:45 2014
Picon

[MarkLogic Dev General] What is the size limitation of an xml doc and binary doc in MarkLogic?

The MongoDB size limitation of a json document is 16MB.

 

Does MarkLogic have a similar limitation for XML and Binary docs?

 

How does MarkLogic ingest a large binary file such as a video or Excel spreadsheet that is greater than 2MB?

 

The online docs state that document size and quantity is constrained by available memory, disk space and system file size limit. => http://docs.marklogic.com/guide/ingestion/formats#id_24381

 

This is nice but I’d like to know of some real world experiences.

 

 

What is the largest file that anyone has ingested?

 

Has anyone ingested files greater than 20 MB, 100 MB, 1 GB ?

 

 

 

Gary Russo

Enterprise NoSQL Developer

http://garyrusso.wordpress.com

 

<div><div class="WordSection1">
<p class="MsoNormal">The MongoDB size limitation of a json document is 16MB.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Does MarkLogic have a similar limitation for XML and Binary docs?<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">How does MarkLogic ingest a large binary file such as a video or Excel spreadsheet that is greater than 2MB?<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">The online docs state that document size and quantity is constrained by available memory, disk space and system file size limit. =&gt; <a href="http://docs.marklogic.com/guide/ingestion/formats#id_24381">http://docs.marklogic.com/guide/ingestion/formats#id_24381</a><p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">This is nice but I&rsquo;d like to know of some real world experiences.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">What is the largest file that anyone has ingested?<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Has anyone ingested files greater than 20 MB, 100 MB, 1 GB ?<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Gary Russo<p></p></p>
<p class="MsoNormal">Enterprise NoSQL Developer<p></p></p>
<p class="MsoNormal"><a href="http://garyrusso.wordpress.com">http://garyrusso.wordpress.com</a><p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
</div></div>
Gary Russo | 16 Sep 22:56 2014
Picon

Re: [MarkLogic Dev General] Leading wildcard search returning wrong total

Thanks Mike!

As you noted, using the recommended configuration posted on this page did
the trick. => https://docs.marklogic.com/guide/search-dev/wildcard#id_14163

Key settings used:
 - word searches
 - three character word searches
 - word positions
 - word lexicon in the codepoint collation
 - three character word positions

It also simplifies the $options.

This is the query that I use now.

import module namespace search = "http://marklogic.com/appservices/search"
    at "/MarkLogic/appservices/search/search.xqy";

declare variable $DN := "http://demo.org/demo";

let $options :=
  <options xmlns="http://marklogic.com/appservices/search">
    <constraint name="ImportedUnitCode">
      <word>
        <element ns="http://demo.org/demo" name="ImportedUnitCode"/>
      </word>
    </constraint>
    <sort-order type="xs:string" collation="http://marklogic.com/collation/"
direction="ascending">
      <element ns="http://demo.org/demo" name="ImportedUnitCode"/>
    </sort-order>
  </options>

let $q := "ImportedUnitCode:RU0*4"

let $results := search:search($q, $options)

return
  ($results/search:result//search:highlight/text(), $results)

-----Original Message-----
From: general-bounces@...
[mailto:general-bounces@...] On Behalf Of Michael
Blakeley
Sent: Thursday, September 11, 2014 11:54 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Leading wildcard search returning wrong
total

The total is 2 because that's how many documents match the searchable part
of your query. You could try using xdmp:plan or xdmp:query-trace to see more
of what's happening. It might also help to tell us the full version string
for the server release you're using, so we know what features are available
and what bugs might be present.

A trailing wildcard index can handle terms like "fuba*". But it isn't much
help with "fub*r" because that isn't a trailing wildcard term. See
https://docs.marklogic.com/guide/search-dev/wildcard - and consider using
the recommended configuration from
https://docs.marklogic.com/guide/search-dev/wildcard#id_14163 for
general-purpose wildcard search.

However from what you've shown us of your use-case you might be better off
with a more specialized approach. You might get automatic expansion with an
element-word lexicon, if the version you're using can do that. Or you could
implement a custom constraint with
https://docs.marklogic.com/cts:value-match and an element range index. Don't
let that idea scare you: custom constraints aren't nearly as difficult as
they sound.

-- Mike

On 11 Sep 2014, at 19:43 , Gary Russo <garyrusso@...> wrote:

> I have a tiny database containing 4 documents with trailing wildcard
search options enabled.
>  
> See Code Snippet #2 below for the data load script.
>  
> Using Query Console, the following wildcard search code snippet returns a
total value of 2 when it should only be 1.
>  
> I'm sure that I'm missing something obvious. Hopefully another pair of
eyes can spot it quickly.
>  
>  
> Code Snippet 1: Leading Wildcard Search
>  
> import module namespace search = "http://marklogic.com/appservices/search"
>     at "/MarkLogic/appservices/search/search.xqy";
>  
> declare variable $DN := "http://demo.org/demo";
>  
> let $options :=
>   <options xmlns="http://marklogic.com/appservices/search">
>     <search-option>unfiltered</search-option>
>     <return-constraints>true</return-constraints>
>     <term>
>       <term-option>wildcarded</term-option>
>     </term>
>     <constraint name="ImportedUnitCode">
>       <value>
>         <element ns="http://demo.org/demo" name="ImportedUnitCode"/>
>       </value>
>     </constraint>
>     <sort-order type="xs:string"
collation="http://marklogic.com/collation/" direction="ascending">
>       <element ns="http://demo.org/demo" name="ImportedUnitCode"/>
>     </sort-order>
>   </options>
>  
> let $q := "ImportedUnitCode:RU000*4"
>  
> let $results := search:search($q, $options)
>  
> return
>   ($results/search:result//search:highlight/text(), $results)
>  
>  
>  
> Code Snippet 2: Data Load
>  
> declare variable $data :=
> <file name="record1.xml">
>    <record xmlns="http://demo.org/demo">
>      <Id type="number">999</Id>
>      <ImportFileId type="number">1</ImportFileId>
>      <ImportedUnitCode type="string">RU00999</ImportedUnitCode>
>      <ImportedAccountCode type="string">AC00002</ImportedAccountCode>
>      <BeginningBalance type="number">0</BeginningBalance>
>     <EndingBalance type="number">1374.63552475657</EndingBalance>
>    </record>
> </file>,
> <file name="record2.xml">
>    <record xmlns="http://demo.org/demo">
>      <Id type="number">499</Id>
>      <ImportFileId type="number">2</ImportFileId>
>      <ImportedUnitCode type="string">RU00499</ImportedUnitCode>
>      <ImportedAccountCode type="string">AC00502</ImportedAccountCode>
>      <BeginningBalance type="number">0</BeginningBalance>
>      <EndingBalance type="number">8524.31456955351</EndingBalance>
>    </record>
> </file>,
> <file name="record3.xml">
>    <record xmlns="http://demo.org/demo">
>      <Id type="number">99</Id>
>      <ImportFileId type="number">3</ImportFileId>
>      <ImportedUnitCode type="string">RU00099</ImportedUnitCode>
>      <ImportedAccountCode type="string">AC00902</ImportedAccountCode>
>      <BeginningBalance type="number">0</BeginningBalance>
>      <EndingBalance type="number">7170.55131083846</EndingBalance>
>    </record>
> </file>,
> <file name="record4.xml">
>    <record xmlns="http://demo.org/demo">
>      <Id type="number">4</Id>
>      <ImportFileId type="number">4</ImportFileId>
>      <ImportedUnitCode type="string">RU00004</ImportedUnitCode>
>      <ImportedAccountCode type="string">AC00997</ImportedAccountCode>
>      <BeginningBalance type="number">0</BeginningBalance>
>      <EndingBalance type="number">3041.22115626988</EndingBalance>
>    </record>
> </file>;
>  
> $data/xdmp:document-insert( <at> name, *),
>
$data!fn:string-join((.//*:ImportedUnitCode,.//*:ImportedAccountCode,.//*:Id
), " ")
>  
>  
>  
>  
> Gary Russo
> Thomson Reuters
> Enterprise NoSQL Developer
> http://twitter.com/garyprusso
>  
>  
> _______________________________________________
> General mailing list
> General@...
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General@...
http://developer.marklogic.com/mailman/listinfo/general

Tim | 15 Sep 18:15 2014
Picon

[MarkLogic Dev General] How to access XML config files from a modules database instead of content database?

Hi Folks,

I'm wondering how to access XML configuration files from a modules database
while the code is being executed in the context of a content database? Is there
a specific import command that allows me to do this?

Tim M.


Gmane