This is a very valuable piece of functionality. Thank you, Michael, for
raising the issue, and Alain for the implementation. I notice in the
current draft of the XForms 2.0 spec, under section 8.1.2, there is a note
that reads:
"The simpleContent binding restriction is intended to allow controls to
bind to attribute and element nodes. This specification does not prevent
binding controls directly to text nodes, however doing so can yield
undesirable behavior, such as a form control becoming non-relevant if a
user enters empty data. This specification also does not prevent
implementers supporting binding controls directly to comment or processing
instruction nodes, however the resulting behavior is
implementation-dependent and may also yield undesirable behavior."
Notwithstanding, if there are use cases that require the ability to bind
directly to text nodes, I hope it would merit inclusion in an eventual
XForms 2.0 Test Suite.
Tim
--
Tim A. Thompson
Metadata Librarian (Spanish/Portuguese Specialty)
Princeton University Library
<[email protected]>
On Tue, Jun 28, 2016 at 3:31 PM, Alain Couthures <
[email protected]> wrote:
> There is no such form in the W3C Test Suite binding a text node to a
> control and I had to fix and build a new version of XSLTForms.
>
> Please give a try at
> http://www.agencexml.com/direct/demos/textnodetest.xml
>
> Thank you for your feedback!
>
> --Alain
>
> Le 28/06/2016 à 06:47, C. M. Sperberg-McQueen a écrit :
> > Consider the simple form at
> >
> > http://blackmesatech.com/2016/06/textnodetest/index.xhtml
> >
> > It has one document instance, which is a simple XML document
> > with mixed content.
> >
> > <doc>
> > <p>This is a <i>document</i>
> > with <b>mixed content</b>.
> > </p>
> > </doc>
> >
> > It shows two ways of editing parts of the document: the first,
> > which binds xf:input elements to the i and b elements, does
> > appear to change the value of the document effectively. The
> > second, which binds xf:input elements to the text nodes of
> > the document, does not seem to work.
> >
> > I also notice that the read-only display of document structure
> > shown at the end of the page does not change, even though
> > the model seems to be being updated.
> >
> > I think that XForms allows controls to be bound to any node in
> > the document, including text nodes. Am I doing something
> > wrong?
> >
> > I would be grateful for any help any reader of this list can
> > give me.
> >
>
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Xsltforms-support mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xsltforms-support
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support