Mercurial > genshi > genshi-test
comparison markup/output.py @ 158:8e81177059f3
* 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 | 56d534eb53f9 |
children | dbae9efe5704 |
comparison
equal
deleted
inserted
replaced
157:40fc3d36f5b4 | 158:8e81177059f3 |
---|---|
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: |