Questions about eXist XML Native DB set-up

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Questions about eXist XML Native DB set-up

joyce.wang
Hi,
I am new to Orbeon. I have couple questions about "submission" in Orbeon:
1. Can Orbeon like XForms 1.0 to save data into a XML file which can be stored in local disk space? Or only can be stored into a XML DB such as "eXist"?
2. How can I setup eXist for Orbeon? To me, there are lack of information about eXist setup. I downloaded Orbeon Forms 3.5.1 and installed on my PC. Based on online document, there should be a file called "eXist-1.0b2-build-1107" for setup the eXist DB, but I couldn't find it from the download files. Could someone help me with this?
Thanks.

Joyce



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Questions about eXist XML Native DB set-up

fl.schmitt(ops-users)
Hi Joyce,

> 1. Can Orbeon like XForms 1.0 to save data into a XML file which can
> be stored in local disk space? Or only can be stored into a XML DB
> such as "eXist"?

It's possible to save XML Files to disk using the file serializer:

http://www.orbeon.com/ops/doc/processors-serializers#file-serializer

But if you're dealing with a greater number of XML Files, the eXist
database makes it much more comfortable to access those data.

> 2. How can I setup eXist for Orbeon? To me, there are lack of
> information about eXist setup. I downloaded Orbeon Forms 3.5.1 and
> installed on my PC. Based on online document, there should be a file
> called "eXist-1.0b2-build-1107" for setup the eXist DB, but I
> couldn't find it from the download files. Could someone help me with
> this? Thanks.

I would recommend to grab the lastest package of eXist at
http://www.exist-db.org/ and deploy it either inside tomcat or
standalone. If it's up and running, there's a comfortable way to access
it as described at http://www.orbeon.com/ops/doc/processors-xmldb#exist
.

florian




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Questions about eXist XML Native DB set-up

raul.aguilar
In reply to this post by joyce.wang
you can download the latest 'exist-1.1.1-newcore.war' file from:

 http://exist.sourceforge.net/

and drop it into your <tomcat root>/webapps directory where it will self-expand in to a directory. the 'eXist-1.0b2-build-1107' file you cited is an old eXist database beta version.

though, i'm still trying to figure-out code lines to switch OPS example apps from the embedded eXist database onto the remote eXist database sitting as a Tomcat app.

Raul


joyce.wang wrote
Hi,
I am new to Orbeon. I have couple questions about "submission" in Orbeon:
1. Can Orbeon like XForms 1.0 to save data into a XML file which can be stored in local disk space? Or only can be stored into a XML DB such as "eXist"?
2. How can I setup eXist for Orbeon? To me, there are lack of information about eXist setup. I downloaded Orbeon Forms 3.5.1 and installed on my PC. Based on online document, there should be a file called "eXist-1.0b2-build-1107" for setup the eXist DB, but I couldn't find it from the download files. Could someone help me with this?
Thanks.

Joyce



--
You receive this message as a subscriber of the ops-users@objectweb.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Questions about eXist XML Native DB set-up

joyce.wang
In reply to this post by fl.schmitt(ops-users)
Thanks for your suggestion, Florian. My eXist is running now and I can
save .xml file into the eXist.
For saving .xml files in local disk space using the file serializer, do
I need to put the block of code in "view.html" or a seperate file?
Please let me know if there is a sample XForms using the file serializer
to do this.
Thanks.

Joyce

Florian Schmitt wrote:

>Hi Joyce,
>
>  
>
>>1. Can Orbeon like XForms 1.0 to save data into a XML file which can
>>be stored in local disk space? Or only can be stored into a XML DB
>>such as "eXist"?
>>    
>>
>
>It's possible to save XML Files to disk using the file serializer:
>
>http://www.orbeon.com/ops/doc/processors-serializers#file-serializer
>
>But if you're dealing with a greater number of XML Files, the eXist
>database makes it much more comfortable to access those data.
>
>  
>
>>2. How can I setup eXist for Orbeon? To me, there are lack of
>>information about eXist setup. I downloaded Orbeon Forms 3.5.1 and
>>installed on my PC. Based on online document, there should be a file
>>called "eXist-1.0b2-build-1107" for setup the eXist DB, but I
>>couldn't find it from the download files. Could someone help me with
>>this? Thanks.
>>    
>>
>
>I would recommend to grab the lastest package of eXist at
>http://www.exist-db.org/ and deploy it either inside tomcat or
>standalone. If it's up and running, there's a comfortable way to access
>it as described at http://www.orbeon.com/ops/doc/processors-xmldb#exist
>.
>
>florian
>
>
>  
>
>------------------------------------------------------------------------
>
>
>--
>You receive this message as a subscriber of the [hidden email] mailing list.
>To unsubscribe: mailto:[hidden email]
>For general help: mailto:[hidden email]?subject=help
>ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

joyce.wang.vcf (217 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Questions about eXist XML Native DB set-up

Alessandro Vernet
Administrator
On 5/10/07, Joyce Wang <[hidden email]> wrote:
> Thanks for your suggestion, Florian. My eXist is running now and I can
> save .xml file into the eXist.
> For saving .xml files in local disk space using the file serializer, do
> I need to put the block of code in "view.html" or a seperate file?
> Please let me know if there is a sample XForms using the file serializer
> to do this.

Hi Joyce,

You need a separate XPL file that calls the File serializer. Then you
call this XPL either with an xforms:submission (which means you need
to map a path to that XPL in the page-flow.xml), or with the
xxforms:call-xpl() extension function. The upside of using
xxforms:call-xpl() is that your code will be simpler. You don't need
an xforms:submission and don't need to modify the page-flow.xml. The
downside is that this is XForms extension.

If you decide to go with xxforms:call-xpl(), you can find more about
this function on:
http://www.orbeon.com/ops/doc/reference-xforms-ng#ops-extensions

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Questions about eXist XML Native DB set-up

Jimmy
..Thought I'd just continue the questioning on this thread.

How would the mapping look like in my page-flow now when I've created an xpl with the serialization configuration?


//Jimmy
Reply | Threaded
Open this post in threaded view
|

Re: Questions about eXist XML Native DB set-up

Jimmy
This post was updated on .
I am also a bit uncertain about how my submission should look. I've created an xpl-file with the following configuration:

<p:processor name="oxf:file-serializer">
    <p:input name="config">
        <config>
            <directory>/my-bookcast/</directory>
            <file>books.xml</file>
            <make-directories>false</make-directories>
            <append>true</append>
        </config>
    </p:input>
    <p:input name="data" href="#converted"/>
</p:processor>

..and placed it in a map (my-bookcast) along with my view.xml and page-flow.xml aswell as the xml-file I wish to save instance data too (books.xml).

I'm playing around with different mapping in the xpl, page-flow and my submission in the view.xml with no progress.


//Jimmy
Reply | Threaded
Open this post in threaded view
|

Re: Re: Questions about eXist XML Native DB set-up

Hank Ratzesberger-3
Hi Jimmy,

By "mapping" do you mean the page-flow.xml?

<page id="my-sub" path-info="/service/serialize"
  model="/service/serialize.xpl"/>

<page id="my-view" path-info="/myform"
  view="/myform.xhtml"/>

So your view file can trigger a submission to 
the /service/serialze the instance.

Regards,
Hank

On Wed, Jun 15, 2011 at 10:06 AM, Jimmy <[hidden email]> wrote:
I am also a bit uncertain about how my submission should look. I've created
an xpl-file with the following configuration:

<p:processor name="oxf:file-serializer">
   <p:input name="config">
       <config>
           <directory>/uppsala/</directory>
           <file>ForeslaTillRS_data.xml</file>
           <make-directories>false</make-directories>
           <append>true</append>
       </config>
   </p:input>
   <p:input name="data" href="#converted"/>
</p:processor>


..and placed it in a map (uppsala) along with my view.xml and page-flow.xml
aswell as the xml-file I wish to save instance data too
(ForeslaTillRS_data.xml).

I'm playing around with different mapping in the xpl, page-flow and my
submission in the view.xml with no progress.


//Jimmy

--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Questions-about-eXist-XML-Native-DB-set-up-tp33832p3600010.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Hank Ratzesberger
XMLWerks.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Questions about eXist XML Native DB set-up

Jimmy
Thanks for the reply, Hank.


I can't seem to get my head around this..

To simplify, I set up the "my-bookcast" example from the wiki.
I created "serialization.xpl" and placed it in /apps/my-bookcast/ along with "view.xhtml" and the "page-flow.xml".

The mapping in my page-flow.xml looks like this:
<config xmlns="http://www.orbeon.com/oxf/controller">
    <page path-info="/my-bookcast/" model="serialize.xpl" view="view.xhtml"/>
    <epilogue url="oxf:/config/epilogue.xpl"/>
</config>

and my serialization.xpl:
<p:processor name="oxf:file-serializer">
    <p:input name="config">
        <config>
            <directory>/my-bookcast/</directory>
            <file>books.xml</file>
            <make-directories>false</make-directories>
            <append>true</append>
        </config>
    </p:input>
    <p:input name="data" href="#converted"/>
</p:processor>

Now, how should my submission look like in my view.xhtml?
Is the mapping and configuration correct in the page-flow and the serializer?
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Questions about eXist XML Native DB set-up

Hank Ratzesberger-3
Hi Jimmy,

So, I would recommend trying a separate path to serialize.

(my unchecked edits  below...)

On Thu, Jun 16, 2011 at 7:02 AM, Jimmy <[hidden email]> wrote:
Thanks for the reply, Hank.


I can't seem to get my head around this..

To simplify, I set up the "my-bookcast" example from the wiki.
I created "serialization.xpl" and placed it in /apps/my-bookcast/ along with
"view.xhtml" and the "page-flow.xml".

The mapping in my page-flow.xml looks like this:
 
<config xmlns="http://www.orbeon.com/oxf/controller">
   <page path-info="/my-bookcast/" view="view.xhtml"/>
      <!-- service to specific to serialize -->
      <page path-ifno="/my-bookcast/serialize" model="serialize.xpl"
   <epilogue url="oxf:/config/epilogue.xpl"/>
</config>

And in view.xhtml, your submission action would be "/my-bookcast/serialize"

Are you getting an exception or http error?

Cheers,
Hank
 


and my serialization.xpl:
<p:processor name="oxf:file-serializer">
   <p:input name="config">
       <config>
           <directory>/my-bookcast/</directory>
           <file>books.xml</file>
           <make-directories>false</make-directories>
           <append>true</append>
       </config>
   </p:input>
   <p:input name="data" href="#converted"/>
</p:processor>


Now, how should my submission look like in my view.xhtml?
Is the mapping and configuration correct in the page-flow and the
serializer?

--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Questions-about-eXist-XML-Native-DB-set-up-tp33832p3602567.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Hank Ratzesberger
XMLWerks.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Questions about eXist XML Native DB set-up

Jimmy
No, there's no exception or http error.

I can't help but feel there's something faulty with my submission.
Am I supposed to set serialization="true" or something similar?
<xforms:submission id="save-submission"
	ref="instance('books-instance')"
	action="/my-bookcast/serialize"
	method="put" replace="none"/>

What about this input field, is it of any importance?
<p:input name="data" href="#converted"/>
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Questions about eXist XML Native DB set-up

Ralf Jung
Hi Jimmy,

Sorry, but what are you trying to achieve at all? I read through the thread
like 3 times and could not find out ( http://orbeon-forms-ops-
users.24843.n4.nabble.com/Questions-about-eXist-XML-Native-DB-set-up-
td33832.html ).

The Page Flow documentation at http://wiki.orbeon.com/forms/doc/developer-
guide/page-flow-controller explains how you can use the output of your model
pipeline within the view. It also explains all the processors and whatnot you
can use in pipelines.

Also, the action from the submission you quoted will not trigger the
submission you configured in the page flow, as you told it to go to "/my-
bookcast/serialize", but the serialize pipeline is connexted to "/my-
bookcast/". The reuqested URL must exactly match the one given in the page flow
for it to be used! But then, I don't even know if that's what you want...

Kind regards,
Ralf

Am Donnerstag 16 Juni 2011, um 19:09:10 schrieb Jimmy:

> No, there's no exception or http error.
>
> I can't help but feel there's something faulty with my submission.
> Am I supposed to set serialization="true" or something similar?
>
> <xforms:submission id="save-submission"
> ref="instance('books-instance')"
> action="/my-bookcast/serialize"
> method="put" replace="none"/>
>
>
> What about this input field, is it of any importance?
> <p:input name="data" href="#converted"/>
>
>
> --
> View this message in context:
> http://orbeon-forms-ops-users.24843.n4.nabble.com/Questions-about-eXist-XM
> L-Native-DB-set-up-tp33832p3603076.html Sent from the Orbeon Forms
> (ops-users) mailing list archive at Nabble.com.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Questions about eXist XML Native DB set-up

Jimmy
Ralf Jung wrote
Hi Jimmy,

Sorry, but what are you trying to achieve at all? I read through the thread
like 3 times and could not find out ( http://orbeon-forms-ops-
users.24843.n4.nabble.com/Questions-about-eXist-XML-Native-DB-set-up-
td33832.html ).

The Page Flow documentation at http://wiki.orbeon.com/forms/doc/developer-
guide/page-flow-controller explains how you can use the output of your model
pipeline within the view. It also explains all the processors and whatnot
you
can use in pipelines.

Also, the action from the submission you quoted will not trigger the
submission you configured in the page flow, as you told it to go to "/my-
bookcast/serialize", but the serialize pipeline is connexted to "/my-
bookcast/". The reuqested URL must exactly match the one given in the page
flow
for it to be used! But then, I don't even know if that's what you want...

Kind regards,
Ralf
Quoted from:
http://orbeon-forms-ops-users.24843.n4.nabble.com/Questions-about-eXist-XML-Native-DB-set-up-tp33832p3603137.html

I wish to save the instance data from my form to an xml-file on my local disk.
From what I gathered of Hanks post I was supposed to set my submission path to /my-bookcast/serialize.
It's quite possible I misunderstood completely.


Thanks for trying to sort this out
Reply | Threaded
Open this post in threaded view
|

Re: Questions about eXist XML Native DB set-up

Ralf Jung
Hi Jimmy,

> I wish to save the instance data from my form to an xml-file on my local
> disk.
> From what I gathered of Hanks post I was supposed to set my submission path
> to /my-bookcast/serialize.
> It's quite possible I misunderstood completely.
>
>
> Thanks for trying to sort this out
You should not even need a model then. Just set the view to your pipeline file.
The submission you posted looks correct. The URL it refers to must be the same
as the one in the page flow:

    <page path-info="/my-bookcast/serialize" view="serialize.xpl"/>

The pipeline needs two processors, one to convert the XML to a byte stream and
one to store it. I assume what you posted is an excerpt - it's generally more
helpful if you attach the whole files (as long as they are short), because the
error could be anywhere in it.
Using the "transform" property of inputs, you can easily write those two
processors as one ( http://wiki.orbeon.com/forms/doc/developer-guide/xml-
pipeline-language-xpl#TOC-Embedding-transformations-within-in ):

<p:processor name="oxf:file-serializer">
                        <p:input name="config">
                                <config xsl:version="2.0">
                                        <file>filename.xml</file>
                                </config>
                        </p:input>
                        <p:input name="data" href="#instance" transform="oxf:xml-
converter">
                                <config>
                                        <content-type>application/xml</content-type>
                                        <encoding>utf-8</encoding>
                                        <indent-amount>4</indent-amount>
                                </config>
                        </p:input>
                </p:processor>

The 2nd input will be sent through the XML converter before it reaches the file
serializer. I am using above code (slightly modified), in a different context,
but it should still work. If it does not, you need to check the log file -
sometimes Orbeon has trouble creating it, since the path in log4j.xml is
relative. I had to change it to an absolute one and restart tomcat6 so get
logs (just check the date and time of the last item in the log to see if it's
currently working or not).

One possible problem is that this pipeline does not have an output, which
Orbeon might require... you can just send dummy data though:

<p:processor name="oxf:identity">
                <p:input name="data"><dummy/></p:input>
                <p:output name="data" ref="data"/>
        </p:processor>

I hope this helps,
Ralf


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Questions about eXist XML Native DB set-up

Jimmy
Hey again, Ralf


I've been lookig through my log and as you suspected, there is a validation exception telling me I need a data output.
Searching the wiki I have yet to find an example of how to configure the output properly.
Using the dummy data you provided, I encountered the same exception.

Is it possible I need additional namespace declarations? Or is there an issue with my configuration input for the validator?


,appreciate the help so far

/Jimmy
Reply | Threaded
Open this post in threaded view
|

Re: Re: Questions about eXist XML Native DB set-up

Ralf Jung
Hi Jimmy,

without the full xml pipeline file and the exact error message, debugging this
is like shooting in the dark - I can't tell you more than the error message,
you obviously did not declare the data output properly.
My shot in the dark would be: You forgot to declare that your pipeline as a
whole has an output called data:
<p:param name="data" type="output"/>

Kind regards,
Ralf

Am Dienstag 28 Juni 2011, um 13:53:17 schrieb Jimmy:

> Hey again, Ralf
>
>
> I've been lookig through my log and as you suspected, there is a validation
> exception telling me I need a data output.
> Searching the wiki I have yet to find an example of how to configure the
> output properly.
> Using the dummy data you provided, I encountered the same exception.
>
> Is it possible I need additional namespace declarations? Or is there an
> issue with my configuration input for the validator?
>
>
> ,appreciate the help so far
>
> /Jimmy
>
> --
> View this message in context:
> http://orbeon-forms-ops-users.24843.n4.nabble.com/Questions-about-eXist-XM
> L-Native-DB-set-up-tp33832p3630112.html Sent from the Orbeon Forms
> (ops-users) mailing list archive at Nabble.com.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Questions about eXist XML Native DB set-up

Jimmy
Hi Ralf


I appologize. I'm completetly new to xpl and simply assumed that what was posted earlier were all of the basic lines of code needed.

I found an example xpl and has since added the missing lines of code.

Here's the full xpl-file, so far:
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
    xmlns:oxf="http://www.orbeon.com/oxf/processors">
    <p:param name="data" type="output"/>
    <p:processor  name="oxf:file-serializer">
		<p:input name="config">
			<config>
				<file>books.xml</file>
			</config>
		</p:input>
		<p:input name="data" href="books-instance" transform="oxf:xml-converter">
			<config>
				<content-type>application/xml</content-type>
				<encoding>utf-8</encoding>
				<indent-amount>4</indent-amount>
			</config>
		</p:input>
		<p:output name="config"  id="converted"/>
	</p:processor>
</p:config>

I have the following log exception, at the moment:
Exception at line 3, column 41 of oxf:/apps/my-bookcast/serialize.xpl
org.orbeon.oxf.common.ValidationException: line 3, column 41 of oxf:/apps/my-bookcast/serialize.xpl: No processor in pipeline is connected to pipeline output 'data'

//Jimmy