Thanks for the typo.
I am just trying to convert "°" to the HTML entity equivalent "&deg"
After further research my approach is currently to use this xsl:
---
<?xml version="1.0"?>
    <!DOCTYPE xsl:stylesheet [
        <!ENTITY nbsp "&#160;">
        <!ENTITY deg "&#176;">
     ]>
<xsl:stylesheet version="1.0"
   xmlns:xalan="http://xml.apache.org/xalan";
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
   xmlns="http://www.w3.org/1999/xhtml";>
  <xsl:template match="/">
  <html>
     <body>
        <xsl:apply-templates/>
     </body>
  </html>
  </xsl:template>
   <xsl:template match="text()" priority="-1">
        <xsl:value-of select="translate(.,'°','&deg;')"/>
   </xsl:template>
</xsl:stylesheet>
---

But "&deg;" doesn't end up in my HTML, it stays as "°".
However, it works with &nbsp; ie:
<xsl:value-of select="translate(.,'°','&nbsp;')"/>

So what's the difference between the 2 entities and how can I resolve it?
Do I use Entity resolution with catalogs:
http://cocoon.apache.org/2.1/userdocs/concepts/catalog.html

Linc

Quoting Joerg Heinicke <[EMAIL PROTECTED]>:

On 22.08.2007 3:11 Uhr, Lincoln Mitchell wrote:

I am trying to output a degree symbol from wordML.
It is entered in word as the symbol  "Alt+0176" ASCII (Decimal).
Which in WordML translates to:
<w:t>°</w:t>

Now, I was hoping to see:
<w:t>&#176</w:t>

Just that (but with a semi-colon at the end: &#176;) should be sufficient. But you say you have the ° already in the WordML. Why do you want to handle it at all in your XSLT? What's wrong with <w:t>°</w:t> compared to <w:t>&#176;</w:t>?

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




----- End forwarded message -----



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to