[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: HTML output method: output a & character?
David Carlisle wrote: > Kai Großjohann wrote >> into HTML output of the following form: > > <a href="/script.cgi?action=search&term=foo">...</a> > This is not well formed XML. You have_ to use & html method does not output valid XML. Here are 3 case when invalidation forced no matter what you want: <WD> ...The html output method should not perform escaping for the content of the script and style elements... ... ...The html output method should not escape a & character occurring in an attribute value immediately followed by a { character ... </WD> However <WD> ...it is an error to disable output escaping for an xsl:value-of or xsl:text element that is used to generate the string-value of a comment, processing instruction or attribute node... </WD> > & should anyway work with your html browser. This is true but it does not apply to onEvents attributes. I do not like when it is decided beforehand what should be escaped. So I rather use XSLT parser (XT) to convert to a valid XML and then use regular expressions to un-escape where I need. The other funny thing about html method is that XSLT parser generates a semi valid document that it can not read back. Seems to me that if there are fancy output methods there are should corresponding fancy input methods. (i.e. XSLT parser should be able to read HTML document if it was produced by another conformant XSLT parser.) Nikita Ogievetsky http://www.cogx.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|