X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Fsp%2Fcons.py;h=0c36458f8af3b99d84a5dc70470a4d05db7484ea;hb=b0f95b219e2f9aea9f81d696adbfaaa0e41a6eaf;hp=99656a3b14ea5170a358dfcb0dee142980f3c1d7;hpb=6d2e09cf5bf8ddfa126ca16d536f6b42e502f0ce;p=wrw.git diff --git a/wrw/sp/cons.py b/wrw/sp/cons.py index 99656a3..0c36458 100644 --- a/wrw/sp/cons.py +++ b/wrw/sp/cons.py @@ -59,6 +59,8 @@ class context(object): raise Exception("No node conversion known for %s objects" % str(type(ob))) def addchild(self, node, child): + if child is None: + return node.children.append(self.nodefrom(child)) def addattr(self, node, k, v): @@ -74,3 +76,9 @@ class constructor(object): def __getattr__(self, name): return self._elcls(self._ns, name, self._ctx) + +class doctype(node): + def __init__(self, rootname, pubid, dtdid): + self.rootname = rootname + self.pubid = pubid + self.dtdid = dtdid