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

Re: amp symbols

Subject: Re: amp symbols
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 4 Jul 2006 00:01:13 +0100
xml symbols
> ? Also, the one issue  
> that I am running into is the fact that if I try to put an entity  
> symbol into the file such as &test; when I process the file, it  
> converts it to &amp;test;. 

Your input must have also been &amp;test; (or <![CDATA[&test;]]> wich is
the same thing, as otherwise you'd have an undefined entity error in the

If your processor supports d-o-e then
<xsl:text disable-output-escaping="yes">&amp;test;</xsl:text>
will produce what you want, but a system is allowed to silently ignore
d-o-e and then gove you &amp;test; so perhaps that is what you are
seeing. (Which processor are you using?)

> It's like it won't allow me to use the &  
> symbol even when using it in the name of the entity.

An XSL file has to be well formed XML so that means that either & has to
be used as the start of a character or entity reference, or it has to
be quoted or equivalently in a CDATA section. If it's used as an entity
reference delimiter then teh entity must be defined in the stylesheet,
but XSLT will not see the entity, it will be resolved by the XML parser
before XSLT starts. If you use a quted amp then that is what you get in
the result unless you turn off the escaping in teh result tree with the
d-o-e attribute.

If it makes you feel any better, you're not the first person to go
through this loop. Including, er, "at least one" of the people
responding in the current thread...

First hit that I get for
may look vaguely familiar...



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.