[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT containing javascript code with '<'
Wolfgang Laun wrote:
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xhtml"> For text/html, consider to create HTML 4 or HTML5 with no namespaces with output method "html", then the XSLT processor will serialize inline script correctly for browsers with their tag soup text/html parsers or with their recent move to HTML5 parsers. You currently have output method "html" which is intended for HTML 4 and text/html with HTML elements being in no namespace, yet your result elements are in the XHTML namespace, so the serialization rules that the output method "html" mandates are not applied to your result elements. There is also in XSLT 2.0 an output method "xhtml" aimed at outputting XHTML 1.0 as text/html but I don't think it is helpful with inline script. If you really want to create XHTML but want it to be served as text/html then I agree with Andrew that using external script files is the right approach to avoid all these problems with incompatibilites between SGML or tag soup HTML parsing rules and XML serialization syntax. -- Martin Honnen --- MVP Data Platform Development http://msmvps.com/blogs/martin_honnen/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|