- From: Erik Bruchez <erik@bruchez.org>
- Date: Tue, 10 Sep 2019 23:12:26 -0700
- To: XForms <public-xformsusers@w3.org>
- Message-ID: <CAAc0PEWC2sHsc99fZ3-RCr4DFixA30ZuU-eYa20X+seFfy1uHQ@mail.gmail.com>
All, The issue is the following: the replace action can replace an existing node, in particular an element or a comment node, with a text node. Text node normalization must happen after that. So if you had: <data>a<foo/>c</data> and you replace the element with text "b", you get: <data>abc</data> The result only has *one* text node containing "abc". Something similar can happen with the insert action (and with the delete action as well, but that action doesn't have an event context information with this problem). Now, in this case, what should the `inserted-nodes` context info of `xforms-replace` or `xforms-insert` contain? I see 3 possibilities: 1. Point to nodes that might have been created and then merged. Those won't be referenced from the XPath data model anymore. With the example above, the text node would contain "b". This doesn't seem very useful and would constrain the implementation to create that temporary text node before merging it. 2. Point to the merged node. Here, it would be the "abc" text node. Then the description "inserted nodes" would be misleading. It's a new text node or modified text node, but not really something that got inserted. 3. Not include the node at all in `inserted-nodes`, and consider adding instead an `inserted-items` context information. To discuss. -Erik
Received on Wednesday, 11 September 2019 06:13:01 UTC