Subject: Re: Hopefully simple -- include a quote? From: Brandon Ibach <bibach@xxxxxxxxxxxxxx> Date: Sat, 23 Oct 1999 22:12:32 -0500 |
Quoting Matthias Clasen <clasen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>: > > So, read in the .h file using the DTD below, use > > XSL to produce docbook? Is that the challenge. > > (How to make my brain hurt!) > > > Actually, I think with a little more sophistication in the dtd > and the right element names, using > > sgmlnorm charlist.dcl charlist.dtd charNames.h > > could produce a suitably tagged version of charNames.h > And right you are! :) After placing the attached files into the "style" directory of the [Open]Jade source distribution, you can do: sgmlnorm charNames.sgml to get the character names, nicely tagged, or: jade -t sgml -d charNames.dsl charNames.sgml to get an HTML page listing all the character names. The document uses DocBook 3.1, supplemented with a few shortrefs, the declaration for which is included in the file, and the style sheet is just a customization of Norm's HTML stylesheet (1.45). You may need to adjust the public identifiers used in these two files. The shortrefs turn this into a <VariableList>, the rendering of which in HTML isn't very compact, and might not be quite right for this, but that can always be changed. Even the tag set could be different, with just a little bit of editing of the SGML file. For instance, the C++ comment at the top of the file currently gets turned into a <comment> inside of a <title> at the top of the <VariableList>. If any comments ever show up in other locations in the file, this will break. We also may want to see the text of the comment, so perhaps the <comment> tag should go. *shrug* -Brandon :)
<!SGML "ISO 8879:1986" CHARSET BASESET "ISO 646:1983//CHARSET International Reference Version (IRV)//ESC 2/5 4/0" DESCSET 0 9 UNUSED 9 2 9 11 2 UNUSED 13 1 13 14 18 UNUSED 32 95 32 127 1 UNUSED BASESET "ISO Registration Number 100//CHARSET ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1" DESCSET 128 32 UNUSED 160 96 32 CAPACITY SGMLREF TOTALCAP 99000000 ATTCAP 1000000 ATTCHCAP 1000000 AVGRPCAP 1000000 ELEMCAP 1000000 ENTCAP 1000000 ENTCHCAP 1000000 GRPCAP 1000000 IDCAP 32000000 IDREFCAP 32000000 SCOPE DOCUMENT SYNTAX SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 BASESET "ISO 646:1983//CHARSET International Reference Version (IRV)//ESC 2/5 4/0" DESCSET 0 128 0 FUNCTION RE 13 RS 10 SPACE 32 TAB SEPCHAR 9 NAMING LCNMSTRT "" UCNMSTRT "" LCNMCHAR ".-_" UCNMCHAR ".-_" NAMECASE GENERAL YES ENTITY NO DELIM GENERAL SGMLREF SHORTREF SGMLREF '{ ' ', "' '" },' '//' '&RS;' NAMES SGMLREF QUANTITY SGMLREF ATTCNT 256 GRPCNT 253 GRPGTCNT 253 LITLEN 8092 NAMELEN 44 TAGLVL 100 FEATURES MINIMIZE DATATAG NO OMITTAG NO RANK NO SHORTTAG YES LINK SIMPLE NO IMPLICIT NO EXPLICIT NO OTHER CONCUR NO SUBDOC NO FORMAL YES APPINFO NONE > <!doctype article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ <!entity cnames SYSTEM "charNames.h"> <!entity a '<varlistentry><term>' > <!entity b '</term><listitem><simpara>' > <!entity c '</simpara></listitem></varlistentry>' > <!entity d '<title><comment>' > <!entity e '</comment></title>' > <!shortref lmap '{ ' a '//' d > <!shortref tmap ', "' b > <!shortref imap '" },' c > <!shortref cmap ' ' e > <!usemap lmap variablelist > <!usemap tmap term > <!usemap imap simpara > <!usemap cmap comment > ]> <article> <title>OpenJade Character Names</title> <simpara>This list was generated directly from the OpenJade source</simpara> <simplesect><title></title> <variablelist> &cnames; </variablelist> </simplesect> </article>
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ <!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL> ]> <style-sheet> <style-specification use="docbook"> <style-specification-body> (define %generate-article-titlepage% #f) (define %generate-article-toc% #f) (define (html-file #!optional (input_nd (current-node))) "charNames.html") </style-specification-body> </style-specification> <external-specification id="docbook" document="docbook.dsl"> </style-sheet>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Hopefully simple -- include a q, Matthias Clasen | Thread | RE: Hopefully simple -- include a q, DPawson |
Re: SGML declarations for subdocume, Matthias Clasen | Date | Re: Where is XSL for CALS TABLE?, Takaaki Yoshida |
Month |