Timothy W. Cook | 31 Oct 18:06 2014

[MarkLogic Dev General] datatypes and Range Indexes

So, since my schemas are not valid because they use some XML Schema 1.1 features. I thought maybe I could get datatyping by building range indexes on certain elements. 

However, unless I am doing something wrong; range indexes do not help with this issue.  



I defined an Element Range index on  an element, magnitude with the namespace http://www.mlhim.org/ccd and a type of xs:decimal. 

This query:


declare namespace ccd = "http://www.mlhim.org/ccd";

for $doc in fn:doc()
  return xdmp:describe($doc//ccd:el-7ef40847-ea17-435e-856a-d489a32514d7/ccd:magnitude/data())
  

returns:

xs:untypedAtomic("998070")


So, does this mean that all of my queries will have to explicitly coerce the data?

Which leaves me with fn:number() correct?  now way to test that it is an integer, etc. 

Any guidance is appreciated. 



============================================
Timothy Cook
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

<div><div dir="ltr">
<div class="gmail_default">So, since my schemas are not valid because they use some XML Schema 1.1 features. I thought maybe I could get datatyping by building range indexes on certain elements.&nbsp;</div>
<div class="gmail_default"><br></div>
<div class="gmail_default">However, unless I am doing something wrong; range indexes do not help with this issue. &nbsp;</div>
<div class="gmail_default"><br></div>
<div class="gmail_default"><br></div>
<div class="gmail_default"><br></div>
<div class="gmail_default">I defined an Element Range index on &nbsp;an element, magnitude with the namespace <a href="http://www.mlhim.org/ccd">http://www.mlhim.org/ccd</a> and a type of xs:decimal.&nbsp;</div>
<div class="gmail_default"><br></div>
<div class="gmail_default">This query:</div>
<div class="gmail_default"><br></div>
<div class="gmail_default"><br></div>
<div class="gmail_default">
<div class="gmail_default">declare namespace ccd = "<a href="http://www.mlhim.org/ccd">http://www.mlhim.org/ccd</a>";</div>
<div class="gmail_default"><br></div>
<div class="gmail_default">for $doc in fn:doc()</div>
<div class="gmail_default">&nbsp; return xdmp:describe($doc//ccd:el-7ef40847-ea17-435e-856a-d489a32514d7/ccd:magnitude/data())</div>
<div class="gmail_default">&nbsp;&nbsp;</div>
<div class="gmail_default"><br></div>
<div class="gmail_default">returns:</div>
<br>xs:untypedAtomic("998070")<br><br><br>So, does this mean that all of my queries will have to explicitly coerce the data?<br><br>Which leaves me with fn:number() correct? &nbsp;now way to test that it is an integer, etc.&nbsp;<br><br>Any guidance is appreciated.&nbsp;<br><br><br><br>
</div>
<div class="gmail_signature"><div dir="ltr">============================================<br>Timothy Cook<br>LinkedIn Profile:<a href="http://www.linkedin.com/in/timothywaynecook" target="_blank">http://www.linkedin.com/in/timothywaynecook</a><br><div>MLHIM&nbsp;<a href="http://www.mlhim.org/" target="_blank">http://www.mlhim.org</a><br>
</div>
<div><br></div>
</div></div>
</div></div>
Whitby, Rob | 31 Oct 15:31 2014

[MarkLogic Dev General] scripting database replication

Are there any sample xquery or shell scripts for coupling to a foreign cluster and configuring database replication? Can’t find anything in the docs except using the admin ui.

Thanks
Rob

<div>
<div>Are there any sample xquery or shell scripts for coupling to a foreign cluster and configuring database replication? Can&rsquo;t find anything in the docs except using the admin ui.</div>
<div><br></div>
<div>Thanks</div>
<div>Rob</div>
<div><br></div>
</div>
Gary Vidal | 29 Oct 12:21 2014

Re: [MarkLogic Dev General] General Digest, Vol 124, Issue 76

Gary,

As Justin suggested create a path range index on the values is the most optimal

You can then use cts:values to and just add range-query constraint or even pass in start argument like

cts:values(
  cts:path-reference(xs:QName("/path-to-price/price","type=decimal"),
  1000.00,
  (),
  cts:element-range-query("/path-to-price/price","=",1000.00)
)

Regards

Gary Vidal
abhijeet | 27 Oct 18:34 2014

[MarkLogic Dev General] Permissions for the Log File

Hi,

 

I have a query regarding Log file permissions.

By default, the permission is 640 for ErrorLog.txt & AuditLog.txt.

We want default permission to 644.  (let it be for all the log files)

 

Is there any way, it can be configured at MarkLogic level.

 

Thanks & Regards,
Abhijeet Singh
XOPS Production IT Services aUBS

 

 

Visit our website at http://www.ubs.com 

This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail. Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system. 

E-mails are not encrypted and cannot be guaranteed to be secure or 
error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender 
therefore does not accept liability for any errors or omissions in the 
contents of this message which arise as a result of e-mail transmission. 
If verification is required please request a hard-copy version. This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities 
or related financial instruments. 

UBS Limited is authorised by the Prudential Regulation Authority 
and regulated by the Financial Conduct Authority and the Prudential 
Regulation Authority.

UBS AG is a public company incorporated with limited liability in
Switzerland domiciled in the Canton of Basel-City and the Canton of
Zurich respectively registered at the Commercial Registry offices in
those Cantons with new Identification No: CHE-101.329.561 as from 18
December 2013 (and prior to 18 December 2013 with Identification
No: CH-270.3.004.646-4) and having respective head offices at
Aeschenvorstadt 1, 4051 Basel and Bahnhofstrasse 45, 8001 Zurich,
Switzerland and is authorised and regulated by the Financial Market
Supervisory Authority in Switzerland.  Registered in the United
Kingdom as a foreign company with No: FC021146 and having a UK
Establishment registered at Companies House, Cardiff, with
No: BR 004507.  The principal office of UK Establishment: 1 Finsbury
Avenue, London EC2M 2PP.  In the United Kingdom, UBS AG is authorised
by the Prudential Regulation Authority and subject to regulation
by the Financial Conduct Authority and limited regulation by the
Prudential Regulation Authority.  Details about the extent of our
regulation by the Prudential Regulation Authority are available
from us on request.

UBS reserves the right to retain all messages. Messages are protected 
and accessed only in legally justified cases. 
Visit our website at http://www.ubs.com 

This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail. Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system. 

E-mails are not encrypted and cannot be guaranteed to be secure or 
error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender 
therefore does not accept liability for any errors or omissions in the 
contents of this message which arise as a result of e-mail transmission. 
If verification is required please request a hard-copy version. This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities 
or related financial instruments. 

UBS Limited is authorised by the Prudential Regulation Authority 
and regulated by the Financial Conduct Authority and the Prudential 
Regulation Authority.

UBS AG is a public company incorporated with limited liability in
Switzerland domiciled in the Canton of Basel-City and the Canton of
Zurich respectively registered at the Commercial Registry offices in
those Cantons with new Identification No: CHE-101.329.561 as from 18
December 2013 (and prior to 18 December 2013 with Identification
No: CH-270.3.004.646-4) and having respective head offices at
Aeschenvorstadt 1, 4051 Basel and Bahnhofstrasse 45, 8001 Zurich,
Switzerland and is authorised and regulated by the Financial Market
Supervisory Authority in Switzerland.  Registered in the United
Kingdom as a foreign company with No: FC021146 and having a UK
Establishment registered at Companies House, Cardiff, with
No: BR 004507.  The principal office of UK Establishment: 1 Finsbury
Avenue, London EC2M 2PP.  In the United Kingdom, UBS AG is authorised
by the Prudential Regulation Authority and subject to regulation
by the Financial Conduct Authority and limited regulation by the
Prudential Regulation Authority.  Details about the extent of our
regulation by the Prudential Regulation Authority are available
from us on request.

UBS reserves the right to retain all messages. Messages are protected 
and accessed only in legally justified cases. 
Tyagi, Devesh | 27 Oct 14:25 2014

[MarkLogic Dev General] Any example of put or post verb in extending the Java API

Hi,


As provided in the example of extending the Java API, the dictionary services provide implementation of get verb. Can anyone please point to an example of put or post verbs for the same. Any help would be appreciated.


Regards,

Devesh Tyagi

"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,<br></p>
<p><br></p>
<p>As provided in the example of extending the Java API, the dictionary services provide implementation of get verb. Can anyone please point to an example of put or post verbs for the same. Any help would be appreciated.<br></p>
<p><br></p>
<p>Regards,<br></p>
<p>Devesh Tyagi<br></p>
"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>
Whitby, Rob | 23 Oct 16:44 2014

[MarkLogic Dev General] How to tell if restart required?

Hi,

I¹m using admin:save-configuration-without-restart() in setup scripts, I
know it returns a list of hosts that require a restart, but would like to
get that information independently, so I can run a bunch of scripts and
then check what needs restarting. Something like
admin:get-hosts-requiring-restart(). I was hoping it would be in
xdmp:host-status() but seems not.

Thanks
Rob

Gary Russo | 20 Oct 16:43 2014
Picon

Re: [MarkLogic Dev General] Is there a way to extract worksheet metadata from an Excel 97/2003?

Hello Ron,

 

Yes, it is feasible to do the metadata extraction upstream of MarkLogic.

 

It complicates things a little bit but it will be ok.

 

Apache Tika looks like a nice solution.

 

My client is a Microsoft shop and they use a product called Aspose to convert/extract data from spreadsheets.

 

The majority of spreadsheet formats that I need to ingest use the older 97/2003 format. I can use the Aspose API to covert the older format to OOXML on the fly.

 

It’s unfortunate that the MarkLogic xdmp:document-filter() API is not able to extract the “defined name” metadata from the “97/2003” file format.

 

I consider it to be a bug in the MarkLogic API because other Excel Spreadsheet extraction APIs (e.g., Aspose, Tika, Apache POI) can extract this data from the older file format.

 

Anyway, thanks for the info.

 

-          Gary R

 

 

 

From: general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org [mailto:general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org] On Behalf Of Ron Hitchens
Sent: Friday, October 17, 2014 11:52 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Is there a way to extract worksheet metadata from an Excel 97/2003?

 

 

   If it's feasible to do your metadata extraction upstream of MarkLogic (i.e., before insertion) you might take a look at Apache Tika.  It's designed for this sort of thing.

 

   You could also setup it up in a simple web service callable from MarkLogic.  POST the spreadsheet to it and have it return the metadata in whatever form you like.


---

Ron Hitchens {ron-ECtqR1qVIOE7VdE/fOJbLw@public.gmane.org +44 7879 358212

 

On Oct 17, 2014, at 3:35 PM, Gary Russo <garyrusso-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:



Hello Dennis,

 

Thanks for the info.

 

Yes, I tried xdmp:excel-convert() but this does not get the worksheet metadata either.

 

The metadata that I need to retrieve from the older excel format is the “Named Fields”.

 

Users create them using the Excel “Named Box” feature as shown here. => http://spreadsheets.about.com/od/exceltips/qt/81225namebox.htm

 

It looks like my only option is to use the Apache POI Java API to extract the named fields or use it to convert xls-to-xlsx on-the-fly. =>https://poi.apache.org/apidocs

 

I know there’s a hidden way to use MarkLogic’s underlying JVM.

 

It would be great if I could use it to call the Apache POI code.

 

But that’s a question for another day.

 

Thanks again,

 

Gary Russo

 

 

Gary Russo

Enterprise NoSQL Developer

 

 

 

From: general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org [mailto:general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org] On Behalf Of David Ennis
Sent: Thursday, October 16, 2014 5:02 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Is there a way to extract worksheet metadata from an Excel 97/2003?

 

HI.

 

I believe that with the conversion licence, you can do what you want with: xdmp:excel-convert

 

Barring that, you could always run openoffice as a headless server for conversion purposes.

 

Kind Regards,

David Ennis

 

 


 

 

Kind Regards,

David Ennis

 

 

David Ennis
Content Engineer

 
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 

   

 

On 16 October 2014 20:00, Gary Russo <garyrusso-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:

I need to extract worksheet metadata called “defined name” from Excel 97/2003 formatted spreadsheets.

 

The ISYS xdmp:document-filter() API is limiting because it only extracts the text.

 

It does not extract any worksheet metadata.

 

Does anyone know of a workaround for this?

 

My only thought is to upload the “Excel 97/2003” xls file and then convert it on the server to an “Excel 2010” xlsx format.

 

Once it’s in an Excel 2010 format, I can easily extract the “defined name” metadata.

 

This is what it looks like in “Excel 2010” files.

 

  <definedNames>
    <definedName name="LastYr">Revenue!$B$6:$B$15</definedName>
    <definedName name="ThisYr">Revenue!$C$6:$C$15</definedName>
    <definedName name="Variance">Revenue!$D$6:$D$15</definedName>
  </definedNames>

 

 

Thanks,

Gary Russo

 

 

Gary Russo

Enterprise NoSQL Developer

Phone: 212-404-8639

Skype: garyprusso

 


_______________________________________________
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

 

<div><div class="WordSection1">
<p class="MsoNormal"><span>Hello Ron,<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Yes, it is feasible to do the metadata extraction upstream of MarkLogic.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>It complicates things a little bit but it will be ok.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Apache Tika looks like a nice solution.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>My client is a Microsoft shop and they use a product called Aspose to convert/extract data from spreadsheets.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>The majority of spreadsheet formats that I need to ingest use the older 97/2003 format. I can use the Aspose API to covert the older format to OOXML on the fly.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>It&rsquo;s unfortunate that the MarkLogic xdmp:document-filter() API is not able to extract the &ldquo;defined name&rdquo; metadata from the &ldquo;97/2003&rdquo; file format.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>I consider it to be a bug in the MarkLogic API because other Excel Spreadsheet extraction APIs (e.g., Aspose, Tika, Apache POI) can extract this data from the older file format. <p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Anyway, thanks for the info.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoListParagraph"><span><span>-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span>Gary R<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<div><div><p class="MsoNormal"><span>From:</span><span> general-bounces@... [mailto:general-bounces@...] On Behalf Of Ron Hitchens<br>Sent: Friday, October 17, 2014 11:52 AM<br>To: MarkLogic Developer Discussion<br>Subject: Re: [MarkLogic Dev General] Is there a way to extract worksheet metadata from an Excel 97/2003?<p></p></span></p></div></div>
<p class="MsoNormal"><p>&nbsp;</p></p>
<div><p class="MsoNormal"><p>&nbsp;</p></p></div>
<p class="MsoNormal">&nbsp; &nbsp;If it's feasible to do your metadata extraction upstream of MarkLogic (i.e., before insertion) you might take a look at Apache Tika. &nbsp;It's designed for this sort of thing.<p></p></p>
<div><p class="MsoNormal"><p>&nbsp;</p></p></div>
<div>
<p class="MsoNormal">&nbsp; &nbsp;You could also setup it up in a simple web service callable from MarkLogic. &nbsp;POST the spreadsheet to it and have it return the metadata in whatever form you like.<p></p></p>
<div><div><div>
<div><p class="MsoNormal"><span><br>---<p></p></span></p></div>
<div><p class="MsoNormal"><span>Ron Hitchens {<a href="mailto:ron@...">ron@...</a>}&nbsp;<span class="apple-converted-space">&nbsp;</span>+44 7879 358212<p></p></span></p></div>
</div></div></div>
<p class="MsoNormal"><p>&nbsp;</p></p>
<div>
<div><p class="MsoNormal">On Oct 17, 2014, at 3:35 PM, Gary Russo &lt;<a href="mailto:garyrusso@...">garyrusso@...</a>&gt; wrote:<p></p></p></div>
<p class="MsoNormal"><br><br><p></p></p>
<div>
<div><p class="MsoNormal"><span>Hello Dennis,</span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>Thanks for the info.</span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>Yes, I tried xdmp:excel-convert() but this does not get the worksheet metadata either.</span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>The metadata that I need to retrieve from the older excel format is the &ldquo;Named Fields&rdquo;.</span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>Users create them using the Excel &ldquo;Named Box&rdquo; feature as shown here. =&gt;<span class="apple-converted-space">&nbsp;</span><a href="http://spreadsheets.about.com/od/exceltips/qt/81225namebox.htm"><span>http://spreadsheets.about.com/od/exceltips/qt/81225namebox.htm</span></a></span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>It looks like my only option is to use the Apache POI Java API to extract the named fields or use it to convert xls-to-xlsx on-the-fly. =&gt;<a href="https://poi.apache.org/apidocs"><span>https://poi.apache.org/apidocs</span></a></span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>I know there&rsquo;s a hidden way to use MarkLogic&rsquo;s underlying JVM.</span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>It would be great if I could use it to call the Apache POI code.</span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>But that&rsquo;s a question for another day.</span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>Thanks again,</span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>Gary Russo</span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>Gary Russo</span><p></p></p></div>
<div><p class="MsoNormal"><span>Enterprise NoSQL Developer</span><p></p></p></div>
<div><p class="MsoNormal"><span><a href="http://garyrusso.wordpress.com">http://garyrusso.wordpress.com</a></span><p></p></p></div>
<div><p class="MsoNormal"><span><a href="http://twitter.com/garyprusso"><span>http://twitter.com/garyprusso</span></a></span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div>
<div><p class="MsoNormal"><span>From:</span><span class="apple-converted-space"><span>&nbsp;</span></span><span><a href="mailto:general-bounces@..."><span>general-bounces@...</span></a><span class="apple-converted-space">&nbsp;</span>[mailto:general-<a href="mailto:bounces@..."><span>bounces@...</span></a>]<span class="apple-converted-space">&nbsp;</span>On Behalf Of<span class="apple-converted-space">&nbsp;</span>David Ennis<br>Sent:<span class="apple-converted-space">&nbsp;</span>Thursday, October 16, 2014 5:02 PM<br>To:<span class="apple-converted-space">&nbsp;</span>MarkLogic Developer Discussion<br>Subject:<span class="apple-converted-space">&nbsp;</span>Re: [MarkLogic Dev General] Is there a way to extract worksheet metadata from an Excel 97/2003?</span><p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div>
<div><div><p class="MsoNormal"><span>HI.</span><p></p></p></div></div>
<div><div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div></div>
<div><div><p class="MsoNormal"><span>I believe that with the conversion licence, you can do what you want with:&nbsp;xdmp:excel-convert</span><p></p></p></div></div>
<div><div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div></div>
<div><div><p class="MsoNormal"><span>Barring that, you could always run openoffice as a headless server for conversion purposes.</span><p></p></p></div></div>
<div><div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div></div>
<div><div><p class="MsoNormal"><span>Kind Regards,</span><p></p></p></div></div>
<div><div><p class="MsoNormal"><span>David Ennis</span><p></p></p></div></div>
<div><div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div></div>
<div><div><p class="MsoNormal"><span>&nbsp;</span><p></p></p></div></div>
</div>
<div>
<div><p class="MsoNormal"><br clear="all"><p></p></p></div>
<div>
<div><div><p class="MsoNormal">&nbsp;<p></p></p></div></div>
<div><div><p class="MsoNormal">&nbsp;<p></p></p></div></div>
<div><div><p class="MsoNormal"><span>Kind Regards,</span><p></p></p></div></div>
<div><div><p class="MsoNormal"><span>David Ennis</span><p></p></p></div></div>
<div><div><p class="MsoNormal">&nbsp;<p></p></p></div></div>
<div><div><p class="MsoNormal">&nbsp;<p></p></p></div></div>
<div><p class="MsoNormal"><span>David Ennis</span><span><br></span><span>Content Engineer</span><span><br><br></span><a href="http://www.hinttech.com/" target="_blank"><span>&nbsp;</span></a><span><br></span><span>Mastering the value of content</span><span><br></span><span>creative | technology | content</span><span><br><br></span><span>Delftechpark 37i<br>2628 XJ Delft<br>The Netherlands<br></span><span>T:</span><span>&nbsp;+31 88 268 25 00<br></span><span>M:</span><span>&nbsp;+31 63 091 72 80&nbsp;</span><span><br><br></span><a href="http://www.hinttech.com" target="_blank"><span></span></a><span>&nbsp;</span><a href="https://twitter.com/HintTech" target="_blank"><span></span></a><span>&nbsp;</span><a href="http://www.facebook.com/HintTech" target="_blank"><span></span></a><span>&nbsp;</span><a href="http://www.linkedin.com/company/HintTech" target="_blank"><span></span></a><p></p></p></div>
</div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div>
<div><p class="MsoNormal">On 16 October 2014 20:00, Gary Russo &lt;<a href="mailto:garyrusso@..." target="_blank"><span>garyrusso@...</span></a>&gt; wrote:<p></p></p></div>
<div>
<div><p class="MsoNormal">I need to extract worksheet metadata called &ldquo;defined name&rdquo; from Excel 97/2003 formatted spreadsheets.<p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div><p class="MsoNormal">The ISYS xdmp:document-filter() API is limiting because it only extracts the text.<p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div><p class="MsoNormal">It does not extract any worksheet metadata.<p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div><p class="MsoNormal">Does anyone know of a workaround for this?<p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div><p class="MsoNormal">My only thought is to upload the &ldquo;Excel 97/2003&rdquo; xls file and then convert it on the server to an &ldquo;Excel 2010&rdquo; xlsx format.<p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div><p class="MsoNormal">Once it&rsquo;s in an Excel 2010 format, I can easily extract the &ldquo;defined name&rdquo; metadata.<p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div><p class="MsoNormal">This is what it looks like in &ldquo;Excel 2010&rdquo; files.<p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div><p class="MsoNormal"><span>&nbsp;<span class="apple-converted-space">&nbsp;</span><span>&lt;definedNames&gt;</span><br>&nbsp;&nbsp;&nbsp;<span class="apple-converted-space">&nbsp;</span><span>&lt;definedName</span><span class="apple-converted-space"><span>&nbsp;</span></span><span>name</span><span>=</span><span>"LastYr"</span><span>&gt;</span>Revenue!$B$6:$B$15<span>&lt;/definedName&gt;</span><br>&nbsp;&nbsp;&nbsp;<span class="apple-converted-space">&nbsp;</span><span>&lt;definedName</span><span class="apple-converted-space"><span>&nbsp;</span></span><span>name</span><span>=</span><span>"ThisYr"</span><span>&gt;</span>Revenue!$C$6:$C$15<span>&lt;/definedName&gt;</span><br>&nbsp;&nbsp;&nbsp;<span class="apple-converted-space">&nbsp;</span><span>&lt;definedName</span><span class="apple-converted-space"><span>&nbsp;</span></span><span>name</span><span>=</span><span>"Variance"</span><span>&gt;</span>Revenue!$D$6:$D$15<span>&lt;/definedName&gt;</span><br>&nbsp;<span class="apple-converted-space">&nbsp;</span><span>&lt;/definedNames&gt;</span></span><p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div><p class="MsoNormal">Thanks,<p></p></p></div>
<div><p class="MsoNormal">Gary Russo<p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
<div><p class="MsoNormal">Gary Russo<p></p></p></div>
<div><p class="MsoNormal">Enterprise NoSQL Developer<p></p></p></div>
<div><p class="MsoNormal">Phone:<span class="apple-converted-space">&nbsp;</span><a href="tel:212-404-8639" target="_blank"><span>212-404-8639</span></a><p></p></p></div>
<div><p class="MsoNormal">Skype: garyprusso<p></p></p></div>
<div><p class="MsoNormal"><a href="http://garyrusso.wordpress.com" target="_blank"><span>http://garyrusso.wordpress.com</span></a><p></p></p></div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
</div>
<p class="MsoNormal"><br>_______________________________________________<br>General mailing list<br><a href="mailto:General@..."><span>General@...</span></a><br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank"><span>http://developer.marklogic.com/mailman/listinfo/general</span></a><p></p></p>
</div>
<div><p class="MsoNormal">&nbsp;<p></p></p></div>
</div>
<p class="MsoNormal"><span>_______________________________________________<br>General mailing list<br><a href="mailto:General@..."><span>General@...</span></a><br><a href="http://developer.marklogic.com/mailman/listinfo/general"><span>http://developer.marklogic.com/mailman/listinfo/general</span></a><p></p></span></p>
</div>
</div>
<p class="MsoNormal"><p>&nbsp;</p></p>
</div>
</div></div>
Wanczowski, Andrew | 17 Oct 19:38 2014

Re: [MarkLogic Dev General] Element Range Query with DateTime and Durations

Hi John and Dave, 

In testing the provided example worked well:

xquery version "1.0-ml";

declare namespace html = "http://www.w3.org/1999/xhtml";

let $results :=
  cts:search(
    fn:doc(),
    cts:element-range-query(xs:QName("publishedDate"), "<=", fn:current-date() - xs:dayTimeDuration("P90D"))
  )[1 to 10]

let $onSaleDates := (
  xs:date("2014-07-18"), (: July 18 published date :)
  xs:date("2014-07-19"), (: July 19 published date :)
  xs:date("2014-07-20")  (: July 20 published date :)
)

let $testCases := 
  for $onSaleDate in $onSaleDates 
  return 
  (
   $onSaleDate, 
   ($onSaleDate <= fn:current-date() - xs:dayTimeDuration("P90D")) 
  )
  
return $testCases


I am trying to solve a larger problem of filtering over larger datasets (5M+ documents)  where the durations are variables  that come from one set of documents (business rules) and filter search of other documents (articles). Basically it is to filter out content with various embargo durations.  The "business rules"only  state duration after published date not the actual  dates the embargo ends. 

Would you say there is anything to watch out with from a performance standpoint? I have range indexes set up on all the fields that require calculations. 

Thanks
Drew

From: Dave Cassel <Dave.Cassel-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org>
Date: Friday, October 17, 2014 12:09 PM
To: Andrew Wanczowski <Andrew_Wanczowski-xN+CextoL1Lby3iVrkZq2A@public.gmane.org>
Subject: Re: [MarkLogic Dev General] Element Range Query with DateTime and Durations

Drew, I wasn't sure how familiar you are with durations, so in case John's answer didn't give you what you need --

cts:element-range-query(
  xs:QName("date"), 
  ">",
  fn:current-date() - xs:dayTimeDuration("P90D")
)


-- 
Dave Cassel
Developer Community Manager
MarkLogic Corporation
Cell:  +1-484-798-8720


From: <Wanczowski>, Andrew <Andrew_Wanczowski <at> condenast.com>
Reply-To: MarkLogic Developer Discussion <general <at> developer.marklogic.com>
Date: Friday, October 17, 2014 at 6:42 AM
To: "general-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org" <general-ld4jwAGwUXTgXEvjvSGRgEPhkuQigjxi@public.gmane.org.com>
Subject: Re: [MarkLogic Dev General] Element Range Query with DateTime and Durations

Thanks John. I'll give that a shot.

On 10/17/14 9:35 AM, "John Snelson" <John.Snelson-efBvD/aTHCF8UrSeD/g0lQ@public.gmane.org> wrote:

Work out a dateTime 90 days before the current dateTime, and query for
articles with a published dateTime before that dateTime.

John

On 17/10/14 14:26, Wanczowski, Andrew wrote:
Hi All,

Is possible to do a dateTime range query based on the elements value
plus or minus a xs:dayTimeDuration. For example I want to find all
articles that are 90 days passed the published date.

The documentation
examples of date queriers but they all have a supplied dateTime.

Thanks
Drew

--
John Snelson, Lead Engineer                    http://twitter.com/jpcs
MarkLogic Corporation                         http://www.marklogic.com
_______________________________________________
General mailing list

_______________________________________________
General mailing list

<div>
<div>Hi John and Dave,&nbsp;</div>
<div>
<div><br></div>
<div>In testing the provided example worked well:</div>
<div><br></div>
<div>
<blockquote>
<div>xquery version "1.0-ml";</div>
<div><br></div>
<div>declare namespace html = "http://www.w3.org/1999/xhtml";</div>
<div><br></div>
<div>let $results :=</div>
<div>&nbsp; cts:search(</div>
<div>&nbsp; &nbsp; fn:doc(),</div>
<div>&nbsp; &nbsp; cts:element-range-query(xs:QName("publishedDate"), "&lt;=", fn:current-date() - xs:dayTimeDuration("P90D"))</div>
<div>&nbsp; )[1 to 10]</div>
<div><br></div>
<div>let $onSaleDates := (</div>
<div>&nbsp; xs:date("2014-07-18"), (: July 18 published date :)</div>
<div>&nbsp; xs:date("2014-07-19"), (: July 19 published date :)</div>
<div>&nbsp; xs:date("2014-07-20") &nbsp;(: July 20 published date :)</div>
<div>)</div>
<div><br></div>
<div>let $testCases :=&nbsp;</div>
<div>&nbsp; for $onSaleDate in $onSaleDates&nbsp;</div>
<div>&nbsp; return&nbsp;</div>
<div>&nbsp; (</div>
<div>&nbsp; &nbsp;$onSaleDate,&nbsp;</div>
<div>&nbsp; &nbsp;($onSaleDate &lt;= fn:current-date() - xs:dayTimeDuration("P90D"))&nbsp;</div>
<div>&nbsp; )</div>
<div>&nbsp;&nbsp;</div>
<div>return $testCases</div>
</blockquote>
</div>
<div><br></div>
<div><br></div>
<div>I am trying to solve a larger problem of filtering over larger datasets (5M+ documents) &nbsp;where the durations are variables &nbsp;that come from one set of documents (business rules) and filter search of other documents (articles). Basically it is to filter
 out content with various embargo durations. &nbsp;The "business rules"only &nbsp;state duration after published date not the actual &nbsp;dates the embargo ends.&nbsp;</div>
<div><br></div>
<div>Would you say there is anything to watch out with from a performance standpoint? I have range indexes set up on all the fields that require calculations.&nbsp;</div>
</div>
<div><br></div>
<div>Thanks</div>
<div>Drew</div>
<div><br></div>
<span>
<div>
<span>From: </span>Dave Cassel &lt;<a href="mailto:Dave.Cassel@...">Dave.Cassel@...</a>&gt;<br><span>Date: </span>Friday, October 17, 2014 12:09 PM<br><span>To: </span>Andrew Wanczowski &lt;<a href="mailto:Andrew_Wanczowski@...">Andrew_Wanczowski@...</a>&gt;<br><span>Subject: </span>Re: [MarkLogic Dev General] Element Range Query with DateTime and Durations<br>
</div>
<div><br></div>
<div>
<div>
<div>
<div>Drew, I wasn't sure how familiar you are with durations, so in case John's answer didn't give you what you need --</div>
<div><br></div>
<div>
<div>cts:element-range-query(</div>
<div>&nbsp; xs:QName("date"),&nbsp;</div>
<div>&nbsp; "&gt;",</div>
<div>&nbsp; fn:current-date() - xs:dayTimeDuration("P90D")</div>
<div>)</div>
</div>
<div><br></div>
<div>
<div><br></div>
<div>--&nbsp;</div>
<div>
<span>Dave Cassel<br></span><span>Developer Community Manager</span><span><br><a href="http://www.marklogic.com/">MarkLogic Corporation</a><br></span><span>Cell:&nbsp;
 +1-484-798-8720<br><br></span>
</div>
</div>
</div>
<div><br></div>
<span>
<div>
<span>From: </span>&lt;Wanczowski&gt;, Andrew &lt;<a href="mailto:Andrew_Wanczowski@...">Andrew_Wanczowski <at> condenast.com</a>&gt;<br><span>Reply-To: </span>MarkLogic Developer Discussion &lt;<a href="mailto:general@...">general <at> developer.marklogic.com</a>&gt;<br><span>Date: </span>Friday, October 17, 2014 at 6:42 AM<br><span>To: </span>"<a href="mailto:general <at> developer.marklogic.com">general@...</a>" &lt;<a href="mailto:general@...">general@....com</a>&gt;<br><span>Subject: </span>Re: [MarkLogic Dev General] Element Range Query with DateTime and Durations<br>
</div>
<div><br></div>
<blockquote>
<div>
<div>
<div>Thanks John. I'll give that a shot.</div>
<div><br></div>
<div>On 10/17/14 9:35 AM, "John Snelson" &lt;<a href="mailto:John.Snelson@...">John.Snelson@...</a>&gt; wrote:</div>
<div><br></div>
<blockquote>
<div>Work out a dateTime 90 days before the current dateTime, and query for</div>
<div>articles with a published dateTime before that dateTime.</div>
<div><br></div>
<div>John</div>
<div><br></div>
<div>On 17/10/14 14:26, Wanczowski, Andrew wrote:</div>
<blockquote>
<div>Hi All,</div>
<div><br></div>
<div>Is possible to do a dateTime range query based on the elements value</div>
<div>plus or minus a xs:dayTimeDuration. For example I want to find all</div>
<div>articles that are 90 days passed the published date.</div>
<div><br></div>
<div>The documentation</div>
<div>(<a href="http://docs.marklogic.com/cts:element-range-query">http://docs.marklogic.com/cts:element-range-query</a>)&nbsp;&nbsp;gives a few</div>
<div>examples of date queriers but they all have a supplied dateTime.</div>
<div><br></div>
<div>Thanks</div>
<div>Drew</div>
</blockquote>
<div><br></div>
<div>-- </div>
<div>John Snelson, Lead Engineer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://twitter.com/jpcs">http://twitter.com/jpcs</a>
</div>
<div>MarkLogic Corporation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.marklogic.com">
http://www.marklogic.com</a>
</div>
<div>_______________________________________________</div>
<div>General mailing list</div>
<div><a href="mailto:General@...">General <at> developer.marklogic.com</a></div>
<div><a href="http://developer.marklogic.com/mailman/listinfo/general">http://developer.marklogic.com/mailman/listinfo/general</a></div>
</blockquote>
<div><br></div>
<div>_______________________________________________</div>
<div>General mailing list</div>
<div><a href="mailto:General@...">General <at> developer.marklogic.com</a></div>
<div><a href="http://developer.marklogic.com/mailman/listinfo/general">http://developer.marklogic.com/mailman/listinfo/general</a></div>
<div><br></div>
</div>
</div>
</blockquote>
</span>
</div>
</div>
</span>
</div>
Gary Russo | 17 Oct 16:35 2014
Picon

Re: [MarkLogic Dev General] Is there a way to extract worksheet metadata from an Excel 97/2003?

Hello Dennis,

 

Thanks for the info.

 

Yes, I tried xdmp:excel-convert() but this does not get the worksheet metadata either.

 

The metadata that I need to retrieve from the older excel format is the “Named Fields”.

 

Users create them using the Excel “Named Box” feature as shown here. => http://spreadsheets.about.com/od/exceltips/qt/81225namebox.htm

 

It looks like my only option is to use the Apache POI Java API to extract the named fields or use it to convert xls-to-xlsx on-the-fly. => https://poi.apache.org/apidocs

 

I know there’s a hidden way to use MarkLogic’s underlying JVM.

 

It would be great if I could use it to call the Apache POI code.

 

But that’s a question for another day.

 

Thanks again,

 

Gary Russo

 

 

Gary Russo

Enterprise NoSQL Developer

http://garyrusso.wordpress.com

http://twitter.com/garyprusso

 

 

 

From: general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org [mailto:general-bounces-ld4jwAGwUXTgXEvjvSGRgMKenhbt+owO@public.gmane.org] On Behalf Of David Ennis
Sent: Thursday, October 16, 2014 5:02 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Is there a way to extract worksheet metadata from an Excel 97/2003?

 

HI.

 

I believe that with the conversion licence, you can do what you want with: xdmp:excel-convert

 

Barring that, you could always run openoffice as a headless server for conversion purposes.

 

Kind Regards,

David Ennis

 

 


 

 

Kind Regards,

David Ennis

 

 

David Ennis
Content Engineer

 
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 

   

 

On 16 October 2014 20:00, Gary Russo <garyrusso-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:

I need to extract worksheet metadata called “defined name” from Excel 97/2003 formatted spreadsheets.

 

The ISYS xdmp:document-filter() API is limiting because it only extracts the text.

 

It does not extract any worksheet metadata.

 

Does anyone know of a workaround for this?

 

My only thought is to upload the “Excel 97/2003” xls file and then convert it on the server to an “Excel 2010” xlsx format.

 

Once it’s in an Excel 2010 format, I can easily extract the “defined name” metadata.

 

This is what it looks like in “Excel 2010” files.

 

  <definedNames>
   
<definedName name="LastYr">Revenue!$B$6:$B$15</definedName>
   
<definedName name="ThisYr">Revenue!$C$6:$C$15</definedName>
   
<definedName name="Variance">Revenue!$D$6:$D$15</definedName>
 
</definedNames>

 

 

Thanks,

Gary Russo

 

 

Gary Russo

Enterprise NoSQL Developer

Phone: 212-404-8639

Skype: garyprusso

http://garyrusso.wordpress.com

 


_______________________________________________
General mailing list
General-ld4jwAGwUXTgXEvjvSGRgNi2O/JbrIOy@public.gmane.orgic.com
http://developer.marklogic.com/mailman/listinfo/general

 

<div><div class="WordSection1">
<p class="MsoNormal"><span>Hello Dennis,<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Thanks for the info.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Yes, I tried xdmp:excel-convert() but this does not get the worksheet metadata either.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>The metadata that I need to retrieve from the older excel format is the &ldquo;Named Fields&rdquo;.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Users create them using the Excel &ldquo;Named Box&rdquo; feature as shown here. =&gt; <a href="http://spreadsheets.about.com/od/exceltips/qt/81225namebox.htm">http://spreadsheets.about.com/od/exceltips/qt/81225namebox.htm</a><p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>It looks like my only option is to use the Apache POI Java API to extract the named fields or use it to convert xls-to-xlsx on-the-fly. =&gt; <a href="https://poi.apache.org/apidocs">https://poi.apache.org/apidocs</a><p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>I know there&rsquo;s a hidden way to use MarkLogic&rsquo;s underlying JVM.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>It would be great if I could use it to call the Apache POI code.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>But that&rsquo;s a question for another day.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Thanks again,<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Gary Russo<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Gary Russo<p></p></span></p>
<p class="MsoNormal"><span>Enterprise NoSQL Developer<p></p></span></p>
<p class="MsoNormal"><span><a href="http://garyrusso.wordpress.com"><span>http://garyrusso.wordpress.com</span></a><p></p></span></p>
<p class="MsoNormal"><span><a href="http://twitter.com/garyprusso">http://twitter.com/garyprusso</a><p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>From:</span><span> general-bounces@... [mailto:general-bounces@...] On Behalf Of David Ennis<br>Sent: Thursday, October 16, 2014 5:02 PM<br>To: MarkLogic Developer Discussion<br>Subject: Re: [MarkLogic Dev General] Is there a way to extract worksheet metadata from an Excel 97/2003?<p></p></span></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<div>
<div><p class="MsoNormal"><span>HI.<p></p></span></p></div>
<div><p class="MsoNormal"><span><p>&nbsp;</p></span></p></div>
<div><p class="MsoNormal"><span>I believe that with the conversion licence, you can do what you want with:&nbsp;xdmp:excel-convert<p></p></span></p></div>
<div><p class="MsoNormal"><span><p>&nbsp;</p></span></p></div>
<div><p class="MsoNormal"><span>Barring that, you could always run openoffice as a headless server for conversion purposes.<p></p></span></p></div>
<div><p class="MsoNormal"><span><p>&nbsp;</p></span></p></div>
<div><p class="MsoNormal"><span>Kind Regards,<p></p></span></p></div>
<div><p class="MsoNormal"><span>David Ennis<p></p></span></p></div>
<div><p class="MsoNormal"><span><p>&nbsp;</p></span></p></div>
<div><p class="MsoNormal"><span><p>&nbsp;</p></span></p></div>
</div>
<div>
<p class="MsoNormal"><br clear="all"><p></p></p>
<div><div>
<div><p class="MsoNormal"><p>&nbsp;</p></p></div>
<div><p class="MsoNormal"><p>&nbsp;</p></p></div>
<div><p class="MsoNormal"><span>Kind Regards,</span><p></p></p></div>
<div><p class="MsoNormal"><span>David Ennis</span><p></p></p></div>
<div><p class="MsoNormal"><p>&nbsp;</p></p></div>
<div><p class="MsoNormal"><p>&nbsp;</p></p></div>
<p class="MsoNormal"><span>David Ennis</span><span><br></span><span>Content Engineer</span><span><br><br></span><a href="http://www.hinttech.com/" target="_blank"><span>&nbsp;</span></a><span><br></span><span>Mastering the value of content</span><span><br></span><span>creative | technology | content</span><span><br><br></span><span>Delftechpark 37i<br>2628 XJ Delft<br>The Netherlands<br></span><span>T:</span><span>&nbsp;+31 88 268 25 00<br></span><span>M:</span><span>&nbsp;+31 63 091 72 80&nbsp;</span><span><br><br></span><a href="http://www.hinttech.com" target="_blank"><span></span></a><span>&nbsp;</span><a href="https://twitter.com/HintTech" target="_blank"><span></span></a><span>&nbsp;</span><a href="http://www.facebook.com/HintTech" target="_blank"><span></span></a><span>&nbsp;</span><a href="http://www.linkedin.com/company/HintTech" target="_blank"><span></span></a><p></p></p>
</div></div>
<p class="MsoNormal"><p>&nbsp;</p></p>
<div>
<p class="MsoNormal">On 16 October 2014 20:00, Gary Russo &lt;<a href="mailto:garyrusso@..." target="_blank">garyrusso@...</a>&gt; wrote:<p></p></p>
<div><div>
<p class="MsoNormal">I need to extract worksheet metadata called &ldquo;defined name&rdquo; from Excel 97/2003 formatted spreadsheets.<p></p></p>
<p class="MsoNormal">&nbsp;<p></p></p>
<p class="MsoNormal">The ISYS xdmp:document-filter() API is limiting because it only extracts the text.<p></p></p>
<p class="MsoNormal">&nbsp;<p></p></p>
<p class="MsoNormal">It does not extract any worksheet metadata.<p></p></p>
<p class="MsoNormal">&nbsp;<p></p></p>
<p class="MsoNormal">Does anyone know of a workaround for this?<p></p></p>
<p class="MsoNormal">&nbsp;<p></p></p>
<p class="MsoNormal">My only thought is to upload the &ldquo;Excel 97/2003&rdquo; xls file and then convert it on the server to an &ldquo;Excel 2010&rdquo; xlsx format.<p></p></p>
<p class="MsoNormal">&nbsp;<p></p></p>
<p class="MsoNormal">Once it&rsquo;s in an Excel 2010 format, I can easily extract the &ldquo;defined name&rdquo; metadata.<p></p></p>
<p class="MsoNormal">&nbsp;<p></p></p>
<p class="MsoNormal">This is what it looks like in &ldquo;Excel 2010&rdquo; files.<p></p></p>
<p class="MsoNormal">&nbsp;<p></p></p>
<p class="MsoNormal"><span>&nbsp; </span><span>&lt;definedNames&gt;</span><span><br>&nbsp;&nbsp;&nbsp; </span><span>&lt;definedName</span><span> name</span><span>=</span><span>"LastYr"</span><span>&gt;</span><span>Revenue!$B$6:$B$15</span><span>&lt;/definedName&gt;</span><span><br>&nbsp;&nbsp;&nbsp; </span><span>&lt;definedName</span><span> name</span><span>=</span><span>"ThisYr"</span><span>&gt;</span><span>Revenue!$C$6:$C$15</span><span>&lt;/definedName&gt;</span><span><br>&nbsp;&nbsp;&nbsp; </span><span>&lt;definedName</span><span> name</span><span>=</span><span>"Variance"</span><span>&gt;</span><span>Revenue!$D$6:$D$15</span><span>&lt;/definedName&gt;</span><span><br>&nbsp; </span><span>&lt;/definedNames&gt;</span><p></p></p>
<p class="MsoNormal">&nbsp;<p></p></p>
<p class="MsoNormal">&nbsp;<p></p></p>
<p class="MsoNormal">Thanks,<p></p></p>
<p class="MsoNormal">Gary Russo<p></p></p>
<p class="MsoNormal">&nbsp;<p></p></p>
<p class="MsoNormal">&nbsp;<p></p></p>
<p class="MsoNormal">Gary Russo<p></p></p>
<p class="MsoNormal">Enterprise NoSQL Developer<p></p></p>
<p class="MsoNormal">Phone: <a href="tel:212-404-8639" target="_blank">212-404-8639</a><p></p></p>
<p class="MsoNormal">Skype: garyprusso<p></p></p>
<p class="MsoNormal"><a href="http://garyrusso.wordpress.com" target="_blank">http://garyrusso.wordpress.com</a><p></p></p>
<p class="MsoNormal">&nbsp;<p></p></p>
</div></div>
<p class="MsoNormal"><br>_______________________________________________<br>General mailing list<br><a href="mailto:General@...">General@...ic.com</a><br><a href="http://developer.marklogic.com/mailman/listinfo/general" target="_blank">http://developer.marklogic.com/mailman/listinfo/general</a><p></p></p>
</div>
<p class="MsoNormal"><p>&nbsp;</p></p>
</div>
</div></div>
Girish Kulkarni | 16 Oct 00:47 2014
Picon

[MarkLogic Dev General] word query

I had some fileds in my xml document like enrichedDateTime which i didnt want to index and search upon. When i added this in the word query exclusion list for some reason my search result isn't returning back this document at all even when i searched for other field like <content>. However when i added the  root field name <fix> to my inclusion list i do see the document back again. I had already set the include root flag to true but seems like for some reason i am un-able to search for other fields in the document. Any ideas why this could be happening ?

<fix>
<content> some content goes here </content>
<enrichedDateTime>2014-09-30T16:32:27.424443-07:00</enrichedDateTime>
</fix>



Girish Kulkarni
<div><div dir="ltr">
<div class="gmail_default">I had some fileds in my xml document like enrichedDateTime which i didnt want to index and search upon. When i added this in the word query exclusion list for some reason my search result isn't returning back this document at all even when i searched for other field like &lt;content&gt;. However when i added the &nbsp;root field name &lt;fix&gt; to my inclusion list i do see the document back again. I had already set the include root flag to true but seems like for some reason i am un-able to search for other fields in the document. Any ideas why this could be happening ?</div>
<div class="gmail_default"><br></div>&lt;fix&gt;<br>&lt;content&gt; some content goes here &lt;/content&gt;<br>&lt;enrichedDateTime&gt;2014-09-30T16:32:27.424443-07:00&lt;/enrichedDateTime&gt;<br>&lt;/fix&gt;<div><br></div>
<div>
<br><div><br></div>Girish Kulkarni
</div>
</div></div>
Kapoor, Pragya | 15 Oct 09:59 2014

[MarkLogic Dev General] using xdmp:eval in REST Service

Hi,

I need to pick the all the docs in directory path ($Path) from Ingestion DB and insert them in Db which is configured for rest services(rest-ingestion).

The below code works fine from Qconsole, but from Rest service , the xml being picked from the Ingestion DB is not coming as xml when the code is hit from Rest service. In logs, only content is theres, xml elements are missing.(attached are the logs)

Please let me know, what I am missing in this code.

Thanks
Pragya

Code:

import module namespace dls = "http://marklogic.com/xdmp/dls" 
      at "/MarkLogic/dls.xqy";

import module namespace functx = "http://www.functx.com"
    at "/MarkLogic/functx/functx-1.0-nodoc-2007-01.xqy"; 

let $transId := '39932186-9cab-44e9-8f4f-7ebf45dabf8f'
let $PrefixURI := "/docs/"
        
        let $Path := fn:concat('/processing/', $transId,'/validDocs/')
        let $DirectoryListing := 
                    xdmp:eval('
                             import module namespace functx = "http://www.functx.com"
                                at "/MarkLogic/functx/functx-1.0-nodoc-2007-01.xqy"; 
                             declare variable $Path as xs:string external;
                             
                              xdmp:directory($Path)
                             '
                             ,
                             (xs:QName("Path"), $Path)
                             ,
                             <options xmlns="xdmp:eval">
                               <database>{xdmp:database("Ingestion")}</database>
                             </options>
                            )
            for $FileEntry in $DirectoryListing
                let $Filename := functx:substring-after-last(xdmp:node-uri($FileEntry),'/')
                let $docUri := fn:concat($PrefixURI, $Filename)
                let $_ := xdmp:log(fn:concat("uri",$docUri))
                let $contents := $FileEntry
                return 
                        (: Insert the document :)
                      (dls:document-insert-and-manage(
                       $docUri,
                        fn:false(),
                       $contents,
                        "created",
                        (xdmp:permission("dls-user", "read"),
                         xdmp:permission("dls-user", "update")),
                        "historic"),
                      xdmp:document-add-collections(
                       $docUri,
                        "latest"),
                      xdmp:document-remove-collections(
                            $docUri,  "historic")
                       
                       )


"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."
2014-10-15 13:09:34.506 Info: rest-ingestion:          4076
2014-10-15 13:09:34.506 Info: rest-ingestion:          REPO-GMR-2000
2014-10-15 13:09:34.506 Info: rest-ingestion:          2010-09-22
2014-10-15 13:09:34.506 Info: rest-ingestion:          BAU
2014-10-15 13:09:34.506 Info: rest-ingestion:          1-44
2014-10-15 13:09:34.506 Info: rest-ingestion:       
2014-10-15 13:09:34.506 Info: rest-ingestion:       
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                   Euro
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:             Same daySame day
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                   Yes
2014-10-15 13:09:34.506 Info: rest-ingestion:                   STAR FINANCIAL SERVICES LTD.
2014-10-15 13:09:34.506 Info: rest-ingestion:                   New York
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                   No
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                   Failure to Deliver Securities
2014-10-15 13:09:34.506 Info: rest-ingestion:                   Standard
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                Not applicable
2014-10-15 13:09:34.506 Info: rest-ingestion:                Not applicable
2014-10-15 13:09:34.506 Info: rest-ingestion:                Not applicable
2014-10-15 13:09:34.506 Info: rest-ingestion:                Standard
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                   
2014-10-15 13:09:34.506 Info: rest-ingestion:                      MAKEMAKE BANK, N.A.
2014-10-15 13:09:34.506 Info: rest-ingestion:                      Active
2014-10-15 13:09:34.506 Info: rest-ingestion:                      
2014-10-15 13:09:34.506 Info: rest-ingestion:                         
2014-10-15 13:09:34.506 Info: rest-ingestion:                      
2014-10-15 13:09:34.506 Info: rest-ingestion:                      
2014-10-15 13:09:34.506 Info: rest-ingestion:                   
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                   
2014-10-15 13:09:34.506 Info: rest-ingestion:                      ABC INC.
2014-10-15 13:09:34.506 Info: rest-ingestion:                      Active
2014-10-15 13:09:34.506 Info: rest-ingestion:                      
2014-10-15 13:09:34.506 Info: rest-ingestion:                         
2014-10-15 13:09:34.506 Info: rest-ingestion:                      
2014-10-15 13:09:34.506 Info: rest-ingestion:                      
2014-10-15 13:09:34.506 Info: rest-ingestion:                   
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                England and Wales
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:             REPO-GMR-20002010-09-234076
2014-10-15 13:09:34.506 Info: rest-ingestion:          4076
2014-10-15 13:09:34.506 Info: rest-ingestion:          REPO-GMR-2000
2014-10-15 13:09:34.506 Info: rest-ingestion:          2010-09-22
2014-10-15 13:09:34.506 Info: rest-ingestion:          BAU
2014-10-15 13:09:34.506 Info: rest-ingestion:          1-44
2014-10-15 13:09:34.506 Info: rest-ingestion:       
2014-10-15 13:09:34.506 Info: rest-ingestion:       
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                   Euro
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:             Same daySame day
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                   Yes
2014-10-15 13:09:34.506 Info: rest-ingestion:                   STAR FINANCIAL SERVICES LTD.
2014-10-15 13:09:34.506 Info: rest-ingestion:                   New York
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                   No
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                   Failure to Deliver Securities
2014-10-15 13:09:34.506 Info: rest-ingestion:                   Standard
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:          
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                Not applicable
2014-10-15 13:09:34.506 Info: rest-ingestion:                Not applicable
2014-10-15 13:09:34.506 Info: rest-ingestion:                Not applicable
2014-10-15 13:09:34.506 Info: rest-ingestion:                Standard
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                   
2014-10-15 13:09:34.506 Info: rest-ingestion:                      MAKEMAKE BANK, N.A.
2014-10-15 13:09:34.506 Info: rest-ingestion:                      Active
2014-10-15 13:09:34.506 Info: rest-ingestion:                      
2014-10-15 13:09:34.506 Info: rest-ingestion:                         
2014-10-15 13:09:34.506 Info: rest-ingestion:                      
2014-10-15 13:09:34.506 Info: rest-ingestion:                      
2014-10-15 13:09:34.506 Info: rest-ingestion:                   
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:                   
2014-10-15 13:09:34.506 Info: rest-ingestion:                      ABC INC.
2014-10-15 13:09:34.506 Info: rest-ingestion:                      Active
2014-10-15 13:09:34.506 Info: rest-ingestion:                      
2014-10-15 13:09:34.506 Info: rest-ingestion:                         
2014-10-15 13:09:34.506 Info: rest-ingestion:                      
2014-10-15 13:09:34.506 Info: rest-ingestion:                      
2014-10-15 13:09:34.506 Info: rest-ingestion:                   
2014-10-15 13:09:34.506 Info: rest-ingestion:                
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:                England and Wales
2014-10-15 13:09:34.506 Info: rest-ingestion:             
2014-10-15 13:09:34.506 Info: rest-ingestion:             REPO-GMR-20002010-09-234076

Gmane