Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] amp symbols

From: "Michael Kay" <mike@------------>
To:
Date: 7/3/2006 11:15:00 PM
It's interesting to read the following in James Clark's reply:

<quote>
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.
</quote>

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
http://www.saxonica.com/ 

> -----Original Message-----
> From: David Carlisle [mailto:davidc@xxxxxxxxx] 
> Sent: 04 July 2006 00:01
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent