src/XML/Util.php
function splitQualifiedName($qname, $defaultNs = null)
    {
        if (strstr($qname, ':')) {
            $tmp = explode(':', $qname);
            return array(
                'namespace' => $tmp[0],
                'localPart' => $tmp[1]
            );
        }
        return array(
            'namespace' => $defaultNs,
            'localPart' => $qname
        );
    }
function splitQualifiedName($qname, $defaultNs = null)
    {
        if (strstr($qname, ':')) {
            $tmp = explode(':', $qname);
            return array(
                'namespace' => $tmp[0],
                'localPart' => $tmp[1]
            );
        }
        return array(
            'namespace' => $defaultNs,
            'localPart' => $qname
        );
    }
split qualified name and return namespace and local part

<code>
require_once 'XML/Util.php';

// split qualified tag
$parts = XML_Util::splitQualifiedName('xslt:stylesheet');
</code>
the returned array will contain two elements:
<pre>
array(
'namespace' => 'xslt',
'localPart' => 'stylesheet'
);
</pre>

@param string $qname     qualified tag name
@param string $defaultNs default namespace (optional)

@return array array containing namespace and local part
@access public
@static