def getXMLNS(self, prefix=None):
if prefix == XMLSchemaComponent.xml:<EOL><INDENT>return XMLNS.XML<EOL><DEDENT>parent = self<EOL>ns = self.attributes[XMLSchemaComponent.xmlns].get(prefix orXMLSchemaComponent.xmlns_key)<EOL>while not ns:<EOL><INDENT>parent = parent._parent()<EOL>ns = parent.attributes[XMLSchemaComponent.xmlns].get(prefix orXMLSchemaComponent.xmlns_key)<EOL>if not ns and isinstance(parent, WSDLToolsAdapter):<EOL><INDENT>if prefix is None:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>raise SchemaError('<STR_LIT>' %prefix)<EOL><DEDENT><DEDENT>return ns<EOL>
deference prefix or by default xmlns, returns namespace.