public function isValidNodename($nodeName)
    {
        try {
            $parts = explode(':', $nodeName);
            if (1 > count($parts) || 2 < count($parts)) {
                return new RepositoryException("Name contains illegal characters: $nodeName");
            }
            if (0 === strlen($parts[0])) {
                return new RepositoryException("Name may not be empty: $nodeName");
            }
            PathHelper::assertValidLocalName($parts[0]);
            if (2 == count($parts)) {
                // [0] was the namespace prefix, also check the name
                PathHelper::assertValidLocalName($parts[1]);
                if (0 === strlen($parts[1])) {
                    return new RepositoryException("Local name may not be empty: $nodeName");
                }
            }
        } catch (RepositoryException $e) {
            return $e;
        }
    }