'XML elements with a prefixed name as per upper level tag definition
have a start-tag of C{"<prefix:tag>"} and an end-tag of
C{"</prefix:tag>"}.
Refer to U{http://www.w3.org/TR/xml-names/#ns-using} for details.'

def test_prefixedTags(self):

    outerNamespace = 'http://example.com/outer'
    innerNamespace = 'http://example.com/inner'
    document = microdom.Document()
    root = document.createElement('root', namespace=outerNamespace)
    root.addPrefixes({innerNamespace: 'inner'})
    tag = document.createElement('tag', namespace=innerNamespace)
    child = document.createElement('child', namespace=innerNamespace)
    tag.appendChild(child)
    root.appendChild(tag)
    document.appendChild(root)
    xmlOk = '<?xml    version="1.0"?><root    xmlns="http://example.com/outer"    xmlns:inner="http://example.com/inner"><inner:tag><inner:child></inner:child></inner:tag></root>'
    xmlOut = document.toxml()
    self.assertEqual(xmlOut, xmlOk)
