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

Re: Escape Special Characters

Subject: Re: Escape Special Characters
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 25 Oct 2004 00:24:44 +0100
xml escape special characters
> 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;&#10;&#9;&#9;&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
________________________________________________________________________

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.