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

RE: amp symbols

Subject: RE: amp symbols
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 4 Jul 2006 00:14:52 +0100
amp symbol
It's interesting to read the following in James Clark's reply:

Maybe a result-dtd-system-id and result-dtd-public-id attributes on
xsl:stylesheet would be a potential solution.  An XSL engine could
output the appropriate DOCTYPE declaration, but could also read the DTD
so as to find an appropriate entity corresponding to a particular
Unicode code point.

Well, we got the doctype-system and doctype-public added to xsl:output, but
the idea of a processor reading the DTD to extract the entity definitions
was never pursued.

Michael Kay

> -----Original Message-----
> From: David Carlisle [mailto:davidc@xxxxxxxxx] 
> Sent: 04 July 2006 00:01
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  amp 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 stylesheet.
> 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
> http://www.google.com/search?q=xsl-list+carlisle+mathml+++CDATA+entity
> may look vaguely familiar...
> http://www.biglist.com/lists/xsl-list/archives/199901/msg00032.html
> David

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.