W.S. Hager | 18 Dec 21:07 2014
Picon

Ghost collection after faulty deployment

Hi,

After unsuccessfully deploying an app package, I can't seem to add or remove the collection the deployment did not create. eXist says:

ERROR failed to create new collection rst-test: Collection /db/apps/rst-test not found

How can I repair this?

Thanks.
Wouter


--

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

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Gioele Barabucci | 18 Dec 11:04 2014
Picon

Different results between eXide and REST interface

Hello,

I have found out that eXist (version 2.2) may return the wrong number of 
results depending on which interface is used to make a query. Before 
filing a bug I would like to make sure that there are no mistakes in 
what I have been doing.

The following REST query will return (sometimes) no results:

     <query xmlns="http://exist.sourceforge.net/NS/exist"
             xmlns:tei='http://www.tei-c.org/ns/1.0' max='999999'>
         <text>/tei:TEI/tei:text/tei:body//*[self::tei:entry or 
self::tei:re][./tei:sense//text()[(normalize-space() = 'TEXT') or 
contains(., ' TEXT ')][ancestor-or-self::*[ <at> xml:lang][1][ <at> xml:lang = 
"en"]]]</text>
     </query>

while the following xquery evaluated inside eXide will always return the 
correct number of results:

     xquery version "3.0";
     declare namespace tei="http://www.tei-c.org/ns/1.0";
     let $doc := doc("test.tei")

     return
         $doc/tei:TEI/tei:text/tei:body//*[self::tei:entry or self::tei:re]
         [./tei:sense//text()
           [(normalize-space() = 'TEXT') or contains(., ' TEXT ')]
           [ancestor-or-self::*[ <at> xml:lang][1][starts-with( <at> xml:lang, "en")]]
         ]

I wrote "sometimes" because it seems that this problem depends on the 
value of TEXT. For example, for 'whilst' both queries will return the 
correct values, while for 'placed' the REST interface will return no 
results, i.e. `<exist:result 
xmlns:exist="http://exist.sourceforge.net/NS/exist" exist:hits="0" 
exist:start="1" exist:count="0"/>`.

Is there a reason why the two querying interfaces should return 
different results?

Regards,

--
Gioele Barabucci <gioele <at> svario.it>

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Gioele Barabucci | 17 Dec 18:32 2014
Picon

Optimizing a XPath lookup

Hello,

I have a XPath query that runs very slowly on eXist (version 2.2).

     /tei:TEI/tei:text/tei:body//
         *[self::tei:entry or self::tei:re]
             [./tei:form/tei:orth
                 [ancestor-or-self::*
                     [ <at> xml:lang]
                     [1]
                     [ <at> xml:lang = "LANG"]
                  and text() = "TEXT"
                 ]
             ]

This query will use a lot of RAM (around 1 GB) and execute in minutes 
when run over a TEI corpus of about 15 MB (available on request). The 
same query run inside oXygen 16.1 requires 5 seconds to complete.

The following similar query runs much faster: only few milliseconds on 
the same corpus.

     /tei:TEI/tei:text/tei:body//
         *[self::tei:entry or self::tei:re]
             [./tei:form/tei:orth/text() = "TEXT"]

So I have two questions:

1) why is eXist slower than oXygen?
2) Could some indexes help me here, up to the point of executing the 
complex query in milliseconds as the simpler one? But which indexes?

Regards,

--
Gioele Barabucci <gioele <at> svario.it?

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
W.S. Hager | 17 Dec 00:12 2014
Picon

Collection browser + RESTXQ

Hi Adam, 

Thanks to my recent work on the collection browser, I finally got to work with and appreciate RESTXQ. I now know how to apply it to my own monstrous libs...

However, I still can't get over the inability to annotate slashes for the collection path... isn't there any way to access the full path? Couldn't the annotations use some sort of pattern matching?

I could of course do

let $id := replace($id,"/",":-(") 

;-)

Cheers,
Wouter

--

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

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&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 | 16 Dec 12:41 2014
Picon

Dynamic module - no request object

Hi,

I thought I was being smart in the department of dynamic module loading. I wanted to not use util:eval, so I made this query:

xquery version "3.0";

let $loc := xs:anyURI("/db/apps/my/modules/test.xql")

let $module := inspect:inspect-module($loc)
let $uri := xs:anyURI($module/ <at> uri)
let $prefix := $module/ <at> prefix
let $service := util:import-module($uri, $prefix, $loc)

let $functions := map:new(
    for $x in inspect:module-functions($loc) return
        map:entry(replace(function-name($x),"^" || $prefix || ":",""),$x)
)
   
return $functions("test")("param")


As you can see, I use a map to load the functions into and then call a function from it. However, in contrast to util:eval I get an error whenever I call a request function:

No request object found in the current XQuery context.

Is this a bug or is my idea flawed?

Thanks.
Wouter

--

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

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Joe Wicentowski | 16 Dec 08:13 2014
Picon

xqjson v0.2.0 released

Hi all,

I've just released a new version of xqjson.  Despite no new
functionality, with the primary change to the library being a bug fix
kindly submitted by Peter Stadler, I've bumped the version up from
0.1.6 to mark the presence of a new test suite based on eXist's
XQSuite unit testing framework
(http://exist-db.org/exist/apps/doc/xqsuite.xml), as well as some
improved examples shown on the project's landing page on GitHub -
inspired by Loren's questions earlier today.  It's available via
Dashboard > Package Manager, or directly from GitHub at:

 https://github.com/joewiz/xqjson/releases

Pull requests, issues, forks welcome at https://github.com/joewiz/xqjson.

Cheers,
Joe

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Jens Østergaard Petersen | 15 Dec 21:31 2014
Picon

O'Reilly eXist book published

Erik and Adam's book, eXist : A NoSQL Document Database and Application Platform, is finally out, <http://shop.oreilly.com/product/0636920026525.do>.

A great day for eXist-db!

Jens


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Adam Retter | 15 Dec 21:40 2014

[ANN] eXist Nightly Builds

For those who want to get there hands on the latest and greatest, I
have setup a service to provide nightly builds of the 'develop' branch
of eXist's GitHub repo to the community. The builds are in the form of
installers for all platforms.

Please be aware that these builds are not necessarily suitable for
production deployment, but use them how you will. A new build is
provided each morning at 04:00 UTC.

Enjoy -> http://static.adamretter.org.uk/exist-nightly/

Cheers Adam.

--

-- 
Adam Retter

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

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Loren Cahlander | 15 Dec 19:05 2014
Picon

json serialization



<!-- /* Font Definitions */ <at> font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} <at> font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} <at> font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} <at> font-face {font-family:Consolas; panose-1:2 11 6 9 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} code {mso-style-priority:99; font-family:"Courier New";} pre {mso-style-priority:99; mso-style-link:"HTML Preformatted Char"; margin:0in; margin-bottom:.0001pt; font-size:10.0pt; font-family:"Courier New";} p.MsoAcetate, li.MsoAcetate, div.MsoAcetate {mso-style-priority:99; mso-style-link:"Balloon Text Char"; margin:0in; margin-bottom:.0001pt; font-size:8.0pt; font-family:"Tahoma","sans-serif";} span.EmailStyle17 {mso-style-type:personal-compose; font-family:"Calibri","sans-serif"; color:windowtext;} span.BalloonTextChar {mso-style-name:"Balloon Text Char"; mso-style-priority:99; mso-style-link:"Balloon Text"; font-family:"Tahoma","sans-serif";} span.HTMLPreformattedChar {mso-style-name:"HTML Preformatted Char"; mso-style-priority:99; mso-style-link:"HTML Preformatted"; font-family:"Courier New";} span.p {mso-style-name:p;} span.nx {mso-style-name:nx;} span.o {mso-style-name:o;} span.s1 {mso-style-name:s1;} .MsoChpDefault {mso-style-type:export-only;} <at> page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} -->

I need to generate JSON in the form of:

 

[

    {

        label: 'node1',

        children: [

            { label: 'child1' },

            { label: 'child2' }

        ]

    },

    {

        label: 'node2',

        children: [

            { label: 'child3' }

        ]

    }

]

 

For the jqTree http://plugins.jquery.com/jqtree/

 

 

How do I serialize this properly?

 

Thanks,

Loren

 



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
peter winstanley | 15 Dec 12:28 2014

Re: problem with transform - possible issue with nonproxyhosts

Adam
Many thanks ... that suggestion was spot on.  The log now shows nonProxyHosts to be set correctly and my
stylesheet correctly imports the document
Cheers
Peter

> -----Original Message-----
> From: adam <at> exist-db.org
> Sent: Sat, 13 Dec 2014 19:08:22 +0000
> To: p.w <at> inbox.com
> Subject: Re: [Exist-open] problem with transform - possible issue with
> nonproxyhosts
> 
> Can you try -
> 
> wrapper.java.additional.13=-Dhttp.proxyHost=xxx.xxx.xxx.xxx
> wrapper.java.additional.14=-Dhttp.proxyPort=80
> wrapper.java.additional.15=-Dhttp.nonProxyHosts=server1|server2|server3|server4|intranet|sascluster
> 
> On 13 December 2014 at 18:52, peter winstanley <p.w <at> inbox.com> wrote:
>> Hi Adam
>> 
>> I added the logging line you wrote and the answer is:
>> 
>> NONPROXYHOSTS=''
>> 
>> So, they are not set.
>> 
>> I have exist running using the wrapper.  The non-proxy hosts are set
>> using the wrapper.conf using the following:
>> 
>> wrapper.java.additional.13=-DproxyHost=xxx.xxx.xxx.xxx
>> wrapper.java.additional.14=-DproxyPort=80
>> wrapper.java.additional.15=-DnonProxyHosts=server1|server2|server3|server4|intranet|sascluster
>> 
>> Any thoughts?
>> 
>> Many thanks
>> 
>> Peter
>> 
>>

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Alister Pillow | 15 Dec 07:14 2014
Picon

sequence in path

Hi,
I’ve tested this in 2.2 and 1.4 with the same result. 

The path expression <test><a/><b/></test>//(a,b) should return both elements. When run using an
in-memory document, the results are as expected. Saxon 9.x produces the same results as eXist for an
in-memory document.
When run using a document stored in the /db, only the first element is returned.

(: eval this in eXide :)
xquery version “1.0";

declare variable $local:doc-name := 'sequence-test-doc.xml';
declare variable $local:doc :=  <test>
                                    <a>fish</a>
                                    <b>eggs</b>
                                </test>;
declare function local:setup() {
    xmldb:store('/db',$local:doc-name,$local:doc)
};

declare function local:filter($doc) {
    $doc//(a,b)
};

let $setup := if (doc-available($local:doc-name)) then () else local:setup()
return (
    local:filter($local:doc),"-", 
    local:filter(doc($local:doc-name)))

—————
Now I’m wondering if my XPath is shonky - but that doesn’t explain why the results are different. And I
have a vague memory of seeing this before - but can’t find it in the mail archives.

Regards,
Alister.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk

Gmane