Re: writing to xpath string result
"David Landwehr" <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
Hi Brian, I just want to be sure we are on the same page with this functionality. If you have mixed content like in the following instance <data>My text <element>e1</element> </data> and have the following ui: <xforms:input ref="/data"> <xforms:label>Data</xforms:label> </xforms:input> then ff you write 'My new text' into the form control the instance should be: <data>My new text <element>e1</element> </data> and not <data>My new text</data> The part that worried me in your mail was the following sentence "...it can blow away any existing children of the element and replace them with a new text node." Best regards, David ---------------------------------------------------------------- David Landwehr [email protected] Novell, Inc. Phone: +45 33 98 15 04 Amaliegade 16C Fax: +45 70 20 15 17 DK-1256 Copenhagen K http://www.novell.com ---------------------------------------------------------------- >>> Brian Ryner<[email protected]> 10/04/04 9:54 pm >>> Hi, One thing I've found that would be really helpful for xforms is, given data like: <foo> <bar name="blah">text</bar> </foo> and xforms input controls bound to: /foo/bar and /foo/bar@name to be able to evaluate that xpath expression and write new data to the resulting text node or attribute, without having to figure out which one it is (since xpath can do that anyway). Basically, to be able to set the stringValue attribute on the result. The semantics of this, at least for my purposes, would be pretty straightforward... it would only need to work for a single-node result, and if the expression points to the text node child of an element, it can blow away any existing children of the element and replace them with a new text node. Any thoughts on this? -Brian Ryner [email protected]