docstring-checkins Mailing List for Docstring Processing System (Page 5)
Status: Pre-Alpha
Brought to you by:
goodger
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(53) |
Sep
(54) |
Oct
(26) |
Nov
(27) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(60) |
Feb
(85) |
Mar
(94) |
Apr
(40) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David G. <go...@us...> - 2002-03-11 03:25:57
|
Update of /cvsroot/docstring/dps/test/test_transforms In directory usw-pr-cvs1:/tmp/cvs-serv11918/dps/test/test_transforms Modified Files: test_hyperlinks.py Log Message: updated Index: test_hyperlinks.py =================================================================== RCS file: /cvsroot/docstring/dps/test/test_transforms/test_hyperlinks.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_hyperlinks.py 20 Feb 2002 04:30:03 -0000 1.5 --- test_hyperlinks.py 11 Mar 2002 03:25:54 -0000 1.6 *************** *** 30,34 **** # Exhaustive listing of hyperlink variations: every combination of # target/reference, direct/indirect, internal/external, and named/anonymous. ! totest['enumerated_hyperlinks'] = ((Hyperlinks,), [ ["""\ direct_ external --- 30,34 ---- # Exhaustive listing of hyperlink variations: every combination of # target/reference, direct/indirect, internal/external, and named/anonymous. ! totest['exhaustive_hyperlinks'] = ((Hyperlinks,), [ ["""\ direct_ external *************** *** 91,94 **** --- 91,148 ---- """], ["""\ + Implicit + -------- + + indirect_ internal + + .. _indirect: implicit_ + """, + """\ + <document> + <section id="id1" name="implicit"> + <title> + Implicit + <paragraph> + <reference refname="implicit"> + indirect + internal + <target id="id2" name="indirect" refname="implicit"> + """], + ["""\ + Implicit + -------- + + Duplicate implicit targets. + + Implicit + -------- + + indirect_ internal + + .. _indirect: implicit_ + """, + """\ + <document> + <section dupname="implicit" id="id1"> + <title> + Implicit + <paragraph> + Duplicate implicit targets. + <section dupname="implicit" id="id2"> + <title> + Implicit + <system_message level="1" refid="id2" type="INFO"> + <paragraph> + Duplicate implicit target name: "implicit" + <paragraph> + <reference refname="implicit"> + indirect + internal + <target id="id3" name="indirect" refname="implicit"> + <system_message level="2" type="WARNING"> + <paragraph> + Indirect hyperlink target "indirect" refers to target "implicit", which does not exist. + """], + ["""\ `direct external`__ *************** *** 98,104 **** <document> <paragraph> ! <reference refuri="http://direct"> direct external ! <target id="id1" name="_:1:_" refuri="http://direct"> """], ["""\ --- 152,158 ---- <document> <paragraph> ! <reference anonymous="1" refuri="http://direct"> direct external ! <target anonymous="1" id="id1" name="_:1:_" refuri="http://direct"> """], ["""\ *************** *** 111,117 **** <document> <paragraph> ! <reference refuri="http://indirect"> indirect external ! <target id="id2" name="_:1:_" refuri="http://indirect"> <target id="id1" name="xtarget" refuri="http://indirect"> """], --- 165,171 ---- <document> <paragraph> ! <reference anonymous="1" refuri="http://indirect"> indirect external ! <target anonymous="1" id="id2" name="_:1:_" refuri="http://indirect"> <target id="id1" name="xtarget" refuri="http://indirect"> """], *************** *** 123,129 **** """\ <document> ! <target id="id1" name="_:1:_"> <paragraph> ! <reference refname="_:1:_"> direct internal """], --- 177,183 ---- """\ <document> ! <target anonymous="1" id="id1" name="_:1:_"> <paragraph> ! <reference anonymous="1" refname="_:1:_"> direct internal """], *************** *** 139,145 **** <target id="id1" name="ztarget"> <paragraph> ! <reference refname="ztarget"> indirect internal ! <target id="id2" name="_:1:_" refname="ztarget"> """], ]) --- 193,228 ---- <target id="id1" name="ztarget"> <paragraph> ! <reference anonymous="1" refname="ztarget"> indirect internal ! <target anonymous="1" id="id2" name="_:1:_" refname="ztarget"> ! """], ! ["""\ ! .. _ztarget: ! ! First ! ! .. _ztarget: ! ! Second ! ! `indirect internal`__ ! ! __ ztarget_ ! """, ! """\ ! <document> ! <target dupname="ztarget" id="id1"> ! <paragraph> ! First ! <system_message level="2" refid="id2" type="WARNING"> ! <paragraph> ! Duplicate explicit target name: "ztarget" ! <target dupname="ztarget" id="id2"> ! <paragraph> ! Second ! <paragraph> ! <reference anonymous="1" refname="ztarget"> ! indirect internal ! <target anonymous="1" id="id3" name="_:1:_" refname="ztarget"> """], ]) *************** *** 289,312 **** """\ <document> ! <target id="id2" name="_:1:_" refuri="http://full"> ! <target id="id3" name="_:2:_" refuri="http://simplified"> ! <target id="id4" name="_:3:_" refuri="http://simplified"> <target id="id1" name="external" refuri="http://indirect.external"> ! <target id="id5" name="_:4:_" refuri="http://indirect.external"> ! <target id="id6" name="_:5:_"> <paragraph> ! <reference refuri="http://full"> Full syntax anonymous external hyperlink reference , ! <reference refuri="http://simplified"> chained anonymous external reference , ! <reference refuri="http://simplified"> simplified syntax anonymous external hyperlink reference , ! <reference refuri="http://indirect.external"> indirect anonymous hyperlink reference , ! <reference refname="_:5:_"> internal anonymous hyperlink reference . --- 372,395 ---- """\ <document> ! <target anonymous="1" id="id2" name="_:1:_" refuri="http://full"> ! <target anonymous="1" id="id3" name="_:2:_" refuri="http://simplified"> ! <target anonymous="1" id="id4" name="_:3:_" refuri="http://simplified"> <target id="id1" name="external" refuri="http://indirect.external"> ! <target anonymous="1" id="id5" name="_:4:_" refuri="http://indirect.external"> ! <target anonymous="1" id="id6" name="_:5:_"> <paragraph> ! <reference anonymous="1" refuri="http://full"> Full syntax anonymous external hyperlink reference , ! <reference anonymous="1" refuri="http://simplified"> chained anonymous external reference , ! <reference anonymous="1" refuri="http://simplified"> simplified syntax anonymous external hyperlink reference , ! <reference anonymous="1" refuri="http://indirect.external"> indirect anonymous hyperlink reference , ! <reference anonymous="1" refname="_:5:_"> internal anonymous hyperlink reference . *************** *** 327,331 **** 's (different URIs): <target dupname="target" id="id1" refuri="first"> ! <system_message level="2" type="WARNING"> <paragraph> Duplicate explicit target name: "target" --- 410,414 ---- 's (different URIs): <target dupname="target" id="id1" refuri="first"> ! <system_message level="2" refid="id2" type="WARNING"> <paragraph> Duplicate explicit target name: "target" |
From: David G. <go...@us...> - 2002-03-11 03:25:50
|
Update of /cvsroot/docstring/dps/test/test_transforms In directory usw-pr-cvs1:/tmp/cvs-serv11889/dps/test/test_transforms Modified Files: test_footnotes.py Log Message: updated Index: test_footnotes.py =================================================================== RCS file: /cvsroot/docstring/dps/test/test_transforms/test_footnotes.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** test_footnotes.py 8 Mar 2002 04:26:07 -0000 1.8 --- test_footnotes.py 11 Mar 2002 03:25:46 -0000 1.9 *************** *** 187,191 **** 3 should be 3, \n\ ! <problematic> [#]_ is one too many, --- 187,191 ---- 3 should be 3, \n\ ! <problematic refid="id7"> [#]_ is one too many, *************** *** 223,232 **** <label> 6 ! <system_message level="2" type="WARNING"> <paragraph> Duplicate explicit target name: "five" <paragraph> Auto-numbered footnote 5 again (duplicate). ! <system_message level="3" type="ERROR"> <paragraph> Too many autonumbered footnote references: only 2 corresponding footnotes available. --- 223,232 ---- <label> 6 ! <system_message level="2" refid="id4" type="WARNING"> <paragraph> Duplicate explicit target name: "five" <paragraph> Auto-numbered footnote 5 again (duplicate). ! <system_message id="id7" level="3" type="ERROR"> <paragraph> Too many autonumbered footnote references: only 2 corresponding footnotes available. *************** *** 332,336 **** 6 should be 6, \n\ ! <problematic> [#]_ is one too many, --- 332,336 ---- 6 should be 6, \n\ ! <problematic refid="id8"> [#]_ is one too many, *************** *** 372,381 **** <label> 7 ! <system_message level="2" type="WARNING"> <paragraph> Duplicate explicit target name: "five" <paragraph> Auto-numbered footnote 5 again (duplicate). ! <system_message level="3" type="ERROR"> <paragraph> Too many autonumbered footnote references: only 2 corresponding footnotes available. --- 372,381 ---- <label> 7 ! <system_message level="2" refid="id5" type="WARNING"> <paragraph> Duplicate explicit target name: "five" <paragraph> Auto-numbered footnote 5 again (duplicate). ! <system_message id="id8" level="3" type="ERROR"> <paragraph> Too many autonumbered footnote references: only 2 corresponding footnotes available. |
From: David G. <go...@us...> - 2002-03-08 04:32:09
|
Update of /cvsroot/docstring/dps/dps/writers In directory usw-pr-cvs1:/tmp/cvs-serv2162/dps/dps/writers Modified Files: html.py Log Message: fixes & additions Index: html.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/writers/html.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** html.py 7 Mar 2002 05:00:58 -0000 1.9 --- html.py 8 Mar 2002 04:32:05 -0000 1.10 *************** *** 121,126 **** def visit_bullet_list(self, node): ! self.body.append(self.starttag(node, 'ul', ! CLASS='bullet'+node['bullet'])) def depart_bullet_list(self, node): --- 121,125 ---- def visit_bullet_list(self, node): ! self.body.append(self.starttag(node, 'ul')) def depart_bullet_list(self, node): *************** *** 610,614 **** def visit_table(self, node): ! self.body.append(self.starttag(node, 'table', rules='all')) def depart_table(self, node): --- 609,613 ---- def visit_table(self, node): ! self.body.append(self.starttag(node, 'table', frame='box', rules='all')) def depart_table(self, node): *************** *** 624,627 **** --- 623,627 ---- def visit_tbody(self, node): + self.body.append(self.context.pop()) # '</COLGROUP>\n' or '' self.body.append(self.starttag(node, 'tbody', valign='top')) *************** *** 640,644 **** def visit_tgroup(self, node): ! pass def depart_tgroup(self, node): --- 640,645 ---- def visit_tgroup(self, node): ! self.body.append(self.starttag(node, 'colgroup')) ! self.context.append('</COLGROUP>\n') def depart_tgroup(self, node): *************** *** 646,649 **** --- 647,652 ---- def visit_thead(self, node): + self.body.append(self.context.pop()) # '</COLGROUP>\n' + self.context.append('') self.body.append(self.starttag(node, 'thead', valign='bottom')) |
From: David G. <go...@us...> - 2002-03-08 04:32:07
|
Update of /cvsroot/docstring/dps/spec In directory usw-pr-cvs1:/tmp/cvs-serv2145/dps/spec Modified Files: dps-notes.txt Log Message: updated Index: dps-notes.txt =================================================================== RCS file: /cvsroot/docstring/dps/spec/dps-notes.txt,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** dps-notes.txt 1 Mar 2002 03:15:42 -0000 1.28 --- dps-notes.txt 8 Mar 2002 04:32:03 -0000 1.29 *************** *** 90,93 **** --- 90,95 ---- that case? + - Perhaps combine name mangling with sequential ids? + - ID everything? Or only named elements? *************** *** 101,106 **** - Boolean attributes. ``<element boolean>`` is good, ``<element ! boolean="boolean">`` is bad. Use a special value in attributes ! mapping, such as ``None``? - Escape double-dashes inside comments. --- 103,108 ---- - Boolean attributes. ``<element boolean>`` is good, ``<element ! boolean="boolean">`` is bad. Use a special value in attribute ! mappings, such as ``None``? - Escape double-dashes inside comments. *************** *** 177,181 **** be adjusted. ! (HTML only? See Deployment_ below.) --- 179,183 ---- be adjusted. ! (HTML only? See Distributors_ below.) *************** *** 304,308 **** 2 // 4 \ 7 / 9 \ +--------+ +------------+ +------------+ +--------------+ ! | PARSER |...| reader | | writer |...| deployment | +--------+ | transforms | | transforms | | | | | | | | - one file | --- 306,310 ---- 2 // 4 \ 7 / 9 \ +--------+ +------------+ +------------+ +--------------+ ! | PARSER |...| reader | | writer |...| DISTRIBUTOR | +--------+ | transforms | | transforms | | | | | | | | - one file | *************** *** 334,348 **** ------ ! - Naming. Use "director"/"builder" instead of "reader"/"writer"? Then ! "deployment" could be replaced by "writer". ! ! - Transforms. How to specify which transforms (and in what order) apply to each combination of reader, parser/syntax, writer, and ! deployment? Even if we restrict ourselves to one parser, there will ! eventually be a multitude of readers, writers, and deployment options. ! Or are readers & writers independent? Then we have reader/parser and ! writer/deployment combinations to consider. --- 336,347 ---- ------ ! - Transforms. How to specify which transforms (and in what order) apply to each combination of reader, parser/syntax, writer, and ! distributor? Even if we restrict ourselves to one parser, there ! will eventually be a multitude of readers, writers, and distributor options. ! Or are readers & writers independent? Then we have reader/parser ! and writer/distributor combinations to consider. *************** *** 350,353 **** --- 349,357 ---- ---------- + Production -> Publication -> Distribution + + Producer -> Publisher -> Distributor + + Parsers ``````` *************** *** 407,412 **** ``````` - ("Writers" may be renamed to "Builders".) - Responsibilities: --- 411,414 ---- *************** *** 423,437 **** ! Deployment ! `````````` - ("Deployment" may be renamed to "Writers" or "Publishers", and current - writer/deployment [renamed to builder/writer] components may change - places. After renaming, the model would look like this:: 1,3,5 6,8 ! +--------+ +---------+ formerly ! | READER | =======================> | BUILDER | writer ! +--------+ (purely presentational) +---------+ // \ / \ // \ / \ --- 425,439 ---- ! Distributors ! ```````````` ! ! (Writer/distributor components may change places. After rearranging, ! the model would look like this:: 1,3,5 6,8 ! +--------+ +-------------+ ! | READER | =======================> | DISTRIBUTOR | ! +--------+ (purely presentational) +-------------+ // \ / \ // \ / \ *************** *** 440,472 **** | PARSER |...| reader | | writer |...| WRITER | +--------+ | transforms | | transforms | +--------+ ! | ... | | ... | formerly ! deployment ! ! After renaming *and* rearrangement, the model would look like this:: ! ! 1,3,5 6,8 ! +--------+ +--------+ formerly ! | READER | =======================> | WRITER | deployment ! +--------+ (purely presentational) +--------+ ! // \ / \ ! // \ / \ ! 2 // 4 \ 7 / 9 \ ! +--------+ +------------+ +------------+ +---------+ ! | PARSER |...| reader | | writer |...| BUILDER | ! +--------+ | transforms | | transforms | +---------+ ! | ... | | ... | formerly writer ! We'll wait and see which arrangement works out best. Is it better for ! the writer/builder to control the deployment/writer, or vice versa? Or ! should they be equals? Looking at the list of writers, it seems that only HTML would require ! anything other than monolithic output. Perhaps merge the "deployment" ! into the "writer"?) Responsibilities: - Do raw output to the destination. ! - Transform references per incarnation. Examples: --- 442,459 ---- | PARSER |...| reader | | writer |...| WRITER | +--------+ | transforms | | transforms | +--------+ ! | ... | | ... | ! We'll wait and see which arrangement works out best. Is it better for ! the writer to control the distributor, or vice versa? Or should they ! be equals? Looking at the list of writers, it seems that only HTML would require ! anything other than monolithic output. Perhaps merge the HTML ! "distributor" into "writer" variants?) Responsibilities: - Do raw output to the destination. ! - Transform references per incarnation (type of distribution). Examples: |
From: David G. <go...@us...> - 2002-03-08 04:31:57
|
Update of /cvsroot/docstring/dps/dps/transforms In directory usw-pr-cvs1:/tmp/cvs-serv2107/dps/dps/transforms Modified Files: universal.py Log Message: fixes & additions Index: universal.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/transforms/universal.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** universal.py 1 Mar 2002 03:13:37 -0000 1.1 --- universal.py 8 Mar 2002 04:31:54 -0000 1.2 *************** *** 30,34 **** self.setup_transform(doctree) if len(doctree.messages) > 0: ! section = nodes.section(CLASS='system_messages') # @@@ get this from the language module? section += nodes.title('', 'Docutils System Messages') --- 30,34 ---- self.setup_transform(doctree) if len(doctree.messages) > 0: ! section = nodes.section(CLASS='system-messages') # @@@ get this from the language module? section += nodes.title('', 'Docutils System Messages') |
From: David G. <go...@us...> - 2002-03-08 04:31:47
|
Update of /cvsroot/docstring/dps/dps/transforms In directory usw-pr-cvs1:/tmp/cvs-serv2070/dps/dps/transforms Modified Files: references.py Log Message: fixes & additions Index: references.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/transforms/references.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** references.py 7 Mar 2002 04:01:40 -0000 1.8 --- references.py 8 Mar 2002 04:31:44 -0000 1.9 *************** *** 169,177 **** try: reftarget = self.doctree.explicit_targets[refname] ! except KeyError: msg = self.doctree.reporter.warning( 'Indirect hyperlink target "%s" refers to target "%s", ' 'which does not exist.' % (name, refname)) self.doctree.messages += msg if reftarget.hasattr('name'): if not reftarget.resolved and reftarget.hasattr('refname'): --- 169,179 ---- try: reftarget = self.doctree.explicit_targets[refname] ! except KeyError: # @@@ something wrong here ! # @@@ give id for anonymous targets msg = self.doctree.reporter.warning( 'Indirect hyperlink target "%s" refers to target "%s", ' 'which does not exist.' % (name, refname)) self.doctree.messages += msg + return if reftarget.hasattr('name'): if not reftarget.resolved and reftarget.hasattr('refname'): |
From: David G. <go...@us...> - 2002-03-08 04:30:39
|
Update of /cvsroot/docstring/dps/test In directory usw-pr-cvs1:/tmp/cvs-serv1761/dps/test Modified Files: DPSTestSupport.py Log Message: unicode fiddling Index: DPSTestSupport.py =================================================================== RCS file: /cvsroot/docstring/dps/test/DPSTestSupport.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DPSTestSupport.py 7 Mar 2002 03:52:11 -0000 1.7 --- DPSTestSupport.py 8 Mar 2002 04:30:36 -0000 1.8 *************** *** 24,29 **** import UnitTestFolder import sys, os ! #, unittest, re, difflib, types, inspect ! #from pprint import pformat # try to import the current working version if possible --- 24,28 ---- import UnitTestFolder import sys, os ! import unittest, difflib, inspect, os, sys # try to import the current working version if possible *************** *** 34,39 **** from dps.transforms import universal - import unittest, difflib, inspect, os, sys - try: import mypdb as pdb --- 33,36 ---- *************** *** 145,154 **** def compareOutput(self, input, output, expected): """`input`, `output`, and `expected` should all be strings.""" - output = output.encode('raw-unicode-escape') - expected = expected.encode('raw-unicode-escape') try: self.assertEquals('\n' + output, '\n' + expected) except AssertionError: - input = input.encode('raw-unicode-escape') print >>sys.stderr, '\n%s\ninput:' % (self,) print >>sys.stderr, input --- 142,148 ---- |
From: David G. <go...@us...> - 2002-03-08 04:30:29
|
Update of /cvsroot/docstring/dps/test In directory usw-pr-cvs1:/tmp/cvs-serv1672/dps/test Modified Files: alltests.py Log Message: unicode fiddling Index: alltests.py =================================================================== RCS file: /cvsroot/docstring/dps/test/alltests.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** alltests.py 26 Jan 2002 00:06:55 -0000 1.2 --- alltests.py 8 Mar 2002 04:30:25 -0000 1.3 *************** *** 24,27 **** --- 24,28 ---- def write(self, string): + string = string.encode('raw-unicode-escape') self.stream.write(string) self.file.write(string) |
From: David G. <go...@us...> - 2002-03-08 04:26:25
|
Update of /cvsroot/docstring/dps/test/test_transforms In directory usw-pr-cvs1:/tmp/cvs-serv898/dps/test/test_transforms Modified Files: test_messages.py Log Message: updated Index: test_messages.py =================================================================== RCS file: /cvsroot/docstring/dps/test/test_transforms/test_messages.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_messages.py 22 Feb 2002 01:58:02 -0000 1.1 --- test_messages.py 8 Mar 2002 04:26:22 -0000 1.2 *************** *** 56,60 **** (A second copy of the system message is tacked on to the end of the doctree by the test framework.) ! <section class="system_messages"> <title> Docutils System Messages --- 56,60 ---- (A second copy of the system message is tacked on to the end of the doctree by the test framework.) ! <section class="system-messages"> <title> Docutils System Messages |
From: David G. <go...@us...> - 2002-03-08 04:26:11
|
Update of /cvsroot/docstring/dps/test/test_transforms In directory usw-pr-cvs1:/tmp/cvs-serv843/dps/test/test_transforms Modified Files: test_footnotes.py Log Message: updated Index: test_footnotes.py =================================================================== RCS file: /cvsroot/docstring/dps/test/test_transforms/test_footnotes.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_footnotes.py 7 Mar 2002 03:50:39 -0000 1.7 --- test_footnotes.py 8 Mar 2002 04:26:07 -0000 1.8 *************** *** 44,48 **** <paragraph> text ! """], # @@@ remove "auto" atts? ["""\ autonumber: [#]_ --- 44,48 ---- <paragraph> text ! """], ["""\ autonumber: [#]_ *************** *** 416,420 **** .. [*] Auto-symbol footnote 12. """, ! """\ <document> <paragraph> --- 416,420 ---- .. [*] Auto-symbol footnote 12. """, ! u"""\ <document> <paragraph> *************** *** 424,437 **** \n\ <footnote_reference auto="*" refid="id2"> ! \\u2020 \n\ <footnote_reference auto="*" refid="id3"> ! \\u2021 \n\ <footnote_reference auto="*" refid="id4"> ! \\u00A7 \n\ <footnote_reference auto="*" refid="id5"> ! \\u00B6 \n\ <footnote_reference auto="*" refid="id6"> --- 424,437 ---- \n\ <footnote_reference auto="*" refid="id2"> ! \u2020 \n\ <footnote_reference auto="*" refid="id3"> ! \u2021 \n\ <footnote_reference auto="*" refid="id4"> ! \u00A7 \n\ <footnote_reference auto="*" refid="id5"> ! \u00B6 \n\ <footnote_reference auto="*" refid="id6"> *************** *** 439,452 **** \n\ <footnote_reference auto="*" refid="id7"> ! \\u2660 \n\ <footnote_reference auto="*" refid="id8"> ! \\u2663 \n\ <footnote_reference auto="*" refid="id9"> ! \\u2665 \n\ <footnote_reference auto="*" refid="id10"> ! \\u2666 \n\ <footnote_reference auto="*" refid="id11"> --- 439,452 ---- \n\ <footnote_reference auto="*" refid="id7"> ! \u2660 \n\ <footnote_reference auto="*" refid="id8"> ! \u2663 \n\ <footnote_reference auto="*" refid="id9"> ! \u2665 \n\ <footnote_reference auto="*" refid="id10"> ! \u2666 \n\ <footnote_reference auto="*" refid="id11"> *************** *** 454,458 **** \n\ <footnote_reference auto="*" refid="id12"> ! \\u2020\\u2020 . <footnote auto="*" id="id1"> --- 454,458 ---- \n\ <footnote_reference auto="*" refid="id12"> ! \u2020\u2020 . <footnote auto="*" id="id1"> *************** *** 463,482 **** <footnote auto="*" id="id2"> <label> ! \\u2020 <paragraph> Auto-symbol footnote 2. <footnote auto="*" id="id3"> <label> ! \\u2021 <paragraph> Auto-symbol footnote 3. <footnote auto="*" id="id4"> <label> ! \\u00A7 <paragraph> Auto-symbol footnote 4. <footnote auto="*" id="id5"> <label> ! \\u00B6 <paragraph> Auto-symbol footnote 5. --- 463,482 ---- <footnote auto="*" id="id2"> <label> ! \u2020 <paragraph> Auto-symbol footnote 2. <footnote auto="*" id="id3"> <label> ! \u2021 <paragraph> Auto-symbol footnote 3. <footnote auto="*" id="id4"> <label> ! \u00A7 <paragraph> Auto-symbol footnote 4. <footnote auto="*" id="id5"> <label> ! \u00B6 <paragraph> Auto-symbol footnote 5. *************** *** 488,507 **** <footnote auto="*" id="id7"> <label> ! \\u2660 <paragraph> Auto-symbol footnote 7. <footnote auto="*" id="id8"> <label> ! \\u2663 <paragraph> Auto-symbol footnote 8. <footnote auto="*" id="id9"> <label> ! \\u2665 <paragraph> Auto-symbol footnote 9. <footnote auto="*" id="id10"> <label> ! \\u2666 <paragraph> Auto-symbol footnote 10. --- 488,507 ---- <footnote auto="*" id="id7"> <label> ! \u2660 <paragraph> Auto-symbol footnote 7. <footnote auto="*" id="id8"> <label> ! \u2663 <paragraph> Auto-symbol footnote 8. <footnote auto="*" id="id9"> <label> ! \u2665 <paragraph> Auto-symbol footnote 9. <footnote auto="*" id="id10"> <label> ! \u2666 <paragraph> Auto-symbol footnote 10. *************** *** 513,517 **** <footnote auto="*" id="id12"> <label> ! \\u2020\\u2020 <paragraph> Auto-symbol footnote 12. --- 513,517 ---- <footnote auto="*" id="id12"> <label> ! \u2020\u2020 <paragraph> Auto-symbol footnote 12. |
From: Richard J. <ri...@us...> - 2002-03-07 05:01:02
|
Update of /cvsroot/docstring/dps/dps/writers In directory usw-pr-cvs1:/tmp/cvs-serv25281 Modified Files: html.py Log Message: changed _ to - in CSS class names Index: html.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/writers/html.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** html.py 7 Mar 2002 03:58:30 -0000 1.8 --- html.py 7 Mar 2002 05:00:58 -0000 1.9 *************** *** 156,160 **** href = '#' + self.doctree.nameids[node['refname']] self.body.append(self.starttag(node, 'a', '[', href=href, ! CLASS='citation_reference')) def depart_citation_reference(self, node): --- 156,160 ---- href = '#' + self.doctree.nameids[node['refname']] self.body.append(self.starttag(node, 'a', '[', href=href, ! CLASS='citation-reference')) def depart_citation_reference(self, node): *************** *** 162,166 **** def visit_classifier(self, node): ! self.body.append(' <SPAN CLASS="classifier_delimiter">:</SPAN> ') self.body.append(self.starttag(node, 'span', '', CLASS='classifier')) --- 162,166 ---- def visit_classifier(self, node): ! self.body.append(' <SPAN CLASS="classifier-delimiter">:</SPAN> ') self.body.append(self.starttag(node, 'span', '', CLASS='classifier')) *************** *** 235,240 **** self.body.append(self.starttag(node, 'table', CLASS='docinfo', frame="void", rules="none")) ! self.body.append('<COL CLASS="docinfo_name">\n' ! '<COL CLASS="docinfo_content">\n' '<TBODY VALIGN="top">\n') --- 235,240 ---- self.body.append(self.starttag(node, 'table', CLASS='docinfo', frame="void", rules="none")) ! self.body.append('<COL CLASS="docinfo-name">\n' ! '<COL CLASS="docinfo-content">\n' '<TBODY VALIGN="top">\n') *************** *** 254,258 **** def visit_doctest_block(self, node): ! self.body.append(self.starttag(node, 'pre', CLASS='doctest_block')) def depart_doctest_block(self, node): --- 254,258 ---- def visit_doctest_block(self, node): ! self.body.append(self.starttag(node, 'pre', CLASS='doctest-block')) def depart_doctest_block(self, node): *************** *** 322,326 **** self.body.append(' ') self.body.append(self.starttag(node, 'span', '', ! CLASS='field_argument')) def depart_field_argument(self, node): --- 322,326 ---- self.body.append(' ') self.body.append(self.starttag(node, 'span', '', ! CLASS='field-argument')) def depart_field_argument(self, node): *************** *** 329,333 **** def visit_field_body(self, node): self.body.append(':</P>\n</TD><TD>') ! self.body.append(self.starttag(node, 'div', CLASS='field_body')) def depart_field_body(self, node): --- 329,333 ---- def visit_field_body(self, node): self.body.append(':</P>\n</TD><TD>') ! self.body.append(self.starttag(node, 'div', CLASS='field-body')) def depart_field_body(self, node): *************** *** 337,342 **** self.body.append(self.starttag(node, 'table', frame='void', rules='none')) ! self.body.append('<COL CLASS="field_name">\n' ! '<COL CLASS="field_body">\n' '<TBODY VALIGN="top">\n') --- 337,342 ---- self.body.append(self.starttag(node, 'table', frame='void', rules='none')) ! self.body.append('<COL CLASS="field-name">\n' ! '<COL CLASS="field-body">\n' '<TBODY VALIGN="top">\n') *************** *** 346,350 **** def visit_field_name(self, node): self.body.append('<TD>\n') ! self.body.append(self.starttag(node, 'p', '', CLASS='field_name')) def depart_field_name(self, node): --- 346,350 ---- def visit_field_name(self, node): self.body.append('<TD>\n') ! self.body.append(self.starttag(node, 'p', '', CLASS='field-name')) def depart_field_name(self, node): *************** *** 380,384 **** href = '#' + self.doctree.nameids[node['refname']] self.body.append(self.starttag(node, 'a', '', href=href, ! CLASS='footnote_reference')) def depart_footnote_reference(self, node): --- 380,384 ---- href = '#' + self.doctree.nameids[node['refname']] self.body.append(self.starttag(node, 'a', '', href=href, ! CLASS='footnote-reference')) def depart_footnote_reference(self, node): *************** *** 440,444 **** def visit_literal_block(self, node): ! self.body.append(self.starttag(node, 'pre', CLASS='literal_block')) def depart_literal_block(self, node): --- 440,444 ---- def visit_literal_block(self, node): ! self.body.append(self.starttag(node, 'pre', CLASS='literal-block')) def depart_literal_block(self, node): *************** *** 467,471 **** self.body.append(node.get('delimiter', ' ')) self.body.append(self.starttag(node, 'span', '', ! CLASS='option_argument')) def depart_option_argument(self, node): --- 467,471 ---- self.body.append(node.get('delimiter', ' ')) self.body.append(self.starttag(node, 'span', '', ! CLASS='option-argument')) def depart_option_argument(self, node): *************** *** 490,494 **** def visit_option_list(self, node): self.body.append( ! self.starttag(node, 'table', CLASS='option_list', frame="void", rules="none", cellspacing=12)) self.body.append('<COL CLASS="option">\n' --- 490,494 ---- def visit_option_list(self, node): self.body.append( ! self.starttag(node, 'table', CLASS='option-list', frame="void", rules="none", cellspacing=12)) self.body.append('<COL CLASS="option">\n' *************** *** 602,606 **** # @@@ need another threshold? gotta fix that raise nodes.SkipNode ! self.body.append(self.starttag(node, 'div', CLASS='system_message')) self.body.append('<H3>%s (level %s system message)</H3>\n' % (node['type'], node['level'])) --- 602,606 ---- # @@@ need another threshold? gotta fix that raise nodes.SkipNode ! self.body.append(self.starttag(node, 'div', CLASS='system-message')) self.body.append('<H3>%s (level %s system message)</H3>\n' % (node['type'], node['level'])) *************** *** 661,665 **** if isinstance(node.parent, nodes.topic): self.body.append( ! self.starttag(node, 'H6', '', CLASS='topic_title')) self.context.append('</H6>\n') elif self.sectionlevel == 0: --- 661,665 ---- if isinstance(node.parent, nodes.topic): self.body.append( ! self.starttag(node, 'H6', '', CLASS='topic-title')) self.context.append('</H6>\n') elif self.sectionlevel == 0: |
From: David G. <go...@us...> - 2002-03-07 04:08:03
|
Update of /cvsroot/docstring/dps/dps/transforms In directory usw-pr-cvs1:/tmp/cvs-serv9233/dps/dps/transforms Modified Files: references.py Log Message: - Added support for symbolic footnotes and mixed manual/auto-numbered footnotes. Index: references.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/transforms/references.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** references.py 22 Feb 2002 02:11:24 -0000 1.7 --- references.py 7 Mar 2002 04:01:40 -0000 1.8 *************** *** 366,369 **** --- 366,386 ---- """Keep track of unlabeled autonumbered footnotes.""" + symbols = [ + # The first six entries below are from section 12.51 of + # The Chicago Manual of Style, 14th edition. + '*', # asterisk/star + u'\u2020', # dagger † + u'\u2021', # double dagger ‡ + u'\u00A7', # section mark § + # (Should be parallels; perhaps u'\u2016' ‖? Not in HTML.) + u'\u00B6', # paragraph mark (pilcrow) ¶ + '#', # number sign + # The entries below were chosen arbitrarily. + u'\u2660', # spade suit ♠ + u'\u2663', # club suit ♣ + u'\u2665', # heart suit ♥ + u'\u2666', # diamond suit ♦ + ] + def transform(self, doctree): self.setup_transform(doctree) *************** *** 372,375 **** --- 389,393 ---- self.number_footnotes() self.number_footnote_references(startnum) + self.symbolize_footnotes() def number_footnotes(self): *************** *** 381,386 **** """ for footnote in self.doctree.autofootnotes: ! label = str(self.doctree.autofootnote_start) ! self.doctree.autofootnote_start += 1 footnote.insert(0, nodes.label('', label)) if footnote.hasattr('dupname'): --- 399,407 ---- """ for footnote in self.doctree.autofootnotes: ! while 1: ! label = str(self.doctree.autofootnote_start) ! self.doctree.autofootnote_start += 1 ! if not self.doctree.explicit_targets.has_key(label): ! break footnote.insert(0, nodes.label('', label)) if footnote.hasattr('dupname'): *************** *** 411,418 **** --- 432,473 ---- % len(self.autofootnote_labels)) self.doctree.messages += msg + for ref in self.doctree.autofootnote_refs[i:]: + if not (ref.resolved or ref.hasattr('refname')): + ref.parent.replace( + ref, nodes.problematic(ref.rawsource, + ref.rawsource)) break ref.resolved = 1 i += 1 + def symbolize_footnotes(self): + """Add symbols indexes to "[*]"-style footnotes and references.""" + labels = [] + for footnote in self.doctree.symbol_footnotes: + reps, index = divmod(self.doctree.symbol_footnote_start, + len(self.symbols)) + labeltext = self.symbols[index] * (reps + 1) + labels.append(labeltext) + footnote.insert(0, nodes.label('', labeltext)) + self.doctree.symbol_footnote_start += 1 + self.doctree.set_id(footnote) + i = 0 + for ref in self.doctree.symbol_footnote_refs: + try: + ref += nodes.Text(labels[i]) + ref['refid'] = self.doctree.symbol_footnotes[i]['id'] + except IndexError: + msg = self.doctree.reporter.error( + 'Too many symbol footnote references: only %s ' + 'corresponding footnotes available.' % len(labels)) + self.doctree.messages += msg + for ref in self.doctree.symbol_footnote_refs[i:]: + if not (ref.resolved or ref.hasattr('refid')): + ref.parent.replace( + ref, nodes.problematic(ref.rawsource, + ref.rawsource)) + break + ref.resolved = 1 + i += 1 class Substitutions(Transform): |
From: David G. <go...@us...> - 2002-03-07 04:08:03
|
Update of /cvsroot/docstring/dps/dps/writers In directory usw-pr-cvs1:/tmp/cvs-serv8983/dps/dps/writers Modified Files: __init__.py Log Message: (temporary?) Unicode "support" Index: __init__.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/writers/__init__.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** __init__.py 22 Feb 2002 02:01:11 -0000 1.5 --- __init__.py 7 Mar 2002 04:00:40 -0000 1.6 *************** *** 83,86 **** --- 83,87 ---- (c) `None`, which implies `sys.stdout`. """ + output = output.encode('raw-unicode-escape') # @@@ temporary? if hasattr(self.destination, 'write'): destination.write(output) |
From: David G. <go...@us...> - 2002-03-07 04:06:57
|
Update of /cvsroot/docstring/dps In directory usw-pr-cvs1:/tmp/cvs-serv10776/dps Modified Files: HISTORY.txt Log Message: updated Index: HISTORY.txt =================================================================== RCS file: /cvsroot/docstring/dps/HISTORY.txt,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** HISTORY.txt 4 Mar 2002 04:50:17 -0000 1.44 --- HISTORY.txt 7 Mar 2002 04:06:54 -0000 1.45 *************** *** 58,62 **** - Added slice support to elements. - Added .findclass() & .findnonclass() methods. ! - Added support for auto-numbered footnotes. - Changed 'tagName' to 'tagname'. - Improved auto-tagname generation. --- 58,62 ---- - Added slice support to elements. - Added .findclass() & .findnonclass() methods. ! - Added support for auto-numbered and symbolic footnotes. - Changed 'tagName' to 'tagname'. - Improved auto-tagname generation. *************** *** 226,229 **** --- 226,230 ---- - Added "pending". - Added "citation" and "citation_reference". + - Added "raw". * spec/pdpi.dtd: |
From: David G. <go...@us...> - 2002-03-07 04:06:10
|
Update of /cvsroot/docstring/dps/dps In directory usw-pr-cvs1:/tmp/cvs-serv10534/dps/dps Modified Files: nodes.py Log Message: - Added support for citations, symbolic footnotes, pending, raw. Index: nodes.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/nodes.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** nodes.py 4 Mar 2002 04:47:06 -0000 1.34 --- nodes.py 7 Mar 2002 04:06:08 -0000 1.35 *************** *** 522,525 **** --- 522,528 ---- """Mapping of footnote labels to lists of footnote_reference nodes.""" + self.citation_refs = {} + """Mapping of citation labels to lists of citation_reference nodes.""" + self.anonymous_targets = [] """List of anonymous target nodes.""" *************** *** 534,537 **** --- 537,546 ---- """List of auto-numbered footnote_reference nodes.""" + self.symbol_footnotes = [] + """List of symbol footnote nodes.""" + + self.symbol_footnote_refs = [] + """List of symbol footnote_reference nodes.""" + self.anonymous_start = 1 """Initial anonymous hyperlink number.""" *************** *** 540,543 **** --- 549,555 ---- """Initial auto-numbered footnote number.""" + self.symbol_footnote_start = 0 + """Initial symbol footnote symbol index.""" + self.id_start = 1 """Initial ID number.""" *************** *** 646,659 **** self.anonymous_refs.append(refnode) ! def note_autofootnote(self, footnotenode): ! self.autofootnotes.append(footnotenode) def note_autofootnote_ref(self, refnode): self.autofootnote_refs.append(refnode) def note_footnote_ref(self, refnode): self.footnote_refs.setdefault(refnode['refname'], []).append(refnode) self.note_refname(refnode) def note_substitution_def(self, substitutiondefnode, msgnode=None): name = substitutiondefnode['name'] --- 658,681 ---- self.anonymous_refs.append(refnode) ! def note_autofootnote(self, footnote): ! self.autofootnotes.append(footnote) def note_autofootnote_ref(self, refnode): self.autofootnote_refs.append(refnode) + def note_symbol_footnote(self, footnote): + self.symbol_footnotes.append(footnote) + + def note_symbol_footnote_ref(self, refnode): + self.symbol_footnote_refs.append(refnode) + def note_footnote_ref(self, refnode): self.footnote_refs.setdefault(refnode['refname'], []).append(refnode) self.note_refname(refnode) + def note_citation_ref(self, refnode): + self.citation_refs.setdefault(refnode['refname'], []).append(refnode) + self.note_refname(refnode) + def note_substitution_def(self, substitutiondefnode, msgnode=None): name = substitutiondefnode['name'] *************** *** 704,708 **** class section(Structural, Element): pass ! class topic(Structural, Element): pass class transition(Structural, Element): pass --- 726,746 ---- class section(Structural, Element): pass ! ! class topic(Structural, Element): ! ! """ ! Topics are terminal, "leaf" mini-sections, like block quotes with titles, ! or textual figures. A topic is just like a section, except that it has no ! subsections, and it doesn't have to conform to section placement rules. ! ! Topics are allowed wherever body elements (list, table, etc.) are allowed, ! but only at the top level of a section or document. Topics cannot nest ! inside topics or body elements; you can't have a topic inside a table, ! list, block quote, etc. ! """ ! ! pass ! ! class transition(Structural, Element): pass *************** *** 797,800 **** --- 835,876 ---- + class pending(Special, PreBibliographic, Element): + + """ + The "pending" element is used to encapsulate a pending transform: the + transform, the point at which to apply it, and any data it requires. + + For example, say you want a table of contents in your reStructuredText + document. The easiest way to specify where to put it is from within the + document, with a directive:: + + .. contents:: + + But the "contents" directive can't do its work until the entire document + has been parsed (and possibly transformed to some extent). So the + directive code leaves a placeholder behind that will trigger the second + phase of the its processing, something like this:: + + <pending directive="contents" ...other attributes...> + ...any directive data... + + The "pending" node is also appended to `document.pending`, so that a later + stage of processing can easily run all pending transforms. + """ + + def __init__(self, transform, *children, **attributes): + self.transform = transform + """Contains the transform class...""" + + + class raw(Special, Inline, PreBibliographic, TextElement): + + """ + Raw data that is to be passed untouched to the Writer. + """ + + pass + + # ================= # Inline Elements *************** *** 834,839 **** option option_argument option_group option_list option_list_item option_string organization ! paragraph problematic ! reference revision row section status strong substitution_definition substitution_reference subtitle system_message --- 910,915 ---- option option_argument option_group option_list option_list_item option_string organization ! paragraph pending problematic ! raw reference revision row section status strong substitution_definition substitution_reference subtitle system_message |
From: David G. <go...@us...> - 2002-03-07 03:58:33
|
Update of /cvsroot/docstring/dps/dps/writers In directory usw-pr-cvs1:/tmp/cvs-serv8400/dps/dps/writers Modified Files: html.py Log Message: citation, footnote, raw updates Index: html.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/writers/html.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** html.py 7 Mar 2002 02:12:28 -0000 1.7 --- html.py 7 Mar 2002 03:58:30 -0000 1.8 *************** *** 140,147 **** def visit_citation(self, node): ! pass def depart_citation(self, node): ! pass def visit_classifier(self, node): --- 140,163 ---- def visit_citation(self, node): ! self.body.append(self.starttag(node, 'table', CLASS='citation', ! frame="void", rules="none")) ! self.body.append('<COL CLASS="label">\n' ! '<COL>\n' ! '<TBODY VALIGN="top">\n' ! '<TR><TD>\n') def depart_citation(self, node): ! self.body.append('</TD></TR>\n' ! '</TBODY>\n</TABLE>\n') ! ! def visit_citation_reference(self, node): ! href = '' ! if node.has_key('refname'): ! href = '#' + self.doctree.nameids[node['refname']] ! self.body.append(self.starttag(node, 'a', '[', href=href, ! CLASS='citation_reference')) ! ! def depart_citation_reference(self, node): ! self.body.append(']</A>') def visit_classifier(self, node): *************** *** 278,282 **** CSS1 doesn't help. CSS2 isn't widely enough supported yet to be usable. ! """ atts = {} if node.has_key('start'): --- 294,298 ---- CSS1 doesn't help. CSS2 isn't widely enough supported yet to be usable. ! """ atts = {} if node.has_key('start'): *************** *** 359,369 **** def visit_footnote_reference(self, node): href = '' ! if node.has_key('refname'): href = '#' + self.doctree.nameids[node['refname']] ! self.body.append(self.starttag(node, 'a', '[', href=href, CLASS='footnote_reference')) def depart_footnote_reference(self, node): ! self.body.append(']</A>') def visit_hint(self, node): --- 375,387 ---- def visit_footnote_reference(self, node): href = '' ! if node.has_key('refid'): ! href = '#' + node['refid'] ! elif node.has_key('refname'): href = '#' + self.doctree.nameids[node['refname']] ! self.body.append(self.starttag(node, 'a', '', href=href, CLASS='footnote_reference')) def depart_footnote_reference(self, node): ! self.body.append('</A>') def visit_hint(self, node): *************** *** 510,513 **** --- 528,536 ---- def depart_problematic(self, node): self.body.append('</SPAN>') + + def visit_raw(self, node): + if node.has_key('format') and node['format'] == 'html': + self.body.append(node.astext()) + raise nodes.SkipNode def visit_reference(self, node): |
From: David G. <go...@us...> - 2002-03-07 03:53:56
|
Update of /cvsroot/docstring/dps/spec In directory usw-pr-cvs1:/tmp/cvs-serv7230/dps/spec Modified Files: gpdi.dtd Log Message: - Added "raw". Index: gpdi.dtd =================================================================== RCS file: /cvsroot/docstring/dps/spec/gpdi.dtd,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** gpdi.dtd 4 Mar 2002 04:43:25 -0000 1.36 --- gpdi.dtd 7 Mar 2002 03:53:53 -0000 1.37 *************** *** 117,121 **** | tip | warning | target | substitution_definition | comment | pending ! | system_message %additional.body.elements; "> --- 117,121 ---- | tip | warning | target | substitution_definition | comment | pending ! | system_message | raw %additional.body.elements; "> *************** *** 124,128 **** " emphasis | strong | interpreted | literal | reference | footnote_reference | citation_reference ! | substitution_reference | target | image | problematic %additional.inline.elements; "> --- 124,128 ---- " emphasis | strong | interpreted | literal | reference | footnote_reference | citation_reference ! | substitution_reference | target | image | problematic | raw %additional.inline.elements; "> *************** *** 432,435 **** --- 432,442 ---- type CDATA #IMPLIED> + <!-- Used to pass raw data through the system. Also inline. --> + <!ELEMENT raw %text.model;> + <!ATTLIST raw + %basic.atts; + %fixedspace.att; + format CDATA #IMPLIED> + <!-- *************** *** 446,451 **** - Nested inline elements may or may not be supported by individual applications using this DTD. ! - The inline elements <footnote_reference>, <literal>, and <image> do ! not support nesting. --> --- 453,458 ---- - Nested inline elements may or may not be supported by individual applications using this DTD. ! - The inline elements <footnote_reference>, <citation_reference>, ! <literal>, and <image> do not support nesting. --> |
From: David G. <go...@us...> - 2002-03-07 03:52:14
|
Update of /cvsroot/docstring/dps/test In directory usw-pr-cvs1:/tmp/cvs-serv6959/dps/test Modified Files: DPSTestSupport.py Log Message: Unicode support Index: DPSTestSupport.py =================================================================== RCS file: /cvsroot/docstring/dps/test/DPSTestSupport.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DPSTestSupport.py 22 Feb 2002 01:57:00 -0000 1.6 --- DPSTestSupport.py 7 Mar 2002 03:52:11 -0000 1.7 *************** *** 145,151 **** --- 145,154 ---- def compareOutput(self, input, output, expected): """`input`, `output`, and `expected` should all be strings.""" + output = output.encode('raw-unicode-escape') + expected = expected.encode('raw-unicode-escape') try: self.assertEquals('\n' + output, '\n' + expected) except AssertionError: + input = input.encode('raw-unicode-escape') print >>sys.stderr, '\n%s\ninput:' % (self,) print >>sys.stderr, input |
From: David G. <go...@us...> - 2002-03-07 03:50:42
|
Update of /cvsroot/docstring/dps/test/test_transforms In directory usw-pr-cvs1:/tmp/cvs-serv6584/dps/test/test_transforms Modified Files: test_footnotes.py Log Message: updated Index: test_footnotes.py =================================================================== RCS file: /cvsroot/docstring/dps/test/test_transforms/test_footnotes.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_footnotes.py 20 Feb 2002 04:29:54 -0000 1.6 --- test_footnotes.py 7 Mar 2002 03:50:39 -0000 1.7 *************** *** 30,49 **** totest['footnotes'] = ((Footnotes,), [ ["""\ - [label]_ - - .. [label] text - """, - """\ - <document> - <paragraph> - <footnote_reference refname="label"> - label - <footnote id="id1" name="label"> - <label> - label - <paragraph> - text - """], - ["""\ [#autolabel]_ --- 30,33 ---- *************** *** 203,207 **** 3 should be 3, \n\ ! <footnote_reference auto="1"> is one too many, <footnote_reference auto="1" refname="two"> --- 187,192 ---- 3 should be 3, \n\ ! <problematic> ! [#]_ is one too many, <footnote_reference auto="1" refname="two"> *************** *** 258,277 **** <paragraph> Mixed auto-numbered and manual footnotes: ! <footnote dupname="1" id="id1"> <label> 1 <paragraph> manually numbered ! <footnote auto="1" dupname="1" id="id3"> <label> ! 1 <paragraph> auto-numbered - <system_message level="2" type="WARNING"> - <paragraph> - Duplicate explicit target name: "1" <footnote auto="1" id="id2" name="label"> <label> ! 2 <paragraph> autonumber-labeled --- 243,259 ---- <paragraph> Mixed auto-numbered and manual footnotes: ! <footnote id="id1" name="1"> <label> 1 <paragraph> manually numbered ! <footnote auto="1" id="id3" name="2"> <label> ! 2 <paragraph> auto-numbered <footnote auto="1" id="id2" name="label"> <label> ! 3 <paragraph> autonumber-labeled *************** *** 311,314 **** --- 293,519 ---- Note that the footnotes are not in the same order as the references. + """], + ["""\ + Mixed manually-numbered, anonymous auto-numbered, + and labelled auto-numbered footnotes: + + [#four]_ should be 4, [#]_ should be 2, + [1]_ is 1, [3]_ is 3, + [#]_ should be 6, [#]_ is one too many, + [#five]_ should be 5, and [#eight]_ doesn't exist. + + .. [1] Manually-numbered footnote 1. + .. [#] Auto-numbered footnote 2. + .. [#four] Auto-numbered footnote 4. + .. [3] Manually-numbered footnote 3 + .. [#five] Auto-numbered footnote 5. + .. [#] Auto-numbered footnote 6. + .. [#five] Auto-numbered footnote 5 again (duplicate). + """, + """\ + <document> + <paragraph> + Mixed manually-numbered, anonymous auto-numbered, + and labelled auto-numbered footnotes: + <paragraph> + <footnote_reference auto="1" refname="four"> + 4 + should be 4, \n\ + <footnote_reference auto="1" refname="2"> + 2 + should be 2, + <footnote_reference refname="1"> + 1 + is 1, \n\ + <footnote_reference refname="3"> + 3 + is 3, + <footnote_reference auto="1" refname="6"> + 6 + should be 6, \n\ + <problematic> + [#]_ + is one too many, + <footnote_reference auto="1" refname="five"> + should be 5, and \n\ + <footnote_reference auto="1" refname="eight"> + doesn't exist. + <footnote id="id1" name="1"> + <label> + 1 + <paragraph> + Manually-numbered footnote 1. + <footnote auto="1" id="id6" name="2"> + <label> + 2 + <paragraph> + Auto-numbered footnote 2. + <footnote auto="1" id="id2" name="four"> + <label> + 4 + <paragraph> + Auto-numbered footnote 4. + <footnote id="id3" name="3"> + <label> + 3 + <paragraph> + Manually-numbered footnote 3 + <footnote auto="1" dupname="five" id="id4"> + <label> + 5 + <paragraph> + Auto-numbered footnote 5. + <footnote auto="1" id="id7" name="6"> + <label> + 6 + <paragraph> + Auto-numbered footnote 6. + <footnote auto="1" dupname="five" id="id5"> + <label> + 7 + <system_message level="2" type="WARNING"> + <paragraph> + Duplicate explicit target name: "five" + <paragraph> + Auto-numbered footnote 5 again (duplicate). + <system_message level="3" type="ERROR"> + <paragraph> + Too many autonumbered footnote references: only 2 corresponding footnotes available. + """], + ["""\ + Referencing a footnote by symbol [*]_. + + .. [*] This is an auto-symbol footnote. + """, + """\ + <document> + <paragraph> + Referencing a footnote by symbol \n\ + <footnote_reference auto="*" refid="id1"> + * + . + <footnote auto="*" id="id1"> + <label> + * + <paragraph> + This is an auto-symbol footnote. + """], + ["""\ + A sequence of symbol footnote references: + [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_. + + .. [*] Auto-symbol footnote 1. + .. [*] Auto-symbol footnote 2. + .. [*] Auto-symbol footnote 3. + .. [*] Auto-symbol footnote 4. + .. [*] Auto-symbol footnote 5. + .. [*] Auto-symbol footnote 6. + .. [*] Auto-symbol footnote 7. + .. [*] Auto-symbol footnote 8. + .. [*] Auto-symbol footnote 9. + .. [*] Auto-symbol footnote 10. + .. [*] Auto-symbol footnote 11. + .. [*] Auto-symbol footnote 12. + """, + """\ + <document> + <paragraph> + A sequence of symbol footnote references: + <footnote_reference auto="*" refid="id1"> + * + \n\ + <footnote_reference auto="*" refid="id2"> + \\u2020 + \n\ + <footnote_reference auto="*" refid="id3"> + \\u2021 + \n\ + <footnote_reference auto="*" refid="id4"> + \\u00A7 + \n\ + <footnote_reference auto="*" refid="id5"> + \\u00B6 + \n\ + <footnote_reference auto="*" refid="id6"> + # + \n\ + <footnote_reference auto="*" refid="id7"> + \\u2660 + \n\ + <footnote_reference auto="*" refid="id8"> + \\u2663 + \n\ + <footnote_reference auto="*" refid="id9"> + \\u2665 + \n\ + <footnote_reference auto="*" refid="id10"> + \\u2666 + \n\ + <footnote_reference auto="*" refid="id11"> + ** + \n\ + <footnote_reference auto="*" refid="id12"> + \\u2020\\u2020 + . + <footnote auto="*" id="id1"> + <label> + * + <paragraph> + Auto-symbol footnote 1. + <footnote auto="*" id="id2"> + <label> + \\u2020 + <paragraph> + Auto-symbol footnote 2. + <footnote auto="*" id="id3"> + <label> + \\u2021 + <paragraph> + Auto-symbol footnote 3. + <footnote auto="*" id="id4"> + <label> + \\u00A7 + <paragraph> + Auto-symbol footnote 4. + <footnote auto="*" id="id5"> + <label> + \\u00B6 + <paragraph> + Auto-symbol footnote 5. + <footnote auto="*" id="id6"> + <label> + # + <paragraph> + Auto-symbol footnote 6. + <footnote auto="*" id="id7"> + <label> + \\u2660 + <paragraph> + Auto-symbol footnote 7. + <footnote auto="*" id="id8"> + <label> + \\u2663 + <paragraph> + Auto-symbol footnote 8. + <footnote auto="*" id="id9"> + <label> + \\u2665 + <paragraph> + Auto-symbol footnote 9. + <footnote auto="*" id="id10"> + <label> + \\u2666 + <paragraph> + Auto-symbol footnote 10. + <footnote auto="*" id="id11"> + <label> + ** + <paragraph> + Auto-symbol footnote 11. + <footnote auto="*" id="id12"> + <label> + \\u2020\\u2020 + <paragraph> + Auto-symbol footnote 12. """], ]) |
From: Richard J. <ri...@us...> - 2002-03-07 02:12:31
|
Update of /cvsroot/docstring/dps/dps/writers In directory usw-pr-cvs1:/tmp/cvs-serv10991 Modified Files: html.py Log Message: <DT> is traditionally terminated by </DT>, not </TERM> :) Index: html.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/writers/html.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** html.py 4 Mar 2002 04:44:09 -0000 1.6 --- html.py 7 Mar 2002 02:12:28 -0000 1.7 *************** *** 192,196 **** def visit_definition(self, node): ! self.body.append('</TERM>\n') self.body.append(self.starttag(node, 'dd')) --- 192,196 ---- def visit_definition(self, node): ! self.body.append('</DT>\n') self.body.append(self.starttag(node, 'dd')) |
From: David G. <go...@us...> - 2002-03-04 04:50:20
|
Update of /cvsroot/docstring/dps In directory usw-pr-cvs1:/tmp/cvs-serv14880/dps Modified Files: HISTORY.txt Log Message: updated Index: HISTORY.txt =================================================================== RCS file: /cvsroot/docstring/dps/HISTORY.txt,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** HISTORY.txt 1 Mar 2002 03:19:41 -0000 1.43 --- HISTORY.txt 4 Mar 2002 04:50:17 -0000 1.44 *************** *** 47,51 **** * dps/nodes.py: - - Added 'vms_option'. - Added 'classifier'. - Added 'error', 'attention'. --- 47,50 ---- *************** *** 64,68 **** - Added string-conversion to attribute values in DOM-conversion. - Changed footnote/footnote_reference 'auto' attribute to integer. - - Moved 'abstract' into bibliographic elements section. - Changed 'graphic' to 'image'. - Added 'docinfo', container for bibliographic elements. --- 63,66 ---- *************** *** 93,96 **** --- 91,96 ---- - Added 'id' attribute support to ``document``. - Reworked option lists. + - Removed "abstract" + - Added "topic", "pending", "citation" and "citation_reference". * dps/roman.py: Added to project. Written by and courtesy of Mark *************** *** 202,206 **** - Added 'error' and 'hint' admonition elements. - Added 'docinfo' as container for bibliographic elements. - - Made 'abstract' a structural element, after 'docinfo'. - Added 'transition'. - Changed %link.atts to %reference.atts. --- 202,205 ---- *************** *** 223,226 **** --- 222,229 ---- - Changed "system_warning" to "system_message". - Reworked option lists. + - Removed "abstract" + - Added "topic". + - Added "pending". + - Added "citation" and "citation_reference". * spec/pdpi.dtd: |
From: David G. <go...@us...> - 2002-03-04 04:47:55
|
Update of /cvsroot/docstring/dps/dps/languages In directory usw-pr-cvs1:/tmp/cvs-serv14387/dps/dps/languages Modified Files: en.py Log Message: updated Index: en.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/languages/en.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** en.py 23 Feb 2002 16:53:30 -0000 1.8 --- en.py 4 Mar 2002 04:47:52 -0000 1.9 *************** *** 53,57 **** 'date': nodes.date, 'copyright': nodes.copyright, ! 'abstract': nodes.abstract} """Field name (lowcased) to node class name mapping for bibliographic fields (field_list).""" --- 53,57 ---- 'date': nodes.date, 'copyright': nodes.copyright, ! 'abstract': nodes.topic} """Field name (lowcased) to node class name mapping for bibliographic fields (field_list).""" |
From: David G. <go...@us...> - 2002-03-04 04:47:11
|
Update of /cvsroot/docstring/dps/dps In directory usw-pr-cvs1:/tmp/cvs-serv14256/dps/dps Modified Files: nodes.py Log Message: - Removed "abstract" - Added "topic". - Added "pending". - Added "citation" and "citation_reference". Index: nodes.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/nodes.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** nodes.py 1 Mar 2002 03:17:06 -0000 1.33 --- nodes.py 4 Mar 2002 04:47:06 -0000 1.34 *************** *** 697,701 **** class date(Bibliographic, TextElement): pass class copyright(Bibliographic, TextElement): pass - class abstract(Bibliographic, Element): pass --- 697,700 ---- *************** *** 705,708 **** --- 704,708 ---- class section(Structural, Element): pass + class topic(Structural, Element): pass class transition(Structural, Element): pass *************** *** 770,773 **** --- 770,774 ---- class target(Special, Inline, TextElement, ToBeResolved): pass class footnote(General, Element): pass + class citation(General, Element): pass class label(Component, TextElement): pass class figure(General, Element): pass *************** *** 806,809 **** --- 807,811 ---- class reference(Inline, Referential, TextElement): pass class footnote_reference(Inline, Referential, TextElement): pass + class citation_reference(Inline, Referential, TextElement): pass class substitution_reference(Inline, Referential, TextElement): pass class image(General, Inline, TextElement): pass *************** *** 817,823 **** node_class_names = """ Text ! abstract attention author authors block_quote bullet_list ! caption caution classifier colspec comment contact copyright danger date definition definition_list definition_list_item description docinfo doctest_block document --- 819,826 ---- node_class_names = """ Text ! attention author authors block_quote bullet_list ! caption caution citation citation_reference classifier colspec ! comment contact copyright danger date definition definition_list definition_list_item description docinfo doctest_block document *************** *** 835,839 **** section status strong substitution_definition substitution_reference subtitle system_message ! table target tbody term tgroup thead tip title transition version warning""".split() --- 838,842 ---- section status strong substitution_definition substitution_reference subtitle system_message ! table target tbody term tgroup thead tip title topic transition version warning""".split() |
From: David G. <go...@us...> - 2002-03-04 04:45:52
|
Update of /cvsroot/docstring/dps/dps/transforms In directory usw-pr-cvs1:/tmp/cvs-serv14024/dps/dps/transforms Modified Files: frontmatter.py Log Message: Updated abstract. Index: frontmatter.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/transforms/frontmatter.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** frontmatter.py 22 Feb 2002 02:08:34 -0000 1.5 --- frontmatter.py 4 Mar 2002 04:45:49 -0000 1.6 *************** *** 166,170 **** field names are transformed to the corresponding DTD elements, becoming child elements of the "docinfo" element (except for the ! "abstract" element, which comes after "docinfo"). For example, given this document fragment after parsing:: --- 166,170 ---- field names are transformed to the corresponding DTD elements, becoming child elements of the "docinfo" element (except for the ! abstract, which becomes a "topic" element after "docinfo"). For example, given this document fragment after parsing:: *************** *** 179,183 **** <field_body> <paragraph> ! Kilgore Trout <field> <field_name> --- 179,183 ---- <field_body> <paragraph> ! A. Name <field> <field_name> *************** *** 196,200 **** <docinfo> <author> ! Kilgore Trout <status> frontmatter.py --- 196,200 ---- <docinfo> <author> ! A. Name <status> frontmatter.py *************** *** 266,275 **** if issubclass(biblioclass, nodes.authors): self.extract_authors(field, name, docinfo) ! elif issubclass(biblioclass, nodes.abstract): if abstract: field[-1] += self.doctree.reporter.warning( 'There can only be one abstract.') raise TransformError ! abstract = nodes.abstract('', *field[1].children) else: docinfo.append(biblioclass('', *field[1].children)) --- 266,278 ---- if issubclass(biblioclass, nodes.authors): self.extract_authors(field, name, docinfo) ! elif issubclass(biblioclass, nodes.topic): if abstract: field[-1] += self.doctree.reporter.warning( 'There can only be one abstract.') raise TransformError ! title = nodes.title( ! name, self.language.labels['abstract']) ! abstract = nodes.topic('', title, CLASS='abstract', ! *field[1].children) else: docinfo.append(biblioclass('', *field[1].children)) |
From: David G. <go...@us...> - 2002-03-04 04:44:12
|
Update of /cvsroot/docstring/dps/dps/writers In directory usw-pr-cvs1:/tmp/cvs-serv13728/dps/dps/writers Modified Files: html.py Log Message: progress Index: html.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/writers/html.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** html.py 1 Mar 2002 03:16:22 -0000 1.5 --- html.py 4 Mar 2002 04:44:09 -0000 1.6 *************** *** 10,16 **** Simple HyperText Markup Language document tree Writer. ! The output uses the HTML 4.01 strict.dtd and contains a minimum of formatting ! information. A cascading style sheet "default.css" is required for proper ! viewing with a browser. """ --- 10,16 ---- Simple HyperText Markup Language document tree Writer. ! The output uses the HTML 4.01 Transitional DTD (*almost* strict) and ! contains a minimum of formatting information. A cascading style sheet ! "default.css" is required for proper viewing with a browser. """ *************** *** 89,98 **** pass - def visit_abstract(self, node): - self.visit_admonition(node, 'abstract') - - def depart_abstract(self, node): - self.depart_admonition() - def visit_admonition(self, node, name): self.body.append(self.starttag(node, 'div', CLASS=name)) --- 89,92 ---- *************** *** 145,148 **** --- 139,148 ---- self.depart_admonition() + def visit_citation(self, node): + pass + + def depart_citation(self, node): + pass + def visit_classifier(self, node): self.body.append(' <SPAN CLASS="classifier_delimiter">:</SPAN> ') *************** *** 595,599 **** if not (node.has_key('refuri') or node.has_key('refid') or node.has_key('refname')): ! self.body.append(self.starttag(node, 'a', '')) def depart_target(self, node): --- 595,599 ---- if not (node.has_key('refuri') or node.has_key('refid') or node.has_key('refname')): ! self.body.append(self.starttag(node, 'a', '', CLASS='target')) def depart_target(self, node): *************** *** 636,650 **** def visit_title(self, node): """Only 6 section levels are supported by HTML.""" ! if self.sectionlevel == 0: ! self.head.append('<TITLE>%s</TITLE>\n' % self.encode(node.astext())) self.body.append(self.starttag(node, 'H1', '', CLASS='title')) else: ! self.body.append(self.starttag(node, 'H%s' % self.sectionlevel, '')) def depart_title(self, node): ! if self.sectionlevel == 0: ! self.body.append('</H1>\n') ! else: ! self.body.append('</H%s>\n' % self.sectionlevel) def visit_transition(self, node): --- 636,661 ---- def visit_title(self, node): """Only 6 section levels are supported by HTML.""" ! if isinstance(node.parent, nodes.topic): ! self.body.append( ! self.starttag(node, 'H6', '', CLASS='topic_title')) ! self.context.append('</H6>\n') ! elif self.sectionlevel == 0: ! self.head.append('<TITLE>%s</TITLE>\n' ! % self.encode(node.astext())) self.body.append(self.starttag(node, 'H1', '', CLASS='title')) + self.context.append('</H1>\n') else: ! self.body.append( ! self.starttag(node, 'H%s' % self.sectionlevel, '')) ! self.context.append('</H%s>\n' % self.sectionlevel) def depart_title(self, node): ! self.body.append(self.context.pop()) ! ! def visit_topic(self, node): ! self.body.append(self.starttag(node, 'div', CLASS='topic')) ! ! def depart_topic(self, node): ! self.body.append('</DIV>\n') def visit_transition(self, node): |