[Home] [By Thread] [By Date] [Recent Entries]
Thomas Morf wrote:
Hi allYou probably mean <xsl:output method="xml"> ? Example:Which xslt processor are you using ? This example evaluate to <input type="checkbox" name="foo" onclick="function(getAttribute('name'))"/> to me in msxml and saxon. XML output method must output well-formed xml and this combination of " and ' is well-formed. I think you meant more complex case where you have to intermingle " and ' in attribute's value, like onclick="func('data with "bla"')", which is not well-formed xml and have to be escaped. Or try a better solution - move all javascript code to one place (CDATA section) or to external js file to get free from well-formedness constraints in javascript code. But why ? It's well-formed xml. The only problem will arise if you try to use < and & in text, they must be escaped. Or use comments: <script> <xsl:comment> <![CDATA[if a <= "d" bla()]]> </xsl:comment> </script> -- Oleg Tkachenko Multiconn International XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



