This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: encoding and XSL Transformation


Chuck White wrote:
> Unicode has solved the world's problems, but it hasn't removed legacy
> software from users' systems yet. The bottom line on the original poster's
> question is that before the document is brought in as an XML document he
> needs to convert the single quote to the Unicode representation for that
> single quote, which is not \u0092 or ’., but for XML purposes, either
> ’ in hex or &#8217 in decimal format, hence the need for the kind of
> link I indicated that references this kind of thing, or for apps like
> Unipad.

It wouldn't necessarily have to be before.

<xsl:template match="text()">
  <xsl:value-of select="translate(.,
  '&#x80;&#x82;&#x83;&#x84;&#x85;&#x86;&#x87;&#x88;&#x89;&#x8A;&#x8B;&#x8C;&#x8E;&#x91;&#x92;&#x93;&#x94;&#x95;&#x96;&#x97;&#x98;&#x99;&#x9A;&#x9B;&#x9C;&#x9E;&#x9F;',
  '&#x20AC;&#x201A;&#x192;&#x201E;&#x2026;&#x2020;&#x2021;&#x2C6;&#x2030;&#x160;&#x2039;&#x152;&#x17D;&#x2018;&#x2019;&#x201C;&#x201D;&#x2022;&#x2013;&#x2014;&#x2DC;&#x2122;&#x161;&#x203A;&#x153;&#x17E;&#x178;')"/>
</xsl:template>

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]