Pierrick Brihaye | 1 Mar 2008 09:20
Picon
Favicon

Re: how to upgrade to version 1.2

Hi,

mzha a écrit :

> I don't know what ist the best way to upgrade my database from version 1.1
> to 1.2. Any suggestion is welcome.

backup then restore

Cheers,

p.b.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
bryan rasmussen | 1 Mar 2008 12:04
Picon
Gravatar

mime types not getting updated

Hi,

I'm running Exist from the location G:\Demos\Geo\bin, G being an usb
drive. I'm trying to add kml files in as a mime type, as per the
following fragment:
 <mime-type name="application/vnd.google-earth.kml+xml" type="xml">
<description>Google Maps Styling format</description>
<extensions>.kml</extensions>
</mime-type>

Without any affect. According to Startup Jetty loads the mime table
from G:\Demos\Geo\mime-types.xml which is the xml document I edited.
however when I try to put any kml file in I got back the error warning
that the mime types defined in //org/exist/util/mime-types.xml didn't
have a mapping for kml, so I added it to the file
G:\demos\GEO\src\org\exist\util\mime-types.xml

This didn't have an affect either. I have of course stopped and
started the server in between these edits.

Is there anything I need to do aside from this, I suppose there is
because it's not working to add the mime type.

It should be noted that I have multiple installations of Exist on my
machine, although none of the others are running at this time, and
this is running in a USB drive, however I have edited the other mime
types files to see if it works.

If I change the extension to XML I can add it in. I suppose this works
but then I have to make an xql page that serves the XML as mime type
(Continue reading)

Dannes Wessels | 1 Mar 2008 16:04
Picon

Re: mime types not getting updated

Hi,

On Sat, Mar 1, 2008 at 12:04 PM, bryan rasmussen
<rasmussen.bryan <at> gmail.com> wrote:
>  G:\demos\GEO\src\org\exist\util\mime-types.xml

did you recompile exist after changing this file? this document ends
up in exist.jar when the other file cannot be found. actually, i think
src\org\exist\util\mime-types.xml is a copied file.....

regards

Dannes

--

-- 
# Dannes Wessels # The Netherlands #

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Dannes Wessels | 1 Mar 2008 16:06
Picon

Re: how to upgrade to version 1.2

Hi,

On Sat, Mar 1, 2008 at 9:20 AM, Pierrick Brihaye
<pierrick.brihaye <at> free.fr> wrote:
>  backup then restore

since eXist-db has become more stricht regarding the xQuery syntax,
you might need make some little changes in your code. Typically this
is not much work and difficult.

regards

Dannes

--

-- 
# Dannes Wessels # The Netherlands #

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Fraser Goffin | 1 Mar 2008 16:31

Re: _query or _xsl support for collection results


Thanks Adam.

However, I *still* can't seem to get this to work. I created the simplest
XQuery that I could think of and stored it in the collection, but it still
doesn't return any results. Are you certain that this will work when the doc
function is referencing a collection rather than a stored XML instance ?

Note: When I point the doc function at an XML instance in the collection it
works fine.

This query :-

xquery version "1.0";
declare namespace eXist = "http://exist.sourceforge.net/NS/exist";
<result>
	{for $m in doc("/db/Numbers")/* return $m}
</result>

This is what got returned :-

<result/>

I also tried {for $m in doc("/db/Numbers")/eXist:result return $m}, but
still the same outcome ??

Any ideas what I'm doing wrong ?

Fraser.

(Continue reading)

Adam Retter | 1 Mar 2008 17:31
Picon
Favicon

Re: eXist XSLFO Module

Andrew,

You need to use xslfo:render() to generate the PDF (or whatever - determined by the second parameter).

This returns xs:base64binary, which you then need to decide what to do with, you could store it as a PDF document in the database with xmldb:store() and then give the user a html link or use response:redirect() to send them to it. Alternatively you could send the PDF direct to the web-browser using response:stream-binary().

Hope that helps...

Thanks Adam.


-----Original Message-----
From: Andrew Trese [mailto:atrese <at> gmail.com]
Sent: Sat 01/03/2008 06:41
To: Craig Goodyer; Adam Retter
Subject: eXist XSLFO Module

Craig and Adam,

The XSLFOModule that you wrote for eXist looks extremely useful, but I am
struggling to figure out which method to call to render a PDF.  I have
loaded the proper jars, read the README, searched around on the internet,
and read the java source files but still can not seem to figure out what the
function that renders the xsl-fo to an actual PDF is.

Can either of you provide an example or a snippet of code?  If you would, I
will happily put together a page on the new eXist wiki so that others can
get access to the code too!

Thanks,
Andrew

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Adam Retter | 1 Mar 2008 17:34
Picon
Favicon

Re: _query or _xsl support for collection results


Your right that wont work, instead of doc() use collection()

:-p

Cheers Adam


-----Original Message-----
From: exist-open-bounces <at> lists.sourceforge.net on behalf of Fraser Goffin
Sent: Sat 01/03/2008 15:31
To: exist-open <at> lists.sourceforge.net
Subject: Re: [Exist-open] _query or _xsl support for collection results


Thanks Adam.

However, I *still* can't seem to get this to work. I created the simplest
XQuery that I could think of and stored it in the collection, but it still
doesn't return any results. Are you certain that this will work when the doc
function is referencing a collection rather than a stored XML instance ?

Note: When I point the doc function at an XML instance in the collection it
works fine.

This query :-

xquery version "1.0";
declare namespace eXist = "http://exist.sourceforge.net/NS/exist";
<result>
        {for $m in doc("/db/Numbers")/* return $m}
</result>

This is what got returned :-

<result/>

I also tried {for $m in doc("/db/Numbers")/eXist:result return $m}, but
still the same outcome ??

Any ideas what I'm doing wrong ?

Fraser.



Adam Retter wrote:
>
> In your first example where you want to use _query - just store your query
> in the collection itself and call it directly from REST. So your
> http://localhost:8080/exist/rest/db/quotestore?_query=myXQuery.xq would
> become http://localhost:8080/exist/rest/db/quotestore/myXQuery.xql
>
> In the second example where you want to apply an XSL to a collection
> result, I think that is a valid use-case but it is not supported at the
> moment. Perhaps you could add a feature request on the SourceForge page
> for eXist - I would be happy for you to assign it to me if you like
> (deliriumsky)
>
> Thanks Adam.
>
>
> -----Original Message-----
> From: exist-open-bounces <at> lists.sourceforge.net on behalf of Fraser Goffin
> Sent: Sun 24/02/2008 13:07
> To: exist-open <at> lists.sourceforge.net
> Subject: [Exist-open]  _query or _xsl support for collection results

>
> exist version: 1.1
> primary usage model : REST
>
> Searching this archive I can see that _xsl does NOT appear to operate on a
> representation of a collection itself, for example if the resource
> requested
> returns this (for http://localhost:8080/exist/rest/db/quotestore) :-
>
> <exist:result xmlns:exist="http://exist.sourceforge.net/NS/exist">
>   <exist:collection name="/db/quotestore" owner="goffinf" group="dba"
> permissions="rwur-ur-u">
>     <exist:collection name="nba" created="2008-01-27T14:41:42.783Z"
> owner="goffinf" .... />
>     ...
>              
> Is this still the case for version 1.2 ?
>
> I wondered whether _query might be an option, but again it appears that
> the
> query does NOT operate on the collection result but on the documents
> within
> that collection. Is that correct or am I missing something ?
>
> For example I would like to return the collection as above, but transform
> it
> before it is passed to the calling client. I *could* of course do this in
> my
> restlet code, but I was hoping to do it as part of the exist request ? I
> want to do something like this, but have the XQuery or XSL operate on the
> collection results shown above :-
>
> http://localhost:8080/exist/rest/db/quotestore?_query=myXQuery.xq
>
> or
>
> http://localhost:8080/exist/rest/db/quotestore?_xsl=myXSL.xsl
>
> Thanks
>
> Fraser.
> --
> View this message in context:
> http://www.nabble.com/_query-or-_xsl-support-for-collection-results-tp15663892p15663892.html
> Sent from the exist-open mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Exist-open mailing list
> Exist-open <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/exist-open
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Exist-open mailing list
> Exist-open <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/exist-open
>
>

--
View this message in context: http://www.nabble.com/Re%3A-_query-or-_xsl-support-for-collection-results-tp15665960p15777208.html
Sent from the exist-open mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Adam Retter | 1 Mar 2008 17:39
Picon
Favicon

Re: Handling variable number of parameters.


When you say a variable number of arguments, how variable are we talking?

Is it just that these two variables (below) may of may not appear?

request:get-parameter("after_time",())
request:get-parameter("before_time",())

Thanks Adam.



-----Original Message-----
From: exist-open-bounces <at> lists.sourceforge.net on behalf of Jasen Jacobsen
Sent: Fri 29/02/2008 22:14
To: exist-open <at> lists.sourceforge.net
Subject: [Exist-open] Handling variable number of parameters.

I hope/think there is a better way to do this.

I am attempting to write an XQuery that handles a variable number of
arguments from the HTTP request parameters.

like:

let $after_time := request:get-parameter("after_time",())
let $before_time := request:get-parameter("before_time",())

Then I want to build an xpath expression like:

/db/collection('MyStuff')/event[(xs:dateTime( <at> start) >
xs:dateTime($after_time)) and (xs:dateTime( <at> start) <
xs:dateTime($before_time))]

but I want to be smart about detecting whether the $after_time and
$before_time have been provided and build the predicate appropriately.
 So if there is no $after_time parameter the xpath would look like:

/db/collection('MyStuff')/event[(xs:dateTime( <at> start) <
xs:dateTime($before_time))]

Currently, I've resorted to writing a Java extension module that
builds up the predicate string and passes it back to the XQuery
engine.  I tried building the predicate as a string within XQuery
(with my limited knowledge) and it just got ridiculously complicated.

I could do something like get ALL the <event>s and then further filter
the results one at a time, something like:

(: get all events :)
let $result := /db/collection('MyStuff')/event

(: get the before events :)
let $result :=
  if (not(empty($before_time)) then
     $result[(xs:dateTime( <at> start) < xs:dateTime($before_time))]
  else $result

But that seems a little hokey - although no more hokey than jumping
out to Java, buidling a string, passing it back, and using the result
as the predicate, I guess.  My concern with this step by step method
is that if the original set is very large, things may get a bit bogged
down.

Advice?

- Jasen.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Fraser Goffin | 1 Mar 2008 19:17

Re: _query or _xsl support for collection results


OK, using collection() *did* run successfully, but still didn't return what I
wanted. It executed against the documents within the collection, not the
collection representation itself.

Its my fault I'm just not explaining clearly enough.

What I want to return is a transformed representation of the collection
results. Exist returns this for the GET request
(http://localhost:8080/exist/rest/db/quotestore):-

<exist:result xmlns:exist="http://exist.sourceforge.net/NS/exist">
  <exist:collection name="/db/quotestore" owner="goffinf" group="dba"
permissions="rwur-ur-u">
  <exist:collection name="nba" created="2008-01-27T14:41:42.783Z"
owner="goffinf" group="dba" permissions="rwur-ur-u"/>
  <exist:collection name="rfq" created="2008-01-27T14:41:42.783Z"
owner="goffinf" group="dba" permissions="rwur-ur-u"/>
  ...
</exist:result>

and I want to return something similar, but transformed ... for example
[say] this :-

<collections>
	<collection name="nba" link="/db/quotestore/nba"/>
	<collection name="rfq" link="/db/quotestore/rfq"/>
	<collection name="ren" link="/db/quotestore/ren"/>
	<collection name="mta" link="/db/quotestore/mta"/>
</collections>

Thanks

Fraser.

Adam Retter wrote:
> 
> 
> Your right that wont work, instead of doc() use collection() 
> 
> :-p
> 
> Cheers Adam
> 
> 
> -----Original Message-----
> From: exist-open-bounces <at> lists.sourceforge.net on behalf of Fraser Goffin
> Sent: Sat 01/03/2008 15:31
> To: exist-open <at> lists.sourceforge.net
> Subject: Re: [Exist-open] _query or _xsl support for collection results
>  
> 
> Thanks Adam.
> 
> However, I *still* can't seem to get this to work. I created the simplest
> XQuery that I could think of and stored it in the collection, but it still
> doesn't return any results. Are you certain that this will work when the
> doc
> function is referencing a collection rather than a stored XML instance ?
> 
> Note: When I point the doc function at an XML instance in the collection
> it
> works fine.
> 
> This query :-
> 
> xquery version "1.0";
> declare namespace eXist = "http://exist.sourceforge.net/NS/exist";
> <result>
> 	{for $m in doc("/db/Numbers")/* return $m}
> </result>
> 
> This is what got returned :-
> 
> <result/>
> 
> I also tried {for $m in doc("/db/Numbers")/eXist:result return $m}, but
> still the same outcome ??
> 
> Any ideas what I'm doing wrong ?
> 
> Fraser.
> 
> 
> 
> Adam Retter wrote:
>> 
>> In your first example where you want to use _query - just store your
>> query
>> in the collection itself and call it directly from REST. So your
>> http://localhost:8080/exist/rest/db/quotestore?_query=myXQuery.xq would
>> become http://localhost:8080/exist/rest/db/quotestore/myXQuery.xql
>> 
>> In the second example where you want to apply an XSL to a collection
>> result, I think that is a valid use-case but it is not supported at the
>> moment. Perhaps you could add a feature request on the SourceForge page
>> for eXist - I would be happy for you to assign it to me if you like
>> (deliriumsky)
>> 
>> Thanks Adam.
>> 
>> 
>> -----Original Message-----
>> From: exist-open-bounces <at> lists.sourceforge.net on behalf of Fraser Goffin
>> Sent: Sun 24/02/2008 13:07
>> To: exist-open <at> lists.sourceforge.net
>> Subject: [Exist-open]  _query or _xsl support for collection results
>>  
>> 
>> exist version: 1.1
>> primary usage model : REST
>> 
>> Searching this archive I can see that _xsl does NOT appear to operate on
>> a
>> representation of a collection itself, for example if the resource
>> requested
>> returns this (for http://localhost:8080/exist/rest/db/quotestore) :-
>> 
>> <exist:result xmlns:exist="http://exist.sourceforge.net/NS/exist">
>>   <exist:collection name="/db/quotestore" owner="goffinf" group="dba"
>> permissions="rwur-ur-u">
>>     <exist:collection name="nba" created="2008-01-27T14:41:42.783Z"
>> owner="goffinf" .... />
>>     ...
>> 		
>> Is this still the case for version 1.2 ?
>> 
>> I wondered whether _query might be an option, but again it appears that
>> the
>> query does NOT operate on the collection result but on the documents
>> within
>> that collection. Is that correct or am I missing something ?
>> 
>> For example I would like to return the collection as above, but transform
>> it
>> before it is passed to the calling client. I *could* of course do this in
>> my
>> restlet code, but I was hoping to do it as part of the exist request ? I
>> want to do something like this, but have the XQuery or XSL operate on the
>> collection results shown above :-
>> 
>> http://localhost:8080/exist/rest/db/quotestore?_query=myXQuery.xq
>> 
>> or 
>> 
>> http://localhost:8080/exist/rest/db/quotestore?_xsl=myXSL.xsl
>> 
>> Thanks
>> 
>> Fraser.
>> -- 
>> View this message in context:
>> http://www.nabble.com/_query-or-_xsl-support-for-collection-results-tp15663892p15663892.html
>> Sent from the exist-open mailing list archive at Nabble.com.
>> 
>> 
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Exist-open mailing list
>> Exist-open <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>> 
>> 
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Exist-open mailing list
>> Exist-open <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Re%3A-_query-or-_xsl-support-for-collection-results-tp15665960p15777208.html
> Sent from the exist-open mailing list archive at Nabble.com.
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Exist-open mailing list
> Exist-open <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/exist-open
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Exist-open mailing list
> Exist-open <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/exist-open
> 
> 

--

-- 
View this message in context: http://www.nabble.com/Re%3A-_query-or-_xsl-support-for-collection-results-tp15665960p15779103.html
Sent from the exist-open mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Jasen Jacobsen | 2 Mar 2008 02:01
Picon

Re: Handling variable number of parameters.

On Sat, Mar 1, 2008 at 11:39 AM, Adam Retter <adam.retter <at> devon.gov.uk> wrote:
>
> When you say a variable number of arguments, how variable are we talking?

Arbitrariily variable? :)

The two provided are to help figure out the principles and techniques
involved.  In my actual application, I have some more variables - one
of which is a list of values.  Like if the query is for events, the
list may be event types (concert, wedding, play, etc.).

- Jasen.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Gmane