|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Special characters turn out as garbage in xslt->html con
> That is, the second loop gives this (for an A with > acute accent): > > <a name="Á">Á</a> > > just like it should. If however the html-attribute is "href" > the output is > like this in html: > > <a href="#%C3%81">Á</a> > > I have absolutely no idea why this happens and haven't been > able to find any clues. The clue is the paragraph in XSLT section 16.2 that says: "The html output method should output non-ASCII characters in URI attribute values using the method recommended in section B.2.1 of the HTML 4.0 Recommendation". Technically, non-ASCII characters in URIs are illegal. The "garbage" is actually the hex representation of the UTF-8 encoding of the relevant characters. Don't worry about the HTML, so long as it works in your browser! I think the <a name=""> attribute should also be escaped this way even though its value is not a URI, this is a minor omission from the XSLT spec. Mike Kay 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
|

Cart








