Do you mean an algorithm like:
1. Iterating on the attributes in the source document 2. Finding the path to those attributes in the source document 3. Converting the path to a path in the result document 4. Create the attribute in the result document
Probably that xu:for-each would do for #1. You should be able to extract pieces of the path with XPath string functions for #2. Then iterating over those to find the document in #3. And then use xu:attribute to create the attribute.
So it sounds like it may be possible.
-Erik
Jos Vos wrote:
Hi,
Is it possible with XUpdate/XPath to have a *generic* piece of code, valid for all form layouts, that copies attributes from a branch of the action result to the instance?
My form for example looks like:
<form> <person/> <givenName/> <surname/> ... <country/> <form>
My action result might look like:
<action> <success>false</success> <message>Invalid Form</message> <form> <person> <givenName valid="false"> <surname> ... <country valid="false"> <form> </action>
So, the action output includes a branch like the form as /action/form, with attributes that I want to use to update the instance with XUpdate in the <result> part, like this:
<form> <person/> <givenName xxforms:valid="false"/> <surname/> ... <country xxforms:valid="false"/> <form>
Can this be done with XUpdate, *independent* of the form layout (and its structure, depth, etc.)? (I know how to do this for individual fields etc.)
Thanks,
-- -- Jos Vos <[EMAIL PROTECTED]> -- X/OS Experts in Open Systems BV | Phone: +31 20 6938364 -- Amsterdam, The Netherlands | Fax: +31 20 6948204
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user
