adding unique to bookcast schema

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

adding unique to bookcast schema

bicyclesforeveryone

I'm trying to understand uniqueness constraints by adding them to the bookcast example's schema for title, for example. Am I doing something wrong or does this not work? I don't get any error messages and the uniqueness is not enforced.

 
<xs:element name="books">

<xs:unique name="bookTitle"> 
<xs:selector xpath="./book"/> 
<xs:field xpath="title"/> 
</xs:unique>

...
Reply | Threaded
Open this post in threaded view
|

Re: adding unique to bookcast schema

Alessandro Vernet
Administrator
John,

On Thu, Jun 12, 2008 at 10:24 PM, bicyclesforeveryone
<[hidden email]> wrote:

> I'm trying to understand uniqueness constraints by adding them to the
> bookcast example's schema for title, for example. Am I doing something wrong
> or does this not work? I don't get any error messages and the uniqueness is
> not enforced.
>
>  <!-- Top-level element -->
> <xs:element name="books">
>
> <xs:unique name="bookTitle">
> <xs:selector xpath="./book"/>
> <xs:field xpath="title"/>
> </xs:unique>
I am not sure where you added the <xs:unique>. Are you sure that your
updated schema is still valid? Could you send the full updated schema?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
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: adding unique to bookcast schema

bicyclesforeveryone
The schema is valid and works as expected in the Orbeon schema sandbox. I used the sample data and just changed one of the titles to be the same as another. However, using this new schema with the bookcast example application does not prevent me from saving two identical titles...


<?xml version="1.0" encoding="utf-8"?>
<xs:schema
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">

    <!-- Top-level element -->
    <xs:element name="books">

    

     <xs:unique name="bookTitle"> 
<xs:selector xpath="/book"/> 
<xs:field xpath="title"/> 
</xs:unique>

    

        <xs:complexType>
            <!-- Allow 0 to n books -->
            <xs:sequence minOccurs="0" maxOccurs="unbounded">

           

                <xs:element name="book" type="book"/>
            </xs:sequence>
        </xs:complexType>

        

    </xs:element>

    <!-- Individual book element -->
    <xs:complexType name="book">

    

        <xs:sequence>
            <xs:element name="title" type="xs:string"/>
            <xs:element name="author" type="xs:string"/>
            <xs:element name="language" type="language"/>
            <xs:element name="link" type="link"/>
            <xs:element name="rating" type="rating"/>
            <xs:element name="notes" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>

    <!-- Type for rating -->
    <xs:simpleType name="rating">
        <xs:restriction base="xs:string">
            <xs:enumeration value=""/>
            <xs:enumeration value="1"/>
            <xs:enumeration value="2"/>
            <xs:enumeration value="3"/>
            <xs:enumeration value="4"/>
            <xs:enumeration value="5"/>
        </xs:restriction>
    </xs:simpleType>

    <!-- Type for language -->
    <xs:simpleType name="language">
        <xs:restriction base="xs:string">
            <xs:enumeration value=""/>
            <xs:enumeration value="en"/>
            <xs:enumeration value="fr"/>
            <xs:enumeration value="es"/>
        </xs:restriction>
    </xs:simpleType>

    <!-- Type for link -->
    <xs:simpleType name="link">
        <xs:restriction base="xs:string">
            <!-- Approximative regexp for HTTP URLs -->
            <xs:pattern value="(https?\://([^/?#]+)/([^?#]*)(\?([^?#]+))?(#(.*))?)?"/>
        </xs:restriction>
    </xs:simpleType>

</xs:schema>

On Jun 13, 2008, at 6:42 PM, Alessandro Vernet wrote:

John,

On Thu, Jun 12, 2008 at 10:24 PM, bicyclesforeveryone
I'm trying to understand uniqueness constraints by adding them to the
bookcast example's schema for title, for example. Am I doing something wrong
or does this not work? I don't get any error messages and the uniqueness is
not enforced.

 <!-- Top-level element -->
<xs:element name="books">

<xs:unique name="bookTitle">
<xs:selector xpath="./book"/>
<xs:field xpath="title"/>
</xs:unique>

I am not sure where you added the <xs:unique>. Are you sure that your
updated schema is still valid? Could you send the full updated schema?

Alex
-- 
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise

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

Re: Re: adding unique to bookcast schema

bicyclesforeveryone
I think I realized my mistake. The validation is not happening because lax is the default mode, right? When i specified "xxforms:validation="strict" on the instance, then the validation behaves as expected.

bicyclesforeveryone wrote
The schema is valid and works as expected in the Orbeon schema  
sandbox. I used the sample data and just changed one of the titles to  
be the same as another. However, using this new schema with the  
bookcast example application does not prevent me from saving two  
identical titles...
Reply | Threaded
Open this post in threaded view
|

Re: Re: adding unique to bookcast schema

bicyclesforeveryone
One thing I don't understand, from here: http://www.orbeon.com/ops/doc/home-changes-36
"only elements that have definitions in the imported schemas are validated"

Didn't my schema have a definition for the book element? Why didn't it work by default?

bicyclesforeveryone wrote
I think I realized my mistake. The validation is not happening because lax is the default mode, right? When i specified "xxforms:validation="strict" on the instance, then the validation behaves as expected.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: adding unique to bookcast schema

Erik Bruchez
Administrator
There may be simply a bug related to checking unique constraints in  
LAX mode.

-Erik

On Jun 15, 2008, at 6:55 AM, bicyclesforeveryone wrote:

>
> One thing I don't understand, from here:
> http://www.orbeon.com/ops/doc/home-changes-36
> "only elements that have definitions in the imported schemas are  
> validated"
>
> Didn't my schema have a definition for the book element? Why didn't  
> it work
> by default?
>
>
> bicyclesforeveryone wrote:
>>
>> I think I realized my mistake. The validation is not happening  
>> because lax
>> is the default mode, right? When i specified  
>> "xxforms:validation="strict"
>> on the instance, then the validation behaves as expected.
>>
>
>
> -----
> John Meyer
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

exist db in bookcast example

asianCoolz
the code is as below, i try to physically search for the file books.xml but there is no such file in webapps folder. 2. is /exist/rest/db/orbeon/  configured in any file? (already search web.xml) where is the mapping used for exist ?



quote


<xforms:submission id="list-submission" serialization="none"
                       method="get" action="/exist/rest/db/orbeon/xforms-bookcast/books.xml"
                       replace="instance" instance="books-instance"/>

            <!-- Submission to save the document containing all the books -->
            <xforms:submission id="save-submission" ref="instance('books-instance')"
                    action="/exist/rest/db/orbeon/xforms-bookcast/books.xml"
                    method="put" replace="none">
                <xforms:message ev:event="xforms-submit-error" level="modal">An error occurred while saving!</xforms:message>
            </xforms:submission>

            <!-- Submission to load the sample data -->
            <xforms:submission id="sample-data-submission" serialization="none"
                       method="get" action="oxf:/apps/xforms-bookcast/sample-data.xml"
                       replace="instance" instance="books-instance"/>







--
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: exist db in bookcast example

Erik Bruchez
Administrator
Not sure where exactly you looked, but /exist/rest/* is mapped in  
web.xml to the eXist REST servlet:

     <servlet-mapping>
         <servlet-name>exist-rest-servlet</servlet-name>
         <url-pattern>/exist/rest/*</url-pattern>
     </servlet-mapping>

Make sure you have a look at this section of the tutorial:

   http://www.orbeon.com/ops/doc/intro-tutorial#bookcast-save-button

"The paths starts with /exist/rest/, which maps to the built-in eXist  
database. The rest of the path (/db/orbeon/my-bookcast/books.xml)  
specifies the collection and document to access. Here, we decide to  
save the data to a document called books within a collection called /
db/orbeon/my-bookcast/."

-Erik

On Jun 15, 2008, at 11:49 AM, cw wrote:

> the code is as below, i try to physically search for the file  
> books.xml but there is no such file in webapps folder. 2. is /exist/
> rest/db/orbeon/  configured in any file? (already search web.xml)  
> where is the mapping used for exist ?
>
>
>
> quote
>
>
> <xforms:submission id="list-submission" serialization="none"
>                        method="get" action="/exist/rest/db/orbeon/
> xforms-bookcast/books.xml"
>                        replace="instance" instance="books-instance"/>
>
>             <!-- Submission to save the document containing all the  
> books -->
>             <xforms:submission id="save-submission"  
> ref="instance('books-instance')"
>                     action="/exist/rest/db/orbeon/xforms-bookcast/
> books.xml"
>                     method="put" replace="none">
>                 <xforms:message ev:event="xforms-submit-error"  
> level="modal">An error occurred while saving!</xforms:message>
>             </xforms:submission>
>
>             <!-- Submission to load the sample data -->
>             <xforms:submission id="sample-data-submission"  
> serialization="none"
>                        method="get" action="oxf:/apps/xforms-
> bookcast/sample-data.xml"
>                        replace="instance" instance="books-instance"/>
>
>
>
>
>
>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: exist db in bookcast example

asianCoolz
ya. thanks you answered my question.   is it a must for xform for only able to save in xml database? possible to use mysql or use hibernate engine ? any example on this? is it possible to map the type to database "column field" ?



--- On Sun, 6/15/08, Erik Bruchez <[hidden email]> wrote:
From: Erik Bruchez <[hidden email]>
Subject: [ops-users] Re: exist db in bookcast example
To: [hidden email]
Date: Sunday, June 15, 2008, 9:50 AM

Not sure where exactly you looked, but /exist/rest/* is mapped in  
web.xml to the eXist REST servlet:

<servlet-mapping>
<servlet-name>exist-rest-servlet</servlet-name>
<url-pattern>/exist/rest/*</url-pattern>
</servlet-mapping>

Make sure you have a look at this section of the tutorial:

http://www.orbeon.com/ops/doc/intro-tutorial#bookcast-save-button

"The paths starts with /exist/rest/, which maps to the built-in eXist
database. The rest of the path (/db/orbeon/my-bookcast/books.xml)
specifies the collection and document to access. Here, we decide to
save the data to a document called books within a collection called /
db/orbeon/my-bookcast/."

-Erik

On Jun 15, 2008, at 11:49 AM, cw wrote:

> the code is as below, i try to physically search for the file
> books.xml but there is no such file in webapps folder. 2. is /exist/
> rest/db/orbeon/ configured in any file? (already search web.xml)
> where is the mapping used for exist ?
>
>
>
> quote
>
>
> <xforms:submission id="list-submission"
serialization="none"
> method="get"
action="/exist/rest/db/orbeon/
> xforms-bookcast/books.xml"
> replace="instance"
instance="books-instance"/>
>
> <!-- Submission to save the document containing all the
> books -->
> <xforms:submission id="save-submission"
> ref="instance('books-instance')"
> action="/exist/rest/db/orbeon/xforms-bookcast/
> books.xml"
> method="put" replace="none">
> <xforms:message
ev:event="xforms-submit-error"
> level="modal">An error occurred while
saving!</xforms:message>
> </xforms:submission>
>
> <!-- Submission to load the sample data -->
> <xforms:submission id="sample-data-submission"
> serialization="none"
> method="get"
action="oxf:/apps/xforms-
> bookcast/sample-data.xml"
> replace="instance"
instance="books-instance"/>

>
>
>
>
>
>
> --
> 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

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
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
OW2 mailing lists service home page: http://www.ow2.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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: exist db in bookcast example

Erik Bruchez
Administrator
XForms itself only talks to the outside world using what is called a  
"submission". This is pretty much a REST or SOAP client.

So you can implement a persistence service that receives data from an  
XForms page and then stores the data into a relational database. You  
do not have to use a relational database.

Now Form Builder / Form runner implement an extensible REST-based API  
for persistence. Currently, we only support the eXist XML database.  
But you can write your own implementation. For example this summer we  
are going to write an integration with Oracle XML DB.

-Erik

On Jun 15, 2008, at 4:20 PM, cw wrote:

> ya. thanks you answered my question.   is it a must for xform for  
> only able to save in xml database? possible to use mysql or use  
> hibernate engine ? any example on this? is it possible to map the  
> type to database "column field" ?
>
>
>
> --- On Sun, 6/15/08, Erik Bruchez <[hidden email]> wrote:
> From: Erik Bruchez <[hidden email]>
> Subject: [ops-users] Re: exist db in bookcast example
> To: [hidden email]
> Date: Sunday, June 15, 2008, 9:50 AM
>
> Not sure where exactly you looked, but /exist/rest/* is mapped in
> web.xml to the eXist REST servlet:
>
>
>  <servlet-mapping>
>          <servlet-name>exist-rest-servlet</servlet-name>
>          <url-pattern>/exist/rest/*</url-pattern>
>      </servlet-mapping>
>
> Make sure you have a look at this section of the tutorial:
>
>    http://www.orbeon.com/ops/doc/intro-tutorial#bookcast-save-button
>
> "The paths starts with /exist/rest/, which maps to the built-in eXist
> database. The rest of the path (/db/orbeon/my-bookcast/books.xml)
> specifies the collection and document to access. Here, we decide to
> save the data to a document called books within a collection called /
> db/orbeon/my-bookcast/."
>
> -Erik
>
> On Jun 15, 2008, at 11:49 AM, cw wrote:
>
> > the code is as below, i try to physically search for the file
> > books.xml but there is no such file in webapps folder. 2. is /exist/
> > rest/db/orbeon/  configured in any file? (already search web.xml)
> > where is
>  the mapping used for exist ?
> >
> >
> >
> > quote
> >
> >
> > <xforms:submission id="list-submission"
> serialization="none"
> >                        method="get"
> action="/exist/rest/db/orbeon/
> > xforms-bookcast/books.xml"
> >                        replace="instance"
> instance="books-instance"/>
> >
> >             <!-- Submission to save the document containing all the
> > books -->
> >             <xforms:submission id="save-submission"
> > ref="instance('books-instance')"
> >                     action="/exist/rest/db/orbeon/xforms-bookcast/
> > books.xml"
> >                     method="put" replace="none">
> >                 <xforms:message
> ev:event="xforms-submit-error"
> > level="modal">An error occurred while
> saving!</xforms:message>
> >             </xforms:submission>
> >
> >
>  <!-- Submission to load the sample data -->
> >             <xforms:submission id="sample-data-submission"
> > serialization="none"
> >                        method="get"
> action="oxf:/apps/xforms-
> > bookcast/sample-data.xml"
> >                        replace="instance"
> instance="books-instance"/>
> >
> >
> >
> >
> >
> >
> > --
> > 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
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> 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
> OW2 mailing lists service home page: http://www.ow2.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
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: exist db in bookcast example

asianCoolz

i have a question, when persist on db, it is possible to separate each values from the form into different "column" field in database?

so a person details table in database will look like

id, firstname,lastname, age, address...etc

?




--- On Mon, 6/16/08, Erik Bruchez <[hidden email]> wrote:
From: Erik Bruchez <[hidden email]>
Subject: [ops-users] Re: Re: Re: exist db in bookcast example
To: [hidden email]
Date: Monday, June 16, 2008, 6:42 AM

XForms itself only talks to the outside world using what is called a  
"submission". This is pretty much a REST or SOAP client.

So you can implement a persistence service that receives data from an
XForms page and then stores the data into a relational database. You
do not have to use a relational database.

Now Form Builder / Form runner implement an extensible REST-based API
for persistence. Currently, we only support the eXist XML database.
But you can write your own implementation. For example this summer we
are going to write an integration with Oracle XML DB.

-Erik

On Jun 15, 2008, at 4:20 PM, cw wrote:

> ya. thanks you answered my question. is it a must for xform for
> only able to save in xml database? possible to use mysql or use
> hibernate engine ? any example on this? is it possible to map the
> type to database "column field" ?
>
>
>
> --- On Sun, 6/15/08, Erik Bruchez <[hidden email]> wrote:
> From: Erik Bruchez <[hidden email]>
> Subject: [ops-users] Re: exist db in bookcast example
> To: [hidden email]
> Date: Sunday, June 15, 2008, 9:50 AM
>
> Not sure where exactly you looked, but /exist/rest/* is mapped in
> web.xml to the eXist REST servlet:
>
>
> <servlet-mapping>
> <servlet-name>exist-rest-servlet</servlet-name>
> <url-pattern>/exist/rest/*</url-pattern>
> </servlet-mapping>
>
> Make sure you have a look at this section of the tutorial:
>
> http://www.orbeon.com/ops/doc/intro-tutorial#bookcast-save-button
>
> "The paths starts with /exist/rest/, which maps to the built-in eXist
> database. The rest of the path (/db/orbeon/my-bookcast/books.xml)
> specifies the collection and document to access. Here, we decide to
> save the data to a document called books within a collection called /
> db/orbeon/my-bookcast/."
>
> -Erik
>
> On Jun 15, 2008, at 11:49 AM, cw wrote:
>
> > the code is as below, i try to physically search for the file
> > books.xml but there is no such file in webapps folder. 2. is /exist/
> > rest/db/orbeon/ configured in any file? (already search web.xml)
> > where is
> the mapping used for exist ?
> >
> >
> >
> > quote
> >
> >
> > <xforms:submission id="list-submission"
> serialization="none"
> > method="get"
> action="/exist/rest/db/orbeon/
> > xforms-bookcast/books.xml"
> > replace="instance"
> instance="books-instance"/>
> >
> > <!-- Submission to save the document containing all
the
> > books -->
> > <xforms:submission id="save-submission"
> > ref="instance('books-instance')"
> >
action="/exist/rest/db/orbeon/xforms-bookcast/
> > books.xml"
> > method="put"
replace="none">
> > <xforms:message
> ev:event="xforms-submit-error"
> > level="modal">An error occurred while
> saving!</xforms:message>
> > </xforms:submission>
> >
> >
> <!-- Submission to load the sample data -->
> > <xforms:submission
id="sample-data-submission"

> > serialization="none"
> > method="get"
> action="oxf:/apps/xforms-
> > bookcast/sample-data.xml"
> > replace="instance"
> instance="books-instance"/>
> >
> >
> >
> >
> >
> >
> > --
> > 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
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> 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
> OW2 mailing lists service home page: http://www.ow2.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
> OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
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
OW2 mailing lists service home page: http://www.ow2.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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: exist db in bookcast example

Erik Bruchez
Administrator
It is possible, if you write the code for it, but we don't integrate  
XML-relational support like this in a generic way at the moment.

-Erik

On Jun 16, 2008, at 1:48 PM, cw wrote:

>
> i have a question, when persist on db, it is possible to separate  
> each values from the form into different "column" field in database?
>
> so a person details table in database will look like
>
> id, firstname,lastname, age, address...etc
>
> ?
>
>
>
>
> --- On Mon, 6/16/08, Erik Bruchez <[hidden email]> wrote:
> From: Erik Bruchez <[hidden email]>
> Subject: [ops-users] Re: Re: Re: exist db in bookcast example
> To: [hidden email]
> Date: Monday, June 16, 2008, 6:42 AM
>
> XForms itself only talks to the outside world using what is called a
> "submission". This
>  is pretty much a REST or SOAP client.
>
> So you can implement a persistence service that receives data from an
> XForms page and then stores the data into a relational database. You
> do not have to use a relational database.
>
> Now Form Builder / Form runner implement an extensible REST-based API
> for persistence. Currently, we only support the eXist XML database.
> But you can write your own implementation. For example this summer we
> are going to write an integration with Oracle XML DB.
>
> -Erik
>
> On Jun 15, 2008, at 4:20 PM, cw wrote:
>
> > ya. thanks you answered my question.   is it a must for xform for
> > only able to save in xml database? possible to use mysql or use
> > hibernate engine ? any example on this? is it possible to map the
> > type to database "column field" ?
> >
> >
> >
> > --- On Sun, 6/15/08, Erik Bruchez <[hidden email]> wrote:
> > From:
>  Erik Bruchez <[hidden email]>
> > Subject: [ops-users] Re: exist db in bookcast example
> > To: [hidden email]
> > Date: Sunday, June 15, 2008, 9:50 AM
> >
> > Not sure where exactly you looked, but /exist/rest/* is mapped in
> > web.xml to the eXist REST servlet:
> >
> >
> >  <servlet-mapping>
> >          <servlet-name>exist-rest-servlet</servlet-name>
> >          <url-pattern>/exist/rest/*</url-pattern>
> >      </servlet-mapping>
> >
> > Make sure you have a look at this section of the tutorial:
> >
> >    http://www.orbeon.com/ops/doc/intro-tutorial#bookcast-save-button
> >
> > "The paths starts with /exist/rest/, which maps to the built-in  
> eXist
> > database. The rest of the path (/db/orbeon/my-bookcast/books.xml)
> > specifies the collection and document to access. Here, we decide to
> > save the data to a
>  document called books within a collection called /
> > db/orbeon/my-bookcast/."
> >
> > -Erik
> >
> > On Jun 15, 2008, at 11:49 AM, cw wrote:
> >
> > > the code is as below, i try to physically search for the file
> > > books.xml but there is no such file in webapps folder. 2. is /
> exist/
> > > rest/db/orbeon/  configured in any file? (already search web.xml)
> > > where is
> >  the mapping used for exist ?
> > >
> > >
> > >
> > > quote
> > >
> > >
> > > <xforms:submission id="list-submission"
> > serialization="none"
> > >                        method="get"
> > action="/exist/rest/db/orbeon/
> > > xforms-bookcast/books.xml"
> > >                        replace="instance"
> > instance="books-instance"/>
> > >
> > >             <!-- Submission to save the document containing all
> the
> >
>  > books -->
> > >             <xforms:submission id="save-submission"
> > > ref="instance('books-instance')"
> > >
> action="/exist/rest/db/orbeon/xforms-bookcast/
> > > books.xml"
> > >                     method="put"
> replace="none">
> > >                 <xforms:message
> > ev:event="xforms-submit-error"
> > > level="modal">An error occurred while
> > saving!</xforms:message>
> > >             </xforms:submission>
> > >
> > >
> >  <!-- Submission to load the sample data -->
> > >             <xforms:submission
> id="sample-data-submission"
> > > serialization="none"
> > >                        method="get"
> > action="oxf:/apps/xforms-
> > > bookcast/sample-data.xml"
> > >                        replace="instance"
> > instance="books-instance"/>
> >
>  >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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
> >
> > --
> > Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> > 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
> > OW2 mailing lists service home page: http://www.ow2.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
> > OW2 mailing lists service home page: http://www.ow2.org/wws
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> 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
> OW2 mailing lists service home page: http://www.ow2.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
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: exist db in bookcast example

PE2Dave
2008/6/16 Erik Bruchez <[hidden email]>:
> It is possible, if you write the code for it, but we don't integrate
> XML-relational support like this in a generic way at the moment.

>> i have a question, when persist on db, it is possible to separate each
>> values from the form into different "column" field in database?
>>
>> so a person details table in database will look like
>>
>> id, firstname,lastname, age, address...etc


I thought the idea was to take in the data in xml format,
store it using an xml format, query it using an xml format
then use it (often having transformed it to something else)?

Perhaps I was mistaken?

Isn't that the advantage of using an xml database?

regards



--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk


--
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: Re: Re: Re: exist db in bookcast example

Erik Bruchez
Administrator
> I thought the idea was to take in the data in xml format,
> store it using an xml format, query it using an xml format
> then use it (often having transformed it to something else)?
>
> Perhaps I was mistaken?
>
> Isn't that the advantage of using an xml database?

Absolutely right.

However, there is an audience of users who still prefer to have their  
data in relational format.

We have at some point written some code to do very basic XML-
relational mapping using XSLT, but it was by no means a very generic  
platform.

We have been wondering about whether Hibernate's XML support was any  
good. Has anybody tried it?

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
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
OW2 mailing lists service home page: http://www.ow2.org/wws