Subject: Re: [xsl] url encoding of ampersands From: Sivan Mozes <sivan@xxxxxxxx> Date: Mon, 26 Feb 2001 01:03:26 -0800 |
> This won't work because there is no ampersand in your *source tree* (which > was *derived* from your original XML). é 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 é or é by the XSLT processor's > result tree serializer, just as it would convert an ampersand into &. 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(.,'é'), > '%C3%A9',substring-after(.,'é'))"/> > > - 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] url encoding of ampersand, Mike Brown | Thread | Re: [xsl] url encoding of ampersand, Mike Brown |
[xsl] Concat ( Again ), Samuzeau Pascal | Date | Re: [xsl] [exsl] Re: Draft 0.1 - ca, Jeni Tennison |
Month |