Martin Holmes | 1 Jan 2010 05:07
Picon
Picon
Favicon

Re: Happy 2010

for $p in collection('exist/users/')//person
	return <greetings>Happy New Year {$p/name}!</greeting>

Cheers,
Martin

Dmitriy Shabanov wrote:
> Happy new year eXist !!!
> 
> -- 
> Dmitriy Shabanov
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Exist-open mailing list
> Exist-open <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/exist-open

(Continue reading)

Wolfgang Meier | 1 Jan 2010 15:17
Gravatar

Re: eXist db - Production use -reg

Hi,

>  I need to know about the Scalability issues of the eXsit db .. Because we
> are going to use exist db as a production server .. Is it possible for the
> heavy load in this exist db ...

To get a useful answer, you probably have to provide some more
information, e.g. about the number of documents you plan to store,
their size and structure, or how often the db is going to be updated
and how the typical update will be processed (important!).

Performance depends on many factors, including the way you write your
queries and the indexes you define (see
http://www.exist-db.org/tuning.html). Under high load, a slow query -
which still performed ok in a low traffic situation - can become a
bottleneck and start blocking the db. It is thus important to properly
test your queries.

Wolfgang

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
(Continue reading)

Phillip Roe | 1 Jan 2010 17:14
Picon

Re: Happy 2010

Happy New Year all!  Thank you for the good work done!
> Happy new year!
>
> On 31 Dec 2009, at 15:25 , Dmitriy Shabanov wrote:
>
>> Happy new year eXist !!!
>
> Kind regards
>
> Dannes
>
> --
> eXist-db Native XML Database - http://exist-db.org
> Join us on linked-in: http://www.linkedin.com/groups?gid=35624
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and
> easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
(Continue reading)

James Fuller | 2 Jan 2010 09:08
Picon
Gravatar

Re: xprocxq extension step for easy integration with xsltforms

I have integrated ext:xsltforms extension step as per your definition:

    <p:declare-step type="ext:xsltforms" xproc:support="true">
           <p:input port="source" sequence="true" primary="true" select="/"/>
           <p:output port="result" primary="true" select="/"/>
           <p:option name="xsltformsURI"/>
           <p:option name="debug"/>
    </p:declare-step>

though this definition implies that you want to pass in an option with
the value of xsltforms uri but the example seemed to supply the xforms
via 'source' input. I have implemented as per the later. Note that
options have always worked as expected in this scenario.

I think there may exist better ways to achieve what u want  but added
it now for convenience.

Jim Fuller

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
James Fuller | 2 Jan 2010 09:36
Picon
Gravatar

added context to p:xquery

I have added current context to p:xquery as it seems that is the most
natural thing most people want, e.g. to inherit current context so
things like request:get-parameter-names works, etc

so now, the following pipeline which uses a p:xquery

<p:pipeline xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:xproc="http://xproc.net/xproc" name="aaa">
   <p:input port="source"/>
    <p:output port="result"/>
    <p:xquery>
        <p:input port="source"/>
        <p:input port="query">
            <p:inline>
                <c:query xproc:escape="true">
					let $a := <test>{request:get-parameter-names()}</test>
					return
						$a
               </c:query>
            </p:inline>
        </p:input>
    </p:xquery>
</p:pipeline>

note that I have added an xproc:escape to c:query element so u dont
have to escape any xml inside of the xquery

if this xproc was loaded into the database and called thusly

(Continue reading)

claud108 | 2 Jan 2010 10:44
Picon
Favicon

Re: xprocxq extension step for useing the HTTP POST data


Update to use post data sent by using xml-urlencoded-post specific to
XSLTForms:

Update of ext.xqm:
(:
--------------------------------------------------------------------------
:)
declare function ext:getPostData($primary,$secondary,$options){
(:
--------------------------------------------------------------------------
:)
util:declare-namespace('request',xs:anyURI('http://exist-db.org/xquery/request')),
if (request:get-header('Content-Type') =
'application/x-www-form-urlencoded')
		then
			(
			util:parse(request:get-parameter('postdata', ''))
			)
		else (request:get-data())
};

N.B. There is no need of separate declaration for request namespace, at the
beginning of file, so that should be removed.

Update of pipeline-extension.xml:
    <p:declare-step type="ext:getPostData" xproc:support="false">
	    <p:output port="result" primary="true" select="/"/>
    </p:declare-step>

(Continue reading)

claud108 | 2 Jan 2010 10:47
Picon
Favicon

Re: xprocxq extension step for useing the HTTP POST data


The previous example of usage was stupid.

Good example of usage:
<?xml version="1.0" encoding="UTF-8"?>
<p:pipeline xmlns:p="http://www.w3.org/ns/xproc"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ext="http://xproc.net/xproc/ext"
xmlns:h="http://www.w3.org/1999/xhtml" name="formarePaginaConectare">
    <ext:getPostData name="preluarePostData"/>
    <p:identity name="preluarePaginaConectareStandard">
        <p:input port="source">
                  <p:pipe step="preluarePostData" port="result"/>
        </p:input>
    </p:identity>
</p:pipeline>
--

-- 
View this message in context: http://old.nabble.com/xprocxq-extension-step-for-useing-the-HTTP-POST-data-tp26980356p26991647.html
Sent from the exist-open mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
James Fuller | 2 Jan 2010 12:20
Picon
Gravatar

Re: xprocxq extension step for useing the HTTP POST data

I think that u could use p:declare-step and create your own step now

using something like

<p:pipeline xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:mine="http://www.example.org/mine"
xmlns:xproc="http://xproc.net/xproc" name="pipeline">
    <p:declare-step type="mine:teststep">
        <p:output port="result" primary="true"/>
        <p:xquery>
            <p:input port="source"/>
            <p:input port="query">
                <p:inline>
                    <c:query xproc:escape="true">
		if (request:get-header('Content-Type') eq 'application/x-www-form-urlencoded')
               then
                   util:parse(request:get-parameter('postdata', ''))
               else
					request:get-data()
                    </c:query>
                </p:inline>
            </p:input>
        </p:xquery>
    </p:declare-step>
    <mine:teststep name="gggg"/>
</p:pipeline>

untested

(Continue reading)

Dannes Wessels | 2 Jan 2010 15:32

Re: request:get-data failing

Hi,

On Thu, Dec 31, 2009 at 2:06 AM, Jacob Myers <jacob.myers <at> gmail.com> wrote:
The problem is the data section at the end is completely empty. This is true of anything passed via GET or a POST from a test HTML form locally. This section is basically just the output from request:get-data().
 
this is the documentation of the function: http://demo.exist-db.org/exist/functions/request/get-data

the function can only be used in an POST operation.....


Unless I have misunderstood something somewhere I should be able to access this just fine. I tried request:get-parameter and it works fine, but I need to post XML fragments and documents through this in some cases so that approach isn't a viable option.

The get-parameters() functions either gets (=parses and splits) the parameters either from the URL or from the www-urlencoded POST body...

please could you post the relevant part of the HTML form so we could check the behaviour?

regards

Dannes


--
eXist-db Native XML Database - http://exist-db.org
Join us on linked-in: http://www.linkedin.com/groups?gid=35624
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
claud108 | 2 Jan 2010 18:33
Picon
Favicon

Re: xprocxq extension step for easy integration with xsltforms


GENERALIZATION of XSLTForms extension step

I generalized this extension step so that one can enter a xsl stylesheet
that will be applied in browser.

A. Modifications of ext.xqm:
1. Delete 'declare option exist:serialize "method=xhtml media-type=text/html
process-xsl-pi=no";'.
2. Replace declare variable $ext:xsltforms :=
util:function(xs:QName("ext:xsltforms"), 3);
with declare variable $ext:clientXSLT :=
util:function(xs:QName("ext:clientXSLT"), 3);
3. Replace definition of xsltforms function with this one
(:
--------------------------------------------------------------------------
:)
declare function ext:clientXSLT($primary,$secondary,$options){
(:
--------------------------------------------------------------------------
:)
let $xslURI := xs:string(data($options/p:with-option[ <at> name =
'xslURI']/ <at> select))
return
	(
	processing-instruction {'xml-stylesheet'} {concat('href="',  $xslURI, '"
type="text/xsl"')},
	document{u:get-primary($primary)}
	)
};

B. Modification of pipeline-extension.xml:
1. Replace definition of xsltforms extension step with the following
definition:\
    <p:declare-step type="ext:clientXSLT" xproc:support="true">
	    <p:input port="source" sequence="true" primary="true" select="/"/>
	    <p:output port="result" primary="true" select="/"/>
	    <p:option name="xslURI" required="true"/>
    </p:declare-step>

C. Example of usage:
    <ext:clientXSLT>
	    <p:input port="source">
		    <p:pipe step="preluarePaginaConectareStandard" port="result"/>
	    </p:input>
	    <p:with-option name="xslURI"
select="/exist/rest//db/xsltforms/xsltforms.xsl"/>
    </ext:clientXSLT>

This is all.

Jim, thank you very much for your support and patience. By looking into
xprocxq.jar file, I understood that implementing xproc in xquery is a
brililant idea, indeed.

Claudius Teodorescu

--

-- 
View this message in context: http://old.nabble.com/xprocxq-extension-step-for-easy-integration-with-xsltforms-tp26973039p26994880.html
Sent from the exist-open mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 

Gmane