This is a document with mixed content.

Text node binding test

There is also an an even simpler test in another document.

The document

The raw XML source looks like this:

      <doc>
	  <p>This is a <i>document</i>
	  with <b>mixed content</b>.
	  </p>
      </doc>
    

Binding to elements

If we bind to the i and b elements, we can edit their content.

The i element:
The b element:

A simple editor

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?

#

*

Document structure

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.

CMSMcQ, 28 June 2016