Subject: Re: Sorted indexes and (string<?) in Jade From: Toby Speight <Toby.Speight@xxxxxxxxxxxxxx> Date: 15 Sep 1998 15:44:16 +0100 |
Steve> Steve Tinney <URL:mailto:stinney@xxxxxxxxxxxxx> 0> In article <199809151409.KAA05361@xxxxxxxxxxxxxxxxxxx>, Steve 0> wrote: Steve> I have solved this problem, sort of, in a slightly different Steve> way. I say sort of only because I don't currently use my Steve> collate code in DSSSL, though I did hack it in. Steve> Steve> The basic idea is that one writes a sequence specification Steve> once, which can then be converted to different forms. At Steve> present there are two converters, written in Perl, which make Steve> C tables and a DSSSL alist respectively. I now have a convertor from the tables supplied with Unicode TR-10 into a DSSSL alist, written as a Makefile: ## Makefile # sorry about the long lines! all: sorttable.dsl sorttable.dsl: basekeys.dsl compkeys.dsl cat header.dsl >$@ sed -e 's/^(#/;;&/' -e 's/^;;\((#\\U-00\)/\1/' -e 's/^;;\((#\\U-017[4-7]\)/\1/' -e 's/^/ /' basekeys.dsl >>$@ sed -e 's/^(#/;;&/' -e 's/^;;\((#\\U-00\)/\1/' -e 's/^;;\((#\\U-017[4-7]\)/\1/' -e 's/^/ /' compkeys.dsl >>$@ cat footer.dsl >>$@ %.dsl: %.txt sed -e 's/^\([0-9A-F][0-9A-F]*\) /(#\\U-\1 /' -e 's/ % /) ; /' \ -e 's/\[\(.\)\([0-9A-F]*\)\.\([0-9A-F]*\)\.\([0-9A-F]*\)\.\([0-9A-F]*\)\]/(#\\\1 #x\2 #x\3 #x\4 #x\5)/g' \ -e 's/\(#x[0-9a-fA-F]*\)A/\1a/g' -e 's/\(#x[0-9a-fA-F]*\)B/\1b/g' \ -e 's/\(#x[0-9a-fA-F]*\)C/\1c/g' -e 's/\(#x[0-9a-fA-F]*\)D/\1d/g' \ -e 's/\(#x[0-9a-fA-F]*\)E/\1e/g' -e 's/\(#x[0-9a-fA-F]*\)F/\1f/g' \ -e 's/\(#x[0-9a-fA-F]*\)A/\1a/g' -e 's/\(#x[0-9a-fA-F]*\)B/\1b/g' \ -e 's/\(#x[0-9a-fA-F]*\)C/\1c/g' -e 's/\(#x[0-9a-fA-F]*\)D/\1d/g' \ -e 's/\(#x[0-9a-fA-F]*\)E/\1e/g' -e 's/\(#x[0-9a-fA-F]*\)F/\1f/g' \ -e 's/\(#x[0-9a-fA-F]*\)A/\1a/g' -e 's/\(#x[0-9a-fA-F]*\)B/\1b/g' \ -e 's/\(#x[0-9a-fA-F]*\)C/\1c/g' -e 's/\(#x[0-9a-fA-F]*\)D/\1d/g' \ -e 's/\(#x[0-9a-fA-F]*\)E/\1e/g' -e 's/\(#x[0-9a-fA-F]*\)F/\1f/g' \ -e 's/\(#x[0-9a-fA-F]*\)A/\1a/g' -e 's/\(#x[0-9a-fA-F]*\)B/\1b/g' \ -e 's/\(#x[0-9a-fA-F]*\)C/\1c/g' -e 's/\(#x[0-9a-fA-F]*\)D/\1d/g' \ -e 's/\(#x[0-9a-fA-F]*\)E/\1e/g' -e 's/\(#x[0-9a-fA-F]*\)F/\1f/g' \ <$< >$@ clean: rm *keys.dsl ## End of Makefile Most of the bulk is in downcasing the hex numbers - easier in Perl. The files header.dsl and footer.dsl add a standard DSSSL wrapping, including a CDATA marked section, as follows <?xml version="1.0" encoding="ISO-8859-1" rmd="none" ?> <!DOCTYPE STYLE-SHEET SYSTEM "style-sheet-xml.dtd"> <STYLE-SHEET> <STYLE-SPECIFICATION ID="collate-data" PARTIAL="PARTIAL"> <STYLE-SPECIFICATION-BODY> <![CDATA[ (define sorttable ( ;;; generated stuff goes here )) ]]> </STYLE-SPECIFICATION-BODY> </STYLE-SPECIFICATION> </STYLE-SHEET> The sed code in the rules for sorttable.dsl comments out the characters I'm not using, for speed. To customise for your own use, change the regexps; at the moment I comment out everything except 0000-00FF and 0174-0177. The DSSSL code which uses this is still under test. Source for basekeys.txt and compkeys.txt: <URL:http://www.unicode.org/unicode/reports/tr10/> -- DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Sorted indexes and (string<?) i, Steve Tinney | Thread | Re: Sorted indexes and (string<?) i, Toby Speight |
Re: Sorted indexes and (string<?) i, Steve Tinney | Date | Re: jade rtf style problem, Adam P. Harris |
Month |