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

Re: UTF-8 URL encoding with XSLT 1.0

Subject: Re: UTF-8 URL encoding with XSLT 1.0
From: "Martynas Jusevicius" <martynas.jusevicius@xxxxxxxxx>
Date: Sat, 2 Jun 2007 12:14:53 +0200
Re:  UTF-8 URL encoding with XSLT 1.0
Ok, now I get it :) I'm using PHP's XSL, so I guess I'll go better
look for a way to call PHP's functions from stylesheets.

Martynas

On 6/2/07, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> is there a stylesheet somewhere to encode URLs in XSLT 1.0?
> So far I'm using one from http://skew.org/xml/stylesheets/url-encode/
> , but it looks like it cannot handle UTF-8.

Doing UTF-8 is about five orders of magnitude harder than doing Latin-1.
Instead of a table of 256 characters, you'll need a table of 1114111
characters. You'll then need to implement the tricky bit-twiddling rules of
UTF-8 encoding in a language that has no built-in bit-twiddling operators.
And at the end it will be painfully slow.

In short, doing this in pure XSLT 1.0 without extensions is pure masochism.
Look for other options. Why are you doing it anyway?

Michael Kay
http://www.saxonica.com/

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.