Subject: Re: Char node-type From: Richard Light <richard@xxxxxxxxxxxxxxxxx> Date: Mon, 27 Nov 2000 10:04:53 +0000 |
In message <20001125080957.6643.qmail@xxxxxxxxxxxxxxxxxxxxxx>, Dimitre Novatchev <dnovatchev@xxxxxxxxx> writes >Until now I thought that the string-length(), substring() and other >string functions by design must deal correctly with combining " >'character-plus-Unicode-combining- >character(s)' sequences into an image representing the single combined >character. " > >If this was not so, they would be very difficult to use. >Could somebody confirm or deny this? Converting the characters in your source XML into 'images' that can be rendered in an HTML browser is a challenge in its own right. We have identified three types of challenge: - well-defined Unicode characters which a 'typical' [add your own definition here] client browser cannot be relied upon to render; - ditto, for all but the simplest base- plus combining-character combinations; - custom characters declared within the Unicode Private Use area In every case, we would like to be able to call upon a font resource to represent the glyph in question, but can't. Accordingly, we have to use image references instead. To do the job properly, we need variant image filenames appropriate to the context - bold, italic, superscript, title font, ... With XSLT, we can easily check a character's ancestry and add components to the filename in a consistent manner: <xsl:attribute name="src"> <xsl:value-of select="$image-prefix"/> <xsl:if test="ancestor-or-self::titlegrp/title">H2_</xsl:if> <xsl:if test="ancestor-or-self::section/title|subsect1/title">H3_< /xsl:if> <xsl:if test="ancestor-or-self::bo|bi|abstract">B_</xsl:if> <xsl:if test="ancestor-or-self::it|bi">I_</xsl:if> ... The other technique we find helpful is to keep information about character classes in an external XML document, e.g.: <charset> <charclass type="ASCII character"> <char> <value>A</value> <filename>0041</filename> </char> ... </charclass> <charclass type="ligature"> <char> <value>Æ</value> <mapping>AE</mapping> </char> ... </charclass> <charclass type="combining character"> <char> <value>̃</value> <mapping>[tilde]</mapping><filename>0303</filename><comb ines-with> Z</combines-with> </char> ... This separates the information about character mappings from the actual XSLT script. Richard. Richard Light SGML/XML and Museum Information Consultancy richard@xxxxxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Char node-type, David Carlisle | Thread | RE: Char node-type, Kay Michael |
RE: doctype, STENZEL | Date | RE: Clarification on node-set defin, Kay Michael |
Month |