Hi adev,
> I am trying to crosscheck data of one instance with another.
>
> My one instance say X is being populated from the database at runtime.
> User inputs some value in an input box. I want to cross- check if that value
> already exists in X or not.
>
> I am confused. how do i go about it
I think are are different ways to do this, depending on when the cross-check
should take place.
If the check is done after the user has submittet his input, this could be done
using the identity processor and the aggregate() function [1]. The XPL takes the
instance with the user input as input and reads the database instance using the
specific database procesors. Then, the identity processors aggregates both
instances under a new top-level element using the aggregate() function. The
resulting, combined instance could get passed to a XSLT processor who checks
both instances and generates any kind of output.
If the user should receive an immediate feedback onm his input, the database
instance (or only the relevant parts of it) could be loaded before initializing
the xform, and then submitted to the xform. The xform model then contains two
instances, the database instance and the user-iput instance. Now, one can check
"on-the-fly" whether there's identical data, for example using xforms:bind
constraints fot the input.
HTH
florian
[1]:
http://www.orbeon.com/ops/doc/processors-other#d21e355--
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