updated roff.charmap file + XML charmap
Michael Smith <[email protected]> Wed, 28 Jan 2004 18:38:25 +0900
| Newsgroups | gmane.text.docbook.docbook2x.general |
|---|---|
| Message-ID | <20040128093801.GC304@zennihon_yopparai_rengo> |
Steve,
Attached is an updated roff.charmap file for use with utf8trans. There
are some incorrect mappings in the current docbook2X charmap that this
fixes. It also adds a bunch of new mappings. The total number of
mappings in it is around 800.
I generated the file from an XML version that I made (also attached).
The XML version follows the "character map" format specified in the XSLT
2.0 working draft[1], but it can be used with an appropriate XSLT 1.0
stylesheet and any XSLT 1.0 processor.
[1] http://www.w3.org/TR/xslt20/#character-maps
(I'm finishing up work on an XSLT 1.0 stylesheet that will enable users
to do unicode character conversion to roff purely using XSLT. Of course
it's very slow -- at least 10 or 20 times slower than doing it with
utf8trans. But if you use it with some subset of the character map
instead of the whole 800-character map, the performance is acceptable.)
In order to make the XML character map more readable, I made up some
"extension attributes"[2] (unichar:name and unichar:entity) and added
them to the xsl:output-character element. So, a complete example for
particular character goes like this:
<xsl:output-character
char="©"
unichar:name="COPYRIGHT SIGN"
unichar:entity="copy"
string="¥(co"
/>
Use of such extension attributes is permitted by the XSLT 2.0
spec; see the "Extension Attributes" section[2].
[2] http://www.w3.org/TR/xslt20/#extension-attributes
--Mike
charmap.tar.gz
(application/x-tar-gz, 23.7 KB) - not displayed
signature.asc
(application/pgp-signature, 155 B)
-----BEGIN PGP SIGNATURE----- iD8DBQFAF4MQsGCNMsnBsxkRApDcAJ930rHYSQmW+4WrecaglrtbF5UowACggEge f2UaQVvJf+lkAhqQXZk1/pI= =3jPf -----END PGP SIGNATURE-----