summaryrefslogtreecommitdiffstats
path: root/Doc/tools
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-08-26 17:54:16 (GMT)
committerFred Drake <fdrake@acm.org>1999-08-26 17:54:16 (GMT)
commitf6199edcd39cceaa48869ec71df88b1ddbc6ce24 (patch)
tree5915582959133279bea33209115143684c544fb6 /Doc/tools
parenta20581c1e56faeb9b90f6d9e887d5fb92fe395be (diff)
downloadcpython-f6199edcd39cceaa48869ec71df88b1ddbc6ce24.zip
cpython-f6199edcd39cceaa48869ec71df88b1ddbc6ce24.tar.gz
cpython-f6199edcd39cceaa48869ec71df88b1ddbc6ce24.tar.bz2
Conversion.subconvert(): Added support for "entityref" parameters
(must be named in the conversion spec.). TableParser.start_entityref(): New method. Use to support creating entity references via the conversion specification.
Diffstat (limited to 'Doc/tools')
-rwxr-xr-xDoc/tools/sgmlconv/latex2esis.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/tools/sgmlconv/latex2esis.py b/Doc/tools/sgmlconv/latex2esis.py
index 02711a3..325b0b1 100755
--- a/Doc/tools/sgmlconv/latex2esis.py
+++ b/Doc/tools/sgmlconv/latex2esis.py
@@ -266,6 +266,8 @@ class Conversion:
self.write("(%s\n" % entry.outputname)
self.err_write("--- text: %s\n" % `pentry.text`)
self.write("-%s\n" % encode(pentry.text))
+ elif pentry.type == "entityref":
+ self.write("&%s\n" % pentry.name)
if entry.outputname:
if not opened:
self.write("(%s\n" % entry.outputname)
@@ -460,6 +462,11 @@ class TableParser(XMLParser):
def end_attribute(self):
self.__current.parameters[-1].text = self.__buffer
+ def start_entityref(self, attrs):
+ name = attrs["name"]
+ p = Parameter("entityref", name)
+ self.__current.parameters.append(p)
+
def start_child(self, attrs):
name = attrs["name"]
p = Parameter("child", name, attrs.get("optional") == "yes")