Adding unicode mappings to any document (including MathML)

The file included contains XSLT code to:
[1] build a unicode table via unicode-table.xsl and the U+*.xsl stylesheets
[2] load the data into a variable (contained in the unicode-table.xsl 
stylesheet)
[3] map text elements containing a single unicode character to the 
font/value mapping contained in the table

What I would like to do is:
[1] Be able to look up by index value (e.g. character number 0x2200)
[2] Search and map unicode characters embedded within text
[3] Allow alternate mappings to be specified within the table - possibly 
lookup by font, although this may change

The unicode table is customisable in that you can specify your own font 
mappings, but this is currently limited to local manipulation of the table. 
This is what modification [3] is aimed at solving.

This can be used to properly map unicode entries in a MathML document (or 
any document for that matter); to select the bracket parts for a stretched 
operator using the unicode 3.2 mappings; to render a radical root operator 
in a generic fashion.

For example:

<xsl:template match = "po:sqrt" mode = "render">
   <span>
      <span style = "vertical-align: top;">
         <xsl:call-template name = "text">
            <!-- sqrt unicode value -->
            <xsl:with-param name = "x"
               select = "'&#x221A;'"/>
         </xsl:call-template>&#xFEFF;</span>
      <span style = "display: inline;
         border-style: solid;
         border-width: 1pt 0pt 0pt 0pt;
         padding-left: .2em; margin-left: 0em;
         margin-top: .2em; height: 1em;
      "><span><xsl:call-template
         name = "po-getstyle"/>
         <xsl:apply-templates mode = "render"/>
      </span></span>
   </span>
</xsl:template>

[Note: more on the po namespace in another e-mail when I have got it 
functioning properly. Basically, instead of rendering the presentation 
markup directly to HTML+CSS, I am transforming it to a simpler markup so I 
can inherit style attributes, stretch operators, etc. IN THE XSLT ENGINE 
WITHOUT THE USE OF JavaScript! At the moment I am looking at building it 
back into ctop.xsl and pmathml-css.xsl files as I have done some *major* 
improvements to them; I will have the changes fully documented when I send 
you them later on.]

If you have any comments or questions, feel free to e-mail me. Also, feel 
free to use the stylesheets in your projects.

-rhd-
mailto:msclrhd@hotmail.com

_________________________________________________________________
Express yourself with cool emoticons http://messenger.msn.co.uk

Received on Friday, 14 March 2003 07:58:21 UTC