Subject: RE: disable-output-escaping From: "Chris Bayes" <Chris@xxxxxxxxxxx> Date: Wed, 2 Aug 2000 08:58:35 +0100 |
Well as you are doing it client-side why not put you xml in an island and just put an xpath to the node in a formfield attribute then post the island xml back to the server instead of the form <XML id="XMLDATA"> <myform> <formfield1 value="" /> </myform> </XML> <form name="myform"> <input type="text" name="formfield1" onchange="updateXML('/myform/formfield1/@value', this)" value="somevalue" /> <input type="button" onclick="mySubmit()" /> </form> <script> function updateXML(path , obj){ XMLDATA.documentElement.selectSingleNode(path).nodeValue = obj.value; } </script> You could do <input type="text" name="formfield1" onchange="updateXML(this)" path="/myform/formfield1/@value" value="somevalue" /> etc. Ciao Chris >-----Original Message----- >From: owner-xsl-list@xxxxxxxxxxxxxxxx >[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Evan Lenz >Sent: 02 August 2000 02:49 >To: XSL-List@xxxxxxxxxxxxxxxx >Subject: Re: disable-output-escaping > > > >Okay, I was operating under some wrong assumptions. It's amazing how >quickly these layers of character escaping can get one confused. It turns >out I don't need to use disable-output-escaping at all. I just need to >learn to trust the processor :) Inserting character entities in an >attribute value is just fine, and where those characters don't need to be >escaped in the output (but do in the input), they won't be. For example, a >< needs to be escaped in character content, but not in an attribute value. >Thus, I use < in the stylesheet (as a child of xsl:attribute) and it is >outputted as a literal < in the output attribute value, because it doesn't >need to be escaped in that context. Well, in the process, I learned a >little about the quirks of SAXON vs. xt. > >What I'm realizing--and this may be a more interesting issue--is that in >order to write a generic, reusable template rule that will do this escaping >for me, I need to be able to treat the XML to be escaped as a node-set. So >if I'm getting that node-set directly from the source tree, I'm >fine without >any extension functions. But where I want to first construct an arbitrary >tree (in a variable) and then escape it, I'm out of luck without the use of >a node-set() function. So, in order to implement what I want to do here >without invoking an extension function, I have to hard-code it to the >various template rules involved, without being able to construct >the tree in >its own step before escaping. The resulting implementation isn't very >reusable. > >Evan Lenz >elenz@xxxxxxxxxxx > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
<- Previous | Index | Next -> |
---|---|---|
Re: disable-output-escaping, Evan Lenz | Thread | Novice, Brett Edwards |
How can I test if an node included , Conny Kreyßel | Date | RE: Adding a childnode to a DataIsl, Chris Bayes |
Month |