X-Git-Url: http://dolda2000.com/gitweb/?p=wrw.git;a=blobdiff_plain;f=wrw%2Fsp%2Fcons.py;h=0c36458f8af3b99d84a5dc70470a4d05db7484ea;hp=99656a3b14ea5170a358dfcb0dee142980f3c1d7;hb=919b8a4ff35da1fce73f238754ef376705c52e18;hpb=dc590bea957bbffa808e6cf3f516d4ae9beda98a 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