Dear Xformers (or Xformsers), This question is very remotely related to XForms but I’m
assuming there are people here experienced with XML processing and all, I’ll give
it a shot. What I’m trying to do is updating multiple existing documents with
the data filled out by a user. The user is going to fill out a few fields in an
otherwise empty form and submit it. The data found (in the fields with data in
them) will be applied to a number of documents. The existing documents might
have data in them so they cannot be overwritten completely. I thought about using
an XML aware diff and patch method but I’m not sure if a differ for this type
of thing already exists. I’m open to suggestions. Thanks. Muzaffer -- 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 |
If you are using eXist, you can use it's update extensions to do that. You can submit from your XForm to the xql file stored somewhere in the eXist database, and later process submitted data to update particular nodes of your documents. Documentation: http://exist-db.org/update_ext.html
Pawel 2008/10/23 Ozakca, Muzaffer <[hidden email]>
-- 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 |
Thanks for the reply. My issue is a step before I can
use XQuery update. I need to be able to compare two documents: (1) from the
user and (2) already exists in some repository and apply the information in the
(1) to (2). The result of this comparison could be a set of Xquery update
statements to update (2). Right now I’m looking for inspirations to do the
comparison part but the actual update part looks challenging also. Hope, I’m clear. Thanks, Muzo From: Pawel Katarzynski
[mailto:[hidden email]] If you are using eXist, you can
use it's update extensions to do that. You can submit from your XForm to the
xql file stored somewhere in the eXist database, and later process submitted
data to update particular nodes of your documents. Documentation: http://exist-db.org/update_ext.html 2008/10/23 Ozakca, Muzaffer <[hidden email]> Dear Xformers (or Xformsers), This question is very remotely related to XForms but I'm assuming there are
people here experienced with XML processing and all, I'll give it a shot. What
I'm trying to do is updating multiple existing documents with the data filled
out by a user. The user is going to fill out a few fields in an otherwise empty
form and submit it. The data found (in the fields with data in them) will be
applied to a number of documents. The existing documents might have data in
them so they cannot be overwritten completely. I thought about using an XML aware
diff and patch method but I'm not sure if a differ for this type of thing
already exists. I'm open to suggestions. Thanks. Muzaffer
-- 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 can of course compare (what I was meaning in 'process' word) documents/nodes, in the same XQuery file you update document. All the operations are viable in the xquery, just do the comparison before update. There is also xmldiff extension in eXist, that you can use to compare individual nodes or whole documents, but I think there will be no such a need, everyfing can be done in functions and FLOWR expressions.
2008/10/24 Ozakca, Muzaffer <[hidden email]>
-- 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 |
I’m not using Exist and I’ve never
looked at XQuery, can you point me to a small example? Especially, the
comparison of two documents might help. Thanks. From: Pawel Katarzynski
[mailto:[hidden email]] You can of course compare (what
I was meaning in 'process' word) documents/nodes, in the same XQuery file you
update document. All the operations are viable in the xquery, just do the
comparison before update. There is also xmldiff extension in eXist, that you
can use to compare individual nodes or whole documents, but I think there will
be no such a need, everyfing can be done in functions and FLOWR expressions. 2008/10/24 Ozakca, Muzaffer <[hidden email]> Thanks for the reply. My issue is a step before I can use XQuery
update. I need to be able to compare two documents: (1) from the user and (2)
already exists in some repository and apply the information in the (1) to (2).
The result of this comparison could be a set of Xquery update statements to
update (2). Right now I'm looking for inspirations to do the comparison part
but the actual update part looks challenging also. Hope, I'm clear. Thanks, Muzo From: Pawel Katarzynski [mailto:[hidden email]] If you are using eXist, you can use it's update
extensions to do that. You can submit from your XForm to the xql file stored
somewhere in the eXist database, and later process submitted data to update
particular nodes of your documents. Documentation: http://exist-db.org/update_ext.html 2008/10/23 Ozakca, Muzaffer <[hidden email]> Dear Xformers (or Xformsers), This question is very remotely related to XForms but I'm assuming there are
people here experienced with XML processing and all, I'll give it a shot. What
I'm trying to do is updating multiple existing documents with the data filled
out by a user. The user is going to fill out a few fields in an otherwise empty
form and submit it. The data found (in the fields with data in them) will be
applied to a number of documents. The existing documents might have data in
them so they cannot be overwritten completely. I thought about using an XML
aware diff and patch method but I'm not sure if a differ for this type of thing
already exists. I'm open to suggestions. Thanks. Muzaffer
-- 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 |
Muzaffer,
See Pavel's previous email - he has a link to exist db. Browse around the documentation - it is comprehensive and well written. Even if your are not using eXist, it might show you different ways of xml processing.
If you are not using eXist, I suspect that you have a server process that receives the posted XML. If so, you can use your implementation's xml processor. You could either walk through the dom and do your comparisons or use (e.g. Saxon) XQuery parser or just use plain XPath expressions to satisfy your requirements before persisting data.
On Fri, Oct 24, 2008 at 3:34 PM, Ozakca, Muzaffer <[hidden email]> wrote:
-- 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 |
Free forum by Nabble | Edit this page |