411 REFERENCE · Wikibooks
XRX/Content Routing
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Motivation
You want all your XForms application to us a single save.xq submission. This makes it easier to autogenerate XForms applications and makes it easier to maintain insert and update operations in a central location.
Method
Create a single save XQuery that inspects the content of a POST operation. Use the name of the root element or other content patterns within the submitted XML file to process the incoming saved documents. Use a table-driven rule engine to determine if the incoming XML document is a new record (and requires a new ID assigned), an update (and requires versioning), or whether other business rules apply.
Back : User Manager • Next: URL Rewriting