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

Re: encoding shift_jis into an attribute

Subject: Re: encoding shift_jis into an attribute
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Thu, 3 Jun 2004 10:24:39 -0600
shift_jis encoding
Hey Matthew,

If you set the output to XML and then add omit-xml-declaration="yes" (this 
ensures that the <?xml version="1.0"?> is not included in the output) you 
the you can take advantage of the fact that in xml <a href="..."> is seen as 
nothing more than an element and attribute with an associated value and not 
a URI.

So adding this element to your stylesheet:

<xsl:output method="xml" omit-xml-declaration="yes"/>

Will solve the URI escaping issue but will require you to ensure that you 
output HTML correctly, though well formed HTML it may be.  This does create 
possible issues with being  backwards compatible with older browsers.  Will 
your clients be viewing this output in a current generation browser?


----- Original Message ----- 
From: "Matthew Simoneau" <Matthew.Simoneau@xxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, June 03, 2004 10:08 AM
Subject: RE:  encoding shift_jis into an attribute

Thanks Josh and David for your replies.  I understand a little more
about what's going on.

In the original XML-file, these characters are shift_jis encoded
Unicode.  XSLT is helping me convert this file to HTML.  As text on the
page, XSLT wants them to display properly and escapes them using their
numeric character references, "&#25968;&#23398;".  In the context of the
href attribute, it wants them to be part of a valid URI and is URI
encoding them as "%E6%95%B0%E5%AD%A6".

What I want is to work around this feature and get the numeric character
reference representation within an href attribute.  This may be a bad
idea for a general web page or general URI, but makes sense in my
application.  If I change href to anything else, it leaves the numeric
character references, but then of course my links don't work.  I found
references on the web that this is a feature of Saxon that can be turned
off, but I can't figure out how.

Does anyone have any ideas about how to attack this?

XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>

Current Thread


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.
First Name
Last Name
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.