comparison markup/output.py @ 158:3f23fafeef99 trunk

* Add test case for SVG content embedded in an HTML document. * The XHTML serializer now assumes that elements in a foreign namespace (such as SVG or MathML) can be serialized as empty tags (`<foo />`).
author cmlenz
date Wed, 16 Aug 2006 21:29:48 +0000
parents 47bbd9d2a5af
children 553866249cb0
comparison
equal deleted inserted replaced
157:47433aa69169 158:3f23fafeef99
229 buf += [' ', attrname, '="', attrname, '"'] 229 buf += [' ', attrname, '="', attrname, '"']
230 else: 230 else:
231 buf += [' ', attrname, '="', escape(value), '"'] 231 buf += [' ', attrname, '="', escape(value), '"']
232 ns_attrib = [] 232 ns_attrib = []
233 233
234 if (not tag.namespace or tag in namespace) and \ 234 if (tag.namespace and tag not in namespace) or \
235 tagname in empty_elems: 235 tagname in empty_elems:
236 kind, data, pos = stream.next() 236 kind, data, pos = stream.next()
237 if kind is END: 237 if kind is END:
238 buf += [' />'] 238 buf += [' />']
239 else: 239 else:
Copyright (C) 2012-2017 Edgewall Software