There is also an an even simpler test in another document.
The raw XML source looks like this:
<doc> <p>This is a <i>document</i> with <b>mixed content</b>. </p> </doc>
If we bind to the i
and b
elements,
we can edit their content.
i
element: b
element: Another way to edit the text of the document is to
use <xf:repeat nodeset="descendant-or-self::node()">
to provide a flat array of all descendants,
and bind xf:input
elements to each text node.
In the following instantiation, however, you can
see that editing the input boxes does not seem to
change the text value.
What is wrong?
Nested repeats can display the document structure.
This display uses three nested xf:repeat
elements
with nodeset="child::node()"
. That won't handle
arbitrary documents, but it's deep enough for this document.
Element node:
Text node:
Element node:
Text node:
Element node:
Text node:
Element node:
CMSMcQ, 28 June 2016