Alex Jouravlev | 26 Mar 04:11 2015

[MarkLogic Dev General] Additional XQuery libraries

Hi Everyone,

What additional XQuery libraries - other than supplied with MarkLogic - you found useful?

Alex Jouravlev
Director, Business Abstraction Pty Ltd
Phone:       +61-(2)-8003-4830
Mobile:     +61-4-0408-3258
Web: http://www.businessabstraction.com
LinkedIn: http://au.linkedin.com/in/alexjouravlev/

<div><div dir="ltr">Hi Everyone,<div><br></div>
<div>What additional XQuery libraries - other than supplied with MarkLogic - you found useful?<br clear="all"><div><div class="gmail_signature"><div dir="ltr"><p><a name="SafeHtmlFilter__MailAutoSig"><span>Alex Jouravlev<br></span></a><span>Director, Business Abstraction Pty
Ltd <br>
Phone: &nbsp; &nbsp; &nbsp; +61-(2)-8003-4830<br>
Mobile: &nbsp; &nbsp; +61-4-0408-3258<br>
Web: <a href="http://www.businessabstraction.com" target="_blank">http://www.businessabstraction.com</a><br>
LinkedIn: <a href="http://au.linkedin.com/in/alexjouravlev/" target="_blank">http://au.linkedin.com/in/alexjouravlev/</a></span><span><br></span></p></div></div></div>
</div>
<div class="ebstaET"></div>
</div></div>
Abhishek.Srivastav | 26 Mar 01:14 2015

[MarkLogic Dev General] XDMP-LOCKED Roxy Deployment

Hi All,

 

I am doing Roxy deployment using no-admin user. First time deployment of XQuery files went well but next successive deployment is throwing XDMP-LOCKED Document or directory is locked exception.

 

Not sure If I am missing any special privilege or permission to deployer role.

 

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>
<div>
<p>Hi All,</p>
<p>&nbsp;</p>
<p>I am doing Roxy deployment using no-admin user.&nbsp;First time deployment of XQuery files went well but next successive deployment is throwing XDMP-LOCKED Document or directory is locked exception.</p>
<p>&nbsp;</p>
<p>Not sure If I am missing any special privilege or permission to deployer role.</p>
<p>&nbsp;</p>
<p>Thanks</p>
<p>Abhishek</p>
</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>
Gabe Cuevas | 24 Mar 23:21 2015

Re: [MarkLogic Dev General] General Digest, Vol 129, Issue 45

What is this email list for? Who does this go to and how many total people?

Regards,


Gabe Cuevas


On Tue, Mar 24, 2015 at 2:53 PM, <general-request-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org> wrote:
Send General mailing list submissions to
        general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://developer.marklogic.com/mailman/listinfo/general
or, via email, send a message with subject or body 'help' to
        general-request-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

You can reach the person managing the list at
        general-owner-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of General digest..."


Today's Topics:

   1. cts:value-match $pattern parameter (Danny Sinang)
   2. Re: cts:value-match $pattern parameter (Danny Sinang)
   3. Re: cts:value-match $pattern parameter (Joe Bryan)
   4. Re: cts:value-match $pattern parameter (Christopher Hamlin)
   5. Re: xml ingestion quick question (Geert Josten)


----------------------------------------------------------------------

Message: 1
Date: Tue, 24 Mar 2015 16:22:40 -0400
From: Danny Sinang <d.sinang <at> gmail.com>
Subject: [MarkLogic Dev General] cts:value-match $pattern parameter
To: general <General <at> developer.marklogic.com>
Message-ID:
        <CAPKs-ULq49ebPT_XEFdh1UQT_o3JACUNRqnawYVjQJ7ZLRwpVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Content-Type: text/plain; charset="utf-8"

cts:value-match() <https://docs.marklogic.com/cts:value-match#pattern>
apparently accepts a "$pattern" parameter.

It works if I specify a pattern of "1" and a pattern of "5" .

But how do I tell it to match values that are either "1" or "5".

I tried "1|5", "[1|5]", "1 or 5" but they don't work.

Regards,
Danny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150324/2f426b7e/attachment-0001.html

------------------------------

Message: 2
Date: Tue, 24 Mar 2015 16:25:28 -0400
From: Danny Sinang <d.sinang <at> gmail.com>
Subject: Re: [MarkLogic Dev General] cts:value-match $pattern
        parameter
To: general <General <at> developer.marklogic.com>
Message-ID:
        <CAPKs-UJu+MuZWF2+VFpBUJ1vwUo7EfjLFOxpvgJ0DBj_TxJL4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Content-Type: text/plain; charset="utf-8"

Never mind.

This pattern worked :

("1", "5").


On Tue, Mar 24, 2015 at 4:22 PM, Danny Sinang <d.sinang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> cts:value-match() <https://docs.marklogic.com/cts:value-match#pattern>
> apparently accepts a "$pattern" parameter.
>
> It works if I specify a pattern of "1" and a pattern of "5" .
>
> But how do I tell it to match values that are either "1" or "5".
>
> I tried "1|5", "[1|5]", "1 or 5" but they don't work.
>
> Regards,
> Danny
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150324/11ae8612/attachment-0001.html

------------------------------

Message: 3
Date: Tue, 24 Mar 2015 20:30:29 +0000
From: Joe Bryan <Joe.Bryan <at> marklogic.com>
Subject: Re: [MarkLogic Dev General] cts:value-match $pattern
        parameter
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Message-ID: <D1374146.D36D%joe.bryan-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org>
Content-Type: text/plain; charset="us-ascii"

Hi Danny,

That pattern "worked" because of function mapping; cts:value-match was invoked twice, one for each pattern in the sequence. Disabling function mapping and invoking cts:value-match with multiple patterns results in XDMP-ARGTYPE.

I'm not sure how to represent a choice of patterns.

Thanks.

-jb



From: Danny Sinang <d.sinang <at> gmail.com<mailto:d.sinang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>>
Reply-To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org<mailto:general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>>
Date: Tuesday, March 24, 2015 at 4:25 PM
To: general <General <at> developer.marklogic.com<mailto:General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>>
Subject: Re: [MarkLogic Dev General] cts:value-match $pattern parameter

Never mind.

This pattern worked :

("1", "5").


On Tue, Mar 24, 2015 at 4:22 PM, Danny Sinang <d.sinang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<mailto:d.sinang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> wrote:
cts:value-match()<https://docs.marklogic.com/cts:value-match#pattern> apparently accepts a "$pattern" parameter.

It works if I specify a pattern of "1" and a pattern of "5" .

But how do I tell it to match values that are either "1" or "5".

I tried "1|5", "[1|5]", "1 or 5" but they don't work.

Regards,
Danny


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150324/85e63074/attachment-0001.html

------------------------------

Message: 4
Date: Tue, 24 Mar 2015 16:35:38 -0400
From: Christopher Hamlin <cbhamlin <at> gmail.com>
Subject: Re: [MarkLogic Dev General] cts:value-match $pattern
        parameter
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Message-ID:
        <CADX+0QzvcPCFqdY7OWufVJrridHWKYHOfomEso7Q4R_kHGJuFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Content-Type: text/plain; charset=UTF-8

Hi,

It's not regular expression matching, but only patterns with wildcards
? (one char) or * (zero or more char).

One way to speed it up could be to limit it to one-char matches with
'?' and then use a predicate with fn:matches to get exactly what you
want.

/ch


------------------------------

Message: 5
Date: Tue, 24 Mar 2015 21:53:10 +0000
From: Geert Josten <Geert.Josten-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org>
Subject: Re: [MarkLogic Dev General] xml ingestion quick question
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Message-ID: <D1379AB5.88604%geert.josten-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org>
Content-Type: text/plain; charset="us-ascii"

Hi Cory,

Something like this? http://grtjn.blogspot.nl/2014/10/capturing-marklogic-applications-with.html ;-)

But extra write ups are more than welcome!

If you think Roxy capture could be improved, take a look at the capture tickets, and feel free to add new or pile on to existing ones: https://github.com/marklogic/roxy/labels/capture

Cheers,
Geert

From: cyanline llc <info <at> cyanline.com<mailto:info-75WYHEIPFU1Wk0Htik3J/w@public.gmane.org>>
Reply-To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org<mailto:general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>>
Date: Tuesday, March 24, 2015 at 5:43 PM
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org<mailto:general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>>
Subject: Re: [MarkLogic Dev General] xml ingestion quick question

Dave,
  I've spent the past 3 weeks getting the app we've built in the app-builder iface, to be captured and re-deploy-able. We've got it working now, and I can deploy a new VM, a full rest application, and ingest the db content- all with the flick of a script. It was a lot of work but I am rather impressed with the results.
  The roxy documentation does do the trick, but the community can obviously always benefit from more write ups. I didn't do anything out of the ordinary, but was still considering doing a simple write up for capturing an ml app on one server, and deploying it to another server.
  Thank you for the tips!

-Cory
On 03/24/2015 09:23 AM, Dave Cassel wrote:
Responding to the Roxy part of this -- check out Roxy's capture functionality. Not well documented yet, but you can see the notes on this GitHub ticket<https://github.com/marklogic/roxy/issues/304>.

--
Dave Cassel
Developer Community Manager
MarkLogic Corporation<http://www.marklogic.com/>
Cell:  +1-484-798-8720


From: David Ennis <david.ennis-otb2drGCQNxWk0Htik3J/w@public.gmane.org<mailto:david.ennis-otb2drGCQNxWk0Htik3J/w@public.gmane.org>>
Reply-To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org<mailto:general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>>
Date: Tuesday, March 24, 2015 at 6:22 AM
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org<mailto:general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>>
Subject: Re: [MarkLogic Dev General] xml ingestion quick question

I always find it more exact to configure my indexes in the admin interface instead of the app-builder interface (I'm not a fan of wizard-type things that hide some options).  You have more control over the process and more options.


[BTW: when using roxy, we usually then read the database.xml and extract the configured indexes for us in ml-config.xml later]



Kind Regards,
David Ennis


David Ennis
Content Engineer

[HintTech] <http://www.hinttech.com/>
Mastering the value of content
creative | technology | content

Delftechpark 37i
2628 XJ Delft
The Netherlands
T: +31 88 268 25 00
M: +31 63 091 72 80

[http://www.hinttech.com]<http://www.hinttech.com> [http://www.hinttech.com/signature/Twitter_HintTech.png] <https://twitter.com/HintTech>  [http://www.hinttech.com/signature/Facebook_HintTech.png] <http://www.facebook.com/HintTech>  [http://www.hinttech.com/signature/Linkedin_HintTech.png] <http://www.linkedin.com/company/HintTech>

On 23 March 2015 at 20:50, cyanline llc <info-75WYHEIPFU1Wk0Htik3J/w@public.gmane.org<mailto:info-75WYHEIPFU1Wk0Htik3J/w@public.gmane.org>> wrote:
Mike,
   While attempting to add the Element via the "CONFIGURE ELEMENT RANGE
INDEX" menu on the app builder interface (port 8000), upon hitting the
"Find" button, I receive "No elements matched your search". For this
app, I have added all the other Element Rage Indexes with this method (~15).
   I have not tried via the admin interface, nor with the ml-config.xml
file.
   The version of ML is 7.0-4.3

Thank you,
Cory
On 03/23/2015 03:44 PM, Michael Blakeley wrote:
> There is no nesting limit.
>
> Why can't you create an element-range index on attachment_filename? Is there an error message?
>
> What's the full version number of the MarkLogic release you're using?
>
> -- Mike
>
>> On 23 Mar 2015, at 11:27 , cyanline llc <info-75WYHEIPFU1Wk0Htik3J/w@public.gmane.org<mailto:info-75WYHEIPFU1Wk0Htik3J/w@public.gmane.org>> wrote:
>>
>> Hello,
>>    What am I missing that I can create an Element Range Index on
>> attachment-count but not attachment_filename?
>>    Below is sample XML that I am ingesting and building an app around.
>>
>> <attachment-count>1</attachment-count>
>> <attachments>
>>    <attachment>
>> <attachment_filename>Adnserio~1.pdf</attachment_filename>
>>    </attachment>
>> </attachments>
>>
>>    I have checked and I am producing valid XML. 'attachment-count' is
>> obviously nested, so, is there a nesting maximum?
>>
>> Thanks in advance.
>> _______________________________________________
>> General mailing list
>> General <at> developer.marklogic.com<mailto:General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
>> http://developer.marklogic.com/mailman/listinfo/general
>>
> _______________________________________________
> General mailing list
> General <at> developer.marklogic.com<mailto:General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General-ld4jwAGwUXTgXEvjvSGRgA@public.gmane.orggic.com<mailto:General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
http://developer.marklogic.com/mailman/listinfo/general




_______________________________________________
General mailing list
General-ld4jwAGwUXTgXEvjvSGRgA@public.gmane.orggic.com<mailto:General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>http://developer.marklogic.com/mailman/listinfo/general

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150324/f92833ff/attachment.html

------------------------------

_______________________________________________
General mailing list
General-ld4jwAGwUXTgXEvjvSGRgA@public.gmane.orggic.com
http://developer.marklogic.com/mailman/listinfo/general


End of General Digest, Vol 129, Issue 45
****************************************



--


Regards,

Gabe Cuevas
O +1 (510) 320-3020 EXT 705
C +1 (415) 847-8011
<div>
<div dir="ltr">What is this email list for? Who does this go to and how many total people?<div><br></div>
<div>Regards,</div>
<div>
<br><br>
</div>
<div>Gabe Cuevas</div>
<div><a href="mailto:gabe@...">gabe <at> cloud9charts.com</a></div>
<div><a href="http://www.cloud9charts.com">www.cloud9charts.com</a></div>
<div><br></div>
</div>
<div class="gmail_extra">
<br><div class="gmail_quote">On Tue, Mar 24, 2015 at 2:53 PM,  <span dir="ltr">&lt;<a href="mailto:general-request@..." target="_blank">general-request@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">Send General mailing list submissions to<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:general@...om">general@...</a><br><br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br>
or, via email, send a message with subject or body 'help' to<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:general-request@...klogic.com">general-request@...</a><br><br>
You can reach the person managing the list at<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:general-owner@...ogic.com">general-owner@...</a><br><br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of General digest..."<br><br><br>
Today's Topics:<br><br>
&nbsp; &nbsp;1. cts:value-match $pattern parameter (Danny Sinang)<br>
&nbsp; &nbsp;2. Re: cts:value-match $pattern parameter (Danny Sinang)<br>
&nbsp; &nbsp;3. Re: cts:value-match $pattern parameter (Joe Bryan)<br>
&nbsp; &nbsp;4. Re: cts:value-match $pattern parameter (Christopher Hamlin)<br>
&nbsp; &nbsp;5. Re: xml ingestion quick question (Geert Josten)<br><br><br>
----------------------------------------------------------------------<br><br>
Message: 1<br>
Date: Tue, 24 Mar 2015 16:22:40 -0400<br>
From: Danny Sinang &lt;<a href="mailto:d.sinang@...">d.sinang <at> gmail.com</a>&gt;<br>
Subject: [MarkLogic Dev General] cts:value-match $pattern parameter<br>
To: general &lt;<a href="mailto:General@...">General <at> developer.marklogic.com</a>&gt;<br>
Message-ID:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="mailto:CAPKs-ULq49ebPT_XEFdh1UQT_o3JACUNRqnawYVjQJ7ZLRwpVw@...">CAPKs-ULq49ebPT_XEFdh1UQT_o3JACUNRqnawYVjQJ7ZLRwpVw@...</a>&gt;<br>
Content-Type: text/plain; charset="utf-8"<br><br>
cts:value-match() &lt;<a href="https://docs.marklogic.com/cts:value-match#pattern" target="_blank">https://docs.marklogic.com/cts:value-match#pattern</a>&gt;<br>
apparently accepts a "$pattern" parameter.<br><br>
It works if I specify a pattern of "1" and a pattern of "5" .<br><br>
But how do I tell it to match values that are either "1" or "5".<br><br>
I tried "1|5", "[1|5]", "1 or 5" but they don't work.<br><br>
Regards,<br>
Danny<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://developer.marklogic.com/pipermail/general/attachments/20150324/2f426b7e/attachment-0001.html" target="_blank">http://developer.marklogic.com/pipermail/general/attachments/20150324/2f426b7e/attachment-0001.html</a><br><br>
------------------------------<br><br>
Message: 2<br>
Date: Tue, 24 Mar 2015 16:25:28 -0400<br>
From: Danny Sinang &lt;<a href="mailto:d.sinang@...">d.sinang <at> gmail.com</a>&gt;<br>
Subject: Re: [MarkLogic Dev General] cts:value-match $pattern<br>
&nbsp; &nbsp; &nbsp; &nbsp; parameter<br>
To: general &lt;<a href="mailto:General@...">General <at> developer.marklogic.com</a>&gt;<br>
Message-ID:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="mailto:CAPKs-UJu%2BMuZWF2%2BVFpBUJ1vwUo7EfjLFOxpvgJ0DBj_TxJL4g@...">CAPKs-UJu+MuZWF2+VFpBUJ1vwUo7EfjLFOxpvgJ0DBj_TxJL4g@...</a>&gt;<br>
Content-Type: text/plain; charset="utf-8"<br><br>
Never mind.<br><br>
This pattern worked :<br><br>
("1", "5").<br><br><br>
On Tue, Mar 24, 2015 at 4:22 PM, Danny Sinang &lt;<a href="mailto:d.sinang <at> gmail.com">d.sinang@...</a>&gt; wrote:<br><br>
&gt; cts:value-match() &lt;<a href="https://docs.marklogic.com/cts:value-match#pattern" target="_blank">https://docs.marklogic.com/cts:value-match#pattern</a>&gt;<br>
&gt; apparently accepts a "$pattern" parameter.<br>
&gt;<br>
&gt; It works if I specify a pattern of "1" and a pattern of "5" .<br>
&gt;<br>
&gt; But how do I tell it to match values that are either "1" or "5".<br>
&gt;<br>
&gt; I tried "1|5", "[1|5]", "1 or 5" but they don't work.<br>
&gt;<br>
&gt; Regards,<br>
&gt; Danny<br>
&gt;<br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://developer.marklogic.com/pipermail/general/attachments/20150324/11ae8612/attachment-0001.html" target="_blank">http://developer.marklogic.com/pipermail/general/attachments/20150324/11ae8612/attachment-0001.html</a><br><br>
------------------------------<br><br>
Message: 3<br>
Date: Tue, 24 Mar 2015 20:30:29 +0000<br>
From: Joe Bryan &lt;<a href="mailto:Joe.Bryan@...">Joe.Bryan <at> marklogic.com</a>&gt;<br>
Subject: Re: [MarkLogic Dev General] cts:value-match $pattern<br>
&nbsp; &nbsp; &nbsp; &nbsp; parameter<br>
To: MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>
Message-ID: &lt;<a href="mailto:D1374146.D36D%25joe.bryan@...">D1374146.D36D%joe.bryan@...</a>&gt;<br>
Content-Type: text/plain; charset="us-ascii"<br><br>
Hi Danny,<br><br>
That pattern "worked" because of function mapping; cts:value-match was invoked twice, one for each pattern in the sequence. Disabling function mapping and invoking cts:value-match with multiple patterns results in XDMP-ARGTYPE.<br><br>
I'm not sure how to represent a choice of patterns.<br><br>
Thanks.<br><br>
-jb<br><br><br><br>
From: Danny Sinang &lt;<a href="mailto:d.sinang@...">d.sinang <at> gmail.com</a>&lt;mailto:<a href="mailto:d.sinang@...">d.sinang@...</a>&gt;&gt;<br>
Reply-To: MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&lt;mailto:<a href="mailto:general@...">general@...</a>&gt;&gt;<br>
Date: Tuesday, March 24, 2015 at 4:25 PM<br>
To: general &lt;<a href="mailto:General@...">General <at> developer.marklogic.com</a>&lt;mailto:<a href="mailto:General <at> developer.marklogic.com">General@...</a>&gt;&gt;<br>
Subject: Re: [MarkLogic Dev General] cts:value-match $pattern parameter<br><br>
Never mind.<br><br>
This pattern worked :<br><br>
("1", "5").<br><br><br>
On Tue, Mar 24, 2015 at 4:22 PM, Danny Sinang &lt;<a href="mailto:d.sinang <at> gmail.com">d.sinang@...</a>&lt;mailto:<a href="mailto:d.sinang <at> gmail.com">d.sinang@...</a>&gt;&gt; wrote:<br>
cts:value-match()&lt;<a href="https://docs.marklogic.com/cts:value-match#pattern" target="_blank">https://docs.marklogic.com/cts:value-match#pattern</a>&gt; apparently accepts a "$pattern" parameter.<br><br>
It works if I specify a pattern of "1" and a pattern of "5" .<br><br>
But how do I tell it to match values that are either "1" or "5".<br><br>
I tried "1|5", "[1|5]", "1 or 5" but they don't work.<br><br>
Regards,<br>
Danny<br><br><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://developer.marklogic.com/pipermail/general/attachments/20150324/85e63074/attachment-0001.html" target="_blank">http://developer.marklogic.com/pipermail/general/attachments/20150324/85e63074/attachment-0001.html</a><br><br>
------------------------------<br><br>
Message: 4<br>
Date: Tue, 24 Mar 2015 16:35:38 -0400<br>
From: Christopher Hamlin &lt;<a href="mailto:cbhamlin@...">cbhamlin <at> gmail.com</a>&gt;<br>
Subject: Re: [MarkLogic Dev General] cts:value-match $pattern<br>
&nbsp; &nbsp; &nbsp; &nbsp; parameter<br>
To: MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>
Message-ID:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="mailto:CADX%2B0QzvcPCFqdY7OWufVJrridHWKYHOfomEso7Q4R_kHGJuFA@...">CADX+0QzvcPCFqdY7OWufVJrridHWKYHOfomEso7Q4R_kHGJuFA@...</a>&gt;<br>
Content-Type: text/plain; charset=UTF-8<br><br>
Hi,<br><br>
It's not regular expression matching, but only patterns with wildcards<br>
? (one char) or * (zero or more char).<br><br>
One way to speed it up could be to limit it to one-char matches with<br>
'?' and then use a predicate with fn:matches to get exactly what you<br>
want.<br><br>
/ch<br><br><br>
------------------------------<br><br>
Message: 5<br>
Date: Tue, 24 Mar 2015 21:53:10 +0000<br>
From: Geert Josten &lt;<a href="mailto:Geert.Josten@...">Geert.Josten@...</a>&gt;<br>
Subject: Re: [MarkLogic Dev General] xml ingestion quick question<br>
To: MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&gt;<br>
Message-ID: &lt;<a href="mailto:D1379AB5.88604%25geert.josten <at> marklogic.com">D1379AB5.88604%geert.josten@...</a>&gt;<br>
Content-Type: text/plain; charset="us-ascii"<br><br>
Hi Cory,<br><br>
Something like this? <a href="http://grtjn.blogspot.nl/2014/10/capturing-marklogic-applications-with.html" target="_blank">http://grtjn.blogspot.nl/2014/10/capturing-marklogic-applications-with.html</a> ;-)<br><br>
But extra write ups are more than welcome!<br><br>
If you think Roxy capture could be improved, take a look at the capture tickets, and feel free to add new or pile on to existing ones: <a href="https://github.com/marklogic/roxy/labels/capture" target="_blank">https://github.com/marklogic/roxy/labels/capture</a><br><br>
Cheers,<br>
Geert<br><br>
From: cyanline llc &lt;<a href="mailto:info@...">info <at> cyanline.com</a>&lt;mailto:<a href="mailto:info@...">info@...</a>&gt;&gt;<br>
Reply-To: MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&lt;mailto:<a href="mailto:general@...">general@...</a>&gt;&gt;<br>
Date: Tuesday, March 24, 2015 at 5:43 PM<br>
To: MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&lt;mailto:<a href="mailto:general@...">general@...</a>&gt;&gt;<br>
Subject: Re: [MarkLogic Dev General] xml ingestion quick question<br><br>
Dave,<br>
&nbsp; I've spent the past 3 weeks getting the app we've built in the app-builder iface, to be captured and re-deploy-able. We've got it working now, and I can deploy a new VM, a full rest application, and ingest the db content- all with the flick of a script. It was a lot of work but I am rather impressed with the results.<br>
&nbsp; The roxy documentation does do the trick, but the community can obviously always benefit from more write ups. I didn't do anything out of the ordinary, but was still considering doing a simple write up for capturing an ml app on one server, and deploying it to another server.<br>
&nbsp; Thank you for the tips!<br><br>
-Cory<br>
On 03/24/2015 09:23 AM, Dave Cassel wrote:<br>
Responding to the Roxy part of this -- check out Roxy's capture functionality. Not well documented yet, but you can see the notes on this GitHub ticket&lt;<a href="https://github.com/marklogic/roxy/issues/304" target="_blank">https://github.com/marklogic/roxy/issues/304</a>&gt;.<br><br>
--<br>
Dave Cassel<br>
Developer Community Manager<br>
MarkLogic Corporation&lt;<a href="http://www.marklogic.com/" target="_blank">http://www.marklogic.com/</a>&gt;<br>
Cell:&nbsp; <a href="tel:%2B1-484-798-8720" value="+14847988720">+1-484-798-8720</a><br><br><br>
From: David Ennis &lt;<a href="mailto:david.ennis@...">david.ennis@...</a>&lt;mailto:<a href="mailto:david.ennis@...">david.ennis@...</a>&gt;&gt;<br>
Reply-To: MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&lt;mailto:<a href="mailto:general@...">general@...</a>&gt;&gt;<br>
Date: Tuesday, March 24, 2015 at 6:22 AM<br>
To: MarkLogic Developer Discussion &lt;<a href="mailto:general <at> developer.marklogic.com">general@...</a>&lt;mailto:<a href="mailto:general@...">general@...</a>&gt;&gt;<br>
Subject: Re: [MarkLogic Dev General] xml ingestion quick question<br><br>
I always find it more exact to configure my indexes in the admin interface instead of the app-builder interface (I'm not a fan of wizard-type things that hide some options).&nbsp; You have more control over the process and more options.<br><br><br>
[BTW: when using roxy, we usually then read the database.xml and extract the configured indexes for us in ml-config.xml later]<br><br><br><br>
Kind Regards,<br>
David Ennis<br><br><br>
David Ennis<br>
Content Engineer<br><br>
[HintTech] &lt;<a href="http://www.hinttech.com/" target="_blank">http://www.hinttech.com/</a>&gt;<br>
Mastering the value of content<br>
creative | technology | content<br><br>
Delftechpark 37i<br>
2628 XJ Delft<br>
The Netherlands<br>
T: <a href="tel:%2B31%2088%20268%2025%2000" value="+31882682500">+31 88 268 25 00</a><br>
M: <a href="tel:%2B31%2063%20091%2072%2080" value="+31630917280">+31 63 091 72 80</a><br><br>
[<a href="http://www.hinttech.com" target="_blank">http://www.hinttech.com</a>]&lt;<a href="http://www.hinttech.com" target="_blank">http://www.hinttech.com</a>&gt; [<a href="http://www.hinttech.com/signature/Twitter_HintTech.png" target="_blank">http://www.hinttech.com/signature/Twitter_HintTech.png</a>] &lt;<a href="https://twitter.com/HintTech" target="_blank">https://twitter.com/HintTech</a>&gt;&nbsp; [<a href="http://www.hinttech.com/signature/Facebook_HintTech.png" target="_blank">http://www.hinttech.com/signature/Facebook_HintTech.png</a>] &lt;<a href="http://www.facebook.com/HintTech" target="_blank">http://www.facebook.com/HintTech</a>&gt;&nbsp; [<a href="http://www.hinttech.com/signature/Linkedin_HintTech.png" target="_blank">http://www.hinttech.com/signature/Linkedin_HintTech.png</a>] &lt;<a href="http://www.linkedin.com/company/HintTech" target="_blank">http://www.linkedin.com/company/HintTech</a>&gt;<br><br>
On 23 March 2015 at 20:50, cyanline llc &lt;<a href="mailto:info <at> cyanline.com">info@...</a>&lt;mailto:<a href="mailto:info@...">info@...</a>&gt;&gt; wrote:<br>
Mike,<br>
&nbsp; &nbsp;While attempting to add the Element via the "CONFIGURE ELEMENT RANGE<br>
INDEX" menu on the app builder interface (port 8000), upon hitting the<br>
"Find" button, I receive "No elements matched your search". For this<br>
app, I have added all the other Element Rage Indexes with this method (~15).<br>
&nbsp; &nbsp;I have not tried via the admin interface, nor with the ml-config.xml<br>
file.<br>
&nbsp; &nbsp;The version of ML is 7.0-4.3<br><br>
Thank you,<br>
Cory<br>
On 03/23/2015 03:44 PM, Michael Blakeley wrote:<br>
&gt; There is no nesting limit.<br>
&gt;<br>
&gt; Why can't you create an element-range index on attachment_filename? Is there an error message?<br>
&gt;<br>
&gt; What's the full version number of the MarkLogic release you're using?<br>
&gt;<br>
&gt; -- Mike<br>
&gt;<br>
&gt;&gt; On 23 Mar 2015, at 11:27 , cyanline llc &lt;<a href="mailto:info <at> cyanline.com">info@...</a>&lt;mailto:<a href="mailto:info <at> cyanline.com">info@...</a>&gt;&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hello,<br>
&gt;&gt;&nbsp; &nbsp; What am I missing that I can create an Element Range Index on<br>
&gt;&gt; attachment-count but not attachment_filename?<br>
&gt;&gt;&nbsp; &nbsp; Below is sample XML that I am ingesting and building an app around.<br>
&gt;&gt;<br>
&gt;&gt; &lt;attachment-count&gt;1&lt;/attachment-count&gt;<br>
&gt;&gt; &lt;attachments&gt;<br>
&gt;&gt;&nbsp; &nbsp; &lt;attachment&gt;<br>
&gt;&gt; &lt;attachment_filename&gt;Adnserio~1.pdf&lt;/attachment_filename&gt;<br>
&gt;&gt;&nbsp; &nbsp; &lt;/attachment&gt;<br>
&gt;&gt; &lt;/attachments&gt;<br>
&gt;&gt;<br>
&gt;&gt;&nbsp; &nbsp; I have checked and I am producing valid XML. 'attachment-count' is<br>
&gt;&gt; obviously nested, so, is there a nesting maximum?<br>
&gt;&gt;<br>
&gt;&gt; Thanks in advance.<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; General mailing list<br>
&gt;&gt; <a href="mailto:General@...">General <at> developer.marklogic.com</a>&lt;mailto:<a href="mailto:General@...c.com">General@...</a>&gt;<br>
&gt;&gt; <a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; General mailing list<br>
&gt; <a href="mailto:General@...">General <at> developer.marklogic.com</a>&lt;mailto:<a href="mailto:General@...m">General@...</a>&gt;<br>
&gt; <a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br>
_______________________________________________<br>
General mailing list<br><a href="mailto:General@...">General@...gic.com</a>&lt;mailto:<a href="mailto:General@...">General@...</a>&gt;<br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br><br><br><br>
_______________________________________________<br>
General mailing list<br><a href="mailto:General@...">General@...gic.com</a>&lt;mailto:<a href="mailto:General@...">General@...</a>&gt;<a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://developer.marklogic.com/pipermail/general/attachments/20150324/f92833ff/attachment.html" target="_blank">http://developer.marklogic.com/pipermail/general/attachments/20150324/f92833ff/attachment.html</a><br><br>
------------------------------<br><br>
_______________________________________________<br>
General mailing list<br><a href="mailto:General@...">General@...gic.com</a><br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><br><br><br>
End of General Digest, Vol 129, Issue 45<br>
****************************************<br>
</blockquote>
</div>
<br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">
<div><br></div>
<div><br></div>
<div>Regards,</div>
<div>
<br>Gabe Cuevas</div>
<div><a href="mailto:gabe <at> cloud9charts.com" target="_blank">gabe@...</a></div>
<div>O +1 (510) 320-3020 EXT 705<br>
</div>
<div>C +1 (415) 847-8011</div>
</div></div>
</div>
</div>
Danny Sinang | 24 Mar 21:22 2015
Picon

[MarkLogic Dev General] cts:value-match $pattern parameter

cts:value-match() apparently accepts a "$pattern" parameter.

It works if I specify a pattern of "1" and a pattern of "5" . 

But how do I tell it to match values that are either "1" or "5".

I tried "1|5", "[1|5]", "1 or 5" but they don't work.

Regards,
Danny

<div><div dir="ltr">
<a href="https://docs.marklogic.com/cts:value-match#pattern">cts:value-match()</a> apparently accepts a "$pattern" parameter.<div><br></div>
<div>It works if I specify a pattern of "1" and a pattern of "5" .&nbsp;</div>
<div><br></div>
<div>But how do I tell it to match values that are either "1" or "5".</div>
<div><br></div>
<div>I tried "1|5", "[1|5]", "1 or 5" but they don't work.</div>
<div><br></div>
<div>Regards,<br>Danny</div>
<div><br></div>
</div></div>
Joel Wilson Gunasekaran | 24 Mar 02:12 2015
Picon

[MarkLogic Dev General] Suggestions for data masking

Hi, 

Once in a while, we refresh dataset in lower environments with production data for testing purposes.
We have a requirement to mask all pii(personally identifiable information) data like email id, phone
number, etc. in lower environments like DEV, QA. 

We were thinking about having a one-time script that does the masking, which can be run when we do the data
refresh. 
In addition to this, we also want a automated process that does this, like either a scheduled task or a
trigger, to avoid any sensitive data left unmasked, accidentally.

Can you please let me know if you have had to deal with similar cases and any suggestions?

Thanks
Joel
norman817 | 24 Mar 00:11 2015
Picon

[MarkLogic Dev General] Distro removal

Please remove me from your distro list. Norman817 <at> gmail.com 

Thanks, Norman
<div>Please remove me from your distro list. Norman817 <at> gmail.com&nbsp;<div></div>
<div><br></div>
<div>Thanks, Norman</div>
</div>
cyanline llc | 23 Mar 19:27 2015

[MarkLogic Dev General] xml ingestion quick question

Hello,
   What am I missing that I can create an Element Range Index on 
attachment-count but not attachment_filename?
   Below is sample XML that I am ingesting and building an app around.

<attachment-count>1</attachment-count>
<attachments>
   <attachment>
<attachment_filename>Adnserio~1.pdf</attachment_filename>
   </attachment>
</attachments>

   I have checked and I am producing valid XML. 'attachment-count' is 
obviously nested, so, is there a nesting maximum?

Thanks in advance.
Charles Blair | 20 Mar 19:54 2015

[MarkLogic Dev General] SPARQL dateTime format

This works in a SPARQL query:

       ?resourceMap dcterms:created "2015-02-04T14:46:09"^^xs:dateTime

This does not

       ?resourceMap dcterms:created "2015-02-04T14:46:09"^^xsd:dateTime

The input has

dcterms:created "2015-02-04T14:46:09"^^xsd:dateTime;

Is there something wrong with the query handler, or with my query?

John Archer | 17 Mar 16:45 2015
Picon

[MarkLogic Dev General] (no subject)

Pp


Sent from Mailbox
<div>
<div>Pp</div>
<div class="mailbox_signature">
<br>&mdash;<br>Sent from <a href="https://www.dropbox.com/mailbox">Mailbox</a>
</div>
</div>
John Archer | 17 Mar 16:37 2015
Picon

Re: [MarkLogic Dev General] General Digest, Vol 129, Issue 26

R


Sent from Mailbox


On Tue, Mar 17, 2015 at 10:15 AM, general-request-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org <general-request-ld4jwAGwUXTgXEvjvSGRgI2Be7XsqA8u@public.gmane.orgcom> wrote:

Send General mailing list submissions to
general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

To subscribe or unsubscribe via the World Wide Web, visit
http://developer.marklogic.com/mailman/listinfo/general
or, via email, send a message with subject or body 'help' to
general-request-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

You can reach the person managing the list at
general-owner-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of General digest..."


Today's Topics:

1. Re: Constructing JSON objects (Will Thompson)
2. Re: Constructing JSON objects (William Sawyer)
3. Creating Powerpoint files with ML content (Danny Sinang)
4. Re: Creating Powerpoint files with ML content (Rob Szkutak)


----------------------------------------------------------------------

Message: 1
Date: Mon, 16 Mar 2015 20:03:06 +0000
From: Will Thompson <wthompson-uxLJQOXlXGZPiASh80hJdA@public.gmane.org>
Subject: Re: [MarkLogic Dev General] Constructing JSON objects
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgI2Be7XsqA8u@public.gmane.orgcom>
Message-ID: <21263D81-670F-41C1-AE8A-C4577D17DC1D <at> jonesmcclure.com>
Content-Type: text/plain; charset="us-ascii"

In this case, json:object and json:array are fine - I just wanted nicer syntax so that, say, a recursive typeswitch to transform XML to JSON wouldn't turn into a mess with all the temp objects. I guess it's also probably nice for building arbitrary JSON if there is any nesting involved.

Mike - Right. And best-case scenario, if there is a conflict, I just remove the utility functions and everything works :)

-W


> On Mar 12, 2015, at 9:36 PM, David Lee <David.Lee-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org> wrote:
>
> Making an XQuery function to call the explicit constructor with variable key names or number of keys is not possible directly
> There isn't the equivalent of map:entry , field names are constant expressions and the number of fields is constant, unlike element {}{}
>
> You would have to resort to string conversions, in memory node operations or evals ... Or stick with json:object() /json:array()
> Or write it in Javascript
>
> In all cases what would the signature be? A fundamental mismatch between XQuery an JSON is sequences vs arrays there are no vararg functions and any construct to nest or bound sequences involves a lot of syntax and temporary objects.
>
> If you come up with something let us know!
>
>
>
>
>
> Sent from my iPad (excuse the terseness)
> David A Lee
> dlee-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org
>
>
>> On Mar 12, 2015, at 9:51 PM, Michael Blakeley <mike-dWgsRPgt/GtWk0Htik3J/w@public.gmane.org> wrote:
>>
>> I tend to avoid declaring functions or variables in any namespace that I know other code is using. But you're doing it with your eyes open, and that's probably ok. Someday a server update may conflict. But if that happens, I'm sure you'll catch it in testing, and fix it before it breaks production.
>>
>> Right?
>>
>> -- Mike
>>
>>> On 12 Mar 2015, at 17:35 , Will Thompson <wthompson-uxLJQOXlXGZPiASh80hJdA@public.gmane.org> wrote:
>>>
>>> Thanks all. The ML8 constructors look very nice.
>>>
>>> Mike - That's what I was looking for, thanks. I ended up writing something similar using json:array before I saw the reply, but I like your implementation better. Also, I appropriated the json: prefix because it looked nicer...for example, is there any reason why this would be bad (other than ML might decide implement it at some later date)?
>>>
>>> declare function json:new(...)
>>>
>>> -W
>>>
>>>> On Mar 12, 2015, at 4:38 PM, Sudhakar Reddy <Sudhakar.Reddy-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org> wrote:
>>>>
>>>> You can also build using JSON node constructors available in ML 8
>>>> let $json-node := object-node { "id": number-node {12345},
>>>> "a" : array-node {1,2,3} ,
>>>> "b" : fn:true(),
>>>> "c" : number-node {1234},
>>>> "d" : array-node{
>>>> number-node {12345},
>>>> text {"test"},
>>>> boolean-node {fn:true()},
>>>> array-node {'aaa','bbb','ccc'}},
>>>> "e" : object-node { "x": "hello world",
>>>> "y": fn:false(),
>>>> "z" : array-node {1, 'a', fn:true()}
>>>> },
>>>> "g": null-node {}
>>>> }
>>>> return $json-node
>>>>
>>>> Thanks
>>>> Sudhakar
>>>>
>>>>
>>>>
>>>>> On 3/11/15, 6:52 PM, "Erik Hennum" <Erik.Hennum-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org> wrote:
>>>>>
>>>>> Hi, Will:
>>>>>
>>>>> You can use json:object() instead of map:map() for a mutable object where
>>>>> order is important.
>>>>>
>>>>> I think the API is the same as that of map:map otherwise.
>>>>>
>>>>> JSON nodes, like XML nodes, are immutable.
>>>>>
>>>>> Erik Hennum
>>>>>
>>>>> ________________________________________
>>>>> From: general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
>>>>> [general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org] on behalf of Will Thompson
>>>>> [wthompson-uxLJQOXlXGZPiASh80hJdA@public.gmane.org]
>>>>> Sent: Tuesday, March 10, 2015 5:09 PM
>>>>> To: MarkLogic Developer Discussion
>>>>> Subject: [MarkLogic Dev General] Constructing JSON objects
>>>>>
>>>>> Is there a nice way to construct a JSON object similar to how maps can be
>>>>> constructed? Typically I would just do it this way:
>>>>>
>>>>> xdmp:to-json(
>>>>> map:new((
>>>>> map:entry('x', 1),
>>>>> map:entry('y', 2)
>>>>> )))
>>>>>
>>>>> Except that order is important in this specific scenario, and this ruins
>>>>> ordering.
>>>>>
>>>>> -Will
>>>>> _______________________________________________
>>>>> General mailing list
>>>>> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
>>>>> http://developer.marklogic.com/mailman/listinfo/general
>>>>> _______________________________________________
>>>>> General mailing list
>>>>> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
>>>>> http://developer.marklogic.com/mailman/listinfo/general
>>>>
>>>> _______________________________________________
>>>> General mailing list
>>>> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
>>>> http://developer.marklogic.com/mailman/listinfo/general
>>>
>>> _______________________________________________
>>> General mailing list
>>> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
>>> http://developer.marklogic.com/mailman/listinfo/general
>>
>> _______________________________________________
>> General mailing list
>> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
>> http://developer.marklogic.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
> http://developer.marklogic.com/mailman/listinfo/general



------------------------------

Message: 2
Date: Mon, 16 Mar 2015 14:46:38 -0600
From: William Sawyer <wilby.sawyer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [MarkLogic Dev General] Constructing JSON objects
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgI2Be7XsqA8u@public.gmane.orgcom>
Message-ID:
<CAKT+1DZaoG93kr1hBwx3iP1hZQquWi4xHQxFkN-tjwbb7mJCGg-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
Content-Type: text/plain; charset="utf-8"

I had similar desires for a nicer syntax for working with JSON a few months
ago and this is what I came up with. Its similar to what Micheal was
describing.
https://github.com/williammsawyer/xquerycoder/blob/master/libs/json-functions.xqy

-Will





On Mon, Mar 16, 2015 at 2:03 PM, Will Thompson <wthompson-uxLJQOXlXGZPiASh80hJdA@public.gmane.org>
wrote:

> In this case, json:object and json:array are fine - I just wanted nicer
> syntax so that, say, a recursive typeswitch to transform XML to JSON
> wouldn't turn into a mess with all the temp objects. I guess it's also
> probably nice for building arbitrary JSON if there is any nesting involved.
>
> Mike - Right. And best-case scenario, if there is a conflict, I just
> remove the utility functions and everything works :)
>
> -W
>
>
> > On Mar 12, 2015, at 9:36 PM, David Lee <David.Lee-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org> wrote:
> >
> > Making an XQuery function to call the explicit constructor with variable
> key names or number of keys is not possible directly
> > There isn't the equivalent of map:entry , field names are constant
> expressions and the number of fields is constant, unlike element {}{}
> >
> > You would have to resort to string conversions, in memory node
> operations or evals ... Or stick with json:object() /json:array()
> > Or write it in Javascript
> >
> > In all cases what would the signature be? A fundamental mismatch
> between XQuery an JSON is sequences vs arrays there are no vararg functions
> and any construct to nest or bound sequences involves a lot of syntax and
> temporary objects.
> >
> > If you come up with something let us know!
> >
> >
> >
> >
> >
> > Sent from my iPad (excuse the terseness)
> > David A Lee
> > dlee-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org
> >
> >
> >> On Mar 12, 2015, at 9:51 PM, Michael Blakeley <mike-dWgsRPgt/GtWk0Htik3J/w@public.gmane.org>
> wrote:
> >>
> >> I tend to avoid declaring functions or variables in any namespace that
> I know other code is using. But you're doing it with your eyes open, and
> that's probably ok. Someday a server update may conflict. But if that
> happens, I'm sure you'll catch it in testing, and fix it before it breaks
> production.
> >>
> >> Right?
> >>
> >> -- Mike
> >>
> >>> On 12 Mar 2015, at 17:35 , Will Thompson <wthompson-uxLJQOXlXGZPiASh80hJdA@public.gmane.org>
> wrote:
> >>>
> >>> Thanks all. The ML8 constructors look very nice.
> >>>
> >>> Mike - That's what I was looking for, thanks. I ended up writing
> something similar using json:array before I saw the reply, but I like your
> implementation better. Also, I appropriated the json: prefix because it
> looked nicer...for example, is there any reason why this would be bad
> (other than ML might decide implement it at some later date)?
> >>>
> >>> declare function json:new(...)
> >>>
> >>> -W
> >>>
> >>>> On Mar 12, 2015, at 4:38 PM, Sudhakar Reddy <
> Sudhakar.Reddy-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org> wrote:
> >>>>
> >>>> You can also build using JSON node constructors available in ML 8
> >>>> let $json-node := object-node { "id": number-node {12345},
> >>>> "a" : array-node {1,2,3} ,
> >>>> "b" : fn:true(),
> >>>> "c" : number-node {1234},
> >>>> "d" : array-node{
> >>>> number-node {12345},
> >>>> text {"test"},
> >>>> boolean-node {fn:true()},
> >>>> array-node {'aaa','bbb','ccc'}},
> >>>> "e" : object-node { "x": "hello world",
> >>>> "y": fn:false(),
> >>>> "z" : array-node {1, 'a', fn:true()}
> >>>> },
> >>>> "g": null-node {}
> >>>> }
> >>>> return $json-node
> >>>>
> >>>> Thanks
> >>>> Sudhakar
> >>>>
> >>>>
> >>>>
> >>>>> On 3/11/15, 6:52 PM, "Erik Hennum" <Erik.Hennum-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org>
> wrote:
> >>>>>
> >>>>> Hi, Will:
> >>>>>
> >>>>> You can use json:object() instead of map:map() for a mutable object
> where
> >>>>> order is important.
> >>>>>
> >>>>> I think the API is the same as that of map:map otherwise.
> >>>>>
> >>>>> JSON nodes, like XML nodes, are immutable.
> >>>>>
> >>>>> Erik Hennum
> >>>>>
> >>>>> ________________________________________
> >>>>> From: general-bounces-ld4jwAGwUXTgXEvjvSGRgI2Be7XsqA8u@public.gmane.orgcom
> >>>>> [general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org] on behalf of Will Thompson
> >>>>> [wthompson-uxLJQOXlXGZPiASh80hJdA@public.gmane.org]
> >>>>> Sent: Tuesday, March 10, 2015 5:09 PM
> >>>>> To: MarkLogic Developer Discussion
> >>>>> Subject: [MarkLogic Dev General] Constructing JSON objects
> >>>>>
> >>>>> Is there a nice way to construct a JSON object similar to how maps
> can be
> >>>>> constructed? Typically I would just do it this way:
> >>>>>
> >>>>> xdmp:to-json(
> >>>>> map:new((
> >>>>> map:entry('x', 1),
> >>>>> map:entry('y', 2)
> >>>>> )))
> >>>>>
> >>>>> Except that order is important in this specific scenario, and this
> ruins
> >>>>> ordering.
> >>>>>
> >>>>> -Will
> >>>>> _______________________________________________
> >>>>> General mailing list
> >>>>> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
> >>>>> http://developer.marklogic.com/mailman/listinfo/general
> >>>>> _______________________________________________
> >>>>> General mailing list
> >>>>> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
> >>>>> http://developer.marklogic.com/mailman/listinfo/general
> >>>>
> >>>> _______________________________________________
> >>>> General mailing list
> >>>> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
> >>>> http://developer.marklogic.com/mailman/listinfo/general
> >>>
> >>> _______________________________________________
> >>> General mailing list
> >>> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
> >>> http://developer.marklogic.com/mailman/listinfo/general
> >>
> >> _______________________________________________
> >> General mailing list
> >> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
> >> http://developer.marklogic.com/mailman/listinfo/general
> > _______________________________________________
> > General mailing list
> > General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
> > http://developer.marklogic.com/mailman/listinfo/general
>
> _______________________________________________
> General mailing list
> General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
> http://developer.marklogic.com/mailman/listinfo/general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150316/402e9695/attachment-0001.html

------------------------------

Message: 3
Date: Tue, 17 Mar 2015 11:05:22 -0400
From: Danny Sinang <d.sinang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [MarkLogic Dev General] Creating Powerpoint files with ML
content
To: general <General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org>
Message-ID:
<CAPKs-U+TQT7WRCEzrW+b8yd5jwK1oqdEwrz_2LmMb0e9Wabqug-JsoAwUIsXotQFR93xxRIaA@public.gmane.orgcom>
Content-Type: text/plain; charset="utf-8"

Does ML have any API's or functions that create Powerpoint files using
content from Marklogic ?

Regards,
Danny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150317/d45c82fe/attachment-0001.html

------------------------------

Message: 4
Date: Tue, 17 Mar 2015 15:14:46 +0000
From: Rob Szkutak <rob.szkutak-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org>
Subject: Re: [MarkLogic Dev General] Creating Powerpoint files with ML
content
To: MarkLogic Developer Discussion <general-ld4jwAGwUXTgXEvjvSGRgI2Be7XsqA8u@public.gmane.orgcom>
Message-ID:
<6E8E665D710D394A853B6EEC145FB7DC11042C97-SsyoCIcCTNmI39OhQWE9tvVIQvoVjOgS@public.gmane.orgcom>
Content-Type: text/plain; charset="iso-8859-1"

Hi Danny,

Have a look at our PowerPoint Toolkit: http://developer.marklogic.com/code/marklogic-toolkit-for-powerpoint

Best,

Rob

Rob Szkutak
Associate Consultant
MarkLogic Corporation
rob.szkutak-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org
Cell +1.716.562.8464
www.marklogic.com<http://www.marklogic.com>

________________________________
From: general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org [general-bounces <at> developer.marklogic.com] on behalf of Danny Sinang [d.sinang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
Sent: Tuesday, March 17, 2015 10:05 AM
To: general
Subject: [MarkLogic Dev General] Creating Powerpoint files with ML content

Does ML have any API's or functions that create Powerpoint files using content from Marklogic ?

Regards,
Danny


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150317/c33e60a0/attachment.html

------------------------------

_______________________________________________
General mailing list
General-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org
http://developer.marklogic.com/mailman/listinfo/general


End of General Digest, Vol 129, Issue 26
****************************************


<div>
<div>R</div>
<div class="mailbox_signature">
<br>&mdash;<br>Sent from <a href="https://www.dropbox.com/mailbox">Mailbox</a>
</div>
<br><br><div class="gmail_quote">
<p>On Tue, Mar 17, 2015 at 10:15 AM, general-request@... <span dir="ltr">&lt;<a href="mailto:general-request@..." target="_blank">general-request@...com</a>&gt;</span> wrote:<br></p>
<blockquote class="gmail_quote"><p>Send General mailing list submissions to
<br>	general@...
<br><br>To subscribe or unsubscribe via the World Wide Web, visit
<br>	http://developer.marklogic.com/mailman/listinfo/general
<br>or, via email, send a message with subject or body 'help' to
<br>	general-request@...
<br><br>You can reach the person managing the list at
<br>	general-owner@...
<br><br>When replying, please edit your Subject line so it is more specific
<br>than "Re: Contents of General digest..."
<br><br><br>Today's Topics:
<br><br>   1. Re: Constructing JSON objects (Will Thompson)
<br>   2. Re: Constructing JSON objects (William Sawyer)
<br>   3. Creating Powerpoint files with ML content (Danny Sinang)
<br>   4. Re: Creating Powerpoint files with ML content (Rob Szkutak)
<br><br><br>----------------------------------------------------------------------
<br><br>Message: 1
<br>Date: Mon, 16 Mar 2015 20:03:06 +0000
<br>From: Will Thompson &lt;wthompson@...&gt;
<br>Subject: Re: [MarkLogic Dev General] Constructing JSON objects
<br>To: MarkLogic Developer Discussion &lt;general@...com&gt;
<br>Message-ID: &lt;21263D81-670F-41C1-AE8A-C4577D17DC1D <at> jonesmcclure.com&gt;
<br>Content-Type: text/plain; charset="us-ascii"
<br><br>In this case, json:object and json:array are fine - I just wanted nicer syntax so that, say, a recursive typeswitch to transform XML to JSON wouldn't turn into a mess with all the temp objects. I guess it's also probably nice for building arbitrary JSON if there is any nesting involved.
<br><br>Mike - Right. And best-case scenario, if there is a conflict, I just remove the utility functions and everything works :)
<br><br>-W
<br><br><br>&gt; On Mar 12, 2015, at 9:36 PM, David Lee &lt;David.Lee@...&gt; wrote:
<br>&gt; 
<br>&gt; Making an XQuery function to call the explicit constructor with variable key names or number  of keys is not possible directly 
<br>&gt; There isn't the equivalent of map:entry , field names are constant expressions and the number of fields is constant, unlike element {}{}
<br>&gt; 
<br>&gt; You would have to resort to string conversions, in memory node operations or evals ...  Or stick with json:object() /json:array() 
<br>&gt; Or write it in Javascript 
<br>&gt; 
<br>&gt; In all cases what would the signature be?   A fundamental mismatch between XQuery an JSON is sequences vs arrays there are no vararg functions and any construct to nest or bound sequences involves a lot of syntax and temporary objects.
<br>&gt; 
<br>&gt; If you come up with something let us know!  
<br>&gt; 
<br>&gt; 
<br>&gt; 
<br>&gt; 
<br>&gt; 
<br>&gt; Sent from my iPad (excuse the terseness) 
<br>&gt; David A Lee
<br>&gt; dlee@...
<br>&gt; 
<br>&gt; 
<br>&gt;&gt; On Mar 12, 2015, at 9:51 PM, Michael Blakeley &lt;mike@...&gt; wrote:
<br>&gt;&gt; 
<br>&gt;&gt; I tend to avoid declaring functions or variables in any namespace that I know other code is using. But you're doing it with your eyes open, and that's probably ok. Someday a server update may conflict. But if that happens, I'm sure you'll catch it in testing, and fix it before it breaks production.
<br>&gt;&gt; 
<br>&gt;&gt; Right?
<br>&gt;&gt; 
<br>&gt;&gt; -- Mike  
<br>&gt;&gt; 
<br>&gt;&gt;&gt; On 12 Mar 2015, at 17:35 , Will Thompson &lt;wthompson@...&gt; wrote:
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; Thanks all. The ML8 constructors look very nice.
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; Mike - That's what I was looking for, thanks. I ended up writing something similar using json:array before I saw the reply, but I like your implementation better. Also, I appropriated the json: prefix because it looked nicer...for example, is there any reason why this would be bad (other than ML might decide implement it at some later date)? 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; declare function json:new(...)
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; -W
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt; On Mar 12, 2015, at 4:38 PM, Sudhakar Reddy &lt;Sudhakar.Reddy@...&gt; wrote:
<br>&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt; You can also build using JSON node constructors available in ML 8
<br>&gt;&gt;&gt;&gt; let $json-node := object-node { "id": number-node {12345},
<br>&gt;&gt;&gt;&gt;               "a" : array-node {1,2,3} ,
<br>&gt;&gt;&gt;&gt;               "b" : fn:true(),
<br>&gt;&gt;&gt;&gt;               "c" : number-node {1234},
<br>&gt;&gt;&gt;&gt;               "d" : array-node{
<br>&gt;&gt;&gt;&gt;                       number-node {12345},
<br>&gt;&gt;&gt;&gt;                       text {"test"},
<br>&gt;&gt;&gt;&gt;                       boolean-node {fn:true()},
<br>&gt;&gt;&gt;&gt;                       array-node {'aaa','bbb','ccc'}},
<br>&gt;&gt;&gt;&gt;                       "e" : object-node { "x": "hello world",
<br>&gt;&gt;&gt;&gt;                       "y": fn:false(),
<br>&gt;&gt;&gt;&gt;                       "z" : array-node {1, 'a', fn:true()}
<br>&gt;&gt;&gt;&gt;                       },
<br>&gt;&gt;&gt;&gt;               "g": null-node {}
<br>&gt;&gt;&gt;&gt;               }  
<br>&gt;&gt;&gt;&gt;               return $json-node
<br>&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt; Thanks
<br>&gt;&gt;&gt;&gt; Sudhakar
<br>&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt;&gt; On 3/11/15, 6:52 PM, "Erik Hennum" &lt;Erik.Hennum@...&gt; wrote:
<br>&gt;&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt;&gt; Hi, Will:
<br>&gt;&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt;&gt; You can use json:object() instead of map:map() for a mutable object where
<br>&gt;&gt;&gt;&gt;&gt; order is important.
<br>&gt;&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt;&gt; I think the API is the same as that of map:map otherwise.
<br>&gt;&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt;&gt; JSON nodes, like XML nodes, are immutable.
<br>&gt;&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt;&gt; Erik Hennum
<br>&gt;&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt;&gt; ________________________________________
<br>&gt;&gt;&gt;&gt;&gt; From: general-bounces@...
<br>&gt;&gt;&gt;&gt;&gt; [general-bounces@...] on behalf of Will Thompson
<br>&gt;&gt;&gt;&gt;&gt; [wthompson@...]
<br>&gt;&gt;&gt;&gt;&gt; Sent: Tuesday, March 10, 2015 5:09 PM
<br>&gt;&gt;&gt;&gt;&gt; To: MarkLogic Developer Discussion
<br>&gt;&gt;&gt;&gt;&gt; Subject: [MarkLogic Dev General] Constructing JSON objects
<br>&gt;&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt;&gt; Is there a nice way to construct a JSON object similar to how maps can be
<br>&gt;&gt;&gt;&gt;&gt; constructed? Typically I would just do it this way:
<br>&gt;&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt;&gt; xdmp:to-json(
<br>&gt;&gt;&gt;&gt;&gt; map:new((
<br>&gt;&gt;&gt;&gt;&gt; map:entry('x', 1),
<br>&gt;&gt;&gt;&gt;&gt; map:entry('y', 2)
<br>&gt;&gt;&gt;&gt;&gt; )))
<br>&gt;&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt;&gt; Except that order is important in this specific scenario, and this ruins
<br>&gt;&gt;&gt;&gt;&gt; ordering.
<br>&gt;&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt;&gt; -Will
<br>&gt;&gt;&gt;&gt;&gt; _______________________________________________
<br>&gt;&gt;&gt;&gt;&gt; General mailing list
<br>&gt;&gt;&gt;&gt;&gt; General@...
<br>&gt;&gt;&gt;&gt;&gt; http://developer.marklogic.com/mailman/listinfo/general
<br>&gt;&gt;&gt;&gt;&gt; _______________________________________________
<br>&gt;&gt;&gt;&gt;&gt; General mailing list
<br>&gt;&gt;&gt;&gt;&gt; General@...
<br>&gt;&gt;&gt;&gt;&gt; http://developer.marklogic.com/mailman/listinfo/general
<br>&gt;&gt;&gt;&gt; 
<br>&gt;&gt;&gt;&gt; _______________________________________________
<br>&gt;&gt;&gt;&gt; General mailing list
<br>&gt;&gt;&gt;&gt; General@...
<br>&gt;&gt;&gt;&gt; http://developer.marklogic.com/mailman/listinfo/general
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; _______________________________________________
<br>&gt;&gt;&gt; General mailing list
<br>&gt;&gt;&gt; General@...
<br>&gt;&gt;&gt; http://developer.marklogic.com/mailman/listinfo/general
<br>&gt;&gt; 
<br>&gt;&gt; _______________________________________________
<br>&gt;&gt; General mailing list
<br>&gt;&gt; General@...
<br>&gt;&gt; http://developer.marklogic.com/mailman/listinfo/general
<br>&gt; _______________________________________________
<br>&gt; General mailing list
<br>&gt; General@...
<br>&gt; http://developer.marklogic.com/mailman/listinfo/general
<br><br><br><br>------------------------------
<br><br>Message: 2
<br>Date: Mon, 16 Mar 2015 14:46:38 -0600
<br>From: William Sawyer &lt;wilby.sawyer@...&gt;
<br>Subject: Re: [MarkLogic Dev General] Constructing JSON objects
<br>To: MarkLogic Developer Discussion &lt;general@...com&gt;
<br>Message-ID:
<br>	&lt;CAKT+1DZaoG93kr1hBwx3iP1hZQquWi4xHQxFkN-tjwbb7mJCGg@...com&gt;
<br>Content-Type: text/plain; charset="utf-8"
<br><br>I had similar desires for a nicer syntax for working with JSON a few months
<br>ago and this is what I came up with.  Its similar to what Micheal was
<br>describing.
<br>https://github.com/williammsawyer/xquerycoder/blob/master/libs/json-functions.xqy
<br><br>-Will
<br><br><br><br><br><br>On Mon, Mar 16, 2015 at 2:03 PM, Will Thompson &lt;wthompson@...&gt;
<br>wrote:
<br><br>&gt; In this case, json:object and json:array are fine - I just wanted nicer
<br>&gt; syntax so that, say, a recursive typeswitch to transform XML to JSON
<br>&gt; wouldn't turn into a mess with all the temp objects. I guess it's also
<br>&gt; probably nice for building arbitrary JSON if there is any nesting involved.
<br>&gt;
<br>&gt; Mike - Right. And best-case scenario, if there is a conflict, I just
<br>&gt; remove the utility functions and everything works :)
<br>&gt;
<br>&gt; -W
<br>&gt;
<br>&gt;
<br>&gt; &gt; On Mar 12, 2015, at 9:36 PM, David Lee &lt;David.Lee@...&gt; wrote:
<br>&gt; &gt;
<br>&gt; &gt; Making an XQuery function to call the explicit constructor with variable
<br>&gt; key names or number  of keys is not possible directly
<br>&gt; &gt; There isn't the equivalent of map:entry , field names are constant
<br>&gt; expressions and the number of fields is constant, unlike element {}{}
<br>&gt; &gt;
<br>&gt; &gt; You would have to resort to string conversions, in memory node
<br>&gt; operations or evals ...  Or stick with json:object() /json:array()
<br>&gt; &gt; Or write it in Javascript
<br>&gt; &gt;
<br>&gt; &gt; In all cases what would the signature be?   A fundamental mismatch
<br>&gt; between XQuery an JSON is sequences vs arrays there are no vararg functions
<br>&gt; and any construct to nest or bound sequences involves a lot of syntax and
<br>&gt; temporary objects.
<br>&gt; &gt;
<br>&gt; &gt; If you come up with something let us know!
<br>&gt; &gt;
<br>&gt; &gt;
<br>&gt; &gt;
<br>&gt; &gt;
<br>&gt; &gt;
<br>&gt; &gt; Sent from my iPad (excuse the terseness)
<br>&gt; &gt; David A Lee
<br>&gt; &gt; dlee@...
<br>&gt; &gt;
<br>&gt; &gt;
<br>&gt; &gt;&gt; On Mar 12, 2015, at 9:51 PM, Michael Blakeley &lt;mike@...&gt;
<br>&gt; wrote:
<br>&gt; &gt;&gt;
<br>&gt; &gt;&gt; I tend to avoid declaring functions or variables in any namespace that
<br>&gt; I know other code is using. But you're doing it with your eyes open, and
<br>&gt; that's probably ok. Someday a server update may conflict. But if that
<br>&gt; happens, I'm sure you'll catch it in testing, and fix it before it breaks
<br>&gt; production.
<br>&gt; &gt;&gt;
<br>&gt; &gt;&gt; Right?
<br>&gt; &gt;&gt;
<br>&gt; &gt;&gt; -- Mike
<br>&gt; &gt;&gt;
<br>&gt; &gt;&gt;&gt; On 12 Mar 2015, at 17:35 , Will Thompson &lt;wthompson@...&gt;
<br>&gt; wrote:
<br>&gt; &gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt; Thanks all. The ML8 constructors look very nice.
<br>&gt; &gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt; Mike - That's what I was looking for, thanks. I ended up writing
<br>&gt; something similar using json:array before I saw the reply, but I like your
<br>&gt; implementation better. Also, I appropriated the json: prefix because it
<br>&gt; looked nicer...for example, is there any reason why this would be bad
<br>&gt; (other than ML might decide implement it at some later date)?
<br>&gt; &gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt; declare function json:new(...)
<br>&gt; &gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt; -W
<br>&gt; &gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt; On Mar 12, 2015, at 4:38 PM, Sudhakar Reddy &lt;
<br>&gt; Sudhakar.Reddy@...&gt; wrote:
<br>&gt; &gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt; You can also build using JSON node constructors available in ML 8
<br>&gt; &gt;&gt;&gt;&gt; let $json-node := object-node { "id": number-node {12345},
<br>&gt; &gt;&gt;&gt;&gt;               "a" : array-node {1,2,3} ,
<br>&gt; &gt;&gt;&gt;&gt;               "b" : fn:true(),
<br>&gt; &gt;&gt;&gt;&gt;               "c" : number-node {1234},
<br>&gt; &gt;&gt;&gt;&gt;               "d" : array-node{
<br>&gt; &gt;&gt;&gt;&gt;                       number-node {12345},
<br>&gt; &gt;&gt;&gt;&gt;                       text {"test"},
<br>&gt; &gt;&gt;&gt;&gt;                       boolean-node {fn:true()},
<br>&gt; &gt;&gt;&gt;&gt;                       array-node {'aaa','bbb','ccc'}},
<br>&gt; &gt;&gt;&gt;&gt;                       "e" : object-node { "x": "hello world",
<br>&gt; &gt;&gt;&gt;&gt;                       "y": fn:false(),
<br>&gt; &gt;&gt;&gt;&gt;                       "z" : array-node {1, 'a', fn:true()}
<br>&gt; &gt;&gt;&gt;&gt;                       },
<br>&gt; &gt;&gt;&gt;&gt;               "g": null-node {}
<br>&gt; &gt;&gt;&gt;&gt;               }
<br>&gt; &gt;&gt;&gt;&gt;               return $json-node
<br>&gt; &gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt; Thanks
<br>&gt; &gt;&gt;&gt;&gt; Sudhakar
<br>&gt; &gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;&gt; On 3/11/15, 6:52 PM, "Erik Hennum" &lt;Erik.Hennum@...&gt;
<br>&gt; wrote:
<br>&gt; &gt;&gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;&gt; Hi, Will:
<br>&gt; &gt;&gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;&gt; You can use json:object() instead of map:map() for a mutable object
<br>&gt; where
<br>&gt; &gt;&gt;&gt;&gt;&gt; order is important.
<br>&gt; &gt;&gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;&gt; I think the API is the same as that of map:map otherwise.
<br>&gt; &gt;&gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;&gt; JSON nodes, like XML nodes, are immutable.
<br>&gt; &gt;&gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;&gt; Erik Hennum
<br>&gt; &gt;&gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;&gt; ________________________________________
<br>&gt; &gt;&gt;&gt;&gt;&gt; From: general-bounces@...com
<br>&gt; &gt;&gt;&gt;&gt;&gt; [general-bounces@...] on behalf of Will Thompson
<br>&gt; &gt;&gt;&gt;&gt;&gt; [wthompson@...]
<br>&gt; &gt;&gt;&gt;&gt;&gt; Sent: Tuesday, March 10, 2015 5:09 PM
<br>&gt; &gt;&gt;&gt;&gt;&gt; To: MarkLogic Developer Discussion
<br>&gt; &gt;&gt;&gt;&gt;&gt; Subject: [MarkLogic Dev General] Constructing JSON objects
<br>&gt; &gt;&gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;&gt; Is there a nice way to construct a JSON object similar to how maps
<br>&gt; can be
<br>&gt; &gt;&gt;&gt;&gt;&gt; constructed? Typically I would just do it this way:
<br>&gt; &gt;&gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;&gt; xdmp:to-json(
<br>&gt; &gt;&gt;&gt;&gt;&gt; map:new((
<br>&gt; &gt;&gt;&gt;&gt;&gt; map:entry('x', 1),
<br>&gt; &gt;&gt;&gt;&gt;&gt; map:entry('y', 2)
<br>&gt; &gt;&gt;&gt;&gt;&gt; )))
<br>&gt; &gt;&gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;&gt; Except that order is important in this specific scenario, and this
<br>&gt; ruins
<br>&gt; &gt;&gt;&gt;&gt;&gt; ordering.
<br>&gt; &gt;&gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt;&gt; -Will
<br>&gt; &gt;&gt;&gt;&gt;&gt; _______________________________________________
<br>&gt; &gt;&gt;&gt;&gt;&gt; General mailing list
<br>&gt; &gt;&gt;&gt;&gt;&gt; General@...
<br>&gt; &gt;&gt;&gt;&gt;&gt; http://developer.marklogic.com/mailman/listinfo/general
<br>&gt; &gt;&gt;&gt;&gt;&gt; _______________________________________________
<br>&gt; &gt;&gt;&gt;&gt;&gt; General mailing list
<br>&gt; &gt;&gt;&gt;&gt;&gt; General@...
<br>&gt; &gt;&gt;&gt;&gt;&gt; http://developer.marklogic.com/mailman/listinfo/general
<br>&gt; &gt;&gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;&gt; _______________________________________________
<br>&gt; &gt;&gt;&gt;&gt; General mailing list
<br>&gt; &gt;&gt;&gt;&gt; General@...
<br>&gt; &gt;&gt;&gt;&gt; http://developer.marklogic.com/mailman/listinfo/general
<br>&gt; &gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt; _______________________________________________
<br>&gt; &gt;&gt;&gt; General mailing list
<br>&gt; &gt;&gt;&gt; General@...
<br>&gt; &gt;&gt;&gt; http://developer.marklogic.com/mailman/listinfo/general
<br>&gt; &gt;&gt;
<br>&gt; &gt;&gt; _______________________________________________
<br>&gt; &gt;&gt; General mailing list
<br>&gt; &gt;&gt; General@...
<br>&gt; &gt;&gt; http://developer.marklogic.com/mailman/listinfo/general
<br>&gt; &gt; _______________________________________________
<br>&gt; &gt; General mailing list
<br>&gt; &gt; General@...
<br>&gt; &gt; http://developer.marklogic.com/mailman/listinfo/general
<br>&gt;
<br>&gt; _______________________________________________
<br>&gt; General mailing list
<br>&gt; General@...
<br>&gt; http://developer.marklogic.com/mailman/listinfo/general
<br>&gt;
<br>-------------- next part --------------
<br>An HTML attachment was scrubbed...
<br>URL: http://developer.marklogic.com/pipermail/general/attachments/20150316/402e9695/attachment-0001.html 
<br><br>------------------------------
<br><br>Message: 3
<br>Date: Tue, 17 Mar 2015 11:05:22 -0400
<br>From: Danny Sinang &lt;d.sinang@...&gt;
<br>Subject: [MarkLogic Dev General] Creating Powerpoint files with ML
<br>	content
<br>To: general &lt;General@...&gt;
<br>Message-ID:
<br>	&lt;CAPKs-U+TQT7WRCEzrW+b8yd5jwK1oqdEwrz_2LmMb0e9Wabqug@...com&gt;
<br>Content-Type: text/plain; charset="utf-8"
<br><br>Does ML have any API's or functions that create Powerpoint files using
<br>content from Marklogic ?
<br><br>Regards,
<br>Danny
<br>-------------- next part --------------
<br>An HTML attachment was scrubbed...
<br>URL: http://developer.marklogic.com/pipermail/general/attachments/20150317/d45c82fe/attachment-0001.html 
<br><br>------------------------------
<br><br>Message: 4
<br>Date: Tue, 17 Mar 2015 15:14:46 +0000
<br>From: Rob Szkutak &lt;rob.szkutak@...&gt;
<br>Subject: Re: [MarkLogic Dev General] Creating Powerpoint files with ML
<br>	content
<br>To: MarkLogic Developer Discussion &lt;general@...com&gt;
<br>Message-ID:
<br>	&lt;6E8E665D710D394A853B6EEC145FB7DC11042C97@...com&gt;
<br>Content-Type: text/plain; charset="iso-8859-1"
<br><br>Hi Danny,
<br><br>Have a look at our PowerPoint Toolkit: http://developer.marklogic.com/code/marklogic-toolkit-for-powerpoint
<br><br>Best,
<br><br>Rob
<br><br>Rob Szkutak
<br>Associate Consultant
<br>MarkLogic Corporation
<br>rob.szkutak@...
<br>Cell +1.716.562.8464
<br>www.marklogic.com&lt;http://www.marklogic.com&gt;
<br><br>________________________________
<br>From: general-bounces@... [general-bounces <at> developer.marklogic.com] on behalf of Danny Sinang [d.sinang@...]
<br>Sent: Tuesday, March 17, 2015 10:05 AM
<br>To: general
<br>Subject: [MarkLogic Dev General] Creating Powerpoint files with ML content
<br><br>Does ML have any API's or functions that create Powerpoint files using content from Marklogic ?
<br><br>Regards,
<br>Danny
<br><br><br>-------------- next part --------------
<br>An HTML attachment was scrubbed...
<br>URL: http://developer.marklogic.com/pipermail/general/attachments/20150317/c33e60a0/attachment.html 
<br><br>------------------------------
<br><br>_______________________________________________
<br>General mailing list
<br>General@...
<br>http://developer.marklogic.com/mailman/listinfo/general
<br><br><br>End of General Digest, Vol 129, Issue 26
<br>****************************************
<br></p></blockquote>
</div>
<br>
</div>
Danny Sinang | 17 Mar 16:05 2015
Picon

[MarkLogic Dev General] Creating Powerpoint files with ML content

Does ML have any API's or functions that create Powerpoint files using content from Marklogic ?

Regards,
Danny


<div><div dir="ltr">Does ML have any API's or functions that create Powerpoint files using content from Marklogic ?<div><br></div>
<div>Regards,</div>
<div>Danny</div>
<div><br></div>
<div><br></div>
</div></div>

Gmane