trondal wrote:
I want to bind to just <user id="1"> on the following xml-file:
<users>
<user id="1">
<name>Johan</name>
</user>
<user id="2">
<name>Mark</name>
</user>
</user>
Here are the sitemap whitch does the job:
<map:match pattern="modify_course">
<map:call function="handleForm">
<map:parameter name="function" value="{0}"/>
<map:parameter name="form-definition"
value="modify_course_definition.xml"/>
<map:parameter name="documentURI"
value="xmldb:exist:///quis/courses/courses.xml#/users/[EMAIL PROTECTED]'1']"/>
<map:parameter name="bindingURI"
value="modify_course_binding.xml"/>
</map:call>
</map:match>
All works well until i save: "Cannot modify a resource that includes an
XPATH expression".
Previos samples-examples with bindings have worked well, but they all work
on a easily identifiable path.
How can I use Xpath to identify the element, and still save the modified
part?
Can anybody please point me in the right direction on how to overcome this?
Hmm, if you used repeaters you could specify something like the following in
your binding:
<fb:repeater id="users" parent-path="/users" row-path="/[EMAIL PROTECTED]'1']"
row-path-insert="/user">
Of course, your documentURI would have to change to smething more like:
value="xmldb:exist:///quis/courses/courses.xml
Perhaps that helps? I doubt you would want to allow them to change the id.
Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]