[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

Subject: RE: Special characters turn out as garbage in xslt->html conversion
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 8 Sep 2000 11:56:23 +0100
xslt output special characters
> That is, the second loop gives this (for an A with
> acute accent): 
> 
>       <a name="&Aacute;">&Aacute;</a>
> 
> just like it should. If however the html-attribute is "href" 
> the output is
> like this in html:
> 
>       <a href="#%C3%81">&Aacute;</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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.