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

Re: url encoding of ampersands

Subject: Re: url encoding of ampersands
From: Sivan Mozes <sivan@xxxxxxxx>
Date: Mon, 26 Feb 2001 01:03:26 -0800
url encode ampersand
> This won't work because there is no ampersand in your *source tree* (which
> was *derived* from your original XML). &#233; in your XML is resolved by
> the XML parser into a single LATIN SMALL E WITH ACUTE character long before
> the XSLT processor sees it. Likewise, your output will be *derived* from
> the result tree you construct, hence the automatic conversion of the
> character in question into &eacute; or &#233; by the XSLT processor's
> result tree serializer, just as it would convert an ampersand into &amp;.

Question: if the xslt processor was passed this character from the xml
parser, how is it selected for conversion as opposed to other characters, by
range?

Shouldn't there be a way to be more specific in HTML output mode in regards
to ampersand handling? (using xerces/xalan).

I eventually wrapped all my entities in CDATA so I can later on encode the
ampersands, and did another assignment pass w/ disable-output-escaping to
parse these entities for displaying link content.

Although it works, I don't like the idea of introducing an exception into
the xml itself, which is being handled by non-techies. Only for specific
elements CDATA needs to be used for entities while everywhere else, entities
are handled in a standard manner. I don't think this can be specified in the
DTD.

Thanks for your illuminating comments.

Sivan
     




 
> <xsl:variable name="anchor" select="concat(substring-before(.,'&#233;'),
> '%C3%A9',substring-after(.,'&#233;'))"/>
> 
> - Mike
> ____________________________________________________________________
> Mike J. Brown, software engineer at            My XML/XSL resources:
> webb.net in Denver, Colorado, USA              http://skew.org/xml/
> 
> 
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 


 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.