Alasdair Dougall | 30 Sep 21:24 2014
Picon

ConsoleModule in 2.1

Hi,

Can someone let me know where ConsoleModule lives?  Has it been removed?

Thanks in advance,

Alasdair
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Tonya-Marie Howe | 30 Sep 16:04 2014

Passing elements vs whole document?

Okay, I've been working on stripping things down to basics, trying to simplify, and I'm at another impasse. This is driving me crazy!

I have an .html file with these lines:

<div data-template="app:work">
                <!-- <div data-template="app:front"/> -->
                <!-- <div data-template="app:front"/>-->
                <div data-template="app:body"/>
                <!-- <div data-template="app:outline" data-template-details="yes"/>-->
</div>

app:body is this:

declare function app:body($node as node(), $model as map(*)) {
    tei2:tei2html($model("work"))
};

tei2:tei2html includes:

            case element(tei:TEI) return
                tei2:tei2html($node/*)
            case element(tei:teiHeader) return
                tei2:header($node) 
            case element(tei:front) return
                tei2:front($node)
            case element(tei:body) return 
                tei2:body($node) 

and tei2:body is as follows:

declare function tei2:body($body as element (tei:body)) {
    let $para := $body/tei:p
    
    return
        <div xmlns="http://www.w3.org/1999/xhtml" class="main-text">
            {
                for $para in $body/tei:body
                return
                     ($para/text()) 
            }
            </div>
};

Everything else (other functions in app.xql, NOT those in tei2html.xql, like those to return the teiHeader and the front) unused is commented out. First, I don't understand why this isn't returning all the text of the <p> elements in the <body>--in xpath, it does. But whatever--here's the weird. All that, above, returns the teiHeader formatted as per another function tei2:header AND tei2:front, BUT NOT tei2:body. Aaaaarrrgh! 

When I replace tei2:tei2html($model("work")) in tei2:body with tei2:tei2html($model("work")/tei:body), nothing at all returns. No error, just nothing. The source for the page shows that none of the calls in view-work fired (at least, the divs and types they are to print aren't there). 

Does anyone know what this is? I want to smoke, and I quit 10 years ago!!

-Tonya
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Ashley Kitson | 30 Sep 13:22 2014

Re: Return REST api response as JSON

Hi Christian

I guess that is what I am already doing in my code snippet - the issue with it is tacking on a query coming in on the request to doc() function.


Ashley Kitson
Lead Software Engineer - Web

T:  +44 (0)1926 659 771

A:   PO Box 4360, Warwick, CV34 9DB / 90 Long Acre, Covent Garden, London WC2E 9RZ

Please access www.first-utility.com/email_disclaimer for an important electronic communications disclaimer


On 30 September 2014 11:09, Christian Moser <christian.moser <at> theol.uzh.ch> wrote:
Dear Ashley

Try this:

xquery version "3.0";
declare namespace json="http://www.json.org";
declare option exist:serialize "method=json media-type=text/javascript";

[your XQuery here]

Then call this file via REST.

Best
Christian



On 09/30/2014 11:33 AM, Ashley Kitson wrote:

I'd like to be able to call the REST API and have the response returned as JSON to support applications that don't understand XML.  I cannot find anywhere in the docs how this can be done.

So I tried a second tack; create an xQuery to do the query and then have that set to return JSON.

----

xquery version "3.0";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request="http://exist-db.org/xquery/request";
declare option output:method "json";
declare option output:media-type "application/json";

let $query:= request:get-parameter('q', '')
let $doc:= doc('configs/oe.xml')/$query

return
<results>
   <message>{$doc}</message>
</results>

----

I am trying to tack on the query passed in via the request to the doc() function.  This doesn't work and I cannot find anything in the xQuery function reference that will allow me to get the intended effect.  I'm looking for something like 

let $doc:= doc('configs/oe.xml')
let $res = $doc.subquery($query)

Is there anything like this available.  Or more simply; How can I get the REST service to return JSON, either natively or via an xQuery.

TIA



------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk

_______________________________________________ Exist-open mailing list Exist-open <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/exist-open

-- Dr. Christian Moser Oberassistent Institut für Schweizerische Reformationsgeschichte Universität Zürich Kirchgasse 9 CH-8001 Zürich +41 (0)44 634 47 59 christian.moser <at> theol.uzh.ch www.irg.uzh.ch/personen/moser.html

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Ashley Kitson | 30 Sep 13:16 2014

Re: Return REST api response as JSON

Hi Adam

I want to be able to HTTP GET/POST them on demand, basically just like the existing REST service but returning JSON instead

Thanks


Ashley Kitson
Lead Software Engineer - Web

T:  +44 (0)1926 659 771

A:   PO Box 4360, Warwick, CV34 9DB / 90 Long Acre, Covent Garden, London WC2E 9RZ

Please access www.first-utility.com/email_disclaimer for an important electronic communications disclaimer


On 30 September 2014 11:05, Adam Retter <adam <at> exist-db.org> wrote:
Ahsley,

First question - can you store your queries into the database ahead of
time, or do you want to HTTP GET/POST them to the server on demand?

On 30 September 2014 10:33, Ashley Kitson
<ashley.kitson <at> first-utility.com> wrote:
> I'd like to be able to call the REST API and have the response returned as
> JSON to support applications that don't understand XML.  I cannot find
> anywhere in the docs how this can be done.
>
> So I tried a second tack; create an xQuery to do the query and then have
> that set to return JSON.
>
> ----
>
> xquery version "3.0";
> declare namespace output =
> "http://www.w3.org/2010/xslt-xquery-serialization";
> declare namespace request="http://exist-db.org/xquery/request";
> declare option output:method "json";
> declare option output:media-type "application/json";
>
> let $query:= request:get-parameter('q', '')
> let $doc:= doc('configs/oe.xml')/$query
>
> return
> <results>
>    <message>{$doc}</message>
> </results>
>
> ----
>
> I am trying to tack on the query passed in via the request to the doc()
> function.  This doesn't work and I cannot find anything in the xQuery
> function reference that will allow me to get the intended effect.  I'm
> looking for something like
>
> let $doc:= doc('configs/oe.xml')
> let $res = $doc.subquery($query)
>
> Is there anything like this available.  Or more simply; How can I get the
> REST service to return JSON, either natively or via an xQuery.
>
> TIA
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Exist-open mailing list
> Exist-open <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



--
Adam Retter

eXist Developer
{ United Kingdom }
adam <at> exist-db.org
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
W.S. Hager | 30 Sep 12:50 2014
Picon

Catalog option for Saxon

Hi,

Could anyone tell me how to force Saxon to use a catalog file from eXist?

Thanks.

--

W.S. Hager
Lagua Web Solutions
http://lagua.nl

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Dannes Wessels | 30 Sep 12:32 2014

Help needed to test service wrapper on Windows

Hi,

Recently I have upgraded the Java service wrapper for eXist-db 2.2 (after RC2);
At this moment I am not entirely sure the update actualy works on Windows (e.g windows 7 64 bit).

My request:
please could someone from the community have a look if it works (at all?)

regards

Dannes

--
eXist-db Native XML Database - http://exist-db.org
Join us on linked-in: http://www.linkedin.com/groups?gid=35624
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Ashley Kitson | 30 Sep 11:33 2014

Return REST api response as JSON

I'd like to be able to call the REST API and have the response returned as JSON to support applications that don't understand XML.  I cannot find anywhere in the docs how this can be done.

So I tried a second tack; create an xQuery to do the query and then have that set to return JSON.

----

xquery version "3.0";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request="http://exist-db.org/xquery/request";
declare option output:method "json";
declare option output:media-type "application/json";

let $query:= request:get-parameter('q', '')
let $doc:= doc('configs/oe.xml')/$query

return
<results>
   <message>{$doc}</message>
</results>

----

I am trying to tack on the query passed in via the request to the doc() function.  This doesn't work and I cannot find anything in the xQuery function reference that will allow me to get the intended effect.  I'm looking for something like 

let $doc:= doc('configs/oe.xml')
let $res = $doc.subquery($query)

Is there anything like this available.  Or more simply; How can I get the REST service to return JSON, either natively or via an xQuery.

TIA

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Nick Sincaglia | 29 Sep 19:24 2014

betterFORM using instance src to a Xquery file

I have been experiencing an issue where I am declaring an instance where I am using the src attribute to point to an Xquery file.

<xf:instance id="code-tables" src="all-codes.xq”/>

My Xquery file simply retrieves several static XML files. It looks a little like this

let $x := true()
return
<code-tables>
{doc('xmldb:exist://db/apps/betterform/demo/staticfile1.xml’)}
{doc('xmldb:exist://db/apps/betterform/demo/staticfile2.xml’)}
</code-tables>

When I try to render my Xform, it gives me the error: "xforms-link-exception: uri resolution failed for 'all-codes.xq' at Instance id: 'code-tables’”

However, if I define my instance such that I am linking to an XML file, like this:

<xf:instance id="code-tables" src="all-codes.xml”/>

It works fine.

Is it possible to reference XQuery scripts using the src attribute? If so, are there any settings that I may have set incorrectly?

Nick





------------------------------------------------------------------------------
Slashdot TV.  Videos for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Christian Moser | 29 Sep 11:06 2014
Picon

JSON Serialization

Dear all,

I have to feed a Bloodhound/Typeahead.js script with JSON.
With exist:serialize "method=json media-type=text/javascript" the output of

<root>
{for $n in $m
     return
<element><v>{$n}</v><k>{$n/ <at> id}</k></element>
}
</root>

is something like

{ "element" : [{ "v" : "value1",  "k" : "key1" }, ... , { "v" : 
"value100",  "k" : "key100" } ] }

What I need is just

[{ "v" : "value1",  "k" : "key1" }, ... , { "v" : "value100",  "k" : 
"key100" } ]

I wondered whether there is an easy way to output just the array?

Many thanks in advance
Christian

------------------------------------------------------------------------------
Slashdot TV.  Videos for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
W.S. Hager | 26 Sep 17:12 2014
Picon

exclusive not equal?

Hi,

Why is

$x/*[not(name() = ('title','lastname'))]

not the same as

$x/*[name() != ('title','lastname')]

?

Thanks.

--

W.S. Hager
Lagua Web Solutions
http://lagua.nl

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Tyagi, Devesh | 26 Sep 12:42 2014

configuring stemming in existDB

​Hi,


I am using version 2.1 of existDB to store XML data of my application. We want to implement stemming for our search operations. I have tried to enable stemming by configuring the conf.xml in the package and in collection.xconf of individual collections, but to no avail. Can anyone please point me out in the right direction as how to configure stemming in existDB 2.1.


Thanks in advance.


Regards,

Devesh Tyagi

Software engineer

Innodata

"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."
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open

Gmane