Re: [xsl] Escape Special Characters

Subject: Re: [xsl] Escape Special Characters
From: Jen Jiang <zhenjiang14221@xxxxxxxxx>
Date: Sun, 24 Oct 2004 17:33:57 -0700 (PDT)
The result I got is:
<img
src="./php/chart_age.php?age1=30&amp;%0a%09%09&amp;age2=10&amp;%0a%09%09&amp;age3=30&amp;%0a%09%09&amp;age4=10&amp;%0a%09%09&amp;age5=20&amp;%0a%09%09&amp;age6=0&amp;%0a%09%09&amp;age7=0&amp;%0a%09%09&amp;age8=0">.
I don't know what those ";%0a%09%09"
are but in this way I can get the values in my php
file. If I take off one &amp; for each variable in the
url the values won't be passed to the php file. It is
very odd.



--- David Carlisle <davidc@xxxxxxxxx> wrote:

> 
> > I'm baffled by this use of &amp;. I have to use it
> > twice for each & sign in the URL to get the
> variables
> > passed correctly. Does someone have explanation
> for
> > this?
> 
> You didn't show the output you got, or the correct
> output thatyou
> wanted.
> The output from the code you showed should be rather
> odd.
> Most of your text is in xsl:text and the usual
> reason for using xsl:text
> is to allow indentation of teh stylesheet without it
> affecting the
> result tree, but you also have non-white characters
> in your text nodes
> (&amp;) so the whole text node will be copied to teh
> output.
> 
> 	<xsl:attribute name='src'>
> 		<xsl:text>./php/chart_age.php?    
> age1=</xsl:text>
> 		<xsl:value-of select="AGE1"/>&amp;
> 		<xsl:text>&amp;age2=</xsl:text>
> 
> after the value of AGE1 you generate the character &
> followed by a
> newline two tabs then another &.
> As this is in an attribute value where white space
> would be normalised,
> the XSLt engine will have to quote the white space
> so i would expect
> that you woul dget something like
>  age1=33&amp;
		&amp;age2=...
> 
> David
> 
> 
>
________________________________________________________________________
> This e-mail has been scanned for all viruses by
> Star. The
> service is powered by MessageLabs. For more
> information on a proactive
> anti-virus service working around the clock, around
> the globe, visit:
> http://www.star.net.uk
>
________________________________________________________________________
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Current Thread