docstring-checkins Mailing List for Docstring Processing System (Page 2)
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-04-13 17:05:35
|
Update of /cvsroot/docstring/dps/dps/transforms In directory usw-pr-cvs1:/tmp/cvs-serv15094/dps/dps/transforms Modified Files: universal.py Log Message: Implemented FinalChecks transform. Index: universal.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/transforms/universal.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** universal.py 28 Mar 2002 04:42:29 -0000 1.5 --- universal.py 13 Apr 2002 17:05:32 -0000 1.6 *************** *** 53,65 **** ! class FinalReferences(Transform): """ ! Resolve any remaining references, check for dangling. """ def transform(self): pass class Pending(Transform): --- 53,98 ---- ! class FinalChecks(Transform): """ ! Perform last-minute checks. ! ! - Check for dangling references (incl. footnote & citation). """ def transform(self): + visitor = FinalCheckVisitor(self.doctree) + self.doctree.walk(visitor) + + + class FinalCheckVisitor(nodes.NodeVisitor): + + def unknown_visit(self, node): pass + def visit_reference(self, node): + if node.resolved or not node.hasattr('refname'): + return + refname = node['refname'] + try: + id = self.doctree.nameids[refname] + except KeyError: + msg = self.doctree.reporter.error( + 'Unknown target name: "%s".' % (node['refname'])) + self.doctree.messages += msg + msgid = self.doctree.set_id(msg) + prb = nodes.problematic( + node.rawsource, node.rawsource, refid=msgid) + prbid = self.doctree.set_id(prb) + msg.add_backref(prbid) + node.parent.replace(node, prb) + return + del node['refname'] + node['refid'] = id + self.doctree.ids[id].referenced = 1 + node.resolved = 1 + + visit_footnote_reference = visit_citation_reference = visit_reference + class Pending(Transform): *************** *** 113,116 **** """Universal transforms to apply before any other Writer transforms.""" ! last_writer_transforms = (LastWriterPending, FinalReferences, Messages) """Universal transforms to apply after all other Writer transforms.""" --- 146,149 ---- """Universal transforms to apply before any other Writer transforms.""" ! last_writer_transforms = (LastWriterPending, FinalChecks, Messages) """Universal transforms to apply after all other Writer transforms.""" |
From: David G. <go...@us...> - 2002-04-13 17:04:50
|
Update of /cvsroot/docstring/dps/dps/writers In directory usw-pr-cvs1:/tmp/cvs-serv14842/dps/dps/writers Modified Files: html.py Log Message: Attribute case bug fix. Table of contents => compact. Multiple backrefs from system messages. Index: html.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/writers/html.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** html.py 28 Mar 2002 05:09:04 -0000 1.16 --- html.py 13 Apr 2002 17:04:46 -0000 1.17 *************** *** 47,51 **** '<HTML LANG="%s">\n<HEAD>\n' % doctree.languagecode, '<LINK REL="StyleSheet" HREF="default.css"' ! ' TYPE="text/css">'] self.body = ['</HEAD>\n<BODY>\n'] self.foot = ['</BODY>\n</HTML>\n'] --- 47,51 ---- '<HTML LANG="%s">\n<HEAD>\n' % doctree.languagecode, '<LINK REL="StyleSheet" HREF="default.css"' ! ' TYPE="text/css">\n'] self.body = ['</HEAD>\n<BODY>\n'] self.foot = ['</BODY>\n</HTML>\n'] *************** *** 68,72 **** atts = {} for (name, value) in attributes.items(): ! atts[name] = value for att in ('class',): # append to node attribute if node.has_key(att): --- 68,72 ---- atts = {} for (name, value) in attributes.items(): ! atts[name.lower()] = value for att in ('class',): # append to node attribute if node.has_key(att): *************** *** 535,542 **** def visit_paragraph(self, node): ! self.body.append(self.starttag(node, 'p', '')) def depart_paragraph(self, node): ! self.body.append('</P>\n') def visit_problematic(self, node): --- 535,546 ---- def visit_paragraph(self, node): ! if not self.topic_class == 'contents': ! self.body.append(self.starttag(node, 'p', '')) def depart_paragraph(self, node): ! if self.topic_class == 'contents': ! self.body.append('\n') ! else: ! self.body.append('</P>\n') def visit_problematic(self, node): *************** *** 624,631 **** self.body.append(self.starttag(node, 'div', CLASS='system-message')) self.body.append('<P CLASS="system-message-title">') ! if node.hasattr('refid'): ! self.body.append('<A HREF="#%s">%s</A> ' ! '(level %s system message)</P>\n' ! % (node['refid'], node['type'], node['level'])) else: self.body.append('%s (level %s system message)</P>\n' --- 628,646 ---- self.body.append(self.starttag(node, 'div', CLASS='system-message')) self.body.append('<P CLASS="system-message-title">') ! if node.hasattr('backrefs'): ! backrefs = node['backrefs'] ! if len(backrefs) == 1: ! self.body.append('<A HREF="#%s">%s</A> ' ! '(level %s system message)</P>\n' ! % (backrefs[0], node['type'], node['level'])) ! else: ! i = 1 ! backlinks = [] ! for backref in backrefs: ! backlinks.append('<A HREF="#%s">%s</A>' % (backref, i)) ! i += 1 ! self.body.append('%s (%s; level %s system message)</P>\n' ! % (node['type'], '|'.join(backlinks), ! node['level'])) else: self.body.append('%s (level %s system message)</P>\n' |
From: David G. <go...@us...> - 2002-04-13 17:01:24
|
Update of /cvsroot/docstring/dps/spec In directory usw-pr-cvs1:/tmp/cvs-serv13599/dps/spec Modified Files: gpdi.dtd Log Message: - Changed "refids" attribute to "backrefs". Index: gpdi.dtd =================================================================== RCS file: /cvsroot/docstring/dps/spec/gpdi.dtd,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** gpdi.dtd 28 Mar 2002 04:38:48 -0000 1.40 --- gpdi.dtd 13 Apr 2002 17:01:20 -0000 1.41 *************** *** 66,71 **** <!-- Space-separated list of id references, for backlinks. --> ! <!ENTITY % refids.att ! " refids IDREFS #IMPLIED "> <!-- --- 66,71 ---- <!-- Space-separated list of id references, for backlinks. --> ! <!ENTITY % backrefs.att ! " backrefs IDREFS #IMPLIED "> <!-- *************** *** 379,383 **** <!ATTLIST footnote %basic.atts; ! %refids.att; %auto.att;> --- 379,383 ---- <!ATTLIST footnote %basic.atts; ! %backrefs.att; %auto.att;> *************** *** 385,389 **** <!ATTLIST citation %basic.atts; ! %refids.att;> <!ELEMENT label (#PCDATA)> --- 385,389 ---- <!ATTLIST citation %basic.atts; ! %backrefs.att;> <!ELEMENT label (#PCDATA)> *************** *** 436,440 **** <!ATTLIST system_message %basic.atts; ! %refids.att; level NMTOKEN #IMPLIED type CDATA #IMPLIED> --- 436,440 ---- <!ATTLIST system_message %basic.atts; ! %backrefs.att; level NMTOKEN #IMPLIED type CDATA #IMPLIED> |
From: David G. <go...@us...> - 2002-04-13 17:00:26
|
Update of /cvsroot/docstring/dps/spec In directory usw-pr-cvs1:/tmp/cvs-serv13195/dps/spec Modified Files: pep-0258.txt Log Message: minor Index: pep-0258.txt =================================================================== RCS file: /cvsroot/docstring/dps/spec/pep-0258.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pep-0258.txt 4 Apr 2002 05:52:44 -0000 1.8 --- pep-0258.txt 13 Apr 2002 17:00:21 -0000 1.9 *************** *** 421,425 **** ------------ ! Distributors exist for each method of storing the results of processing: --- 421,425 ---- ------------ ! Distributors will exist for each method of storing the results of processing: |
From: David G. <go...@us...> - 2002-04-13 17:00:00
|
Update of /cvsroot/docstring/web In directory usw-pr-cvs1:/tmp/cvs-serv12983/web Modified Files: index.html.template Log Message: updated Index: index.html.template =================================================================== RCS file: /cvsroot/docstring/web/index.html.template,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.html.template 7 Sep 2001 02:45:07 -0000 1.4 --- index.html.template 13 Apr 2002 16:59:57 -0000 1.5 *************** *** 2,5 **** --- 2,6 ---- <!-- $Id$ --> # latest_dps_release = 'dps.0.3.tar.gz' + # latest_rst_release = 'rst.0.3.tar.gz' <HTML> <HEAD> *************** *** 33,50 **** input parser.</P> - <P>The <A - HREF="http://prdownloads.sourceforge.net/docstring/`latest_dps_release`" - >latest project release package (`latest_dps_release`)</A> and past project - releases can be downloaded from the <A - HREF="http://sourceforge.net/project/showfiles.php?group_id=26626" >project files - page</A>. <A HREF="http://sourceforge.net/cvs/?group_id=26626">Anonymous CVS - access is available.</A> You can also <A - HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/~checkout~/docstring/dps/" - >browse the latest source files (CVS) individually</A>, and read the latest <A - HREF="README.txt" - >README.txt</A> and <A - HREF="HISTORY.txt" - >HISTORY.txt</A>.</P> - <H3><A NAME="snapshots">Daily Snapshots</A></H3> --- 34,37 ---- *************** *** 74,77 **** --- 61,87 ---- </UL> + <H3><A NAME="releases">Project Releases</A></H3> + + <P>Please note that the <A HREF="#snapshots">daily snapshots</A> above + contain the latest versions of project files.</P> + + <P>The <A + HREF="http://prdownloads.sourceforge.net/docstring/`latest_dps_release`" + >latest project release package (`latest_dps_release`)</A> and past project + releases can be downloaded from the <A + HREF="http://sourceforge.net/project/showfiles.php?group_id=26626" >project files + page</A>. Please also download the <A + HREF="http://prdownloads.sourceforge.net/structuredtext/`latest_rst_release`" + >latest RST package (`latest_rst_release`)</A> which contains the + reStructuredText parser. <A + HREF="http://sourceforge.net/cvs/?group_id=26626">Anonymous CVS + access is available.</A> You can also <A + HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/~checkout~/docstring/dps/" + >browse the latest source files (CVS) individually</A>, and read the latest <A + HREF="README.txt" + >README.txt</A> and <A + HREF="HISTORY.txt" + >HISTORY.txt</A>.</P> + <H2>Specification</H2> *************** *** 144,148 **** <UL> ! <LI><P>Input Parsers:</P> <UL> --- 154,173 ---- <UL> ! <LI><P>Input Context Readers:</P> ! ! <UL> ! ! <LI><P>For standalone input files: <A ! HREF="http://docstring.sourceforge.net/dps/readers/standalone.py" ! ><TT>dps.readers.standalone</TT></A> ! </P></LI> ! ! <LI><P>More to be implemented: Python Source, Email, PEP, Wiki, ! Web Page, FAQ. ! </P></LI> ! ! </UL> ! ! <LI><P>Parsers:</P> <UL> *************** *** 160,168 **** </LI> ! <LI><P>Output Formatters:</P> <UL> <LI><P>Raw XML (corresponding to the DTDs in the spec): built-in.</P></LI> </UL> --- 185,205 ---- </LI> ! <LI><P>Output Format Writers:</P> <UL> <LI><P>Raw XML (corresponding to the DTDs in the spec): built-in.</P></LI> + + <LI><P>Pretty-printed pseudo-XML: <A + HREF="http://docstring.sourceforge.net/dps/writers/pprint.py" + ><TT>dps.writers.pprint</TT></A>.</P></LI> + + <LI><P>HTML 4.01 (loose) for CSS-1 stylesheets: <A + HREF="http://docstring.sourceforge.net/dps/writers/html.py" + ><TT>dps.writers.html</TT></A>.</P></LI> + + <LI><P>More to be implemented: other forms of XML (DocBook etc.), + HTML 3.2, TeX, plain text, maybe even reStructuredText. + </P></LI> </UL> |
From: David G. <go...@us...> - 2002-04-13 16:59:49
|
Update of /cvsroot/docstring/dps/test/test_transforms In directory usw-pr-cvs1:/tmp/cvs-serv12936/dps/test/test_transforms Added Files: test_final_checks.py Log Message: Tests for dps.transforms.universal.FinalChecks. --- NEW FILE: test_final_checks.py --- #! /usr/bin/env python """ :Author: David Goodger :Contact: go...@us... :Revision: $Revision: 1.1 $ :Date: $Date: 2002/04/13 16:59:46 $ :Copyright: This module has been placed in the public domain. Tests for dps.transforms.universal.FinalChecks. """ import DPSTestSupport from dps.transforms.universal import FinalChecks import UnitTestFolder try: from restructuredtext import Parser except ImportError: from dps.parsers.restructuredtext import Parser def suite(): parser = Parser() s = DPSTestSupport.TransformTestSuite(parser) s.generateTests(totest) return s totest = {} totest['final_checks'] = ((FinalChecks,), [ ["""\ Unknown reference_. """, """\ <document> <paragraph> Unknown <problematic id="id2" refid="id1"> reference_ . <system_message backrefs="id2" id="id1" level="3" type="ERROR"> <paragraph> Unknown target name: "reference". """], ]) if __name__ == '__main__': import unittest unittest.main(defaultTest='suite') |
From: David G. <go...@us...> - 2002-04-13 16:59:47
|
Update of /cvsroot/docstring/web In directory usw-pr-cvs1:/tmp/cvs-serv12911/web Modified Files: index.html Log Message: updated Index: index.html =================================================================== RCS file: /cvsroot/docstring/web/index.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.html 7 Sep 2001 02:44:53 -0000 1.4 --- index.html 13 Apr 2002 16:59:44 -0000 1.5 *************** *** 11,15 **** ALT="Docstring Processing System" BORDER=0 ALIGN=bottom></A></P> ! <P><I>last updated: 2001-09-06</I></P> <P>The purpose of the Python Docstring Processing System project is to create --- 11,15 ---- ALT="Docstring Processing System" BORDER=0 ALIGN=bottom></A></P> ! <P><I>last updated: 2002-04-12</I></P> <P>The purpose of the Python Docstring Processing System project is to create *************** *** 32,49 **** input parser.</P> - <P>The <A - HREF="http://prdownloads.sourceforge.net/docstring/dps.0.3.tar.gz" - >latest project release package (dps.0.3.tar.gz)</A> and past project - releases can be downloaded from the <A - HREF="http://sourceforge.net/project/showfiles.php?group_id=26626" >project files - page</A>. <A HREF="http://sourceforge.net/cvs/?group_id=26626">Anonymous CVS - access is available.</A> You can also <A - HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/~checkout~/docstring/dps/" - >browse the latest source files (CVS) individually</A>, and read the latest <A - HREF="README.txt" - >README.txt</A> and <A - HREF="HISTORY.txt" - >HISTORY.txt</A>.</P> - <H3><A NAME="snapshots">Daily Snapshots</A></H3> --- 32,35 ---- *************** *** 73,76 **** --- 59,85 ---- </UL> + <H3><A NAME="releases">Project Releases</A></H3> + + <P>Please note that the <A HREF="#snapshots">daily snapshots</A> above + contain the latest versions of project files.</P> + + <P>The <A + HREF="http://prdownloads.sourceforge.net/docstring/dps.0.3.tar.gz" + >latest project release package (dps.0.3.tar.gz)</A> and past project + releases can be downloaded from the <A + HREF="http://sourceforge.net/project/showfiles.php?group_id=26626" >project files + page</A>. Please also download the <A + HREF="http://prdownloads.sourceforge.net/structuredtext/rst.0.3.tar.gz" + >latest RST package (rst.0.3.tar.gz)</A> which contains the + reStructuredText parser. <A + HREF="http://sourceforge.net/cvs/?group_id=26626">Anonymous CVS + access is available.</A> You can also <A + HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/~checkout~/docstring/dps/" + >browse the latest source files (CVS) individually</A>, and read the latest <A + HREF="README.txt" + >README.txt</A> and <A + HREF="HISTORY.txt" + >HISTORY.txt</A>.</P> + <H2>Specification</H2> *************** *** 143,147 **** <UL> ! <LI><P>Input Parsers:</P> <UL> --- 152,171 ---- <UL> ! <LI><P>Input Context Readers:</P> ! ! <UL> ! ! <LI><P>For standalone input files: <A ! HREF="http://docstring.sourceforge.net/dps/readers/standalone.py" ! ><TT>dps.readers.standalone</TT></A> ! </P></LI> ! ! <LI><P>More to be implemented: Python Source, Email, PEP, Wiki, ! Web Page, FAQ. ! </P></LI> ! ! </UL> ! ! <LI><P>Parsers:</P> <UL> *************** *** 159,167 **** </LI> ! <LI><P>Output Formatters:</P> <UL> <LI><P>Raw XML (corresponding to the DTDs in the spec): built-in.</P></LI> </UL> --- 183,203 ---- </LI> ! <LI><P>Output Format Writers:</P> <UL> <LI><P>Raw XML (corresponding to the DTDs in the spec): built-in.</P></LI> + + <LI><P>Pretty-printed pseudo-XML: <A + HREF="http://docstring.sourceforge.net/dps/writers/pprint.py" + ><TT>dps.writers.pprint</TT></A>.</P></LI> + + <LI><P>HTML 4.01 (loose) for CSS-1 stylesheets: <A + HREF="http://docstring.sourceforge.net/dps/writers/html.py" + ><TT>dps.writers.html</TT></A>.</P></LI> + + <LI><P>More to be implemented: other forms of XML (DocBook etc.), + HTML 3.2, TeX, plain text, maybe even reStructuredText. + </P></LI> </UL> |
From: David G. <go...@us...> - 2002-04-13 16:59:32
|
Update of /cvsroot/docstring/dps/test/test_transforms In directory usw-pr-cvs1:/tmp/cvs-serv12855/dps/test/test_transforms Modified Files: test_substitutions.py Log Message: updated Index: test_substitutions.py =================================================================== RCS file: /cvsroot/docstring/dps/test/test_transforms/test_substitutions.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_substitutions.py 11 Mar 2002 03:26:16 -0000 1.5 --- test_substitutions.py 13 Apr 2002 16:59:29 -0000 1.6 *************** *** 51,57 **** Here's an <problematic id="id2" refid="id1"> ! unknown substitution. ! <system_message id="id1" level="3" refid="id2" type="ERROR"> <paragraph> Undefined substitution referenced: "unknown". --- 51,57 ---- Here's an <problematic id="id2" refid="id1"> ! |unknown| substitution. ! <system_message backrefs="id2" id="id1" level="3" type="ERROR"> <paragraph> Undefined substitution referenced: "unknown". |
From: David G. <go...@us...> - 2002-04-13 16:59:19
|
Update of /cvsroot/docstring/dps/test/test_transforms In directory usw-pr-cvs1:/tmp/cvs-serv12776/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.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_messages.py 11 Mar 2002 03:26:05 -0000 1.3 --- test_messages.py 13 Apr 2002 16:59:17 -0000 1.4 *************** *** 43,47 **** This \n\ <problematic id="id2" refid="id1"> ! unknown substitution will generate a system message, thanks to the \n\ --- 43,47 ---- This \n\ <problematic id="id2" refid="id1"> ! |unknown substitution| will generate a system message, thanks to the \n\ *************** *** 59,63 **** <title> Docutils System Messages ! <system_message id="id1" level="3" refid="id2" type="ERROR"> <paragraph> Undefined substitution referenced: "unknown substitution". --- 59,63 ---- <title> Docutils System Messages ! <system_message backrefs="id2" id="id1" level="3" type="ERROR"> <paragraph> Undefined substitution referenced: "unknown substitution". |
From: David G. <go...@us...> - 2002-04-13 16:59:10
|
Update of /cvsroot/docstring/dps/test/test_transforms In directory usw-pr-cvs1:/tmp/cvs-serv12713/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.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** test_hyperlinks.py 28 Mar 2002 04:32:22 -0000 1.8 --- test_hyperlinks.py 13 Apr 2002 16:59:07 -0000 1.9 *************** *** 68,72 **** <target id="direct" name="direct"> <paragraph> ! <reference refname="direct"> direct internal --- 68,72 ---- <target id="direct" name="direct"> <paragraph> ! <reference refid="direct"> direct internal *************** *** 84,92 **** <target id="ztarget" name="ztarget"> <paragraph> ! <reference refname="ztarget"> indirect internal ! <target id="indirect2" name="indirect2" refname="ztarget"> ! <target id="indirect" name="indirect" refname="ztarget"> """], ["""\ --- 84,92 ---- <target id="ztarget" name="ztarget"> <paragraph> ! <reference refid="ztarget"> indirect internal ! <target id="indirect2" name="indirect2" refid="ztarget"> ! <target id="indirect" name="indirect" refid="ztarget"> """], ["""\ *************** *** 104,111 **** Implicit <paragraph> ! <reference refname="implicit"> indirect internal ! <target id="indirect" name="indirect" refname="implicit"> """], ["""\ --- 104,111 ---- Implicit <paragraph> ! <reference refid="implicit"> indirect internal ! <target id="indirect" name="indirect" refid="implicit"> """], ["""\ *************** *** 132,146 **** <title> Implicit ! <system_message level="1" refid="id1" type="INFO"> <paragraph> Duplicate implicit target name: "implicit". <paragraph> ! <reference refname="implicit"> ! indirect internal <target id="indirect" name="indirect" refname="implicit"> ! <system_message level="2" type="WARNING"> <paragraph> ! Indirect hyperlink target "indirect" refers to target "implicit", which does not exist. """], ["""\ --- 132,146 ---- <title> Implicit ! <system_message backrefs="id1" level="1" type="INFO"> <paragraph> Duplicate implicit target name: "implicit". <paragraph> ! <problematic id="id3" refid="id2"> ! indirect_ internal <target id="indirect" name="indirect" refname="implicit"> ! <system_message backrefs="id3" id="id2" level="2" type="WARNING"> <paragraph> ! Indirect hyperlink target "indirect" (id="indirect") refers to target "implicit", which does not exist. """], ["""\ *************** *** 154,158 **** <reference anonymous="1" refuri="http://direct"> direct external ! <target anonymous="1" id="id1" name="_:1:_" refuri="http://direct"> """], ["""\ --- 154,158 ---- <reference anonymous="1" refuri="http://direct"> direct external ! <target anonymous="1" id="id1" refuri="http://direct"> """], ["""\ *************** *** 167,171 **** <reference anonymous="1" refuri="http://indirect"> indirect external ! <target anonymous="1" id="id1" name="_:1:_" refuri="http://indirect"> <target id="xtarget" name="xtarget" refuri="http://indirect"> """], --- 167,171 ---- <reference anonymous="1" refuri="http://indirect"> indirect external ! <target anonymous="1" id="id1" refuri="http://indirect"> <target id="xtarget" name="xtarget" refuri="http://indirect"> """], *************** *** 177,183 **** """\ <document> ! <target anonymous="1" id="id1" name="_:1:_"> <paragraph> ! <reference anonymous="1" refname="_:1:_"> direct internal """], --- 177,183 ---- """\ <document> ! <target anonymous="1" id="id1"> <paragraph> ! <reference anonymous="1" refid="id1"> direct internal """], *************** *** 193,199 **** <target id="ztarget" name="ztarget"> <paragraph> ! <reference anonymous="1" refname="ztarget"> indirect internal ! <target anonymous="1" id="id1" name="_:1:_" refname="ztarget"> """], ["""\ --- 193,199 ---- <target id="ztarget" name="ztarget"> <paragraph> ! <reference anonymous="1" refid="ztarget"> indirect internal ! <target anonymous="1" id="id1" refid="ztarget"> """], ["""\ *************** *** 215,219 **** <paragraph> First ! <system_message level="2" refid="id1" type="WARNING"> <paragraph> Duplicate explicit target name: "ztarget". --- 215,219 ---- <paragraph> First ! <system_message backrefs="id1" level="2" type="WARNING"> <paragraph> Duplicate explicit target name: "ztarget". *************** *** 222,228 **** Second <paragraph> ! <reference anonymous="1" refname="ztarget"> indirect internal ! <target anonymous="1" id="id2" name="_:1:_" refname="ztarget"> """], ]) --- 222,228 ---- Second <paragraph> ! <reference anonymous="1" refid="id1"> indirect internal ! <target anonymous="1" id="id2" refid="id1"> """], ]) *************** *** 243,247 **** <paragraph> By this \n\ ! <reference refname="internal hyperlink"> internal hyperlink referemce. --- 243,247 ---- <paragraph> By this \n\ ! <reference refid="internal-hyperlink"> internal hyperlink referemce. *************** *** 266,274 **** <paragraph> By this \n\ ! <reference refname="internal hyperlink"> internal hyperlink referemce as well as by this \n\ ! <reference refname="chained"> chained reference. --- 266,274 ---- <paragraph> By this \n\ ! <reference refid="internal-hyperlink"> internal hyperlink referemce as well as by this \n\ ! <reference refid="chained"> chained reference. *************** *** 299,303 **** <system_message level="1" type="INFO"> <paragraph> ! External hyperlink target "indirect target" is not referenced. """], ["""\ --- 299,303 ---- <system_message level="1" type="INFO"> <paragraph> ! Indirect hyperlink target "indirect target" is not referenced. """], ["""\ *************** *** 372,381 **** """\ <document> ! <target anonymous="1" id="id1" name="_:1:_" refuri="http://full"> ! <target anonymous="1" id="id2" name="_:2:_" refuri="http://simplified"> ! <target anonymous="1" id="id3" name="_:3:_" refuri="http://simplified"> <target id="external" name="external" refuri="http://indirect.external"> ! <target anonymous="1" id="id4" name="_:4:_" refuri="http://indirect.external"> ! <target anonymous="1" id="id5" name="_:5:_"> <paragraph> <reference anonymous="1" refuri="http://full"> --- 372,381 ---- """\ <document> ! <target anonymous="1" id="id1" refuri="http://full"> ! <target anonymous="1" id="id2" refuri="http://simplified"> ! <target anonymous="1" id="id3" refuri="http://simplified"> <target id="external" name="external" refuri="http://indirect.external"> ! <target anonymous="1" id="id4" refuri="http://indirect.external"> ! <target anonymous="1" id="id5"> <paragraph> <reference anonymous="1" refuri="http://full"> *************** *** 391,395 **** indirect anonymous hyperlink reference , ! <reference anonymous="1" refname="_:5:_"> internal anonymous hyperlink reference . --- 391,395 ---- indirect anonymous hyperlink reference , ! <reference anonymous="1" refid="id5"> internal anonymous hyperlink reference . *************** *** 410,417 **** 's (different URIs): <target dupname="target" id="target" refuri="first"> ! <system_message level="2" refid="id1" type="WARNING"> <paragraph> Duplicate explicit target name: "target". <target dupname="target" id="id1" refuri="second"> """], ]) --- 410,439 ---- 's (different URIs): <target dupname="target" id="target" refuri="first"> ! <system_message backrefs="id1" level="2" type="WARNING"> <paragraph> Duplicate explicit target name: "target". <target dupname="target" id="id1" refuri="second"> + """], + ["""\ + Several__ anonymous__ hyperlinks__, but not enough targets. + + __ http://example.org + """, + """\ + <document> + <paragraph> + <problematic id="id3" refid="id2"> + Several__ + \n\ + <problematic id="id4" refid="id2"> + anonymous__ + \n\ + <problematic id="id5" refid="id2"> + hyperlinks__ + , but not enough targets. + <target anonymous="1" id="id1" refuri="http://example.org"> + <system_message backrefs="id3 id4 id5" id="id2" level="3" type="ERROR"> + <paragraph> + Anonymous hyperlink mismatch: 3 references but 1 targets. """], ]) |
From: David G. <go...@us...> - 2002-04-13 16:58:59
|
Update of /cvsroot/docstring/dps/test/test_transforms In directory usw-pr-cvs1:/tmp/cvs-serv12599/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.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** test_footnotes.py 28 Mar 2002 04:32:06 -0000 1.12 --- test_footnotes.py 13 Apr 2002 16:58:55 -0000 1.13 *************** *** 37,43 **** <document> <paragraph> ! <footnote_reference auto="1" refname="autolabel"> 1 ! <footnote auto="1" id="autolabel" name="autolabel"> <label> 1 --- 37,43 ---- <document> <paragraph> ! <footnote_reference auto="1" id="id1" refid="autolabel"> 1 ! <footnote auto="1" backrefs="id1" id="autolabel" name="autolabel"> <label> 1 *************** *** 54,60 **** <paragraph> autonumber: \n\ ! <footnote_reference auto="1" refname="1"> 1 ! <footnote auto="1" id="id1" name="1"> <label> 1 --- 54,60 ---- <paragraph> autonumber: \n\ ! <footnote_reference auto="1" id="id1" refid="id2"> 1 ! <footnote auto="1" backrefs="id1" id="id2" name="1"> <label> 1 *************** *** 75,95 **** <document> <paragraph> ! <footnote_reference auto="1" refname="1"> 1 is the first auto-numbered footnote reference. ! <footnote_reference auto="1" refname="2"> 2 is the second auto-numbered footnote reference. ! <footnote auto="1" id="id1" name="1"> <label> 1 <paragraph> Auto-numbered footnote 1. ! <footnote auto="1" id="id2" name="2"> <label> 2 <paragraph> Auto-numbered footnote 2. ! <footnote auto="1" id="id3" name="3"> <label> 3 --- 75,95 ---- <document> <paragraph> ! <footnote_reference auto="1" id="id1" refid="id3"> 1 is the first auto-numbered footnote reference. ! <footnote_reference auto="1" id="id2" refid="id4"> 2 is the second auto-numbered footnote reference. ! <footnote auto="1" backrefs="id1" id="id3" name="1"> <label> 1 <paragraph> Auto-numbered footnote 1. ! <footnote auto="1" backrefs="id2" id="id4" name="2"> <label> 2 <paragraph> Auto-numbered footnote 2. ! <footnote auto="1" backrefs="id6" id="id5" name="3"> <label> 3 *************** *** 97,101 **** Auto-numbered footnote 3. <paragraph> ! <footnote_reference auto="1" refname="3"> 3 is the third auto-numbered footnote reference. --- 97,101 ---- Auto-numbered footnote 3. <paragraph> ! <footnote_reference auto="1" id="id6" refid="id5"> 3 is the third auto-numbered footnote reference. *************** *** 118,135 **** <document> <paragraph> ! <footnote_reference auto="1" refname="third"> 3 is a reference to the third auto-numbered footnote. ! <footnote auto="1" id="first" name="first"> <label> 1 <paragraph> First auto-numbered footnote. ! <footnote auto="1" id="second" name="second"> <label> 2 <paragraph> Second auto-numbered footnote. ! <footnote auto="1" id="third" name="third"> <label> 3 --- 118,135 ---- <document> <paragraph> ! <footnote_reference auto="1" id="id1" refid="third"> 3 is a reference to the third auto-numbered footnote. ! <footnote auto="1" backrefs="id3" id="first" name="first"> <label> 1 <paragraph> First auto-numbered footnote. ! <footnote auto="1" backrefs="id2" id="second" name="second"> <label> 2 <paragraph> Second auto-numbered footnote. ! <footnote auto="1" backrefs="id1 id4" id="third" name="third"> <label> 3 *************** *** 137,147 **** Third auto-numbered footnote. <paragraph> ! <footnote_reference auto="1" refname="second"> 2 is a reference to the second auto-numbered footnote. ! <footnote_reference auto="1" refname="first"> 1 is a reference to the first auto-numbered footnote. ! <footnote_reference auto="1" refname="third"> 3 is another reference to the third auto-numbered footnote. --- 137,147 ---- Third auto-numbered footnote. <paragraph> ! <footnote_reference auto="1" id="id2" refid="second"> 2 is a reference to the second auto-numbered footnote. ! <footnote_reference auto="1" id="id3" refid="first"> 1 is a reference to the first auto-numbered footnote. ! <footnote_reference auto="1" id="id4" refid="third"> 3 is another reference to the third auto-numbered footnote. *************** *** 178,214 **** Mixed anonymous and labelled auto-numbered footnotes: <paragraph> ! <footnote_reference auto="1" refname="four"> 4 should be 4, \n\ ! <footnote_reference auto="1" refname="1"> 1 should be 1, ! <footnote_reference auto="1" refname="3"> 3 should be 3, \n\ ! <problematic refid="id4"> [#]_ is one too many, ! <footnote_reference auto="1" refname="two"> 2 should be 2, and \n\ ! <footnote_reference auto="1" refname="six"> doesn't exist. ! <footnote auto="1" id="id2" name="1"> <label> 1 <paragraph> Auto-numbered footnote 1. ! <footnote auto="1" id="two" name="two"> <label> 2 <paragraph> Auto-numbered footnote 2. ! <footnote auto="1" id="id3" name="3"> <label> 3 <paragraph> Auto-numbered footnote 3. ! <footnote auto="1" id="four" name="four"> <label> 4 --- 178,214 ---- Mixed anonymous and labelled auto-numbered footnotes: <paragraph> ! <footnote_reference auto="1" id="id1" refid="four"> 4 should be 4, \n\ ! <footnote_reference auto="1" id="id2" refid="id7"> 1 should be 1, ! <footnote_reference auto="1" id="id3" refid="id8"> 3 should be 3, \n\ ! <problematic id="id11" refid="id10"> [#]_ is one too many, ! <footnote_reference auto="1" id="id5" refid="two"> 2 should be 2, and \n\ ! <footnote_reference auto="1" id="id6" refname="six"> doesn't exist. ! <footnote auto="1" backrefs="id2" id="id7" name="1"> <label> 1 <paragraph> Auto-numbered footnote 1. ! <footnote auto="1" backrefs="id5" id="two" name="two"> <label> 2 <paragraph> Auto-numbered footnote 2. ! <footnote auto="1" backrefs="id3" id="id8" name="3"> <label> 3 <paragraph> Auto-numbered footnote 3. ! <footnote auto="1" backrefs="id1" id="four" name="four"> <label> 4 *************** *** 220,232 **** <paragraph> Auto-numbered footnote 5. ! <footnote auto="1" dupname="five" id="id1"> <label> 6 ! <system_message level="2" refid="id1" type="WARNING"> <paragraph> Duplicate explicit target name: "five". <paragraph> Auto-numbered footnote 5 again (duplicate). ! <system_message id="id4" level="3" type="ERROR"> <paragraph> Too many autonumbered footnote references: only 2 corresponding footnotes available. --- 220,232 ---- <paragraph> Auto-numbered footnote 5. ! <footnote auto="1" dupname="five" id="id9"> <label> 6 ! <system_message backrefs="id9" level="2" type="WARNING"> <paragraph> Duplicate explicit target name: "five". <paragraph> Auto-numbered footnote 5 again (duplicate). ! <system_message backrefs="id11" id="id10" level="3" type="ERROR"> <paragraph> Too many autonumbered footnote references: only 2 corresponding footnotes available. *************** *** 273,290 **** <paragraph> A labeled autonumbered footnote referece: \n\ ! <footnote_reference auto="1" refname="footnote"> 2 . <paragraph> An unlabeled autonumbered footnote referece: \n\ ! <footnote_reference auto="1" refname="1"> 1 . ! <footnote auto="1" id="id1" name="1"> <label> 1 <paragraph> Unlabeled autonumbered footnote. ! <footnote auto="1" id="footnote" name="footnote"> <label> 2 --- 273,290 ---- <paragraph> A labeled autonumbered footnote referece: \n\ ! <footnote_reference auto="1" id="id1" refid="footnote"> 2 . <paragraph> An unlabeled autonumbered footnote referece: \n\ ! <footnote_reference auto="1" id="id2" refid="id3"> 1 . ! <footnote auto="1" backrefs="id2" id="id3" name="1"> <label> 1 <paragraph> Unlabeled autonumbered footnote. ! <footnote auto="1" backrefs="id1" id="footnote" name="footnote"> <label> 2 *************** *** 317,358 **** 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 refid="id6"> [#]_ 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="id4" name="2"> <label> 2 <paragraph> Auto-numbered footnote 2. ! <footnote auto="1" id="four" name="four"> <label> 4 <paragraph> Auto-numbered footnote 4. ! <footnote id="id2" name="3"> <label> 3 --- 317,358 ---- and labelled auto-numbered footnotes: <paragraph> ! <footnote_reference auto="1" id="id1" refid="four"> 4 should be 4, \n\ ! <footnote_reference auto="1" id="id2" refid="id10"> 2 should be 2, ! <footnote_reference id="id3" refid="id9"> 1 is 1, \n\ ! <footnote_reference id="id4" refid="id11"> 3 is 3, ! <footnote_reference auto="1" id="id5" refid="id12"> 6 should be 6, \n\ ! <problematic id="id15" refid="id14"> [#]_ is one too many, ! <footnote_reference auto="1" id="id7" refname="five"> should be 5, and \n\ ! <footnote_reference auto="1" id="id8" refname="eight"> doesn't exist. ! <footnote backrefs="id3" id="id9" name="1"> <label> 1 <paragraph> Manually-numbered footnote 1. ! <footnote auto="1" backrefs="id2" id="id10" name="2"> <label> 2 <paragraph> Auto-numbered footnote 2. ! <footnote auto="1" backrefs="id1" id="four" name="four"> <label> 4 <paragraph> Auto-numbered footnote 4. ! <footnote backrefs="id4" id="id11" name="3"> <label> 3 *************** *** 364,381 **** <paragraph> Auto-numbered footnote 5. ! <footnote auto="1" id="id5" name="6"> <label> 6 <paragraph> Auto-numbered footnote 6. ! <footnote auto="1" dupname="five" id="id3"> <label> 7 ! <system_message level="2" refid="id3" type="WARNING"> <paragraph> Duplicate explicit target name: "five". <paragraph> Auto-numbered footnote 5 again (duplicate). ! <system_message id="id6" level="3" type="ERROR"> <paragraph> Too many autonumbered footnote references: only 2 corresponding footnotes available. --- 364,381 ---- <paragraph> Auto-numbered footnote 5. ! <footnote auto="1" backrefs="id5" id="id12" name="6"> <label> 6 <paragraph> Auto-numbered footnote 6. ! <footnote auto="1" dupname="five" id="id13"> <label> 7 ! <system_message backrefs="id13" level="2" type="WARNING"> <paragraph> Duplicate explicit target name: "five". <paragraph> Auto-numbered footnote 5 again (duplicate). ! <system_message backrefs="id15" id="id14" level="3" type="ERROR"> <paragraph> Too many autonumbered footnote references: only 2 corresponding footnotes available. *************** *** 390,397 **** <paragraph> Referencing a footnote by symbol \n\ ! <footnote_reference auto="*" refid="id1"> * . ! <footnote auto="*" id="id1"> <label> * --- 390,397 ---- <paragraph> Referencing a footnote by symbol \n\ ! <footnote_reference auto="*" id="id1" refid="id2"> * . ! <footnote auto="*" backrefs="id1" id="id2"> <label> * *************** *** 420,515 **** <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"> \u2665 \n\ ! <footnote_reference auto="*" refid="id9"> \u2666 \n\ ! <footnote_reference auto="*" refid="id10"> \u2663 \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> \u2665 <paragraph> Auto-symbol footnote 8. ! <footnote auto="*" id="id9"> <label> \u2666 <paragraph> Auto-symbol footnote 9. ! <footnote auto="*" id="id10"> <label> \u2663 <paragraph> Auto-symbol footnote 10. ! <footnote auto="*" id="id11"> <label> ** <paragraph> Auto-symbol footnote 11. ! <footnote auto="*" id="id12"> <label> \u2020\u2020 --- 420,515 ---- <paragraph> A sequence of symbol footnote references: ! <footnote_reference auto="*" id="id1" refid="id13"> * \n\ ! <footnote_reference auto="*" id="id2" refid="id14"> \u2020 \n\ ! <footnote_reference auto="*" id="id3" refid="id15"> \u2021 \n\ ! <footnote_reference auto="*" id="id4" refid="id16"> \u00A7 \n\ ! <footnote_reference auto="*" id="id5" refid="id17"> \u00B6 \n\ ! <footnote_reference auto="*" id="id6" refid="id18"> # \n\ ! <footnote_reference auto="*" id="id7" refid="id19"> \u2660 \n\ ! <footnote_reference auto="*" id="id8" refid="id20"> \u2665 \n\ ! <footnote_reference auto="*" id="id9" refid="id21"> \u2666 \n\ ! <footnote_reference auto="*" id="id10" refid="id22"> \u2663 \n\ ! <footnote_reference auto="*" id="id11" refid="id23"> ** \n\ ! <footnote_reference auto="*" id="id12" refid="id24"> \u2020\u2020 . ! <footnote auto="*" backrefs="id1" id="id13"> <label> * <paragraph> Auto-symbol footnote 1. ! <footnote auto="*" backrefs="id2" id="id14"> <label> \u2020 <paragraph> Auto-symbol footnote 2. ! <footnote auto="*" backrefs="id3" id="id15"> <label> \u2021 <paragraph> Auto-symbol footnote 3. ! <footnote auto="*" backrefs="id4" id="id16"> <label> \u00A7 <paragraph> Auto-symbol footnote 4. ! <footnote auto="*" backrefs="id5" id="id17"> <label> \u00B6 <paragraph> Auto-symbol footnote 5. ! <footnote auto="*" backrefs="id6" id="id18"> <label> # <paragraph> Auto-symbol footnote 6. ! <footnote auto="*" backrefs="id7" id="id19"> <label> \u2660 <paragraph> Auto-symbol footnote 7. ! <footnote auto="*" backrefs="id8" id="id20"> <label> \u2665 <paragraph> Auto-symbol footnote 8. ! <footnote auto="*" backrefs="id9" id="id21"> <label> \u2666 <paragraph> Auto-symbol footnote 9. ! <footnote auto="*" backrefs="id10" id="id22"> <label> \u2663 <paragraph> Auto-symbol footnote 10. ! <footnote auto="*" backrefs="id11" id="id23"> <label> ** <paragraph> Auto-symbol footnote 11. ! <footnote auto="*" backrefs="id12" id="id24"> <label> \u2020\u2020 |
From: David G. <go...@us...> - 2002-04-04 05:53:59
|
Update of /cvsroot/docstring/dps/dps In directory usw-pr-cvs1:/tmp/cvs-serv1454/dps/dps Modified Files: core.py Log Message: __all__ gone Index: core.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/core.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** core.py 28 Mar 2002 04:47:16 -0000 1.3 --- core.py 4 Apr 2002 05:53:56 -0000 1.4 *************** *** 13,18 **** __docformat__ = 'reStructuredText' - __all__ = ['Publisher', 'publish'] - import readers, parsers, writers, utils --- 13,16 ---- |
From: David G. <go...@us...> - 2002-04-04 05:53:35
|
Update of /cvsroot/docstring/dps/dps/writers In directory usw-pr-cvs1:/tmp/cvs-serv1376/dps/dps/writers Modified Files: __init__.py Log Message: blank line Index: __init__.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/writers/__init__.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** __init__.py 28 Mar 2002 04:47:47 -0000 1.8 --- __init__.py 4 Apr 2002 05:53:32 -0000 1.9 *************** *** 76,79 **** --- 76,80 ---- Parameters: + - `output`: Data to write. - `destination`: one of: |
From: David G. <go...@us...> - 2002-04-04 05:53:14
|
Update of /cvsroot/docstring/dps/spec In directory usw-pr-cvs1:/tmp/cvs-serv1313/dps/spec Modified Files: dps-notes.txt Log Message: minor mod Index: dps-notes.txt =================================================================== RCS file: /cvsroot/docstring/dps/spec/dps-notes.txt,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** dps-notes.txt 28 Mar 2002 04:34:58 -0000 1.33 --- dps-notes.txt 4 Apr 2002 05:53:11 -0000 1.34 *************** *** 238,242 **** 2. Run the parser on each docstring in turn, producing a forest of ! trees (internal data structure as per nodes.py). 3. Join the docstring trees together into a single tree, running --- 238,242 ---- 2. Run the parser on each docstring in turn, producing a forest of ! doctrees (per nodes.py). 3. Join the docstring trees together into a single tree, running |
From: David G. <go...@us...> - 2002-04-04 05:52:47
|
Update of /cvsroot/docstring/dps/spec In directory usw-pr-cvs1:/tmp/cvs-serv1138/dps/spec Modified Files: pep-0258.txt Log Message: whitespace Index: pep-0258.txt =================================================================== RCS file: /cvsroot/docstring/dps/spec/pep-0258.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pep-0258.txt 28 Mar 2002 04:36:53 -0000 1.7 --- pep-0258.txt 4 Apr 2002 05:52:44 -0000 1.8 *************** *** 615,625 **** [1] PEP 256, Docstring Processing System Framework, Goodger ! http://www.python.org/peps/pep-0256.html [2] PEP 224, Attribute Docstrings, Lemburg ! http://www.python.org/peps/pep-0224.html [3] PEP 216, Docstring Format, Zadka ! http://www.python.org/peps/pep-0216.html [4] http://www.rfc-editor.org/rfc/rfc1766.txt --- 615,625 ---- [1] PEP 256, Docstring Processing System Framework, Goodger ! http://www.python.org/peps/pep-0256.html [2] PEP 224, Attribute Docstrings, Lemburg ! http://www.python.org/peps/pep-0224.html [3] PEP 216, Docstring Format, Zadka ! http://www.python.org/peps/pep-0216.html [4] http://www.rfc-editor.org/rfc/rfc1766.txt |
From: David G. <go...@us...> - 2002-03-28 05:18:10
|
Update of /cvsroot/docstring/dps In directory usw-pr-cvs1:/tmp/cvs-serv1012/dps Modified Files: HISTORY.txt Log Message: updated Index: HISTORY.txt =================================================================== RCS file: /cvsroot/docstring/dps/HISTORY.txt,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** HISTORY.txt 28 Mar 2002 04:47:58 -0000 1.49 --- HISTORY.txt 28 Mar 2002 05:18:06 -0000 1.50 *************** *** 178,185 **** * spec/doctree.txt: "DPS Document Tree Structure", added to project. ! * spec/pep-0256.txt: ! ! - Added ref to Ed Loper's STminus. ! - Added "methods" to abstract. * spec/pep-0257.txt: --- 178,182 ---- * spec/doctree.txt: "DPS Document Tree Structure", added to project. ! * spec/pep-0256.txt: Overhauled. * spec/pep-0257.txt: *************** *** 188,195 **** - Mentioned Unicode strings. ! * spec/pep-0258.txt: ! ! - Clarifications due to Tony Ibbs. ! - Added names to system warnings, updated. * spec/gdpi.dtd: --- 185,189 ---- - Mentioned Unicode strings. ! * spec/pep-0258.txt: Overhauled and retitled. * spec/gdpi.dtd: |
From: David G. <go...@us...> - 2002-03-28 05:09:07
|
Update of /cvsroot/docstring/dps/dps/writers In directory usw-pr-cvs1:/tmp/cvs-serv30181 Modified Files: html.py Log Message: fixed bugs Index: html.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/writers/html.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** html.py 28 Mar 2002 04:41:03 -0000 1.15 --- html.py 28 Mar 2002 05:09:04 -0000 1.16 *************** *** 19,22 **** --- 19,23 ---- import time + from types import ListType from dps import writers, nodes, languages *************** *** 161,168 **** 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=node['refid'], CLASS='citation-reference')) --- 162,171 ---- def visit_citation_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, #node['refid'], CLASS='citation-reference')) *************** *** 388,397 **** 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=node['refid'], CLASS='footnote-reference')) --- 391,400 ---- 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, #node['refid'], CLASS='footnote-reference')) *************** *** 713,718 **** def visit_topic(self, node): self.body.append(self.starttag(node, 'div', CLASS='topic')) ! if node.hasattr('class'): ! self.topic_class = topic['class'] def depart_topic(self, node): --- 716,720 ---- def visit_topic(self, node): self.body.append(self.starttag(node, 'div', CLASS='topic')) ! self.topic_class = node.get('class') def depart_topic(self, node): |
From: David G. <go...@us...> - 2002-03-28 04:57:42
|
Update of /cvsroot/docstring/dps/dps/transforms In directory usw-pr-cvs1:/tmp/cvs-serv18032/dps/dps/transforms Modified Files: universal.py Log Message: Added FinalReferences transform. Index: universal.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/transforms/universal.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** universal.py 16 Mar 2002 05:58:54 -0000 1.4 --- universal.py 28 Mar 2002 04:42:29 -0000 1.5 *************** *** 11,14 **** --- 11,19 ---- - `Messages`: Placement of system messages stored in `nodes.document.messages`. + - `TestMessages`: Like `Messages`, used on test runs. + - `FinalReferences`: Resolve remaining references. + - `Pending`: Execute pending transforms (abstract base class; + `FirstReaderPending`, `LastReaderPending`, `FirstWriterPending`, and + `LastWriterPending` are its concrete subclasses). """ *************** *** 28,31 **** --- 33,37 ---- def transform(self): + # @@@ filter out msgs below threshold? if len(self.doctree.messages) > 0: section = nodes.section(CLASS='system-messages') *************** *** 47,50 **** --- 53,66 ---- + class FinalReferences(Transform): + + """ + Resolve any remaining references, check for dangling. + """ + + def transform(self): + pass + + class Pending(Transform): *************** *** 85,89 **** - test_transforms = (TestMessages,) """Universal transforms to apply to the raw doctree when testing.""" --- 101,104 ---- *************** *** 92,96 **** """Universal transforms to apply before any other Reader transforms.""" ! last_reader_transforms = (LastReaderPending, Messages) """Universal transforms to apply after all other Reader transforms.""" --- 107,111 ---- """Universal transforms to apply before any other Reader transforms.""" ! last_reader_transforms = (LastReaderPending,) """Universal transforms to apply after all other Reader transforms.""" *************** *** 98,101 **** """Universal transforms to apply before any other Writer transforms.""" ! last_writer_transforms = (LastWriterPending,) """Universal transforms to apply after all other Writer transforms.""" --- 113,116 ---- """Universal transforms to apply before any other Writer transforms.""" ! last_writer_transforms = (LastWriterPending, FinalReferences, Messages) """Universal transforms to apply after all other Writer transforms.""" |
From: David G. <go...@us...> - 2002-03-28 04:48:01
|
Update of /cvsroot/docstring/dps In directory usw-pr-cvs1:/tmp/cvs-serv21471/dps Modified Files: HISTORY.txt Log Message: updated Index: HISTORY.txt =================================================================== RCS file: /cvsroot/docstring/dps/HISTORY.txt,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** HISTORY.txt 16 Mar 2002 06:11:01 -0000 1.48 --- HISTORY.txt 28 Mar 2002 04:47:58 -0000 1.49 *************** *** 94,97 **** --- 94,100 ---- - Added "topic", "pending", "citation" and "citation_reference". - Added support for system_message cross-references. + - Added support for list-value attributes (including + "Element.setdefault()"). + - Added "BackLinkable" mixin. * dps/roman.py: Added to project. Written by and courtesy of Mark *************** *** 225,230 **** - Added 'problematic', inline relative of 'system_message'. - Added 'type' attribute to 'system_warning', removed 'warning'. ! - Changed "system_warning" to "system_message"; added ! cross-reference attribute "refid". - Reworked option lists. - Removed "abstract" --- 228,233 ---- - Added 'problematic', inline relative of 'system_message'. - Added 'type' attribute to 'system_warning', removed 'warning'. ! - Changed "system_warning" to "system_message"; added backlink ! attribute "refids". - Reworked option lists. - Removed "abstract" *************** *** 234,237 **** --- 237,241 ---- - Added "raw". - Added "refid" attribute to "title" for two-way Tables of Contents. + - Added "refids" attribute to "footnote" & "citation" for backlinks. * spec/pdpi.dtd: |
From: David G. <go...@us...> - 2002-03-28 04:47:49
|
Update of /cvsroot/docstring/dps/dps/writers In directory usw-pr-cvs1:/tmp/cvs-serv21396/dps/dps/writers Modified Files: __init__.py Log Message: docstring mods Index: __init__.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/writers/__init__.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** __init__.py 16 Mar 2002 05:53:52 -0000 1.7 --- __init__.py 28 Mar 2002 04:47:47 -0000 1.8 *************** *** 8,18 **** :Copyright: This module has been placed in the public domain. ! This package contains DPS Writer modules. """ __docformat__ = 'reStructuredText' - __all__ = ['Writer', 'get_writer_class'] - import sys --- 8,16 ---- :Copyright: This module has been placed in the public domain. ! This package contains Docutils Writer modules. """ __docformat__ = 'reStructuredText' import sys *************** *** 25,28 **** --- 23,28 ---- """ Abstract base class for docutils Writers. + + Each writer module or package must export a subclass also called 'Writer'. Call `write()` to process a document. |
From: David G. <go...@us...> - 2002-03-28 04:47:36
|
Update of /cvsroot/docstring/dps/dps In directory usw-pr-cvs1:/tmp/cvs-serv21248/dps/dps Modified Files: utils.py Log Message: docstring mods Index: utils.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/utils.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** utils.py 16 Mar 2002 05:57:30 -0000 1.19 --- utils.py 28 Mar 2002 04:47:33 -0000 1.20 *************** *** 53,57 **** explicitly set, defaults to the conditions of the default category). ! .. [#]_ The concept of "categories" was inspired by the log4j project: http://jakarta.apache.org/log4j/. """ --- 53,57 ---- explicitly set, defaults to the conditions of the default category). ! .. [#] The concept of "categories" was inspired by the log4j project: http://jakarta.apache.org/log4j/. """ |
From: David G. <go...@us...> - 2002-03-28 04:47:25
|
Update of /cvsroot/docstring/dps/dps/readers In directory usw-pr-cvs1:/tmp/cvs-serv21122/dps/dps/readers Modified Files: __init__.py Log Message: docstring mods Index: __init__.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/readers/__init__.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** __init__.py 16 Mar 2002 06:04:30 -0000 1.5 --- __init__.py 28 Mar 2002 04:47:22 -0000 1.6 *************** *** 26,29 **** --- 26,31 ---- Abstract base class for docutils Readers. + Each reader module or package must export a subclass also called 'Reader'. + The three steps of a Reader's responsibility are defined: `scan()`, `parse()`, and `transform()`. Call `read()` to process a document. |
From: David G. <go...@us...> - 2002-03-28 04:47:19
|
Update of /cvsroot/docstring/dps/dps In directory usw-pr-cvs1:/tmp/cvs-serv21039/dps/dps Modified Files: core.py Log Message: docstring mods Index: core.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/core.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** core.py 7 Feb 2002 02:02:24 -0000 1.2 --- core.py 28 Mar 2002 04:47:16 -0000 1.3 *************** *** 21,24 **** --- 21,28 ---- class Publisher: + """ + Publisher encapsulates the high-level logic of a Docutils system. + """ + reporter = None """A `utils.Reporter` instance used for all document processing.""" *************** *** 27,30 **** --- 31,39 ---- languagecode='en', warninglevel=2, errorlevel=4, warningstream=None, debug=0): + """ + Initial setup. If any of `reader`, `parser`, or `writer` are + not specified, the corresponding 'set*' method should be + called. + """ self.reader = reader self.parser = parser *************** *** 53,56 **** --- 62,69 ---- def publish(self, source, destination): + """ + Run `source` through `self.reader`, then through `self.writer` to + `destination`. + """ document = self.reader.read(source, self.parser) self.writer.write(document, destination) *************** *** 63,66 **** --- 76,80 ---- reporter=None, languagecode='en', warninglevel=2, errorlevel=4, warningstream=None, debug=0): + """Set up & run a `Publisher`.""" pub = Publisher(reader, parser, writer, reporter, languagecode, warninglevel, errorlevel, warningstream, debug) |
From: David G. <go...@us...> - 2002-03-28 04:46:27
|
Update of /cvsroot/docstring/dps/dps In directory usw-pr-cvs1:/tmp/cvs-serv20484/dps/dps Modified Files: nodes.py Log Message: - Added support for list-value attributes (including "Element.setdefault()"). - Added "BackLinkable" mixin. Index: nodes.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/nodes.py,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** nodes.py 16 Mar 2002 06:07:41 -0000 1.37 --- nodes.py 28 Mar 2002 04:46:24 -0000 1.38 *************** *** 8,11 **** --- 8,13 ---- :Copyright: This module has been placed in the public domain. + Docutils document tree element class library. + Classes in CamelCase are abstract base classes or auxiliary classes. The one exception is `Text`, for a text node; uppercase is used to differentiate from *************** *** 20,24 **** import sys, os import xml.dom.minidom ! from types import IntType, SliceType, StringType, TupleType from UserString import MutableString from dps import utils --- 22,26 ---- import sys, os import xml.dom.minidom ! from types import IntType, SliceType, StringType, TupleType, ListType from UserString import MutableString from dps import utils *************** *** 241,247 **** def starttag(self): ! return '<%s>' % ' '.join([self.tagname] + ! ['%s="%s"' % (n, v) ! for n, v in self.attlist()]) def endtag(self): --- 243,256 ---- def starttag(self): ! parts = [self.tagname] ! for name, value in self.attlist: ! if value is None: # boolean attribute ! parts.append(name) ! elif isinstance(value, ListType): ! values = [str(v) for v in value] ! parts.append('%s="%s"' % (name, ' '.join(values))) ! else: ! parts.append('%s="%s"' % (name, str(value))) ! return '<%s>' % ' '.join(parts) def endtag(self): *************** *** 327,330 **** --- 336,342 ---- return self.attributes.has_key(attr) + def setdefault(self, key, failobj=None): + return self.attributes.setdefault(key, failobj) + has_key = hasattr *************** *** 440,443 **** --- 452,461 ---- + class BackLinkable: + + def add_refid(self, refid): + self.setdefault('refid', []).append(refid) + + # ==================== # Element Categories *************** *** 580,584 **** id = node['id'] if self.ids.has_key(id) and self.ids[id] is not node: ! msg = self.reporter.error('Duplicate ID: "%s"' % id) msgnode += msg else: --- 598,602 ---- id = node['id'] if self.ids.has_key(id) and self.ids[id] is not node: ! msg = self.reporter.error('Duplicate ID: "%s".' % id) msgnode += msg else: *************** *** 594,603 **** if node.has_key('name'): name = node['name'] - #if self.nameids.has_key(name) \ - # and self.ids[self.nameids[name]].has_key('name'): - # msg = self.reporter.info( - # 'Multiple IDs for name "%s": "%s", "%s"' - # % (name, self.nameids[name], id)) - # msgnode += msg self.nameids[name] = id return id --- 612,615 ---- *************** *** 611,615 **** or self.implicit_targets.has_key(name): msg = self.reporter.info( ! 'Duplicate implicit target name: "%s"' % name, refid=id) msgnode += msg self.clear_target_names(name, self.implicit_targets) --- 623,627 ---- or self.implicit_targets.has_key(name): msg = self.reporter.info( ! 'Duplicate implicit target name: "%s".' % name, refid=id) msgnode += msg self.clear_target_names(name, self.implicit_targets) *************** *** 632,636 **** level = 1 # just inform if refuri's identical msg = self.reporter.system_message( ! level, 'Duplicate explicit target name: "%s"' % name, refid=id) msgnode += msg --- 644,648 ---- level = 1 # just inform if refuri's identical msg = self.reporter.system_message( ! level, 'Duplicate explicit target name: "%s".' % name, refid=id) msgnode += msg *************** *** 642,646 **** elif self.implicit_targets.has_key(name): msg = self.reporter.info( ! 'Duplicate implicit target name: "%s"' % name, refid=id) msgnode += msg self.clear_target_names(name, self.implicit_targets) --- 654,658 ---- elif self.implicit_targets.has_key(name): msg = self.reporter.info( ! 'Duplicate implicit target name: "%s".' % name, refid=id) msgnode += msg self.clear_target_names(name, self.implicit_targets) *************** *** 696,700 **** if self.substitution_defs.has_key(name): msg = self.reporter.error( ! 'Duplicate substitution definition name: "%s"' % name) if msgnode == None: msgnode = self.messages --- 708,712 ---- if self.substitution_defs.has_key(name): msg = self.reporter.error( ! 'Duplicate substitution definition name: "%s".' % name) if msgnode == None: msgnode = self.messages *************** *** 824,829 **** class substitution_definition(Special, TextElement): pass 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 --- 836,841 ---- class substitution_definition(Special, TextElement): pass class target(Special, Inline, TextElement, ToBeResolved): pass ! class footnote(General, Element, BackLinkable): pass ! class citation(General, Element, BackLinkable): pass class label(Component, TextElement): pass class figure(General, Element): pass *************** *** 839,843 **** ! class system_message(Special, PreBibliographic, Element): def __init__(self, comment=None, *children, **attributes): --- 851,855 ---- ! class system_message(Special, PreBibliographic, Element, BackLinkable): def __init__(self, comment=None, *children, **attributes): *************** *** 855,859 **** """ - The "pending" element is used to encapsulate a pending operation: the operation, the point at which to apply it, and any data it requires. Only --- 867,870 ---- *************** *** 891,895 **** self.details = details ! """Detail data required by the pending operation.""" def pformat(self, indent=' ', level=0): --- 902,906 ---- self.details = details ! """Detail data (dictionary) required by the pending operation.""" def pformat(self, indent=' ', level=0): |
From: David G. <go...@us...> - 2002-03-28 04:41:07
|
Update of /cvsroot/docstring/dps/dps/writers In directory usw-pr-cvs1:/tmp/cvs-serv17077/dps/dps/writers Modified Files: html.py Log Message: many improvements Index: html.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/writers/html.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** html.py 16 Mar 2002 05:53:22 -0000 1.14 --- html.py 28 Mar 2002 04:41:03 -0000 1.15 *************** *** 17,22 **** __docformat__ = 'reStructuredText' - __all__ = ['Writer'] - import time --- 17,20 ---- *************** *** 53,56 **** --- 51,55 ---- self.sectionlevel = 0 self.context = [] + self.topic_class = '' def astext(self): *************** *** 68,72 **** atts = {} for (name, value) in attributes.items(): ! atts[name.lower()] = value for att in ('class',): # append to node attribute if node.has_key(att): --- 67,71 ---- atts = {} for (name, value) in attributes.items(): ! atts[name] = value for att in ('class',): # append to node attribute if node.has_key(att): *************** *** 78,86 **** attlist = atts.items() attlist.sort() ! return '<%s>%s' % (' '.join([tagname.upper()] ! + ['%s="%s"' % (name.upper(), ! self.encode(str(value))) ! for name, value in attlist]), ! suffix) def visit_Text(self, node): --- 77,92 ---- attlist = atts.items() attlist.sort() ! parts = [tagname.upper()] ! for name, value in attlist: ! if value is None: # boolean attribute ! parts.append(name.upper()) ! elif isinstance(value, ListType): ! values = [str(v) for v in value] ! parts.append('%s="%s"' % (name.upper(), ! self.encode(' '.join(values)))) ! else: ! parts.append('%s="%s"' % (name.upper(), ! self.encode(str(value)))) ! return '<%s>%s' % (' '.join(parts), suffix) def visit_Text(self, node): *************** *** 92,96 **** def visit_admonition(self, node, name): self.body.append(self.starttag(node, 'div', CLASS=name)) ! self.body.append('<H3>' + self.language.labels[name] + '</H3>\n') def depart_admonition(self): --- 98,102 ---- def visit_admonition(self, node, name): self.body.append(self.starttag(node, 'div', CLASS=name)) ! self.body.append('<P CLASS="admonition-title">' + self.language.labels[name] + '</P>\n') def depart_admonition(self): *************** *** 122,126 **** def visit_bullet_list(self, node): ! self.body.append(self.starttag(node, 'ul')) def depart_bullet_list(self, node): --- 128,135 ---- def visit_bullet_list(self, node): ! if self.topic_class == 'contents': ! self.body.append(self.starttag(node, 'ul', compact=None)) ! else: ! self.body.append(self.starttag(node, 'ul')) def depart_bullet_list(self, node): *************** *** 152,159 **** 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')) --- 161,168 ---- 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=node['refid'], CLASS='citation-reference')) *************** *** 265,272 **** def depart_document(self, node): self.body.append('</DIV>\n') ! self.body.append( ! '<P CLASS="credits">HTML generated from <CODE>%s</CODE> on %s ' ! 'by <A HREF="http://docutils.sourceforge.net/">Docutils</A>.' ! '</P>\n' % (node['source'], time.strftime('%Y-%m-%d'))) def visit_emphasis(self, node): --- 274,281 ---- def depart_document(self, node): self.body.append('</DIV>\n') ! #self.body.append( ! # '<P CLASS="credits">HTML generated from <CODE>%s</CODE> on %s ' ! # 'by <A HREF="http://docutils.sourceforge.net/">Docutils</A>.' ! # '</P>\n' % (node['source'], time.strftime('%Y-%m-%d'))) def visit_emphasis(self, node): *************** *** 379,388 **** 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')) --- 388,397 ---- 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=node['refid'], CLASS='footnote-reference')) *************** *** 549,552 **** --- 558,562 ---- href = node['refuri'] elif node.has_key('refid'): + #else: href = '#' + node['refid'] elif node.has_key('refname'): *************** *** 598,605 **** def visit_substitution_reference(self, node): ! pass ! ! def depart_substitution_reference(self, node): ! pass def visit_subtitle(self, node): --- 608,612 ---- def visit_substitution_reference(self, node): ! self.unimplemented_visit(node) def visit_subtitle(self, node): *************** *** 613,622 **** raise nodes.SkipNode self.body.append(self.starttag(node, 'div', CLASS='system-message')) if node.hasattr('refid'): ! self.body.append('<H3><A HREF="#%s">%s</A> ' ! '(level %s system message)</H3>\n' % (node['refid'], node['type'], node['level'])) else: ! self.body.append('<H3>%s (level %s system message)</H3>\n' % (node['type'], node['level'])) --- 620,630 ---- raise nodes.SkipNode self.body.append(self.starttag(node, 'div', CLASS='system-message')) + self.body.append('<P CLASS="system-message-title">') if node.hasattr('refid'): ! self.body.append('<A HREF="#%s">%s</A> ' ! '(level %s system message)</P>\n' % (node['refid'], node['type'], node['level'])) else: ! self.body.append('%s (level %s system message)</P>\n' % (node['type'], node['level'])) *************** *** 635,641 **** or node.has_key('refname')): self.body.append(self.starttag(node, 'a', '', CLASS='target')) def depart_target(self, node): ! self.body.append('</A>') def visit_tbody(self, node): --- 643,652 ---- or node.has_key('refname')): self.body.append(self.starttag(node, 'a', '', CLASS='target')) + self.context.append('</A>') + else: + self.context.append('') def depart_target(self, node): ! self.body.append(self.context.pop()) def visit_tbody(self, node): *************** *** 702,708 **** --- 713,722 ---- def visit_topic(self, node): self.body.append(self.starttag(node, 'div', CLASS='topic')) + if node.hasattr('class'): + self.topic_class = topic['class'] def depart_topic(self, node): self.body.append('</DIV>\n') + self.topic_class = '' def visit_transition(self, node): *************** *** 723,724 **** --- 737,742 ---- def depart_warning(self, node): self.depart_admonition() + + def unimplemented_visit(self, node): + raise NotImplementedError('visiting unimplemented node type: %s' + % node.__class__.__name__) |