xsl-list
[Top] [All Lists]

RE: Assign the xsl:copy-of output to the value attribute of checkbox input xsl:element OR copying a node as a xml string to value of a geckbox

2005-01-31 01:31:28
Hi,

snip

Expected xslt output:
<html xmlns:xhtml="http://www.w3.org/1999/xhtml";>
<body>
<script language="Javascript">
function msg(val)
{
  alert(val);
}
</script>
<form name="f" onsubmit="return false;">
<div>
NAME: Bugs &lt; Bunny<br>
DOB: 03/21/1970<br>
AGE: 31<br>
ADDRESS: 4895 Wabbit Hole Road<br>
PHONE: 865-111-1111<br>
<input name="lastEvent" type="checkbox" value="
<programmer>

You want to write elements into an attribute value. Why? Why not escaped 
markup? This is not well-formed XML and cannot be achived with vanilla XSLT. 
Either you output

<input name="lastEvent" type="checkbox" value="
&lt;programmer&gt;
...

by using a XML serializer written in XSLT (e.g. 
<http://www.xmlportfolio.com/xml-to-string/>), or if you absolutely need

<input name="lastEvent" type="checkbox" value="
<programmer>
...

Then use the above method in conjunction with a result tree serializer that 
doesn't escape the output for that particular element. IIRC, Saxon also has an 
extension to use DOE in xsl:attribute.

Cheers,

Jarno - SITD: Venom

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>