[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Perl workaround for XSLT escaped UTF-8 pass-thru to XH

Subject: Perl workaround for XSLT escaped UTF-8 pass-thru to XHTML
From: Gan Uesli Starling <alias@xxxxxxxxxxx>
Date: Fri, 21 Mar 2003 18:09:27 -0500
perl xml howto
Gan Uesli Starling wrote:
I have an XML here...

http://starling.ws/XML/howto.xml

...which uses this XSLT...

http://starling.ws/XML/howto.xsl

...and looks fine when viewed in either
Mozilla 1.2.1 or MSIE 6 SP 1 as *.xml.

But when I use that same XSLT to output
to *.html as a file, then go to view it
as *.html with those same browsers then
the UTF-8 (since it is not escaped with
ampersand-pound) does not display...

Nobody answered my plea about passing escaped UTF-8 thru from XML to HTML. So I cobbled my own ex-post-facto Perl solution. Not elegant, but at least it works. See results at...

http://starling.ws/XML/howto.html

...which should work for most browsers and not
just Mozilla 1.2.1 and MSIE 6 SP 1.

Here is the Perl script. What it does is
reads in all *.html files and translates
a list of UTF-8 chars to their escaped-for-
HTML identical twins. The list of chars is
for Esperanto and some arrow glyphs. Feel
free to add more.

http://starling.ws/XML/re-escape_UTF-8.pl

Enjoy,

Gan

--

Mistera Sturno - Rarest Extinct Bird

 <(+)__       Gan Uesli Starling
  ((__/)=-    Kalamazoo, MI, USA
   `||`
    ++        http://starling.us


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.