Re Message 1 (below):

Thanks John, that will be the explanation :=)

regards
-Tony

Message: 1
Date: Wed, 12 Jul 2017 19:07:43 +0000
From: John Snelson <john.snel...@marklogic.com>
Subject: Re: [MarkLogic Dev General] MarkLogic sem:store issue?
To: "general@developer.marklogic.com"
        <general@developer.marklogic.com>
Message-ID: <6ed26b67-1f1a-14af-b1b9-0ada44efa...@marklogic.com>
Content-Type: text/plain; charset="windows-1252"

The TransitiveProperty.rules rule is looking for a triple in your ontology
of the form:

?p a owl:TransitiveProperty .

Are you sure that the cts:query you pass in matches the document that
contains these ontological triples? If not, the rule won't get triggered.

John

On 11/07/2017 20:08, Tony Greaves wrote:
hi
I am experimenting with a SPARQL query, embedded in XQuery and using the
sem:ruleset-store functionality. The query specifies a custom ruleset in
addition to the standard "TransitiveProperty.rules" as follows:

#1:
let $rdf-store := sem:ruleset-store(("/lims/rulesets/derivedFrom.rules",
"TransitiveProperty.rules"),sem:store((), cts:or-query(($q1,$q2))) )

#2:
let $rdf-store := sem:ruleset-store(("/lims/rulesets/derivedFrom.rules",
"TransitiveProperty.rules"),sem:store() )

In the first version, the sem:store contains triples selected via a
cts:query construct; the second version the sem:store specifies the entire
default graph. In terms of data, the underlying RDF is such that #1 is a
subset of #2.

When the SPARQL/XQuery is executed, the results generated from the two
different sem:ruleset-store versions are identical, except that only #2
includes the effect of applying the TransitiveProperty.rules ruleset. In
the case of #1 above, "TransitiveProperty.rules" seems not to be being
applied; remove this ruleset from #2 and the two sem:ruleset-store
functions produce identical results.

An explanation for this would be really helpful.

regards
-Tony

On 13 July 2017 at 10:35, <general-requ...@developer.marklogic.com> wrote:

> Send General mailing list submissions to
>         general@developer.marklogic.com
>
> 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-requ...@developer.marklogic.com
>
> You can reach the person managing the list at
>         general-ow...@developer.marklogic.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of General digest..."
>
>
> Today's Topics:
>
>    1. Re: MarkLogic sem:store issue? (John Snelson)
>    2. Re: Convert output to PDF or Excel (Kari Cowan)
>    3. Re: Convert output to PDF or Excel (Justin Makeig)
>    4. Re: Convert output to PDF or Excel (Kari Cowan)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 12 Jul 2017 19:07:43 +0000
> From: John Snelson <john.snel...@marklogic.com>
> Subject: Re: [MarkLogic Dev General] MarkLogic sem:store issue?
> To: "general@developer.marklogic.com"
>         <general@developer.marklogic.com>
> Message-ID: <6ed26b67-1f1a-14af-b1b9-0ada44efa...@marklogic.com>
> Content-Type: text/plain; charset="windows-1252"
>
> The TransitiveProperty.rules rule is looking for a triple in your ontology
> of the form:
>
> ?p a owl:TransitiveProperty .
>
> Are you sure that the cts:query you pass in matches the document that
> contains these ontological triples? If not, the rule won't get triggered.
>
> John
>
> On 11/07/2017 20:08, Tony Greaves wrote:
> hi
> I am experimenting with a SPARQL query, embedded in XQuery and using the
> sem:ruleset-store functionality. The query specifies a custom ruleset in
> addition to the standard "TransitiveProperty.rules" as follows:
>
> #1:
> let $rdf-store := sem:ruleset-store(("/lims/rulesets/derivedFrom.rules",
> "TransitiveProperty.rules"),sem:store((), cts:or-query(($q1,$q2))) )
>
> #2:
> let $rdf-store := sem:ruleset-store(("/lims/rulesets/derivedFrom.rules",
> "TransitiveProperty.rules"),sem:store() )
>
> In the first version, the sem:store contains triples selected via a
> cts:query construct; the second version the sem:store specifies the entire
> default graph. In terms of data, the underlying RDF is such that #1 is a
> subset of #2.
>
> When the SPARQL/XQuery is executed, the results generated from the two
> different sem:ruleset-store versions are identical, except that only #2
> includes the effect of applying the TransitiveProperty.rules ruleset. In
> the case of #1 above, "TransitiveProperty.rules" seems not to be being
> applied; remove this ruleset from #2 and the two sem:ruleset-store
> functions produce identical results.
>
> An explanation for this would be really helpful.
>
> regards
> -Tony
>
>
>
>
>
> Attention:
>
> The information in this email and in any attachments is confidential. If
> you are not the intended recipient then please do not distribute, copy or
> use this information. Please notify us immediately and then delete the
> message from your computer. Any views or opinions presented are solely
> those of the author.
>
>
>
> _______________________________________________
> General mailing list
> General@developer.marklogic.com<mailto:General@developer.marklogic.com>
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
>
>
> --
> John Snelson, Principal Engineer              http://twitter.com/jpcs
> MarkLogic Corporation                         http://www.marklogic.com
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://developer.marklogic.com/pipermail/general/
> attachments/20170712/470ecb9e/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Wed, 12 Jul 2017 15:16:57 -0700
> From: Kari Cowan <kco...@alm.com>
> Subject: Re: [MarkLogic Dev General] Convert output to PDF or Excel
> To: MarkLogic Developer Discussion <general@developer.marklogic.com>
> Message-ID:
>         <CAM_m21DP3r-6Y1DW1c5Oz_mfeqN4+=jeK+tFDMP4HipDf=D0Qw@
> mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Do you have an example with a bit more detail  Would you do it in xQuery or
> would it need to be set in xcc/java response?
>
> xdmp:set-response-content-type("application/pdf")
> xdmp:set-response-content-type("application/vnd.ms-excel")
>
> On Mon, Jun 26, 2017 at 10:14 PM, VISHNU SINGH <svishnu.sin...@gmail.com>
> wrote:
>
> > We can use xdmp function as below:-
> >   xdmp:set-response-content-type("application/vnd.ms-excel")
> >
> > On 24 June 2017 at 01:42, Kari Cowan <kco...@alm.com> wrote:
> >
> >>
> >> Is there any function to convert an xqy query response to a PDF or Excel
> >> file?
> >>
> >> _______________________________________________
> >> General mailing list
> >> General@developer.marklogic.com
> >> Manage your subscription at:
> >> http://developer.marklogic.com/mailman/listinfo/general
> >>
> >>
> >
> >
> > --
> > Vishnu Singh | http://marklogicgd.blogspot.in/
> >
> > _______________________________________________
> > General mailing list
> > General@developer.marklogic.com
> > Manage your subscription at:
> > http://developer.marklogic.com/mailman/listinfo/general
> >
> >
>
>
> --
>
> Kari Cowan :: Web Developer :: ALM Media
>
> 1035 Market St. Suite 550, San Francisco, CA 94103
>
> iPhone/Text/FaceTime: +1 4157 444 762
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://developer.marklogic.com/pipermail/general/
> attachments/20170712/e24d22ce/attachment-0001.html
>
> ------------------------------
>
> Message: 3
> Date: Wed, 12 Jul 2017 22:24:12 +0000
> From: Justin Makeig <justin.mak...@marklogic.com>
> Subject: Re: [MarkLogic Dev General] Convert output to PDF or Excel
> To: MarkLogic Developer Discussion <general@developer.marklogic.com>
> Message-ID: <6ee0278b-ba7f-43cf-a3c5-1f82ae0c2...@marklogic.com>
> Content-Type: text/plain; charset="us-ascii"
>
> > xdmp:set-response-content-type("application/pdf")
>
>
> That only sets the Content-Type HTTP header. You'll still need to prepare
> the response body, i.e. the Excel or PDF itself. I wouldn't recommend
> trying to do that in XQuery. There are many libraries in Java, Node,
> Python, etc. that can take XML and turn it into one of those binary formats.
>
> Justin
>
> --
> Justin Makeig
> Director, Product Management
> MarkLogic
> jmak...@marklogic.com
>
> > On Jul 12, 2017, at 3:16 PM, Kari Cowan <kco...@alm.com> wrote:
> >
> > Do you have an example with a bit more detail  Would you do it in xQuery
> or would it need to be set in xcc/java response?
> >
> > xdmp:set-response-content-type("application/pdf")
> > xdmp:set-response-content-type("application/vnd.ms-excel")
> >
> > On Mon, Jun 26, 2017 at 10:14 PM, VISHNU SINGH <svishnu.sin...@gmail.com>
> wrote:
> > We can use xdmp function as below:-
> >   xdmp:set-response-content-type("application/vnd.ms-excel")
> >
> > On 24 June 2017 at 01:42, Kari Cowan <kco...@alm.com> wrote:
> >
> > Is there any function to convert an xqy query response to a PDF or Excel
> file?
> >
> > _______________________________________________
> > General mailing list
> > General@developer.marklogic.com
> > Manage your subscription at:
> > http://developer.marklogic.com/mailman/listinfo/general
> >
> >
> >
> >
> > --
> > Vishnu Singh | http://marklogicgd.blogspot.in/
> >
> > _______________________________________________
> > General mailing list
> > General@developer.marklogic.com
> > Manage your subscription at:
> > http://developer.marklogic.com/mailman/listinfo/general
> >
> >
> >
> >
> > --
> > Kari Cowan :: Web Developer :: ALM Media
> > 1035 Market St. Suite 550, San Francisco, CA 94103
> > iPhone/Text/FaceTime: +1 4157 444 762
> > _______________________________________________
> > General mailing list
> > General@developer.marklogic.com
> > Manage your subscription at:
> > http://developer.marklogic.com/mailman/listinfo/general
>
>
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 12 Jul 2017 15:35:24 -0700
> From: Kari Cowan <kco...@alm.com>
> Subject: Re: [MarkLogic Dev General] Convert output to PDF or Excel
> To: MarkLogic Developer Discussion <general@developer.marklogic.com>
> Message-ID:
>         <CAM_m21CJzmQ08JKOZcQYUT0u3w4dF3ORMfCOZLXv-dfktrsc0Q@mail.gmail.
> com>
> Content-Type: text/plain; charset="utf-8"
>
> Ahh, ok that makes sense.  I started to look for those then hoped there
> might be some trickery in ML that would do it quicker/easier.  Thanks.
>
> On Wed, Jul 12, 2017 at 3:24 PM, Justin Makeig <
> justin.mak...@marklogic.com>
> wrote:
>
> > > xdmp:set-response-content-type("application/pdf")
> >
> >
> > That only sets the Content-Type HTTP header. You'll still need to prepare
> > the response body, i.e. the Excel or PDF itself. I wouldn't recommend
> > trying to do that in XQuery. There are many libraries in Java, Node,
> > Python, etc. that can take XML and turn it into one of those binary
> formats.
> >
> > Justin
> >
> > --
> > Justin Makeig
> > Director, Product Management
> > MarkLogic
> > jmak...@marklogic.com
> >
> > > On Jul 12, 2017, at 3:16 PM, Kari Cowan <kco...@alm.com> wrote:
> > >
> > > Do you have an example with a bit more detail  Would you do it in
> xQuery
> > or would it need to be set in xcc/java response?
> > >
> > > xdmp:set-response-content-type("application/pdf")
> > > xdmp:set-response-content-type("application/vnd.ms-excel")
> > >
> > > On Mon, Jun 26, 2017 at 10:14 PM, VISHNU SINGH <
> svishnu.sin...@gmail.com>
> > wrote:
> > > We can use xdmp function as below:-
> > >   xdmp:set-response-content-type("application/vnd.ms-excel")
> > >
> > > On 24 June 2017 at 01:42, Kari Cowan <kco...@alm.com> wrote:
> > >
> > > Is there any function to convert an xqy query response to a PDF or
> Excel
> > file?
> > >
> > > _______________________________________________
> > > General mailing list
> > > General@developer.marklogic.com
> > > Manage your subscription at:
> > > http://developer.marklogic.com/mailman/listinfo/general
> > >
> > >
> > >
> > >
> > > --
> > > Vishnu Singh | http://marklogicgd.blogspot.in/
> > >
> > > _______________________________________________
> > > General mailing list
> > > General@developer.marklogic.com
> > > Manage your subscription at:
> > > http://developer.marklogic.com/mailman/listinfo/general
> > >
> > >
> > >
> > >
> > > --
> > > Kari Cowan :: Web Developer :: ALM Media
> > > 1035 Market St. Suite 550, San Francisco, CA 94103
> > > iPhone/Text/FaceTime: +1 4157 444 762
> > > _______________________________________________
> > > General mailing list
> > > General@developer.marklogic.com
> > > Manage your subscription at:
> > > http://developer.marklogic.com/mailman/listinfo/general
> >
> >
> >
> >
> > _______________________________________________
> > General mailing list
> > General@developer.marklogic.com
> > Manage your subscription at:
> > http://developer.marklogic.com/mailman/listinfo/general
> >
>
>
>
> --
>
> Kari Cowan :: Web Developer :: ALM Media
>
> 1035 Market St. Suite 550, San Francisco, CA 94103
>
> iPhone/Text/FaceTime: +1 4157 444 762
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://developer.marklogic.com/pipermail/general/
> attachments/20170712/fea1e072/attachment.html
>
> ------------------------------
>
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
> End of General Digest, Vol 157, Issue 14
> ****************************************
>

-- 


Attention:

The information in this email and in any attachments is confidential. If 
you are not the intended recipient then please do not distribute, copy or 
use this information. Please notify us immediately and then delete the 
message from your computer. Any views or opinions presented are solely 
those of the author.
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to