/* Generated by Cython 0.9.6.9 on Wed Dec 19 12:50:13 2007 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
  #define PyNumber_Index(o)    PyNumber_Int(o)
  #define PyIndex_Check(o)     PyNumber_Check(o)
#endif
#if PY_VERSION_HEX < 0x02040000
  #define METH_COEXIST 0
#endif
#ifndef WIN32
  #define __stdcall
  #define __cdecl
#endif
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#include <math.h>
#include "etree_defs.h"
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#include "stdarg.h"
#include "lxml-version.h"
#include "libxml/xmlversion.h"
#include "libxml/encoding.h"
#include "libxml/chvalid.h"
#include "libxml/hash.h"
#include "libxml/tree.h"
#include "libxml/HTMLtree.h"
#include "libxml/valid.h"
#include "libxml/xmlIO.h"
#include "libxml/xmlsave.h"
#include "libxml/globals.h"
#include "libxml/xmlstring.h"
#include "libxml/xmlmemory.h"
#include "pythread.h"
#include "lxml.etree_api.h"


#ifdef __GNUC__
#define INLINE __inline__
#elif _WIN32
#define INLINE __inline
#else
#define INLINE 
#endif

typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
typedef struct {PyObject **p; char *s; long n; int is_unicode;} __Pyx_StringTabEntry; /*proto*/

static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}

#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   if (x == Py_True) return 1;
   else if (x == Py_False) return 0;
   else return PyObject_IsTrue(x);
}



static int __pyx_skip_dispatch = 0;


#ifdef __GNUC__
/* Test for GCC > 2.95 */
#if __GNUC__ > 2 ||               (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) 
#define likely(x)   __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else /* __GNUC__ > 2 ... */
#define likely(x)   (x)
#define unlikely(x) (x)
#endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
#define likely(x)   (x)
#define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static int __pyx_lineno;
static char *__pyx_filename;
static char **__pyx_f;

static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[],     Py_ssize_t nargs, PyObject **args2, PyObject **kwds2, char rqd_kwds[]); /*proto*/

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static PyObject *__Pyx_UnpackItem(PyObject *); /*proto*/
static int __Pyx_EndUnpack(PyObject *); /*proto*/

static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/

static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size);  /*proto*/

static PyObject *__Pyx_ImportModule(char *name); /*proto*/

static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/

static void __Pyx_AddTraceback(char *funcname); /*proto*/

static int __Pyx_RegisterCleanup(); /*proto*/
static PyObject* cleanup(PyObject *self, PyObject *unused); /*proto*/
static PyMethodDef cleanup_def = {"__cleanup", (PyCFunction)&cleanup, METH_NOARGS, 0};

/* Declarations from cstd */


/* Declarations from tree */


/* Declarations from __builtin__ */


/* Declarations from python */

static PyTypeObject *__pyx_ptype_6python_slice = 0;

/* Declarations from lxml.etree */


/* Declarations from etreepublic */

static PyTypeObject *__pyx_ptype_11etreepublic__Document = 0;
static PyTypeObject *__pyx_ptype_11etreepublic__Element = 0;
static PyTypeObject *__pyx_ptype_11etreepublic_ElementBase = 0;
static PyTypeObject *__pyx_ptype_11etreepublic__ElementTree = 0;
static PyTypeObject *__pyx_ptype_11etreepublic_ElementClassLookup = 0;
static PyTypeObject *__pyx_ptype_11etreepublic_FallbackElementClassLookup = 0;
static PyTypeObject *__pyx_ptype_11etreepublic__ElementTagMatcher = 0;
static PyTypeObject *__pyx_ptype_11etreepublic__ElementIterator = 0;

/* Declarations from lxml.objectify */

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":100
 * # Element class for the main API
 * 
 * cdef class ObjectifiedElement(ElementBase):             # <<<<<<<<<<<<<< 
 *     """Main XML Element class.
 * 
 */

struct __pyx_obj_4lxml_9objectify_ObjectifiedElement {
  struct LxmlElementBase __pyx_base;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":544
 * # Data type support in subclasses
 * 
 * cdef class ObjectifiedDataElement(ObjectifiedElement):             # <<<<<<<<<<<<<< 
 *     """This is the base class for all data type Elements.  Subclasses should
 *     override the 'pyval' property and possibly the __str__ method.
 */

struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement {
  struct __pyx_obj_4lxml_9objectify_ObjectifiedElement __pyx_base;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":564
 *         cetree.setNodeText(self._c_node, s)
 * 
 * cdef class NumberElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *     cdef object _type
 *     def _setValueParser(self, function):
 */

struct __pyx_obj_4lxml_9objectify_NumberElement {
  struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
  struct __pyx_vtabstruct_4lxml_9objectify_NumberElement *__pyx_vtab;
  PyObject *_type;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":655
 *         return _numericValueOf(self) ^ _numericValueOf(other)
 * 
 * cdef class IntElement(NumberElement):             # <<<<<<<<<<<<<< 
 *     def _init(self):
 *         self._type = int
 */

struct __pyx_obj_4lxml_9objectify_IntElement {
  struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":659
 *         self._type = int
 * 
 * cdef class LongElement(NumberElement):             # <<<<<<<<<<<<<< 
 *     def _init(self):
 *         self._type = long
 */

struct __pyx_obj_4lxml_9objectify_LongElement {
  struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":663
 *         self._type = long
 * 
 * cdef class FloatElement(NumberElement):             # <<<<<<<<<<<<<< 
 *     def _init(self):
 *         self._type = float
 */

struct __pyx_obj_4lxml_9objectify_FloatElement {
  struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":667
 *         self._type = float
 * 
 * cdef class StringElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *     """String data class.
 * 
 */

struct __pyx_obj_4lxml_9objectify_StringElement {
  struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":720
 *         return _strValueOf(self) % other
 * 
 * cdef class NoneElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *     def __str__(self):
 *         return "None"
 */

struct __pyx_obj_4lxml_9objectify_NoneElement {
  struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":742
 *             return None
 * 
 * cdef class BoolElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *     """Boolean type base on string values: 'true' or 'false'.
 *     """
 */

struct __pyx_obj_4lxml_9objectify_BoolElement {
  struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
  struct __pyx_vtabstruct_4lxml_9objectify_BoolElement *__pyx_vtab;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":817
 * # Python type registry
 * 
 * cdef class PyType:             # <<<<<<<<<<<<<< 
 *     """User defined type.
 * 
 */

struct __pyx_obj_4lxml_9objectify_PyType {
  PyObject_HEAD
  PyObject *name;
  PyObject *type_check;
  PyObject *_add_text;
  PyObject *_type;
  PyObject *_schema_types;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":920
 *             self._schema_types = list(types)
 * 
 * cdef class _StringValueSetter:             # <<<<<<<<<<<<<< 
 *     cdef object _stringify
 *     def __init__(self, stringify):
 */

struct __pyx_obj_4lxml_9objectify__StringValueSetter {
  PyObject_HEAD
  PyObject *_stringify;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1063
 *     cdef _ObjectifyElementMakerCaller NEW_ELEMENT_MAKER "PY_NEW" (object t)
 * 
 * cdef class ElementMaker:             # <<<<<<<<<<<<<< 
 *     cdef object _makeelement
 *     cdef object _namespace
 */

struct __pyx_obj_4lxml_9objectify_ElementMaker {
  PyObject_HEAD
  PyObject *_makeelement;
  PyObject *_namespace;
  PyObject *_nsmap;
  int _annotate;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1057
 * # adapted ElementMaker supports registered PyTypes
 * 
 * cdef class _ObjectifyElementMakerCaller # forward declaration             # <<<<<<<<<<<<<< 
 * 
 * cdef extern from "etree_defs.h":
 */

struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller {
  PyObject_HEAD
  PyObject *_tag;
  PyObject *_nsmap;
  PyObject *_element_factory;
  int _annotate;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1241
 * # Element class lookup
 * 
 * cdef class ObjectifyElementClassLookup(ElementClassLookup):             # <<<<<<<<<<<<<< 
 *     """Element class lookup method that uses the objectify classes.
 *     """
 */

struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup {
  struct LxmlElementClassLookup __pyx_base;
  PyObject *empty_data_class;
  PyObject *tree_class;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":4
 * # ObjectPath
 * 
 * ctypedef struct _ObjectPath:             # <<<<<<<<<<<<<< 
 *     char* href
 *     char* name
 */

typedef struct {
  char *href;
  char *name;
  Py_ssize_t index;
} __pyx_t_4lxml_9objectify__ObjectPath;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":10
 * 
 * 
 * cdef class ObjectPath:             # <<<<<<<<<<<<<< 
 *     """Immutable object that represents a compiled object path.
 * 
 */

struct __pyx_obj_4lxml_9objectify_ObjectPath {
  PyObject_HEAD
  PyObject *find;
  PyObject *_path;
  PyObject *_path_str;
  __pyx_t_4lxml_9objectify__ObjectPath *_c_path;
  Py_ssize_t _path_len;
};


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":100
 * # Element class for the main API
 * 
 * cdef class ObjectifiedElement(ElementBase):             # <<<<<<<<<<<<<< 
 *     """Main XML Element class.
 * 
 */


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":544
 * # Data type support in subclasses
 * 
 * cdef class ObjectifiedDataElement(ObjectifiedElement):             # <<<<<<<<<<<<<< 
 *     """This is the base class for all data type Elements.  Subclasses should
 *     override the 'pyval' property and possibly the __str__ method.
 */


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":564
 *         cetree.setNodeText(self._c_node, s)
 * 
 * cdef class NumberElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *     cdef object _type
 *     def _setValueParser(self, function):
 */

struct __pyx_vtabstruct_4lxml_9objectify_NumberElement {
  PyObject *(*_value)(struct __pyx_obj_4lxml_9objectify_NumberElement *);
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":564
 *         cetree.setNodeText(self._c_node, s)
 * 
 * cdef class NumberElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *     cdef object _type
 *     def _setValueParser(self, function):
 */
static struct __pyx_vtabstruct_4lxml_9objectify_NumberElement *__pyx_vtabptr_4lxml_9objectify_NumberElement;


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":655
 *         return _numericValueOf(self) ^ _numericValueOf(other)
 * 
 * cdef class IntElement(NumberElement):             # <<<<<<<<<<<<<< 
 *     def _init(self):
 *         self._type = int
 */

struct __pyx_vtabstruct_4lxml_9objectify_IntElement {
  struct __pyx_vtabstruct_4lxml_9objectify_NumberElement __pyx_base;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":655
 *         return _numericValueOf(self) ^ _numericValueOf(other)
 * 
 * cdef class IntElement(NumberElement):             # <<<<<<<<<<<<<< 
 *     def _init(self):
 *         self._type = int
 */
static struct __pyx_vtabstruct_4lxml_9objectify_IntElement *__pyx_vtabptr_4lxml_9objectify_IntElement;


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":659
 *         self._type = int
 * 
 * cdef class LongElement(NumberElement):             # <<<<<<<<<<<<<< 
 *     def _init(self):
 *         self._type = long
 */

struct __pyx_vtabstruct_4lxml_9objectify_LongElement {
  struct __pyx_vtabstruct_4lxml_9objectify_NumberElement __pyx_base;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":659
 *         self._type = int
 * 
 * cdef class LongElement(NumberElement):             # <<<<<<<<<<<<<< 
 *     def _init(self):
 *         self._type = long
 */
static struct __pyx_vtabstruct_4lxml_9objectify_LongElement *__pyx_vtabptr_4lxml_9objectify_LongElement;


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":663
 *         self._type = long
 * 
 * cdef class FloatElement(NumberElement):             # <<<<<<<<<<<<<< 
 *     def _init(self):
 *         self._type = float
 */

struct __pyx_vtabstruct_4lxml_9objectify_FloatElement {
  struct __pyx_vtabstruct_4lxml_9objectify_NumberElement __pyx_base;
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":663
 *         self._type = long
 * 
 * cdef class FloatElement(NumberElement):             # <<<<<<<<<<<<<< 
 *     def _init(self):
 *         self._type = float
 */
static struct __pyx_vtabstruct_4lxml_9objectify_FloatElement *__pyx_vtabptr_4lxml_9objectify_FloatElement;


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":667
 *         self._type = float
 * 
 * cdef class StringElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *     """String data class.
 * 
 */


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":720
 *         return _strValueOf(self) % other
 * 
 * cdef class NoneElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *     def __str__(self):
 *         return "None"
 */


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":742
 *             return None
 * 
 * cdef class BoolElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *     """Boolean type base on string values: 'true' or 'false'.
 *     """
 */

struct __pyx_vtabstruct_4lxml_9objectify_BoolElement {
  int (*_boolval)(struct __pyx_obj_4lxml_9objectify_BoolElement *);
};

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":742
 *             return None
 * 
 * cdef class BoolElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *     """Boolean type base on string values: 'true' or 'false'.
 *     """
 */
static struct __pyx_vtabstruct_4lxml_9objectify_BoolElement *__pyx_vtabptr_4lxml_9objectify_BoolElement;


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":817
 * # Python type registry
 * 
 * cdef class PyType:             # <<<<<<<<<<<<<< 
 *     """User defined type.
 * 
 */


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":920
 *             self._schema_types = list(types)
 * 
 * cdef class _StringValueSetter:             # <<<<<<<<<<<<<< 
 *     cdef object _stringify
 *     def __init__(self, stringify):
 */


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1095
 *         return element_maker
 * 
 * cdef class _ObjectifyElementMakerCaller:             # <<<<<<<<<<<<<< 
 *     cdef object _tag
 *     cdef object _nsmap
 */


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1063
 *     cdef _ObjectifyElementMakerCaller NEW_ELEMENT_MAKER "PY_NEW" (object t)
 * 
 * cdef class ElementMaker:             # <<<<<<<<<<<<<< 
 *     cdef object _makeelement
 *     cdef object _namespace
 */


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1241
 * # Element class lookup
 * 
 * cdef class ObjectifyElementClassLookup(ElementClassLookup):             # <<<<<<<<<<<<<< 
 *     """Element class lookup method that uses the objectify classes.
 *     """
 */


/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":10
 * 
 * 
 * cdef class ObjectPath:             # <<<<<<<<<<<<<< 
 *     """Immutable object that represents a compiled object path.
 * 
 */

static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifiedElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_NumberElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_IntElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_LongElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_FloatElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_StringElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_NoneElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_BoolElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_PyType = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify__StringValueSetter = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_ElementMaker = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = 0;
static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectPath = 0;
static PyObject *__pyx_v_4lxml_9objectify_etree;
static PyObject *__pyx_v_4lxml_9objectify_re;
static PyObject *__pyx_v_4lxml_9objectify___builtin__;
static PyObject *__pyx_v_4lxml_9objectify_set;
static PyObject *__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS;
static PyObject *__pyx_v_4lxml_9objectify_islice;
static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE;
static char *__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE;
static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME;
static char *__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME;
static PyObject *__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME;
static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_NS;
static char *__pyx_v_4lxml_9objectify__XML_SCHEMA_NS;
static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS;
static char *__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS;
static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR;
static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR;
static PyObject *__pyx_v_4lxml_9objectify__PYTYPE_DICT;
static PyObject *__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT;
static PyObject *__pyx_v_4lxml_9objectify__TYPE_CHECKS;
static PyObject *__pyx_v_4lxml_9objectify_TREE_PYTYPE;
static int __pyx_v_4lxml_9objectify___RECURSIVE_STR;
static PyObject *__pyx_v_4lxml_9objectify___DEFAULT_PARSER;
static PyObject *__pyx_v_4lxml_9objectify_objectify_parser;
static PyObject *__pyx_v_4lxml_9objectify__fromstring;
static PyObject *__pyx_v_4lxml_9objectify__parse;
static PyObject *__pyx_v_4lxml_9objectify__DEFAULT_NSMAP;
static PyObject *__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT;
static PyObject *__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT;
static PyObject *__pyx_k12;
static PyObject *__pyx_k17;
static PyObject *__pyx_k18;
static PyObject *__pyx_k19;
static PyObject *__pyx_k20;
static PyObject *__pyx_k21;
static PyObject *__pyx_k22;
static PyObject *__pyx_k23;
static PyObject *__pyx_k24;
static PyObject *__pyx_k25;
static PyObject *__pyx_k26;
static PyObject *__pyx_k27;
static PyObject *__pyx_k28;
static PyObject *__pyx_k29;
static PyObject *__pyx_k30;
static PyObject *__pyx_k31;
static PyObject *__pyx_k32;
static PyObject *__pyx_k33;
static PyObject *__pyx_k34;
static PyObject *__pyx_k35;
static PyObject *__pyx_k36;
static PyObject *__pyx_k37;
static PyObject *__pyx_k38;
static PyObject *__pyx_k39;
static PyObject *__pyx_k40;
static PyObject *__pyx_k41;
static PyObject *__pyx_k42;
static PyObject *__pyx_k44;
static PyObject *__pyx_k45;
static PyObject *__pyx_k46;
static PyObject *__pyx_k47;
static PyObject *__pyx_k51;
static PyObject *__pyx_k52;
static PyObject *__pyx_k53;
static PyObject *__pyx_k54;
static PyObject *__pyx_k55;
static PyObject *__pyx_k56;
static PyObject *__pyx_k57;
static PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *); /*proto*/
static Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *); /*proto*/
static xmlNode *__pyx_f_4lxml_9objectify__findFollowingSibling(xmlNode *,char *,char *,Py_ssize_t); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__lookupChild(struct LxmlElement *,PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__lookupChildOrRaise(struct LxmlElement *,PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *,PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__replaceElement(struct LxmlElement *,PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__appendValue(struct LxmlElement *,PyObject *,PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__setElementValue(struct LxmlElement *,PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__lower_bool(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void); /*proto*/
static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guessPyType(PyObject *,struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *,PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *,int); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *,struct LxmlDocument *,xmlNode *); /*proto*/
static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check_type(xmlNode *,struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *,int,int,int,int,PyObject *,PyObject *); /*proto*/
static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *,PyObject *,PyObject *,PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__parseObjectPathString(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__parseObjectPathList(PyObject *); /*proto*/
static __pyx_t_4lxml_9objectify__ObjectPath *__pyx_f_4lxml_9objectify__buildObjectPathSegments(PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__findObjectPath(struct LxmlElement *,__pyx_t_4lxml_9objectify__ObjectPath *,Py_ssize_t,PyObject *,int); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__createObjectPath(struct LxmlElement *,__pyx_t_4lxml_9objectify__ObjectPath *,Py_ssize_t,int,PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__buildDescendantPaths(xmlNode *,PyObject *); /*proto*/
static PyObject *__pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(xmlNode *,PyObject *,PyObject *); /*proto*/


/* Implementation of lxml.objectify */

static char __pyx_k1[] = "A fake implementation for __dict__ to support dir() etc.\n\n        Note that this only considers the first child with a given name.\n        ";
static char __pyx_k2[] = "The list of XML Schema datatypes this Python type maps to.\n\n        Note that this must be set before registering the type!\n        ";
static char __pyx_k13[] = "http://www.w3.org/2001/XMLSchema";
static char __pyx_k14[] = "http://www.w3.org/2001/XMLSchema-instance";
static char __pyx_k15[] = "{%s}nil";
static char __pyx_k16[] = "{%s}type";
static char __pyx_k58[] = "(\\.?)\\s*(?:\\{([^}]*)\\})?\\s*([^.{}\\[\\]\\s]+)\\s*(?:\\[\\s*([-0-9]+)\\s*\\])?";

static PyObject *__pyx_num_0;
static PyObject *__pyx_num_1;

static PyObject *__pyx_n___iter__;
static PyObject *__pyx_n___str__;
static PyObject *__pyx_n___len__;
static PyObject *__pyx_n_countchildren;
static PyObject *__pyx_n_getchildren;
static PyObject *__pyx_n___getattr__;
static PyObject *__pyx_n___setattr__;
static PyObject *__pyx_n___delattr__;
static PyObject *__pyx_n_addattr;
static PyObject *__pyx_n___getitem__;
static PyObject *__pyx_n___setitem__;
static PyObject *__pyx_n___delitem__;
static PyObject *__pyx_n_iterfind;
static PyObject *__pyx_n_findall;
static PyObject *__pyx_n_find;
static PyObject *__pyx_n_findtext;
static PyObject *__pyx_n_descendantpaths;
static PyObject *__pyx_n___repr__;
static PyObject *__pyx_n__setText;
static PyObject *__pyx_n__setValueParser;
static PyObject *__pyx_n___int__;
static PyObject *__pyx_n___long__;
static PyObject *__pyx_n___float__;
static PyObject *__pyx_n___richcmp__;
static PyObject *__pyx_n___add__;
static PyObject *__pyx_n___sub__;
static PyObject *__pyx_n___mul__;
static PyObject *__pyx_n___div__;
static PyObject *__pyx_n___truediv__;
static PyObject *__pyx_n___mod__;
static PyObject *__pyx_n___pow__;
static PyObject *__pyx_n___neg__;
static PyObject *__pyx_n___pos__;
static PyObject *__pyx_n___abs__;
static PyObject *__pyx_n___nonzero__;
static PyObject *__pyx_n___invert__;
static PyObject *__pyx_n___lshift__;
static PyObject *__pyx_n___rshift__;
static PyObject *__pyx_n___and__;
static PyObject *__pyx_n___or__;
static PyObject *__pyx_n___xor__;
static PyObject *__pyx_n__init;
static PyObject *__pyx_n_strlen;
static PyObject *__pyx_n___init__;
static PyObject *__pyx_n_register;
static PyObject *__pyx_n_unregister;
static PyObject *__pyx_n___call__;
static PyObject *__pyx_n___dealloc__;
static PyObject *__pyx_n_hasattr;
static PyObject *__pyx_n_setattr;
static PyObject *__pyx_n_lxml;
static PyObject *__pyx_n_etree;
static PyObject *__pyx_n___version__;
static PyObject *__pyx_n_re;
static PyObject *__pyx_n___builtin__;
static PyObject *__pyx_n_set;
static PyObject *__pyx_n_AttributeError;
static PyObject *__pyx_n_sets;
static PyObject *__pyx_n_Set;
static PyObject *__pyx_n_ValueError;
static PyObject *__pyx_n_TypeError;
static PyObject *__pyx_n_itertools;
static PyObject *__pyx_n_islice;
static PyObject *__pyx_n_PYTYPE_ATTRIBUTE;
static PyObject *__pyx_n_TREE;
static PyObject *__pyx_n_setPytypeAttributeTag;
static PyObject *__pyx_n_pickleReduce;
static PyObject *__pyx_n_XMLParser;
static PyObject *__pyx_n_remove_blank_text;
static PyObject *__pyx_n_setElementClassLookup;
static PyObject *__pyx_n_fromstring;
static PyObject *__pyx_n_XML;
static PyObject *__pyx_n_parse;
static PyObject *__pyx_n_py;
static PyObject *__pyx_n_xsi;
static PyObject *__pyx_n_xsd;
static PyObject *__pyx_n_E;
static PyObject *__pyx_n_compile;
static PyObject *__pyx_n_U;
static PyObject *__pyx_n_match;

static PyObject *__pyx_k13p;
static PyObject *__pyx_k14p;
static PyObject *__pyx_k15p;
static PyObject *__pyx_k16p;
static PyObject *__pyx_k58p;

static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_TypeError;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":35
 * from itertools import islice
 * 
 * cdef object _typename(object t):             # <<<<<<<<<<<<<< 
 *     cdef char* c_name
 *     cdef char* s
 */

static  PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *__pyx_v_t) {
char *__pyx_v_c_name;
char *__pyx_v_s;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
Py_INCREF(__pyx_v_t);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":38
 *     cdef char* c_name
 *     cdef char* s
 *     c_name = python._fqtypename(t)             # <<<<<<<<<<<<<< 
 *     s = cstd.strrchr(c_name, c'.')
 *     if s == NULL:
 */
__pyx_v_c_name = _fqtypename(__pyx_v_t);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":39
 *     cdef char* s
 *     c_name = python._fqtypename(t)
 *     s = cstd.strrchr(c_name, c'.')             # <<<<<<<<<<<<<< 
 *     if s == NULL:
 *         return c_name
 */
__pyx_v_s = strrchr(__pyx_v_c_name,'.');

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":40
 *     c_name = python._fqtypename(t)
 *     s = cstd.strrchr(c_name, c'.')
 *     if s == NULL:             # <<<<<<<<<<<<<< 
 *         return c_name
 *     else:
 */
__pyx_1 = (__pyx_v_s == NULL);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":41
 *     s = cstd.strrchr(c_name, c'.')
 *     if s == NULL:
 *         return c_name             # <<<<<<<<<<<<<< 
 *     else:
 *         return (s+1)
 */
  __pyx_2 = PyString_FromString(__pyx_v_c_name); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":43
 *         return c_name
 *     else:
 *         return (s+1)             # <<<<<<<<<<<<<< 
 * 
 * # namespace/name for "pytype" hint attribute
 */
  __pyx_2 = PyString_FromString((__pyx_v_s + 1)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify._typename");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_t);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":57
 * TREE_PYTYPE_NAME = "TREE"
 * 
 * def setPytypeAttributeTag(attribute_tag=None):             # <<<<<<<<<<<<<< 
 *     """Changes name and namespace of the XML attribute that holds Python type
 *     information.
 */

static PyObject *__pyx_n_pytype;

static PyObject *__pyx_k59p;

static char __pyx_k59[] = "http://codespeak.net/lxml/objectify/pytype";

static PyObject *__pyx_pf_4lxml_9objectify_setPytypeAttributeTag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_setPytypeAttributeTag[] = "Changes name and namespace of the XML attribute that holds Python type\n    information.\n\n    Reset by calling without argument.\n\n    Default: \"{http://codespeak.net/lxml/objectify/pytype}pytype\"\n    ";
static PyObject *__pyx_pf_4lxml_9objectify_setPytypeAttributeTag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_attribute_tag = 0;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"attribute_tag",0};
__pyx_v_attribute_tag = __pyx_k12;
if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_attribute_tag))) return NULL;
Py_INCREF(__pyx_v_attribute_tag);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":67
 *     global PYTYPE_ATTRIBUTE, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME
 *     global PYTYPE_NAMESPACE, PYTYPE_ATTRIBUTE_NAME
 *     if attribute_tag is None:             # <<<<<<<<<<<<<< 
 *         PYTYPE_NAMESPACE      = "http://codespeak.net/lxml/objectify/pytype"
 *         PYTYPE_ATTRIBUTE_NAME = "pytype"
 */
__pyx_1 = (__pyx_v_attribute_tag == Py_None);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":68
 *     global PYTYPE_NAMESPACE, PYTYPE_ATTRIBUTE_NAME
 *     if attribute_tag is None:
 *         PYTYPE_NAMESPACE      = "http://codespeak.net/lxml/objectify/pytype"             # <<<<<<<<<<<<<< 
 *         PYTYPE_ATTRIBUTE_NAME = "pytype"
 *     else:
 */
  Py_INCREF(__pyx_k59p);
  Py_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
  __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_k59p;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":69
 *     if attribute_tag is None:
 *         PYTYPE_NAMESPACE      = "http://codespeak.net/lxml/objectify/pytype"
 *         PYTYPE_ATTRIBUTE_NAME = "pytype"             # <<<<<<<<<<<<<< 
 *     else:
 *         PYTYPE_NAMESPACE, PYTYPE_ATTRIBUTE_NAME = cetree.getNsTag(attribute_tag)
 */
  Py_INCREF(__pyx_n_pytype);
  Py_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
  __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_n_pytype;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":71
 *         PYTYPE_ATTRIBUTE_NAME = "pytype"
 *     else:
 *         PYTYPE_NAMESPACE, PYTYPE_ATTRIBUTE_NAME = cetree.getNsTag(attribute_tag)             # <<<<<<<<<<<<<< 
 *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE)
 *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME)
 */
  __pyx_2 = getNsTag(__pyx_v_attribute_tag); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; goto __pyx_L1;}
  if (PyTuple_CheckExact(__pyx_2) && PyTuple_GET_SIZE(__pyx_2) == 2) {
    __pyx_4 = PyTuple_GET_ITEM(__pyx_2, 0);
    Py_INCREF(__pyx_4);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":71
 *         PYTYPE_ATTRIBUTE_NAME = "pytype"
 *     else:
 *         PYTYPE_NAMESPACE, PYTYPE_ATTRIBUTE_NAME = cetree.getNsTag(attribute_tag)             # <<<<<<<<<<<<<< 
 *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE)
 *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME)
 */
    Py_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
    __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_4;
    __pyx_4 = 0;
    __pyx_4 = PyTuple_GET_ITEM(__pyx_2, 1);
    Py_INCREF(__pyx_4);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":71
 *         PYTYPE_ATTRIBUTE_NAME = "pytype"
 *     else:
 *         PYTYPE_NAMESPACE, PYTYPE_ATTRIBUTE_NAME = cetree.getNsTag(attribute_tag)             # <<<<<<<<<<<<<< 
 *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE)
 *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME)
 */
    Py_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
    __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_4;
    __pyx_4 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
  }
  else {
    __pyx_3 = PyObject_GetIter(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_4 = __Pyx_UnpackItem(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":71
 *         PYTYPE_ATTRIBUTE_NAME = "pytype"
 *     else:
 *         PYTYPE_NAMESPACE, PYTYPE_ATTRIBUTE_NAME = cetree.getNsTag(attribute_tag)             # <<<<<<<<<<<<<< 
 *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE)
 *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME)
 */
    Py_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
    __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_4;
    __pyx_4 = 0;
    __pyx_4 = __Pyx_UnpackItem(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":71
 *         PYTYPE_ATTRIBUTE_NAME = "pytype"
 *     else:
 *         PYTYPE_NAMESPACE, PYTYPE_ATTRIBUTE_NAME = cetree.getNsTag(attribute_tag)             # <<<<<<<<<<<<<< 
 *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE)
 *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME)
 */
    Py_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
    __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_4;
    __pyx_4 = 0;
    if (__Pyx_EndUnpack(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
  }
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":72
 *     else:
 *         PYTYPE_NAMESPACE, PYTYPE_ATTRIBUTE_NAME = cetree.getNsTag(attribute_tag)
 *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE)             # <<<<<<<<<<<<<< 
 *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME)
 *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
 */
__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE = _cstr(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":73
 *         PYTYPE_NAMESPACE, PYTYPE_ATTRIBUTE_NAME = cetree.getNsTag(attribute_tag)
 *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE)
 *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<< 
 *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
 *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 */
__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME = _cstr(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":75
 *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME)
 *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
 *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<< 
 * 
 * setPytypeAttributeTag()
 */
__pyx_4 = namespacedNameFromNsName(__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE,__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_PYTYPE_ATTRIBUTE, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("lxml.objectify.setPytypeAttributeTag");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_attribute_tag);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":109
 *        >>> second_c2 = root.c1.c2[1]
 *     """
 *     def __iter__(self):             # <<<<<<<<<<<<<< 
 *         """Iterate over self and all siblings with the same tag.
 *         """
 */

static PyObject *__pyx_n_getparent;
static PyObject *__pyx_n_ElementChildIterator;
static PyObject *__pyx_n_tag;


static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__[] = "Iterate over self and all siblings with the same tag.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(PyObject *__pyx_v_self) {
PyObject *__pyx_v_parent;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
int __pyx_3;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
Py_INCREF((PyObject *)__pyx_v_self);
__pyx_v_parent = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":112
 *         """Iterate over self and all siblings with the same tag.
 *         """
 *         parent = self.getparent()             # <<<<<<<<<<<<<< 
 *         if parent is None:
 *             return iter([self])
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_getparent); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}
__pyx_2 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_parent);
__pyx_v_parent = __pyx_2;
__pyx_2 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":113
 *         """
 *         parent = self.getparent()
 *         if parent is None:             # <<<<<<<<<<<<<< 
 *             return iter([self])
 *         return etree.ElementChildIterator(parent, tag=self.tag)
 */
__pyx_3 = (__pyx_v_parent == Py_None);
if (__pyx_3) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":114
 *         parent = self.getparent()
 *         if parent is None:
 *             return iter([self])             # <<<<<<<<<<<<<< 
 *         return etree.ElementChildIterator(parent, tag=self.tag)
 * 
 */
  __pyx_1 = PyList_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;}
  Py_INCREF(__pyx_v_self);
  PyList_SET_ITEM(__pyx_1, 0, __pyx_v_self);
  __pyx_2 = PyObject_GetIter(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":115
 *         if parent is None:
 *             return iter([self])
 *         return etree.ElementChildIterator(parent, tag=self.tag)             # <<<<<<<<<<<<<< 
 * 
 *     def __str__(self):
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ElementChildIterator); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":115
 *         if parent is None:
 *             return iter([self])
 *         return etree.ElementChildIterator(parent, tag=self.tag)             # <<<<<<<<<<<<<< 
 * 
 *     def __str__(self):
 */
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;}
Py_INCREF(__pyx_v_parent);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_parent);
__pyx_4 = PyDict_New(); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":115
 *         if parent is None:
 *             return iter([self])
 *         return etree.ElementChildIterator(parent, tag=self.tag)             # <<<<<<<<<<<<<< 
 * 
 *     def __str__(self):
 */
__pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_tag); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;}
if (PyDict_SetItem(__pyx_4, __pyx_n_tag, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_5 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_r = __pyx_5;
__pyx_5 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__iter__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_parent);
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":117
 *         return etree.ElementChildIterator(parent, tag=self.tag)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<< 
 *         if __RECURSIVE_STR:
 *             return _dump(self, 0)
 */

static PyObject *__pyx_k62p;

static char __pyx_k62[] = "";

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":118
 * 
 *     def __str__(self):
 *         if __RECURSIVE_STR:             # <<<<<<<<<<<<<< 
 *             return _dump(self, 0)
 *         else:
 */
__pyx_1 = __pyx_v_4lxml_9objectify___RECURSIVE_STR;
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":119
 *     def __str__(self):
 *         if __RECURSIVE_STR:
 *             return _dump(self, 0)             # <<<<<<<<<<<<<< 
 *         else:
 *             return textOf(self._c_node) or ''
 */
  __pyx_2 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_self),0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":121
 *             return _dump(self, 0)
 *         else:
 *             return textOf(self._c_node) or ''             # <<<<<<<<<<<<<< 
 * 
 *     property text:
 */
  __pyx_2 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;}
  __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;}
  if (!__pyx_1) {
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":121
 *             return _dump(self, 0)
 *         else:
 *             return textOf(self._c_node) or ''             # <<<<<<<<<<<<<< 
 * 
 *     property text:
 */
    __pyx_2 = __pyx_k62p;
    Py_INCREF(__pyx_2);
  }
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__str__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":124
 * 
 *     property text:
 *         def __get__(self):             # <<<<<<<<<<<<<< 
 *             return textOf(self._c_node)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":125
 *     property text:
 *         def __get__(self):
 *             return textOf(self._c_node)             # <<<<<<<<<<<<<< 
 * 
 *     property __dict__:
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.text.__get__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":132
 *         Note that this only considers the first child with a given name.
 *         """
 *         def __get__(self):             # <<<<<<<<<<<<<< 
 *             cdef char* c_ns
 *             cdef char* c_child_ns
 */

static PyObject *__pyx_k63p;

static char __pyx_k63[] = "{%s}*";

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(PyObject *__pyx_v_self) {
char *__pyx_v_c_ns;
struct LxmlElement *__pyx_v_child;
PyObject *__pyx_v_tag;
PyObject *__pyx_v_children;
PyObject *__pyx_v_name;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_ssize_t __pyx_4;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
int __pyx_7;
Py_INCREF((PyObject *)__pyx_v_self);
__pyx_v_child = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
__pyx_v_tag = Py_None; Py_INCREF(Py_None);
__pyx_v_children = Py_None; Py_INCREF(Py_None);
__pyx_v_name = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":136
 *             cdef char* c_child_ns
 *             cdef _Element child
 *             c_ns = tree._getNs(self._c_node)             # <<<<<<<<<<<<<< 
 *             if c_ns is NULL:
 *                 tag = None
 */
__pyx_v_c_ns = _getNs(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":137
 *             cdef _Element child
 *             c_ns = tree._getNs(self._c_node)
 *             if c_ns is NULL:             # <<<<<<<<<<<<<< 
 *                 tag = None
 *             else:
 */
__pyx_1 = (__pyx_v_c_ns == NULL);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":138
 *             c_ns = tree._getNs(self._c_node)
 *             if c_ns is NULL:
 *                 tag = None             # <<<<<<<<<<<<<< 
 *             else:
 *                 tag = "{%s}*" % c_ns
 */
  Py_INCREF(Py_None);
  Py_DECREF(__pyx_v_tag);
  __pyx_v_tag = Py_None;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":140
 *                 tag = None
 *             else:
 *                 tag = "{%s}*" % c_ns             # <<<<<<<<<<<<<< 
 *             children = {}
 *             for child in etree.ElementChildIterator(self, tag=tag):
 */
  __pyx_2 = PyString_FromString(__pyx_v_c_ns); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; goto __pyx_L1;}
  __pyx_3 = PyNumber_Remainder(__pyx_k63p, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_v_tag);
  __pyx_v_tag = __pyx_3;
  __pyx_3 = 0;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":141
 *             else:
 *                 tag = "{%s}*" % c_ns
 *             children = {}             # <<<<<<<<<<<<<< 
 *             for child in etree.ElementChildIterator(self, tag=tag):
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
 */
__pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;}
Py_DECREF(__pyx_v_children);
__pyx_v_children = __pyx_2;
__pyx_2 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":142
 *                 tag = "{%s}*" % c_ns
 *             children = {}
 *             for child in etree.ElementChildIterator(self, tag=tag):             # <<<<<<<<<<<<<< 
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
 *                     continue
 */
__pyx_3 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ElementChildIterator); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":142
 *                 tag = "{%s}*" % c_ns
 *             children = {}
 *             for child in etree.ElementChildIterator(self, tag=tag):             # <<<<<<<<<<<<<< 
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
 *                     continue
 */
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;}
Py_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self);
__pyx_5 = PyDict_New(); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":142
 *                 tag = "{%s}*" % c_ns
 *             children = {}
 *             for child in etree.ElementChildIterator(self, tag=tag):             # <<<<<<<<<<<<<< 
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
 *                     continue
 */
if (PyDict_SetItem(__pyx_5, __pyx_n_tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;}
__pyx_6 = PyEval_CallObjectWithKeywords(__pyx_3, __pyx_2, __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyList_CheckExact(__pyx_6)) { __pyx_4 = 0; __pyx_3 = __pyx_6; Py_INCREF(__pyx_3); }
else { __pyx_3 = PyObject_GetIter(__pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;} }
Py_DECREF(__pyx_6); __pyx_6 = 0;
for (;;) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":142
 *                 tag = "{%s}*" % c_ns
 *             children = {}
 *             for child in etree.ElementChildIterator(self, tag=tag):             # <<<<<<<<<<<<<< 
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
 *                     continue
 */
  if (PyList_CheckExact(__pyx_3)) { if (__pyx_4 >= PyList_GET_SIZE(__pyx_3)) break; __pyx_2 = PyList_GET_ITEM(__pyx_3, __pyx_4++); Py_INCREF(__pyx_2); }
  else {
    __pyx_2 = PyIter_Next(__pyx_3);
    if (!__pyx_2) {
      break;
    }
  }
  if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_11etreepublic__Element)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;}
  Py_DECREF(((PyObject *)__pyx_v_child));
  __pyx_v_child = ((struct LxmlElement *)__pyx_2);
  __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":143
 *             children = {}
 *             for child in etree.ElementChildIterator(self, tag=tag):
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:             # <<<<<<<<<<<<<< 
 *                     continue
 *                 name = child._c_node.name
 */
  __pyx_1 = (__pyx_v_c_ns == NULL);
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":143
 *             children = {}
 *             for child in etree.ElementChildIterator(self, tag=tag):
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:             # <<<<<<<<<<<<<< 
 *                     continue
 *                 name = child._c_node.name
 */
    __pyx_1 = (_getNs(__pyx_v_child->_c_node) != NULL);
  }
  if (__pyx_1) {
    goto __pyx_L3;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":145
 *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
 *                     continue
 *                 name = child._c_node.name             # <<<<<<<<<<<<<< 
 *                 if python.PyDict_GetItem(children, name) is NULL:
 *                     python.PyDict_SetItem(children, name, child)
 */
  __pyx_5 = PyString_FromString(__pyx_v_child->_c_node->name); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; goto __pyx_L1;}
  Py_DECREF(__pyx_v_name);
  __pyx_v_name = __pyx_5;
  __pyx_5 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":146
 *                     continue
 *                 name = child._c_node.name
 *                 if python.PyDict_GetItem(children, name) is NULL:             # <<<<<<<<<<<<<< 
 *                     python.PyDict_SetItem(children, name, child)
 *             return children
 */
  __pyx_1 = (PyDict_GetItem(__pyx_v_children,__pyx_v_name) == NULL);
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":147
 *                 name = child._c_node.name
 *                 if python.PyDict_GetItem(children, name) is NULL:
 *                     python.PyDict_SetItem(children, name, child)             # <<<<<<<<<<<<<< 
 *             return children
 * 
 */
    __pyx_7 = PyDict_SetItem(__pyx_v_children,__pyx_v_name,((PyObject *)__pyx_v_child)); if (unlikely(__pyx_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; goto __pyx_L1;}
    goto __pyx_L6;
  }
  __pyx_L6:;
  __pyx_L3:;
}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":148
 *                 if python.PyDict_GetItem(children, name) is NULL:
 *                     python.PyDict_SetItem(children, name, child)
 *             return children             # <<<<<<<<<<<<<< 
 * 
 *     def __len__(self):
 */
Py_INCREF(__pyx_v_children);
__pyx_r = __pyx_v_children;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__dict__.__get__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_child);
Py_DECREF(__pyx_v_tag);
Py_DECREF(__pyx_v_children);
Py_DECREF(__pyx_v_name);
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":150
 *             return children
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<< 
 *         """Count self and siblings with the same tag.
 *         """
 */

static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___len__[] = "Count self and siblings with the same tag.\n        ";
static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__(PyObject *__pyx_v_self) {
Py_ssize_t __pyx_r;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":153
 *         """Count self and siblings with the same tag.
 *         """
 *         return _countSiblings(self._c_node)             # <<<<<<<<<<<<<< 
 * 
 *     def countchildren(self):
 */
__pyx_r = __pyx_f_4lxml_9objectify__countSiblings(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node);
goto __pyx_L0;

__pyx_r = 0;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":155
 *         return _countSiblings(self._c_node)
 * 
 *     def countchildren(self):             # <<<<<<<<<<<<<< 
 *         """Return the number of children of this element, regardless of their
 *         name.
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_countchildren(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_countchildren[] = "Return the number of children of this element, regardless of their\n        name.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_countchildren(PyObject *__pyx_v_self, PyObject *unused) {
Py_ssize_t __pyx_v_c;
xmlNode *__pyx_v_c_node;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":162
 *         cdef Py_ssize_t c
 *         cdef tree.xmlNode* c_node
 *         c = 0             # <<<<<<<<<<<<<< 
 *         c_node = self._c_node.children
 *         while c_node is not NULL:
 */
__pyx_v_c = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":163
 *         cdef tree.xmlNode* c_node
 *         c = 0
 *         c_node = self._c_node.children             # <<<<<<<<<<<<<< 
 *         while c_node is not NULL:
 *             if tree._isElement(c_node):
 */
__pyx_v_c_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->children;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":164
 *         c = 0
 *         c_node = self._c_node.children
 *         while c_node is not NULL:             # <<<<<<<<<<<<<< 
 *             if tree._isElement(c_node):
 *                 c = c + 1
 */
while (1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":164
 *         c = 0
 *         c_node = self._c_node.children
 *         while c_node is not NULL:             # <<<<<<<<<<<<<< 
 *             if tree._isElement(c_node):
 *                 c = c + 1
 */
  __pyx_1 = (__pyx_v_c_node != NULL);
  if (!__pyx_1) break;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":165
 *         c_node = self._c_node.children
 *         while c_node is not NULL:
 *             if tree._isElement(c_node):             # <<<<<<<<<<<<<< 
 *                 c = c + 1
 *             c_node = c_node.next
 */
  __pyx_1 = _isElement(__pyx_v_c_node);
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":166
 *         while c_node is not NULL:
 *             if tree._isElement(c_node):
 *                 c = c + 1             # <<<<<<<<<<<<<< 
 *             c_node = c_node.next
 *         return c
 */
    __pyx_v_c = (__pyx_v_c + 1);
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":167
 *             if tree._isElement(c_node):
 *                 c = c + 1
 *             c_node = c_node.next             # <<<<<<<<<<<<<< 
 *         return c
 * 
 */
  __pyx_v_c_node = __pyx_v_c_node->next;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":168
 *                 c = c + 1
 *             c_node = c_node.next
 *         return c             # <<<<<<<<<<<<<< 
 * 
 *     def getchildren(self):
 */
__pyx_2 = PyInt_FromSsize_t(__pyx_v_c); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.countchildren");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":170
 *         return c
 * 
 *     def getchildren(self):             # <<<<<<<<<<<<<< 
 *         """Returns a sequence of all direct children.  The elements are
 *         returned in document order.
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_getchildren(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_getchildren[] = "Returns a sequence of all direct children.  The elements are\n        returned in document order.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_getchildren(PyObject *__pyx_v_self, PyObject *unused) {
xmlNode *__pyx_v_c_node;
PyObject *__pyx_v_result;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
int __pyx_3;
Py_INCREF((PyObject *)__pyx_v_self);
__pyx_v_result = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":175
 *         """
 *         cdef tree.xmlNode* c_node
 *         result = []             # <<<<<<<<<<<<<< 
 *         c_node = self._c_node.children
 *         while c_node is not NULL:
 */
__pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;}
Py_DECREF(__pyx_v_result);
__pyx_v_result = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":176
 *         cdef tree.xmlNode* c_node
 *         result = []
 *         c_node = self._c_node.children             # <<<<<<<<<<<<<< 
 *         while c_node is not NULL:
 *             if tree._isElement(c_node):
 */
__pyx_v_c_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->children;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":177
 *         result = []
 *         c_node = self._c_node.children
 *         while c_node is not NULL:             # <<<<<<<<<<<<<< 
 *             if tree._isElement(c_node):
 *                 python.PyList_Append(
 */
while (1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":177
 *         result = []
 *         c_node = self._c_node.children
 *         while c_node is not NULL:             # <<<<<<<<<<<<<< 
 *             if tree._isElement(c_node):
 *                 python.PyList_Append(
 */
  __pyx_2 = (__pyx_v_c_node != NULL);
  if (!__pyx_2) break;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":178
 *         c_node = self._c_node.children
 *         while c_node is not NULL:
 *             if tree._isElement(c_node):             # <<<<<<<<<<<<<< 
 *                 python.PyList_Append(
 *                     result, cetree.elementFactory(self._doc, c_node))
 */
  __pyx_2 = _isElement(__pyx_v_c_node);
  if (__pyx_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":180
 *             if tree._isElement(c_node):
 *                 python.PyList_Append(
 *                     result, cetree.elementFactory(self._doc, c_node))             # <<<<<<<<<<<<<< 
 *             c_node = c_node.next
 *         return result
 */
    __pyx_1 = ((PyObject *)elementFactory(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._doc,__pyx_v_c_node)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;}
    __pyx_3 = PyList_Append(__pyx_v_result,__pyx_1); if (unlikely(__pyx_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":181
 *                 python.PyList_Append(
 *                     result, cetree.elementFactory(self._doc, c_node))
 *             c_node = c_node.next             # <<<<<<<<<<<<<< 
 *         return result
 * 
 */
  __pyx_v_c_node = __pyx_v_c_node->next;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":182
 *                     result, cetree.elementFactory(self._doc, c_node))
 *             c_node = c_node.next
 *         return result             # <<<<<<<<<<<<<< 
 * 
 *     def __getattr__(self, tag):
 */
Py_INCREF(__pyx_v_result);
__pyx_r = __pyx_v_result;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.getchildren");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_result);
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":184
 *         return result
 * 
 *     def __getattr__(self, tag):             # <<<<<<<<<<<<<< 
 *         """Return the (first) child with the given tag name.  If no namespace
 *         is provided, the child will be looked up in the same one as self.
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___getattr__[] = "Return the (first) child with the given tag name.  If no namespace\n        is provided, the child will be looked up in the same one as self.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_tag);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":188
 *         is provided, the child will be looked up in the same one as self.
 *         """
 *         return _lookupChildOrRaise(self, tag)             # <<<<<<<<<<<<<< 
 * 
 *     def __setattr__(self, tag, value):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self),__pyx_v_tag); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getattr__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_tag);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":190
 *         return _lookupChildOrRaise(self, tag)
 * 
 *     def __setattr__(self, tag, value):             # <<<<<<<<<<<<<< 
 *         """Set the value of the (first) child with the given tag name.  If no
 *         namespace is provided, the child will be looked up in the same one as
 */

static PyObject *__pyx_n_text;
static PyObject *__pyx_n_pyval;
static PyObject *__pyx_n_tail;
static PyObject *__pyx_n___set__;

static PyObject *__pyx_k67p;

static char __pyx_k67[] = "attribute '%s' of '%s' objects is not writable";

static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___setattr__[] = "Set the value of the (first) child with the given tag name.  If no\n        namespace is provided, the child will be looked up in the same one as\n        self.\n        ";
static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
struct LxmlElement *__pyx_v_element;
int __pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
PyObject *__pyx_3 = 0;
int __pyx_4;
PyObject *__pyx_5 = 0;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_tag);
Py_INCREF(__pyx_v_value);
__pyx_v_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":197
 *         cdef _Element element
 *         # properties are looked up /after/ __setattr__, so we must emulate them
 *         if tag == 'text' or tag == 'pyval':             # <<<<<<<<<<<<<< 
 *             # read-only !
 *             raise TypeError, "attribute '%s' of '%s' objects is not writable"% \
 */
__pyx_1 = PyObject_RichCompare(__pyx_v_tag, __pyx_n_text, Py_EQ); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;}
__pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;}
if (!__pyx_2) {
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":197
 *         cdef _Element element
 *         # properties are looked up /after/ __setattr__, so we must emulate them
 *         if tag == 'text' or tag == 'pyval':             # <<<<<<<<<<<<<< 
 *             # read-only !
 *             raise TypeError, "attribute '%s' of '%s' objects is not writable"% \
 */
  __pyx_1 = PyObject_RichCompare(__pyx_v_tag, __pyx_n_pyval, Py_EQ); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;}
}
__pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":200
 *             # read-only !
 *             raise TypeError, "attribute '%s' of '%s' objects is not writable"% \
 *                   (tag, _typename(self))             # <<<<<<<<<<<<<< 
 *         elif tag == 'tail':
 *             cetree.setTailText(self._c_node, value)
 */
  __pyx_1 = __pyx_f_4lxml_9objectify__typename(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;}
  Py_INCREF(__pyx_v_tag);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_tag);
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_1);
  __pyx_1 = 0;
  __pyx_1 = PyNumber_Remainder(__pyx_k67p, __pyx_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_1, 0);
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;}
  goto __pyx_L2;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":201
 *             raise TypeError, "attribute '%s' of '%s' objects is not writable"% \
 *                   (tag, _typename(self))
 *         elif tag == 'tail':             # <<<<<<<<<<<<<< 
 *             cetree.setTailText(self._c_node, value)
 *             return
 */
__pyx_3 = PyObject_RichCompare(__pyx_v_tag, __pyx_n_tail, Py_EQ); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; goto __pyx_L1;}
__pyx_2 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":202
 *                   (tag, _typename(self))
 *         elif tag == 'tail':
 *             cetree.setTailText(self._c_node, value)             # <<<<<<<<<<<<<< 
 *             return
 *         elif tag == 'tag':
 */
  __pyx_4 = setTailText(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node,__pyx_v_value); if (unlikely(__pyx_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":203
 *         elif tag == 'tail':
 *             cetree.setTailText(self._c_node, value)
 *             return             # <<<<<<<<<<<<<< 
 *         elif tag == 'tag':
 *             ElementBase.tag.__set__(self, value)
 */
  __pyx_r = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":204
 *             cetree.setTailText(self._c_node, value)
 *             return
 *         elif tag == 'tag':             # <<<<<<<<<<<<<< 
 *             ElementBase.tag.__set__(self, value)
 *             return
 */
__pyx_1 = PyObject_RichCompare(__pyx_v_tag, __pyx_n_tag, Py_EQ); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;}
__pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":205
 *             return
 *         elif tag == 'tag':
 *             ElementBase.tag.__set__(self, value)             # <<<<<<<<<<<<<< 
 *             return
 * 
 */
  __pyx_3 = PyObject_GetAttr(((PyObject*)__pyx_ptype_11etreepublic_ElementBase), __pyx_n_tag); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
  __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n___set__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":205
 *             return
 *         elif tag == 'tag':
 *             ElementBase.tag.__set__(self, value)             # <<<<<<<<<<<<<< 
 *             return
 * 
 */
  __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
  Py_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self);
  Py_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_value);
  __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_5); __pyx_5 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":206
 *         elif tag == 'tag':
 *             ElementBase.tag.__set__(self, value)
 *             return             # <<<<<<<<<<<<<< 
 * 
 *         tag = _buildChildTag(self, tag)
 */
  __pyx_r = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":208
 *             return
 * 
 *         tag = _buildChildTag(self, tag)             # <<<<<<<<<<<<<< 
 *         element = _lookupChild(self, tag)
 *         if element is None:
 */
__pyx_1 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self),__pyx_v_tag); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;}
Py_DECREF(__pyx_v_tag);
__pyx_v_tag = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":209
 * 
 *         tag = _buildChildTag(self, tag)
 *         element = _lookupChild(self, tag)             # <<<<<<<<<<<<<< 
 *         if element is None:
 *             _appendValue(self, tag, value)
 */
__pyx_3 = __pyx_f_4lxml_9objectify__lookupChild(((struct LxmlElement *)__pyx_v_self),__pyx_v_tag); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;}
if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_11etreepublic__Element)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;}
Py_DECREF(((PyObject *)__pyx_v_element));
__pyx_v_element = ((struct LxmlElement *)__pyx_3);
__pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":210
 *         tag = _buildChildTag(self, tag)
 *         element = _lookupChild(self, tag)
 *         if element is None:             # <<<<<<<<<<<<<< 
 *             _appendValue(self, tag, value)
 *         else:
 */
__pyx_2 = (((PyObject *)__pyx_v_element) == Py_None);
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":211
 *         element = _lookupChild(self, tag)
 *         if element is None:
 *             _appendValue(self, tag, value)             # <<<<<<<<<<<<<< 
 *         else:
 *             _replaceElement(element, value)
 */
  __pyx_5 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self),__pyx_v_tag,__pyx_v_value); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; goto __pyx_L1;}
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  goto __pyx_L3;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":213
 *             _appendValue(self, tag, value)
 *         else:
 *             _replaceElement(element, value)             # <<<<<<<<<<<<<< 
 * 
 *     def __delattr__(self, tag):
 */
  __pyx_1 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element,__pyx_v_value); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
}
__pyx_L3:;

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setattr__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_element);
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_tag);
Py_DECREF(__pyx_v_value);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":215
 *             _replaceElement(element, value)
 * 
 *     def __delattr__(self, tag):             # <<<<<<<<<<<<<< 
 *         child = _lookupChildOrRaise(self, tag)
 *         self.remove(child)
 */

static PyObject *__pyx_n_remove;

static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
PyObject *__pyx_v_child;
int __pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_tag);
__pyx_v_child = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":216
 * 
 *     def __delattr__(self, tag):
 *         child = _lookupChildOrRaise(self, tag)             # <<<<<<<<<<<<<< 
 *         self.remove(child)
 * 
 */
__pyx_1 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self),__pyx_v_tag); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; goto __pyx_L1;}
Py_DECREF(__pyx_v_child);
__pyx_v_child = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":217
 *     def __delattr__(self, tag):
 *         child = _lookupChildOrRaise(self, tag)
 *         self.remove(child)             # <<<<<<<<<<<<<< 
 * 
 *     def addattr(self, tag, value):
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_remove); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":217
 *     def __delattr__(self, tag):
 *         child = _lookupChildOrRaise(self, tag)
 *         self.remove(child)             # <<<<<<<<<<<<<< 
 * 
 *     def addattr(self, tag, value):
 */
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; goto __pyx_L1;}
Py_INCREF(__pyx_v_child);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_child);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delattr__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_child);
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_tag);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":219
 *         self.remove(child)
 * 
 *     def addattr(self, tag, value):             # <<<<<<<<<<<<<< 
 *         """Add a child value to the element.
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_addattr[] = "Add a child value to the element.\n\n        As opposed to append(), it sets a data value, not an element.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_tag = 0;
PyObject *__pyx_v_value = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
static char *__pyx_argnames[] = {"tag","value",0};
if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_tag, &__pyx_v_value))) return NULL;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_tag);
Py_INCREF(__pyx_v_value);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":224
 *         As opposed to append(), it sets a data value, not an element.
 *         """
 *         _appendValue(self, _buildChildTag(self, tag), value)             # <<<<<<<<<<<<<< 
 * 
 *     def __getitem__(self, key):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self),__pyx_v_tag); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":224
 *         As opposed to append(), it sets a data value, not an element.
 *         """
 *         _appendValue(self, _buildChildTag(self, tag), value)             # <<<<<<<<<<<<<< 
 * 
 *     def __getitem__(self, key):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self),__pyx_1,__pyx_v_value); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.addattr");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_tag);
Py_DECREF(__pyx_v_value);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":226
 *         _appendValue(self, _buildChildTag(self, tag), value)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<< 
 *         """Return a sibling, counting from the first child of the parent.  The
 *         method behaves like both a dict and a sequence.
 */

static PyObject *__pyx_n_IndexError;

static PyObject *__pyx_builtin_IndexError;

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___getitem__[] = "Return a sibling, counting from the first child of the parent.  The\n        method behaves like both a dict and a sequence.\n\n        * If argument is an integer, returns the sibling at that position.\n\n        * If argument is a string, does the same as getattr().  This can be\n          used to provide namespaces for element lookup, or to look up\n          children with special names (``text`` etc.).\n\n        * If argument is a slice object, returns the matching slice.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
xmlNode *__pyx_v_c_self_node;
xmlNode *__pyx_v_c_parent;
xmlNode *__pyx_v_c_node;
Py_ssize_t __pyx_v_start;
Py_ssize_t __pyx_v_stop;
Py_ssize_t __pyx_v_step;
Py_ssize_t __pyx_v_slicelength;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
int __pyx_3;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
PyObject *__pyx_7 = 0;
Py_ssize_t __pyx_8;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_key);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":242
 *         cdef tree.xmlNode* c_node
 *         cdef Py_ssize_t start, stop, step, slicelength
 *         if python._isString(key):             # <<<<<<<<<<<<<< 
 *             return _lookupChildOrRaise(self, key)
 *         elif python.PySlice_Check(key):
 */
__pyx_1 = _isString(__pyx_v_key);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":243
 *         cdef Py_ssize_t start, stop, step, slicelength
 *         if python._isString(key):
 *             return _lookupChildOrRaise(self, key)             # <<<<<<<<<<<<<< 
 *         elif python.PySlice_Check(key):
 *             python.PySlice_GetIndicesEx(
 */
  __pyx_2 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self),__pyx_v_key); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":244
 *         if python._isString(key):
 *             return _lookupChildOrRaise(self, key)
 *         elif python.PySlice_Check(key):             # <<<<<<<<<<<<<< 
 *             python.PySlice_GetIndicesEx(
 *                 key, _countSiblings(self._c_node),
 */
__pyx_3 = PySlice_Check(__pyx_v_key);
if (__pyx_3) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":247
 *             python.PySlice_GetIndicesEx(
 *                 key, _countSiblings(self._c_node),
 *                 &start, &stop, &step, &slicelength)             # <<<<<<<<<<<<<< 
 *             if step < 0:
 *                 return list(self)[start:stop:step]
 */
  __pyx_1 = PySlice_GetIndicesEx(__pyx_v_key,__pyx_f_4lxml_9objectify__countSiblings(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node),(&__pyx_v_start),(&__pyx_v_stop),(&__pyx_v_step),(&__pyx_v_slicelength)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":248
 *                 key, _countSiblings(self._c_node),
 *                 &start, &stop, &step, &slicelength)
 *             if step < 0:             # <<<<<<<<<<<<<< 
 *                 return list(self)[start:stop:step]
 *             else:
 */
  __pyx_3 = (__pyx_v_step < 0);
  if (__pyx_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":249
 *                 &start, &stop, &step, &slicelength)
 *             if step < 0:
 *                 return list(self)[start:stop:step]             # <<<<<<<<<<<<<< 
 *             else:
 *                 return list(islice(self, start, stop, step))
 */
    __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self);
    __pyx_4 = PyObject_CallObject(((PyObject*)&PyList_Type), __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":249
 *                 &start, &stop, &step, &slicelength)
 *             if step < 0:
 *                 return list(self)[start:stop:step]             # <<<<<<<<<<<<<< 
 *             else:
 *                 return list(islice(self, start, stop, step))
 */
    __pyx_2 = PyInt_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":249
 *                 &start, &stop, &step, &slicelength)
 *             if step < 0:
 *                 return list(self)[start:stop:step]             # <<<<<<<<<<<<<< 
 *             else:
 *                 return list(islice(self, start, stop, step))
 */
    __pyx_5 = PyInt_FromSsize_t(__pyx_v_stop); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":249
 *                 &start, &stop, &step, &slicelength)
 *             if step < 0:
 *                 return list(self)[start:stop:step]             # <<<<<<<<<<<<<< 
 *             else:
 *                 return list(islice(self, start, stop, step))
 */
    __pyx_6 = PyInt_FromSsize_t(__pyx_v_step); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;}
    __pyx_7 = PySlice_New(__pyx_2, __pyx_5, __pyx_6); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    __pyx_2 = PyObject_GetItem(__pyx_4, __pyx_7); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":251
 *                 return list(self)[start:stop:step]
 *             else:
 *                 return list(islice(self, start, stop, step))             # <<<<<<<<<<<<<< 
 *         # normal item access
 *         c_self_node = self._c_node
 */
    __pyx_5 = PyInt_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":251
 *                 return list(self)[start:stop:step]
 *             else:
 *                 return list(islice(self, start, stop, step))             # <<<<<<<<<<<<<< 
 *         # normal item access
 *         c_self_node = self._c_node
 */
    __pyx_6 = PyInt_FromSsize_t(__pyx_v_stop); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":251
 *                 return list(self)[start:stop:step]
 *             else:
 *                 return list(islice(self, start, stop, step))             # <<<<<<<<<<<<<< 
 *         # normal item access
 *         c_self_node = self._c_node
 */
    __pyx_4 = PyInt_FromSsize_t(__pyx_v_step); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}
    __pyx_7 = PyTuple_New(4); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_self);
    PyTuple_SET_ITEM(__pyx_7, 1, __pyx_5);
    PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6);
    PyTuple_SET_ITEM(__pyx_7, 3, __pyx_4);
    __pyx_5 = 0;
    __pyx_6 = 0;
    __pyx_4 = 0;
    __pyx_2 = PyObject_CallObject(__pyx_v_4lxml_9objectify_islice, __pyx_7); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2);
    __pyx_2 = 0;
    __pyx_6 = PyObject_CallObject(((PyObject*)&PyList_Type), __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_r = __pyx_6;
    __pyx_6 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":253
 *                 return list(islice(self, start, stop, step))
 *         # normal item access
 *         c_self_node = self._c_node             # <<<<<<<<<<<<<< 
 *         c_parent = c_self_node.parent
 *         if c_parent is NULL:
 */
__pyx_v_c_self_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":254
 *         # normal item access
 *         c_self_node = self._c_node
 *         c_parent = c_self_node.parent             # <<<<<<<<<<<<<< 
 *         if c_parent is NULL:
 *             if key == 0:
 */
__pyx_v_c_parent = __pyx_v_c_self_node->parent;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":255
 *         c_self_node = self._c_node
 *         c_parent = c_self_node.parent
 *         if c_parent is NULL:             # <<<<<<<<<<<<<< 
 *             if key == 0:
 *                 return self
 */
__pyx_3 = (__pyx_v_c_parent == NULL);
if (__pyx_3) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":256
 *         c_parent = c_self_node.parent
 *         if c_parent is NULL:
 *             if key == 0:             # <<<<<<<<<<<<<< 
 *                 return self
 *             else:
 */
  __pyx_4 = PyObject_RichCompare(__pyx_v_key, __pyx_num_0, Py_EQ); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L1;}
  __pyx_3 = __Pyx_PyObject_IsTrue(__pyx_4); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  if (__pyx_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":257
 *         if c_parent is NULL:
 *             if key == 0:
 *                 return self             # <<<<<<<<<<<<<< 
 *             else:
 *                 raise IndexError, key
 */
    Py_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":259
 *                 return self
 *             else:
 *                 raise IndexError, key             # <<<<<<<<<<<<<< 
 *         if key < 0:
 *             c_node = c_parent.last
 */
    __Pyx_Raise(__pyx_builtin_IndexError, __pyx_v_key, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
  }
  __pyx_L5:;
  goto __pyx_L4;
}
__pyx_L4:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":260
 *             else:
 *                 raise IndexError, key
 *         if key < 0:             # <<<<<<<<<<<<<< 
 *             c_node = c_parent.last
 *         else:
 */
__pyx_7 = PyObject_RichCompare(__pyx_v_key, __pyx_num_0, Py_LT); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L1;}
__pyx_3 = __Pyx_PyObject_IsTrue(__pyx_7); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
if (__pyx_3) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":261
 *                 raise IndexError, key
 *         if key < 0:
 *             c_node = c_parent.last             # <<<<<<<<<<<<<< 
 *         else:
 *             c_node = c_parent.children
 */
  __pyx_v_c_node = __pyx_v_c_parent->last;
  goto __pyx_L6;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":263
 *             c_node = c_parent.last
 *         else:
 *             c_node = c_parent.children             # <<<<<<<<<<<<<< 
 *         c_node = _findFollowingSibling(
 *             c_node, tree._getNs(c_self_node), c_self_node.name, key)
 */
  __pyx_v_c_node = __pyx_v_c_parent->children;
}
__pyx_L6:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":265
 *             c_node = c_parent.children
 *         c_node = _findFollowingSibling(
 *             c_node, tree._getNs(c_self_node), c_self_node.name, key)             # <<<<<<<<<<<<<< 
 *         if c_node is NULL:
 *             raise IndexError, key
 */
__pyx_8 = __pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_8 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L1;}
__pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node,_getNs(__pyx_v_c_self_node),__pyx_v_c_self_node->name,__pyx_8);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":266
 *         c_node = _findFollowingSibling(
 *             c_node, tree._getNs(c_self_node), c_self_node.name, key)
 *         if c_node is NULL:             # <<<<<<<<<<<<<< 
 *             raise IndexError, key
 *         return elementFactory(self._doc, c_node)
 */
__pyx_3 = (__pyx_v_c_node == NULL);
if (__pyx_3) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":267
 *             c_node, tree._getNs(c_self_node), c_self_node.name, key)
 *         if c_node is NULL:
 *             raise IndexError, key             # <<<<<<<<<<<<<< 
 *         return elementFactory(self._doc, c_node)
 * 
 */
  __Pyx_Raise(__pyx_builtin_IndexError, __pyx_v_key, 0);
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L1;}
  goto __pyx_L7;
}
__pyx_L7:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":268
 *         if c_node is NULL:
 *             raise IndexError, key
 *         return elementFactory(self._doc, c_node)             # <<<<<<<<<<<<<< 
 * 
 *     def __setitem__(self, key, value):
 */
__pyx_2 = ((PyObject *)elementFactory(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._doc,__pyx_v_c_node)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
Py_XDECREF(__pyx_7);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getitem__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_key);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":270
 *         return elementFactory(self._doc, c_node)
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<< 
 *         """Set the value of a sibling, counting from the first child of the
 *         parent.
 */

static PyObject *__pyx_n_next;
static PyObject *__pyx_n_StopIteration;

static PyObject *__pyx_k70p;

static PyObject *__pyx_builtin_StopIteration;

static char __pyx_k70[] = "assignment to root element is invalid";

static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___setitem__[] = "Set the value of a sibling, counting from the first child of the\n        parent.\n\n        * If argument is an integer, sets the sibling at that position.\n\n        * If argument is a string, does the same as setattr().  This is used\n          to provide namespaces for element lookup.\n\n        * If argument is a sequence (list, tuple, etc.), assign the contained\n          items to the siblings.\n        ";
static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
struct LxmlElement *__pyx_v_element;
struct LxmlElement *__pyx_v_parent;
xmlNode *__pyx_v_c_self_node;
xmlNode *__pyx_v_c_parent;
xmlNode *__pyx_v_c_node;
Py_ssize_t __pyx_v_start;
Py_ssize_t __pyx_v_stop;
Py_ssize_t __pyx_v_step;
Py_ssize_t __pyx_v_slicelength;
PyObject *__pyx_v_new_items;
PyObject *__pyx_v_del_items;
PyObject *__pyx_v_el;
PyObject *__pyx_v_item;
PyObject *__pyx_v_remove;
PyObject *__pyx_v_tag;
int __pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
int __pyx_3;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
PyObject *__pyx_7 = 0;
Py_ssize_t __pyx_8;
PyObject *__pyx_9 = 0;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_key);
Py_INCREF(__pyx_v_value);
__pyx_v_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
__pyx_v_parent = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
__pyx_v_new_items = Py_None; Py_INCREF(Py_None);
__pyx_v_del_items = Py_None; Py_INCREF(Py_None);
__pyx_v_el = Py_None; Py_INCREF(Py_None);
__pyx_v_item = Py_None; Py_INCREF(Py_None);
__pyx_v_remove = Py_None; Py_INCREF(Py_None);
__pyx_v_tag = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":289
 *         cdef tree.xmlNode* c_node
 *         cdef Py_ssize_t start, stop, step, slicelength
 *         if python._isString(key):             # <<<<<<<<<<<<<< 
 *             key = _buildChildTag(self, key)
 *             element = _lookupChild(self, key)
 */
__pyx_1 = _isString(__pyx_v_key);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":290
 *         cdef Py_ssize_t start, stop, step, slicelength
 *         if python._isString(key):
 *             key = _buildChildTag(self, key)             # <<<<<<<<<<<<<< 
 *             element = _lookupChild(self, key)
 *             if element is None:
 */
  __pyx_2 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self),__pyx_v_key); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
  Py_DECREF(__pyx_v_key);
  __pyx_v_key = __pyx_2;
  __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":291
 *         if python._isString(key):
 *             key = _buildChildTag(self, key)
 *             element = _lookupChild(self, key)             # <<<<<<<<<<<<<< 
 *             if element is None:
 *                 _appendValue(self, key, value)
 */
  __pyx_2 = __pyx_f_4lxml_9objectify__lookupChild(((struct LxmlElement *)__pyx_v_self),__pyx_v_key); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;}
  if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_11etreepublic__Element)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;}
  Py_DECREF(((PyObject *)__pyx_v_element));
  __pyx_v_element = ((struct LxmlElement *)__pyx_2);
  __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":292
 *             key = _buildChildTag(self, key)
 *             element = _lookupChild(self, key)
 *             if element is None:             # <<<<<<<<<<<<<< 
 *                 _appendValue(self, key, value)
 *             else:
 */
  __pyx_3 = (((PyObject *)__pyx_v_element) == Py_None);
  if (__pyx_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":293
 *             element = _lookupChild(self, key)
 *             if element is None:
 *                 _appendValue(self, key, value)             # <<<<<<<<<<<<<< 
 *             else:
 *                 _replaceElement(element, value)
 */
    __pyx_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self),__pyx_v_key,__pyx_v_value); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":295
 *                 _appendValue(self, key, value)
 *             else:
 *                 _replaceElement(element, value)             # <<<<<<<<<<<<<< 
 *             return
 * 
 */
    __pyx_2 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element,__pyx_v_value); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":296
 *             else:
 *                 _replaceElement(element, value)
 *             return             # <<<<<<<<<<<<<< 
 * 
 *         c_self_node = self._c_node
 */
  __pyx_r = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":298
 *             return
 * 
 *         c_self_node = self._c_node             # <<<<<<<<<<<<<< 
 *         c_parent = c_self_node.parent
 *         if c_parent is NULL:
 */
__pyx_v_c_self_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":299
 * 
 *         c_self_node = self._c_node
 *         c_parent = c_self_node.parent             # <<<<<<<<<<<<<< 
 *         if c_parent is NULL:
 *             # the 'root[i] = ...' case
 */
__pyx_v_c_parent = __pyx_v_c_self_node->parent;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":300
 *         c_self_node = self._c_node
 *         c_parent = c_self_node.parent
 *         if c_parent is NULL:             # <<<<<<<<<<<<<< 
 *             # the 'root[i] = ...' case
 *             raise TypeError, "assignment to root element is invalid"
 */
__pyx_3 = (__pyx_v_c_parent == NULL);
if (__pyx_3) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":302
 *         if c_parent is NULL:
 *             # the 'root[i] = ...' case
 *             raise TypeError, "assignment to root element is invalid"             # <<<<<<<<<<<<<< 
 * 
 *         if python.PySlice_Check(key):
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_k70p, 0);
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;}
  goto __pyx_L4;
}
__pyx_L4:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":304
 *             raise TypeError, "assignment to root element is invalid"
 * 
 *         if python.PySlice_Check(key):             # <<<<<<<<<<<<<< 
 *             # slice assignment
 *             python.PySlice_GetIndicesEx(
 */
__pyx_3 = PySlice_Check(__pyx_v_key);
if (__pyx_3) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":308
 *             python.PySlice_GetIndicesEx(
 *                 key, _countSiblings(self._c_node),
 *                 &start, &stop, &step, &slicelength)             # <<<<<<<<<<<<<< 
 *             # replace existing items
 *             new_items = iter(value)
 */
  __pyx_1 = PySlice_GetIndicesEx(__pyx_v_key,__pyx_f_4lxml_9objectify__countSiblings(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node),(&__pyx_v_start),(&__pyx_v_stop),(&__pyx_v_step),(&__pyx_v_slicelength)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":310
 *                 &start, &stop, &step, &slicelength)
 *             # replace existing items
 *             new_items = iter(value)             # <<<<<<<<<<<<<< 
 *             if step < 0:
 *                 del_items = list(self)[start:stop:step]
 */
  __pyx_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; goto __pyx_L1;}
  Py_DECREF(__pyx_v_new_items);
  __pyx_v_new_items = __pyx_2;
  __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":311
 *             # replace existing items
 *             new_items = iter(value)
 *             if step < 0:             # <<<<<<<<<<<<<< 
 *                 del_items = list(self)[start:stop:step]
 *             else:
 */
  __pyx_3 = (__pyx_v_step < 0);
  if (__pyx_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":312
 *             new_items = iter(value)
 *             if step < 0:
 *                 del_items = list(self)[start:stop:step]             # <<<<<<<<<<<<<< 
 *             else:
 *                 del_items = list(islice(self, start, stop, step))
 */
    __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self);
    __pyx_4 = PyObject_CallObject(((PyObject*)&PyList_Type), __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":312
 *             new_items = iter(value)
 *             if step < 0:
 *                 del_items = list(self)[start:stop:step]             # <<<<<<<<<<<<<< 
 *             else:
 *                 del_items = list(islice(self, start, stop, step))
 */
    __pyx_2 = PyInt_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":312
 *             new_items = iter(value)
 *             if step < 0:
 *                 del_items = list(self)[start:stop:step]             # <<<<<<<<<<<<<< 
 *             else:
 *                 del_items = list(islice(self, start, stop, step))
 */
    __pyx_5 = PyInt_FromSsize_t(__pyx_v_stop); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":312
 *             new_items = iter(value)
 *             if step < 0:
 *                 del_items = list(self)[start:stop:step]             # <<<<<<<<<<<<<< 
 *             else:
 *                 del_items = list(islice(self, start, stop, step))
 */
    __pyx_6 = PyInt_FromSsize_t(__pyx_v_step); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; goto __pyx_L1;}
    __pyx_7 = PySlice_New(__pyx_2, __pyx_5, __pyx_6); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    __pyx_2 = PyObject_GetItem(__pyx_4, __pyx_7); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    Py_DECREF(__pyx_v_del_items);
    __pyx_v_del_items = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":314
 *                 del_items = list(self)[start:stop:step]
 *             else:
 *                 del_items = list(islice(self, start, stop, step))             # <<<<<<<<<<<<<< 
 *             del_items = iter(del_items)
 *             parent = self.getparent()
 */
    __pyx_5 = PyInt_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":314
 *                 del_items = list(self)[start:stop:step]
 *             else:
 *                 del_items = list(islice(self, start, stop, step))             # <<<<<<<<<<<<<< 
 *             del_items = iter(del_items)
 *             parent = self.getparent()
 */
    __pyx_6 = PyInt_FromSsize_t(__pyx_v_stop); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":314
 *                 del_items = list(self)[start:stop:step]
 *             else:
 *                 del_items = list(islice(self, start, stop, step))             # <<<<<<<<<<<<<< 
 *             del_items = iter(del_items)
 *             parent = self.getparent()
 */
    __pyx_4 = PyInt_FromSsize_t(__pyx_v_step); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; goto __pyx_L1;}
    __pyx_7 = PyTuple_New(4); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_self);
    PyTuple_SET_ITEM(__pyx_7, 1, __pyx_5);
    PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6);
    PyTuple_SET_ITEM(__pyx_7, 3, __pyx_4);
    __pyx_5 = 0;
    __pyx_6 = 0;
    __pyx_4 = 0;
    __pyx_2 = PyObject_CallObject(__pyx_v_4lxml_9objectify_islice, __pyx_7); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; goto __pyx_L1;}
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2);
    __pyx_2 = 0;
    __pyx_6 = PyObject_CallObject(((PyObject*)&PyList_Type), __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_v_del_items);
    __pyx_v_del_items = __pyx_6;
    __pyx_6 = 0;
  }
  __pyx_L6:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":315
 *             else:
 *                 del_items = list(islice(self, start, stop, step))
 *             del_items = iter(del_items)             # <<<<<<<<<<<<<< 
 *             parent = self.getparent()
 *             try:
 */
  __pyx_4 = PyObject_GetIter(__pyx_v_del_items); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; goto __pyx_L1;}
  Py_DECREF(__pyx_v_del_items);
  __pyx_v_del_items = __pyx_4;
  __pyx_4 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":316
 *                 del_items = list(islice(self, start, stop, step))
 *             del_items = iter(del_items)
 *             parent = self.getparent()             # <<<<<<<<<<<<<< 
 *             try:
 *                 for el in del_items:
 */
  __pyx_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_getparent); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_7, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;}
  Py_DECREF(__pyx_7); __pyx_7 = 0;
  if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_11etreepublic__Element)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;}
  Py_DECREF(((PyObject *)__pyx_v_parent));
  __pyx_v_parent = ((struct LxmlElement *)__pyx_2);
  __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":317
 *             del_items = iter(del_items)
 *             parent = self.getparent()
 *             try:             # <<<<<<<<<<<<<< 
 *                 for el in del_items:
 *                     item = new_items.next()
 */
  /*try:*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":318
 *             parent = self.getparent()
 *             try:
 *                 for el in del_items:             # <<<<<<<<<<<<<< 
 *                     item = new_items.next()
 *                     _replaceElement(el, item)
 */
    if (PyList_CheckExact(__pyx_v_del_items)) { __pyx_8 = 0; __pyx_5 = __pyx_v_del_items; Py_INCREF(__pyx_5); }
    else { __pyx_5 = PyObject_GetIter(__pyx_v_del_items); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; goto __pyx_L7;} }
    for (;;) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":318
 *             parent = self.getparent()
 *             try:
 *                 for el in del_items:             # <<<<<<<<<<<<<< 
 *                     item = new_items.next()
 *                     _replaceElement(el, item)
 */
      if (PyList_CheckExact(__pyx_5)) { if (__pyx_8 >= PyList_GET_SIZE(__pyx_5)) break; __pyx_6 = PyList_GET_ITEM(__pyx_5, __pyx_8++); Py_INCREF(__pyx_6); }
      else {
        __pyx_6 = PyIter_Next(__pyx_5);
        if (!__pyx_6) {
          break;
        }
      }
      Py_DECREF(__pyx_v_el);
      __pyx_v_el = __pyx_6;
      __pyx_6 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":319
 *             try:
 *                 for el in del_items:
 *                     item = new_items.next()             # <<<<<<<<<<<<<< 
 *                     _replaceElement(el, item)
 *             except StopIteration:
 */
      __pyx_4 = PyObject_GetAttr(__pyx_v_new_items, __pyx_n_next); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; goto __pyx_L7;}
      __pyx_7 = PyObject_CallObject(__pyx_4, 0); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; goto __pyx_L7;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_v_item);
      __pyx_v_item = __pyx_7;
      __pyx_7 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":320
 *                 for el in del_items:
 *                     item = new_items.next()
 *                     _replaceElement(el, item)             # <<<<<<<<<<<<<< 
 *             except StopIteration:
 *                 remove = parent.remove
 */
      if (!__Pyx_TypeTest(__pyx_v_el, __pyx_ptype_11etreepublic__Element)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L7;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":320
 *                 for el in del_items:
 *                     item = new_items.next()
 *                     _replaceElement(el, item)             # <<<<<<<<<<<<<< 
 *             except StopIteration:
 *                 remove = parent.remove
 */
      __pyx_2 = __pyx_f_4lxml_9objectify__replaceElement(((struct LxmlElement *)__pyx_v_el),__pyx_v_item); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L7;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
    }
    Py_DECREF(__pyx_5); __pyx_5 = 0;
  }
  /*else:*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":329
 *             else:
 *                 # append remaining new items
 *                 tag = self.tag             # <<<<<<<<<<<<<< 
 *                 for item in new_items:
 *                     _appendValue(parent, tag, item)
 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_tag); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; goto __pyx_L1;}
    Py_DECREF(__pyx_v_tag);
    __pyx_v_tag = __pyx_2;
    __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":330
 *                 # append remaining new items
 *                 tag = self.tag
 *                 for item in new_items:             # <<<<<<<<<<<<<< 
 *                     _appendValue(parent, tag, item)
 *         else:
 */
    if (PyList_CheckExact(__pyx_v_new_items)) { __pyx_8 = 0; __pyx_9 = __pyx_v_new_items; Py_INCREF(__pyx_9); }
    else { __pyx_9 = PyObject_GetIter(__pyx_v_new_items); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; goto __pyx_L1;} }
    for (;;) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":330
 *                 # append remaining new items
 *                 tag = self.tag
 *                 for item in new_items:             # <<<<<<<<<<<<<< 
 *                     _appendValue(parent, tag, item)
 *         else:
 */
      if (PyList_CheckExact(__pyx_9)) { if (__pyx_8 >= PyList_GET_SIZE(__pyx_9)) break; __pyx_5 = PyList_GET_ITEM(__pyx_9, __pyx_8++); Py_INCREF(__pyx_5); }
      else {
        __pyx_5 = PyIter_Next(__pyx_9);
        if (!__pyx_5) {
          break;
        }
      }
      Py_DECREF(__pyx_v_item);
      __pyx_v_item = __pyx_5;
      __pyx_5 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":331
 *                 tag = self.tag
 *                 for item in new_items:
 *                     _appendValue(parent, tag, item)             # <<<<<<<<<<<<<< 
 *         else:
 *             # normal index assignment
 */
      __pyx_6 = __pyx_f_4lxml_9objectify__appendValue(__pyx_v_parent,__pyx_v_tag,__pyx_v_item); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; goto __pyx_L1;}
      Py_DECREF(__pyx_6); __pyx_6 = 0;
    }
    Py_DECREF(__pyx_9); __pyx_9 = 0;
  }
  goto __pyx_L8;
  __pyx_L7:;
  Py_XDECREF(__pyx_6); __pyx_6 = 0;
  Py_XDECREF(__pyx_4); __pyx_4 = 0;
  Py_XDECREF(__pyx_7); __pyx_7 = 0;
  Py_XDECREF(__pyx_2); __pyx_2 = 0;
  Py_XDECREF(__pyx_5); __pyx_5 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":321
 *                     item = new_items.next()
 *                     _replaceElement(el, item)
 *             except StopIteration:             # <<<<<<<<<<<<<< 
 *                 remove = parent.remove
 *                 remove(el)
 */
  __pyx_1 = PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
  if (__pyx_1) {
    __Pyx_AddTraceback("lxml.objectify.__setitem__");
    if (__Pyx_GetException(&__pyx_6, &__pyx_4, &__pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":322
 *                     _replaceElement(el, item)
 *             except StopIteration:
 *                 remove = parent.remove             # <<<<<<<<<<<<<< 
 *                 remove(el)
 *                 for el in del_items:
 */
    __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_parent), __pyx_n_remove); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; goto __pyx_L1;}
    Py_DECREF(__pyx_v_remove);
    __pyx_v_remove = __pyx_2;
    __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":323
 *             except StopIteration:
 *                 remove = parent.remove
 *                 remove(el)             # <<<<<<<<<<<<<< 
 *                 for el in del_items:
 *                     remove(el)
 */
    __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;}
    Py_INCREF(__pyx_v_el);
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_el);
    __pyx_2 = PyObject_CallObject(__pyx_v_remove, __pyx_5); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":324
 *                 remove = parent.remove
 *                 remove(el)
 *                 for el in del_items:             # <<<<<<<<<<<<<< 
 *                     remove(el)
 *                 return
 */
    if (PyList_CheckExact(__pyx_v_del_items)) { __pyx_8 = 0; __pyx_5 = __pyx_v_del_items; Py_INCREF(__pyx_5); }
    else { __pyx_5 = PyObject_GetIter(__pyx_v_del_items); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} }
    for (;;) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":324
 *                 remove = parent.remove
 *                 remove(el)
 *                 for el in del_items:             # <<<<<<<<<<<<<< 
 *                     remove(el)
 *                 return
 */
      if (PyList_CheckExact(__pyx_5)) { if (__pyx_8 >= PyList_GET_SIZE(__pyx_5)) break; __pyx_2 = PyList_GET_ITEM(__pyx_5, __pyx_8++); Py_INCREF(__pyx_2); }
      else {
        __pyx_2 = PyIter_Next(__pyx_5);
        if (!__pyx_2) {
          break;
        }
      }
      Py_DECREF(__pyx_v_el);
      __pyx_v_el = __pyx_2;
      __pyx_2 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":325
 *                 remove(el)
 *                 for el in del_items:
 *                     remove(el)             # <<<<<<<<<<<<<< 
 *                 return
 *             else:
 */
      __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; goto __pyx_L1;}
      Py_INCREF(__pyx_v_el);
      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_el);
      __pyx_9 = PyObject_CallObject(__pyx_v_remove, __pyx_2); if (unlikely(!__pyx_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_9); __pyx_9 = 0;
    }
    Py_DECREF(__pyx_5); __pyx_5 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":326
 *                 for el in del_items:
 *                     remove(el)
 *                 return             # <<<<<<<<<<<<<< 
 *             else:
 *                 # append remaining new items
 */
    __pyx_r = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    goto __pyx_L0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    goto __pyx_L8;
  }
  goto __pyx_L1;
  __pyx_L8:;
  goto __pyx_L5;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":334
 *         else:
 *             # normal index assignment
 *             if key < 0:             # <<<<<<<<<<<<<< 
 *                 c_node = c_parent.last
 *             else:
 */
  __pyx_4 = PyObject_RichCompare(__pyx_v_key, __pyx_num_0, Py_LT); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; goto __pyx_L1;}
  __pyx_3 = __Pyx_PyObject_IsTrue(__pyx_4); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  if (__pyx_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":335
 *             # normal index assignment
 *             if key < 0:
 *                 c_node = c_parent.last             # <<<<<<<<<<<<<< 
 *             else:
 *                 c_node = c_parent.children
 */
    __pyx_v_c_node = __pyx_v_c_parent->last;
    goto __pyx_L15;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":337
 *                 c_node = c_parent.last
 *             else:
 *                 c_node = c_parent.children             # <<<<<<<<<<<<<< 
 *             c_node = _findFollowingSibling(
 *                 c_node, tree._getNs(c_self_node), c_self_node.name, key)
 */
    __pyx_v_c_node = __pyx_v_c_parent->children;
  }
  __pyx_L15:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":339
 *                 c_node = c_parent.children
 *             c_node = _findFollowingSibling(
 *                 c_node, tree._getNs(c_self_node), c_self_node.name, key)             # <<<<<<<<<<<<<< 
 *             if c_node is NULL:
 *                 raise IndexError, key
 */
  __pyx_8 = __pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_8 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; goto __pyx_L1;}
  __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node,_getNs(__pyx_v_c_self_node),__pyx_v_c_self_node->name,__pyx_8);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":340
 *             c_node = _findFollowingSibling(
 *                 c_node, tree._getNs(c_self_node), c_self_node.name, key)
 *             if c_node is NULL:             # <<<<<<<<<<<<<< 
 *                 raise IndexError, key
 *             element = elementFactory(self._doc, c_node)
 */
  __pyx_3 = (__pyx_v_c_node == NULL);
  if (__pyx_3) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":341
 *                 c_node, tree._getNs(c_self_node), c_self_node.name, key)
 *             if c_node is NULL:
 *                 raise IndexError, key             # <<<<<<<<<<<<<< 
 *             element = elementFactory(self._doc, c_node)
 *             _replaceElement(element, value)
 */
    __Pyx_Raise(__pyx_builtin_IndexError, __pyx_v_key, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; goto __pyx_L1;}
    goto __pyx_L16;
  }
  __pyx_L16:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":342
 *             if c_node is NULL:
 *                 raise IndexError, key
 *             element = elementFactory(self._doc, c_node)             # <<<<<<<<<<<<<< 
 *             _replaceElement(element, value)
 * 
 */
  __pyx_7 = ((PyObject *)elementFactory(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._doc,__pyx_v_c_node)); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; goto __pyx_L1;}
  Py_DECREF(((PyObject *)__pyx_v_element));
  __pyx_v_element = ((struct LxmlElement *)__pyx_7);
  __pyx_7 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":343
 *                 raise IndexError, key
 *             element = elementFactory(self._doc, c_node)
 *             _replaceElement(element, value)             # <<<<<<<<<<<<<< 
 * 
 *     def __delitem__(self, key):
 */
  __pyx_2 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element,__pyx_v_value); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
}
__pyx_L5:;

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
Py_XDECREF(__pyx_7);
Py_XDECREF(__pyx_9);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setitem__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_element);
Py_DECREF(__pyx_v_parent);
Py_DECREF(__pyx_v_new_items);
Py_DECREF(__pyx_v_del_items);
Py_DECREF(__pyx_v_el);
Py_DECREF(__pyx_v_item);
Py_DECREF(__pyx_v_remove);
Py_DECREF(__pyx_v_tag);
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_key);
Py_DECREF(__pyx_v_value);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":345
 *             _replaceElement(element, value)
 * 
 *     def __delitem__(self, key):             # <<<<<<<<<<<<<< 
 *         cdef Py_ssize_t start, stop, step, slicelength
 *         if python.PySlice_Check(key):
 */

static PyObject *__pyx_k71p;
static PyObject *__pyx_k72p;

static char __pyx_k71[] = "deleting slices of root element not supported";
static char __pyx_k72[] = "deleting items not supported by root element";

static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
Py_ssize_t __pyx_v_start;
Py_ssize_t __pyx_v_stop;
Py_ssize_t __pyx_v_step;
Py_ssize_t __pyx_v_slicelength;
PyObject *__pyx_v_parent;
PyObject *__pyx_v_del_items;
PyObject *__pyx_v_remove;
PyObject *__pyx_v_el;
PyObject *__pyx_v_sibling;
int __pyx_r;
int __pyx_1;
int __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
PyObject *__pyx_7 = 0;
Py_ssize_t __pyx_8;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_key);
__pyx_v_parent = Py_None; Py_INCREF(Py_None);
__pyx_v_del_items = Py_None; Py_INCREF(Py_None);
__pyx_v_remove = Py_None; Py_INCREF(Py_None);
__pyx_v_el = Py_None; Py_INCREF(Py_None);
__pyx_v_sibling = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":347
 *     def __delitem__(self, key):
 *         cdef Py_ssize_t start, stop, step, slicelength
 *         if python.PySlice_Check(key):             # <<<<<<<<<<<<<< 
 *             # slice deletion
 *             python.PySlice_GetIndicesEx(
 */
__pyx_1 = PySlice_Check(__pyx_v_key);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":351
 *             python.PySlice_GetIndicesEx(
 *                 key, _countSiblings(self._c_node),
 *                 &start, &stop, &step, &slicelength)             # <<<<<<<<<<<<<< 
 *             parent = self.getparent()
 *             if parent is None:
 */
  __pyx_2 = PySlice_GetIndicesEx(__pyx_v_key,__pyx_f_4lxml_9objectify__countSiblings(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node),(&__pyx_v_start),(&__pyx_v_stop),(&__pyx_v_step),(&__pyx_v_slicelength)); if (unlikely(__pyx_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":352
 *                 key, _countSiblings(self._c_node),
 *                 &start, &stop, &step, &slicelength)
 *             parent = self.getparent()             # <<<<<<<<<<<<<< 
 *             if parent is None:
 *                 raise TypeError, "deleting slices of root element not supported"
 */
  __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_getparent); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; goto __pyx_L1;}
  __pyx_4 = PyObject_CallObject(__pyx_3, 0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_v_parent);
  __pyx_v_parent = __pyx_4;
  __pyx_4 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":353
 *                 &start, &stop, &step, &slicelength)
 *             parent = self.getparent()
 *             if parent is None:             # <<<<<<<<<<<<<< 
 *                 raise TypeError, "deleting slices of root element not supported"
 *             if step < 0:
 */
  __pyx_1 = (__pyx_v_parent == Py_None);
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":354
 *             parent = self.getparent()
 *             if parent is None:
 *                 raise TypeError, "deleting slices of root element not supported"             # <<<<<<<<<<<<<< 
 *             if step < 0:
 *                 del_items = list(self)[start:stop:step]
 */
    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_k71p, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":355
 *             if parent is None:
 *                 raise TypeError, "deleting slices of root element not supported"
 *             if step < 0:             # <<<<<<<<<<<<<< 
 *                 del_items = list(self)[start:stop:step]
 *             else:
 */
  __pyx_1 = (__pyx_v_step < 0);
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":356
 *                 raise TypeError, "deleting slices of root element not supported"
 *             if step < 0:
 *                 del_items = list(self)[start:stop:step]             # <<<<<<<<<<<<<< 
 *             else:
 *                 del_items = list(islice(self, start, stop, step))
 */
    __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self);
    __pyx_4 = PyObject_CallObject(((PyObject*)&PyList_Type), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":356
 *                 raise TypeError, "deleting slices of root element not supported"
 *             if step < 0:
 *                 del_items = list(self)[start:stop:step]             # <<<<<<<<<<<<<< 
 *             else:
 *                 del_items = list(islice(self, start, stop, step))
 */
    __pyx_3 = PyInt_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":356
 *                 raise TypeError, "deleting slices of root element not supported"
 *             if step < 0:
 *                 del_items = list(self)[start:stop:step]             # <<<<<<<<<<<<<< 
 *             else:
 *                 del_items = list(islice(self, start, stop, step))
 */
    __pyx_5 = PyInt_FromSsize_t(__pyx_v_stop); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":356
 *                 raise TypeError, "deleting slices of root element not supported"
 *             if step < 0:
 *                 del_items = list(self)[start:stop:step]             # <<<<<<<<<<<<<< 
 *             else:
 *                 del_items = list(islice(self, start, stop, step))
 */
    __pyx_6 = PyInt_FromSsize_t(__pyx_v_step); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;}
    __pyx_7 = PySlice_New(__pyx_3, __pyx_5, __pyx_6); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    __pyx_3 = PyObject_GetItem(__pyx_4, __pyx_7); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    Py_DECREF(__pyx_v_del_items);
    __pyx_v_del_items = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":358
 *                 del_items = list(self)[start:stop:step]
 *             else:
 *                 del_items = list(islice(self, start, stop, step))             # <<<<<<<<<<<<<< 
 *             remove = parent.remove
 *             for el in del_items:
 */
    __pyx_5 = PyInt_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":358
 *                 del_items = list(self)[start:stop:step]
 *             else:
 *                 del_items = list(islice(self, start, stop, step))             # <<<<<<<<<<<<<< 
 *             remove = parent.remove
 *             for el in del_items:
 */
    __pyx_6 = PyInt_FromSsize_t(__pyx_v_stop); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":358
 *                 del_items = list(self)[start:stop:step]
 *             else:
 *                 del_items = list(islice(self, start, stop, step))             # <<<<<<<<<<<<<< 
 *             remove = parent.remove
 *             for el in del_items:
 */
    __pyx_4 = PyInt_FromSsize_t(__pyx_v_step); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
    __pyx_7 = PyTuple_New(4); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_self);
    PyTuple_SET_ITEM(__pyx_7, 1, __pyx_5);
    PyTuple_SET_ITEM(__pyx_7, 2, __pyx_6);
    PyTuple_SET_ITEM(__pyx_7, 3, __pyx_4);
    __pyx_5 = 0;
    __pyx_6 = 0;
    __pyx_4 = 0;
    __pyx_3 = PyObject_CallObject(__pyx_v_4lxml_9objectify_islice, __pyx_7); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_6 = PyObject_CallObject(((PyObject*)&PyList_Type), __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_v_del_items);
    __pyx_v_del_items = __pyx_6;
    __pyx_6 = 0;
  }
  __pyx_L4:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":359
 *             else:
 *                 del_items = list(islice(self, start, stop, step))
 *             remove = parent.remove             # <<<<<<<<<<<<<< 
 *             for el in del_items:
 *                 remove(el)
 */
  __pyx_4 = PyObject_GetAttr(__pyx_v_parent, __pyx_n_remove); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; goto __pyx_L1;}
  Py_DECREF(__pyx_v_remove);
  __pyx_v_remove = __pyx_4;
  __pyx_4 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":360
 *                 del_items = list(islice(self, start, stop, step))
 *             remove = parent.remove
 *             for el in del_items:             # <<<<<<<<<<<<<< 
 *                 remove(el)
 *         else:
 */
  if (PyList_CheckExact(__pyx_v_del_items)) { __pyx_8 = 0; __pyx_7 = __pyx_v_del_items; Py_INCREF(__pyx_7); }
  else { __pyx_7 = PyObject_GetIter(__pyx_v_del_items); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;} }
  for (;;) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":360
 *                 del_items = list(islice(self, start, stop, step))
 *             remove = parent.remove
 *             for el in del_items:             # <<<<<<<<<<<<<< 
 *                 remove(el)
 *         else:
 */
    if (PyList_CheckExact(__pyx_7)) { if (__pyx_8 >= PyList_GET_SIZE(__pyx_7)) break; __pyx_3 = PyList_GET_ITEM(__pyx_7, __pyx_8++); Py_INCREF(__pyx_3); }
    else {
      __pyx_3 = PyIter_Next(__pyx_7);
      if (!__pyx_3) {
        break;
      }
    }
    Py_DECREF(__pyx_v_el);
    __pyx_v_el = __pyx_3;
    __pyx_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":361
 *             remove = parent.remove
 *             for el in del_items:
 *                 remove(el)             # <<<<<<<<<<<<<< 
 *         else:
 *             # normal index deletion
 */
    __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
    Py_INCREF(__pyx_v_el);
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_el);
    __pyx_6 = PyObject_CallObject(__pyx_v_remove, __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
  }
  Py_DECREF(__pyx_7); __pyx_7 = 0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":364
 *         else:
 *             # normal index deletion
 *             parent = self.getparent()             # <<<<<<<<<<<<<< 
 *             if parent is None:
 *                 raise TypeError, "deleting items not supported by root element"
 */
  __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_getparent); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;}
  __pyx_3 = PyObject_CallObject(__pyx_4, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  Py_DECREF(__pyx_v_parent);
  __pyx_v_parent = __pyx_3;
  __pyx_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":365
 *             # normal index deletion
 *             parent = self.getparent()
 *             if parent is None:             # <<<<<<<<<<<<<< 
 *                 raise TypeError, "deleting items not supported by root element"
 *             sibling = self.__getitem__(key)
 */
  __pyx_1 = (__pyx_v_parent == Py_None);
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":366
 *             parent = self.getparent()
 *             if parent is None:
 *                 raise TypeError, "deleting items not supported by root element"             # <<<<<<<<<<<<<< 
 *             sibling = self.__getitem__(key)
 *             parent.remove(sibling)
 */
    __Pyx_Raise(__pyx_builtin_TypeError, __pyx_k72p, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":367
 *             if parent is None:
 *                 raise TypeError, "deleting items not supported by root element"
 *             sibling = self.__getitem__(key)             # <<<<<<<<<<<<<< 
 *             parent.remove(sibling)
 * 
 */
  __pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n___getitem__); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":367
 *             if parent is None:
 *                 raise TypeError, "deleting items not supported by root element"
 *             sibling = self.__getitem__(key)             # <<<<<<<<<<<<<< 
 *             parent.remove(sibling)
 * 
 */
  __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
  Py_INCREF(__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_key);
  __pyx_7 = PyObject_CallObject(__pyx_5, __pyx_6); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  Py_DECREF(__pyx_6); __pyx_6 = 0;
  Py_DECREF(__pyx_v_sibling);
  __pyx_v_sibling = __pyx_7;
  __pyx_7 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":368
 *                 raise TypeError, "deleting items not supported by root element"
 *             sibling = self.__getitem__(key)
 *             parent.remove(sibling)             # <<<<<<<<<<<<<< 
 * 
 *     def iterfind(self, path):
 */
  __pyx_4 = PyObject_GetAttr(__pyx_v_parent, __pyx_n_remove); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":368
 *                 raise TypeError, "deleting items not supported by root element"
 *             sibling = self.__getitem__(key)
 *             parent.remove(sibling)             # <<<<<<<<<<<<<< 
 * 
 *     def iterfind(self, path):
 */
  __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;}
  Py_INCREF(__pyx_v_sibling);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_sibling);
  __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_3); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_5); __pyx_5 = 0;
}
__pyx_L2:;

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
Py_XDECREF(__pyx_7);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delitem__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_parent);
Py_DECREF(__pyx_v_del_items);
Py_DECREF(__pyx_v_remove);
Py_DECREF(__pyx_v_el);
Py_DECREF(__pyx_v_sibling);
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_key);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":370
 *             parent.remove(sibling)
 * 
 *     def iterfind(self, path):             # <<<<<<<<<<<<<< 
 *         # Reimplementation of Element.iterfind() to make it work without child
 *         # iteration.
 */

static PyObject *__pyx_n_ETXPath;

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_iterfind(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_iterfind(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
PyObject *__pyx_v_xpath;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_path);
__pyx_v_xpath = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":373
 *         # Reimplementation of Element.iterfind() to make it work without child
 *         # iteration.
 *         xpath = etree.ETXPath(path)             # <<<<<<<<<<<<<< 
 *         return iter(xpath(self))
 * 
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ETXPath); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":373
 *         # Reimplementation of Element.iterfind() to make it work without child
 *         # iteration.
 *         xpath = etree.ETXPath(path)             # <<<<<<<<<<<<<< 
 *         return iter(xpath(self))
 * 
 */
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L1;}
Py_INCREF(__pyx_v_path);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_xpath);
__pyx_v_xpath = __pyx_3;
__pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":374
 *         # iteration.
 *         xpath = etree.ETXPath(path)
 *         return iter(xpath(self))             # <<<<<<<<<<<<<< 
 * 
 *     def findall(self, path):
 */
__pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; goto __pyx_L1;}
Py_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_self);
__pyx_2 = PyObject_CallObject(__pyx_v_xpath, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_3 = PyObject_GetIter(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.iterfind");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_xpath);
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_path);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":376
 *         return iter(xpath(self))
 * 
 *     def findall(self, path):             # <<<<<<<<<<<<<< 
 *         # Reimplementation of Element.findall() to make it work without child
 *         # iteration.
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findall(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findall(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
PyObject *__pyx_v_xpath;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_path);
__pyx_v_xpath = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":379
 *         # Reimplementation of Element.findall() to make it work without child
 *         # iteration.
 *         xpath = etree.ETXPath(path)             # <<<<<<<<<<<<<< 
 *         return xpath(self)
 * 
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ETXPath); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":379
 *         # Reimplementation of Element.findall() to make it work without child
 *         # iteration.
 *         xpath = etree.ETXPath(path)             # <<<<<<<<<<<<<< 
 *         return xpath(self)
 * 
 */
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;}
Py_INCREF(__pyx_v_path);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_xpath);
__pyx_v_xpath = __pyx_3;
__pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":380
 *         # iteration.
 *         xpath = etree.ETXPath(path)
 *         return xpath(self)             # <<<<<<<<<<<<<< 
 * 
 *     def find(self, path):
 */
__pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; goto __pyx_L1;}
Py_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_self);
__pyx_2 = PyObject_CallObject(__pyx_v_xpath, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.findall");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_xpath);
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_path);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":382
 *         return xpath(self)
 * 
 *     def find(self, path):             # <<<<<<<<<<<<<< 
 *         # Reimplementation of Element.find() to make it work without child
 *         # iteration.
 */

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_find(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_find(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
PyObject *__pyx_v_result;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_path);
__pyx_v_result = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":385
 *         # Reimplementation of Element.find() to make it work without child
 *         # iteration.
 *         result = self.findall(path)             # <<<<<<<<<<<<<< 
 *         if isinstance(result, list) and len(result):
 *             return result[0]
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_findall); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":385
 *         # Reimplementation of Element.find() to make it work without child
 *         # iteration.
 *         result = self.findall(path)             # <<<<<<<<<<<<<< 
 *         if isinstance(result, list) and len(result):
 *             return result[0]
 */
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; goto __pyx_L1;}
Py_INCREF(__pyx_v_path);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_result);
__pyx_v_result = __pyx_3;
__pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":386
 *         # iteration.
 *         result = self.findall(path)
 *         if isinstance(result, list) and len(result):             # <<<<<<<<<<<<<< 
 *             return result[0]
 *         elif isinstance(result, _Element):
 */
__pyx_4 = PyObject_IsInstance(__pyx_v_result,((PyObject*)&PyList_Type)); if (unlikely(__pyx_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; goto __pyx_L1;}
if (__pyx_4) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":386
 *         # iteration.
 *         result = self.findall(path)
 *         if isinstance(result, list) and len(result):             # <<<<<<<<<<<<<< 
 *             return result[0]
 *         elif isinstance(result, _Element):
 */
  __pyx_4 = PyObject_Length(__pyx_v_result); if (unlikely(__pyx_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; goto __pyx_L1;}
}
if (__pyx_4) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":387
 *         result = self.findall(path)
 *         if isinstance(result, list) and len(result):
 *             return result[0]             # <<<<<<<<<<<<<< 
 *         elif isinstance(result, _Element):
 *             return result
 */
  if (PyList_CheckExact(__pyx_v_result) && 0 <= 0 && 0 < PyList_GET_SIZE(__pyx_v_result)) {
    __pyx_2 = PyList_GET_ITEM(__pyx_v_result, 0); Py_INCREF(__pyx_2);
    } else if (PyTuple_CheckExact(__pyx_v_result) && 0 <= 0 && 0 < PyTuple_GET_SIZE(__pyx_v_result)) {
    __pyx_2 = PyTuple_GET_ITEM(__pyx_v_result, 0); Py_INCREF(__pyx_2);
    } else {
    __pyx_1 = PyInt_FromLong(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
    __pyx_2 = PyObject_GetItem(__pyx_v_result, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
  }
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":388
 *         if isinstance(result, list) and len(result):
 *             return result[0]
 *         elif isinstance(result, _Element):             # <<<<<<<<<<<<<< 
 *             return result
 *         else:
 */
__pyx_4 = PyObject_IsInstance(__pyx_v_result,((PyObject*)__pyx_ptype_11etreepublic__Element)); if (unlikely(__pyx_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; goto __pyx_L1;}
if (__pyx_4) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":389
 *             return result[0]
 *         elif isinstance(result, _Element):
 *             return result             # <<<<<<<<<<<<<< 
 *         else:
 *             return None
 */
  Py_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":391
 *             return result
 *         else:
 *             return None             # <<<<<<<<<<<<<< 
 * 
 *     def findtext(self, path, default=None):
 */
  Py_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.find");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_result);
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_path);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":393
 *             return None
 * 
 *     def findtext(self, path, default=None):             # <<<<<<<<<<<<<< 
 *         # Reimplementation of Element.findtext() to make it work without child
 *         # iteration.
 */

static PyObject *__pyx_k73p;

static char __pyx_k73[] = "";

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findtext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findtext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_path = 0;
PyObject *__pyx_v_default = 0;
PyObject *__pyx_v_result;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
static char *__pyx_argnames[] = {"path","default",0};
__pyx_v_default = __pyx_k17;
if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_path, &__pyx_v_default))) return NULL;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_path);
Py_INCREF(__pyx_v_default);
__pyx_v_result = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":396
 *         # Reimplementation of Element.findtext() to make it work without child
 *         # iteration.
 *         result = self.find(path)             # <<<<<<<<<<<<<< 
 *         if isinstance(result, _Element):
 *             return result.text or ""
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_find); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":396
 *         # Reimplementation of Element.findtext() to make it work without child
 *         # iteration.
 *         result = self.find(path)             # <<<<<<<<<<<<<< 
 *         if isinstance(result, _Element):
 *             return result.text or ""
 */
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;}
Py_INCREF(__pyx_v_path);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_result);
__pyx_v_result = __pyx_3;
__pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":397
 *         # iteration.
 *         result = self.find(path)
 *         if isinstance(result, _Element):             # <<<<<<<<<<<<<< 
 *             return result.text or ""
 *         else:
 */
__pyx_4 = PyObject_IsInstance(__pyx_v_result,((PyObject*)__pyx_ptype_11etreepublic__Element)); if (unlikely(__pyx_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L1;}
if (__pyx_4) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":398
 *         result = self.find(path)
 *         if isinstance(result, _Element):
 *             return result.text or ""             # <<<<<<<<<<<<<< 
 *         else:
 *             return default
 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_result, __pyx_n_text); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
  __pyx_4 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
  if (!__pyx_4) {
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":398
 *         result = self.find(path)
 *         if isinstance(result, _Element):
 *             return result.text or ""             # <<<<<<<<<<<<<< 
 *         else:
 *             return default
 */
    __pyx_1 = __pyx_k73p;
    Py_INCREF(__pyx_1);
  }
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":400
 *             return result.text or ""
 *         else:
 *             return default             # <<<<<<<<<<<<<< 
 * 
 *     def descendantpaths(self, prefix=None):
 */
  Py_INCREF(__pyx_v_default);
  __pyx_r = __pyx_v_default;
  goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.findtext");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_result);
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_path);
Py_DECREF(__pyx_v_default);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":402
 *             return default
 * 
 *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<< 
 *         """Returns a list of object path expressions for all descendants.
 *         """
 */

static PyObject *__pyx_n_join;

static PyObject *__pyx_k74p;

static char __pyx_k74[] = ".";

static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_descendantpaths[] = "Returns a list of object path expressions for all descendants.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_prefix = 0;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"prefix",0};
__pyx_v_prefix = __pyx_k18;
if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_prefix))) return NULL;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_prefix);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":405
 *         """Returns a list of object path expressions for all descendants.
 *         """
 *         if prefix is not None and not python._isString(prefix):             # <<<<<<<<<<<<<< 
 *             prefix = '.'.join(prefix)
 *         return _buildDescendantPaths(self._c_node, prefix)
 */
__pyx_1 = (__pyx_v_prefix != Py_None);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":405
 *         """Returns a list of object path expressions for all descendants.
 *         """
 *         if prefix is not None and not python._isString(prefix):             # <<<<<<<<<<<<<< 
 *             prefix = '.'.join(prefix)
 *         return _buildDescendantPaths(self._c_node, prefix)
 */
  __pyx_1 = (!_isString(__pyx_v_prefix));
}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":406
 *         """
 *         if prefix is not None and not python._isString(prefix):
 *             prefix = '.'.join(prefix)             # <<<<<<<<<<<<<< 
 *         return _buildDescendantPaths(self._c_node, prefix)
 * 
 */
  __pyx_2 = PyObject_GetAttr(__pyx_k74p, __pyx_n_join); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":406
 *         """
 *         if prefix is not None and not python._isString(prefix):
 *             prefix = '.'.join(prefix)             # <<<<<<<<<<<<<< 
 *         return _buildDescendantPaths(self._c_node, prefix)
 * 
 */
  __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; goto __pyx_L1;}
  Py_INCREF(__pyx_v_prefix);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_prefix);
  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_v_prefix);
  __pyx_v_prefix = __pyx_4;
  __pyx_4 = 0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":407
 *         if prefix is not None and not python._isString(prefix):
 *             prefix = '.'.join(prefix)
 *         return _buildDescendantPaths(self._c_node, prefix)             # <<<<<<<<<<<<<< 
 * 
 * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__buildDescendantPaths(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node,__pyx_v_prefix); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_prefix);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":409
 *         return _buildDescendantPaths(self._c_node, prefix)
 * 
 * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):             # <<<<<<<<<<<<<< 
 *     cdef tree.xmlNode* c_node
 *     cdef char* c_href
 */

static  Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *__pyx_v_c_start_node) {
xmlNode *__pyx_v_c_node;
char *__pyx_v_c_href;
char *__pyx_v_c_tag;
Py_ssize_t __pyx_v_count;
Py_ssize_t __pyx_r;
int __pyx_1;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":414
 *     cdef char* c_tag
 *     cdef Py_ssize_t count
 *     c_tag  = c_start_node.name             # <<<<<<<<<<<<<< 
 *     c_href = tree._getNs(c_start_node)
 *     count = 1
 */
__pyx_v_c_tag = __pyx_v_c_start_node->name;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":415
 *     cdef Py_ssize_t count
 *     c_tag  = c_start_node.name
 *     c_href = tree._getNs(c_start_node)             # <<<<<<<<<<<<<< 
 *     count = 1
 *     c_node = c_start_node.next
 */
__pyx_v_c_href = _getNs(__pyx_v_c_start_node);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":416
 *     c_tag  = c_start_node.name
 *     c_href = tree._getNs(c_start_node)
 *     count = 1             # <<<<<<<<<<<<<< 
 *     c_node = c_start_node.next
 *     while c_node is not NULL:
 */
__pyx_v_count = 1;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":417
 *     c_href = tree._getNs(c_start_node)
 *     count = 1
 *     c_node = c_start_node.next             # <<<<<<<<<<<<<< 
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 */
__pyx_v_c_node = __pyx_v_c_start_node->next;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":418
 *     count = 1
 *     c_node = c_start_node.next
 *     while c_node is not NULL:             # <<<<<<<<<<<<<< 
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                cetree.tagMatches(c_node, c_href, c_tag):
 */
while (1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":418
 *     count = 1
 *     c_node = c_start_node.next
 *     while c_node is not NULL:             # <<<<<<<<<<<<<< 
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                cetree.tagMatches(c_node, c_href, c_tag):
 */
  __pyx_1 = (__pyx_v_c_node != NULL);
  if (!__pyx_1) break;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":419
 *     c_node = c_start_node.next
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<< 
 *                cetree.tagMatches(c_node, c_href, c_tag):
 *             count = count + 1
 */
  __pyx_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":420
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                cetree.tagMatches(c_node, c_href, c_tag):             # <<<<<<<<<<<<<< 
 *             count = count + 1
 *         c_node = c_node.next
 */
    __pyx_1 = tagMatches(__pyx_v_c_node,__pyx_v_c_href,__pyx_v_c_tag);
  }
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":421
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                cetree.tagMatches(c_node, c_href, c_tag):
 *             count = count + 1             # <<<<<<<<<<<<<< 
 *         c_node = c_node.next
 *     c_node = c_start_node.prev
 */
    __pyx_v_count = (__pyx_v_count + 1);
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":422
 *                cetree.tagMatches(c_node, c_href, c_tag):
 *             count = count + 1
 *         c_node = c_node.next             # <<<<<<<<<<<<<< 
 *     c_node = c_start_node.prev
 *     while c_node is not NULL:
 */
  __pyx_v_c_node = __pyx_v_c_node->next;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":423
 *             count = count + 1
 *         c_node = c_node.next
 *     c_node = c_start_node.prev             # <<<<<<<<<<<<<< 
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 */
__pyx_v_c_node = __pyx_v_c_start_node->prev;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":424
 *         c_node = c_node.next
 *     c_node = c_start_node.prev
 *     while c_node is not NULL:             # <<<<<<<<<<<<<< 
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                cetree.tagMatches(c_node, c_href, c_tag):
 */
while (1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":424
 *         c_node = c_node.next
 *     c_node = c_start_node.prev
 *     while c_node is not NULL:             # <<<<<<<<<<<<<< 
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                cetree.tagMatches(c_node, c_href, c_tag):
 */
  __pyx_1 = (__pyx_v_c_node != NULL);
  if (!__pyx_1) break;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":425
 *     c_node = c_start_node.prev
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<< 
 *                cetree.tagMatches(c_node, c_href, c_tag):
 *             count = count + 1
 */
  __pyx_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":426
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                cetree.tagMatches(c_node, c_href, c_tag):             # <<<<<<<<<<<<<< 
 *             count = count + 1
 *         c_node = c_node.prev
 */
    __pyx_1 = tagMatches(__pyx_v_c_node,__pyx_v_c_href,__pyx_v_c_tag);
  }
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":427
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                cetree.tagMatches(c_node, c_href, c_tag):
 *             count = count + 1             # <<<<<<<<<<<<<< 
 *         c_node = c_node.prev
 *     return count
 */
    __pyx_v_count = (__pyx_v_count + 1);
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":428
 *                cetree.tagMatches(c_node, c_href, c_tag):
 *             count = count + 1
 *         c_node = c_node.prev             # <<<<<<<<<<<<<< 
 *     return count
 * 
 */
  __pyx_v_c_node = __pyx_v_c_node->prev;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":429
 *             count = count + 1
 *         c_node = c_node.prev
 *     return count             # <<<<<<<<<<<<<< 
 * 
 * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,
 */
__pyx_r = __pyx_v_count;
goto __pyx_L0;

__pyx_r = 0;
__pyx_L0:;
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":431
 *     return count
 * 
 * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,             # <<<<<<<<<<<<<< 
 *                                          char* href, char* name,
 *                                          Py_ssize_t index):
 */

static  xmlNode *__pyx_f_4lxml_9objectify__findFollowingSibling(xmlNode *__pyx_v_c_node,char *__pyx_v_href,char *__pyx_v_name,Py_ssize_t __pyx_v_index) {
xmlNode *(*__pyx_v_next)(xmlNode *);
xmlNode *__pyx_r;
int __pyx_1;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":435
 *                                          Py_ssize_t index):
 *     cdef tree.xmlNode* (*next)(tree.xmlNode*)
 *     if index >= 0:             # <<<<<<<<<<<<<< 
 *         next = cetree.nextElement
 *     else:
 */
__pyx_1 = (__pyx_v_index >= 0);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":436
 *     cdef tree.xmlNode* (*next)(tree.xmlNode*)
 *     if index >= 0:
 *         next = cetree.nextElement             # <<<<<<<<<<<<<< 
 *     else:
 *         index = -1 - index
 */
  __pyx_v_next = nextElement;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":438
 *         next = cetree.nextElement
 *     else:
 *         index = -1 - index             # <<<<<<<<<<<<<< 
 *         next = cetree.previousElement
 *     while c_node is not NULL:
 */
  __pyx_v_index = (-1 - __pyx_v_index);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":439
 *     else:
 *         index = -1 - index
 *         next = cetree.previousElement             # <<<<<<<<<<<<<< 
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 */
  __pyx_v_next = previousElement;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":440
 *         index = -1 - index
 *         next = cetree.previousElement
 *     while c_node is not NULL:             # <<<<<<<<<<<<<< 
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                cetree.tagMatches(c_node, href, name):
 */
while (1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":440
 *         index = -1 - index
 *         next = cetree.previousElement
 *     while c_node is not NULL:             # <<<<<<<<<<<<<< 
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                cetree.tagMatches(c_node, href, name):
 */
  __pyx_1 = (__pyx_v_c_node != NULL);
  if (!__pyx_1) break;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":441
 *         next = cetree.previousElement
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<< 
 *                cetree.tagMatches(c_node, href, name):
 *             index = index - 1
 */
  __pyx_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":442
 *     while c_node is not NULL:
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                cetree.tagMatches(c_node, href, name):             # <<<<<<<<<<<<<< 
 *             index = index - 1
 *             if index < 0:
 */
    __pyx_1 = tagMatches(__pyx_v_c_node,__pyx_v_href,__pyx_v_name);
  }
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":443
 *         if c_node.type == tree.XML_ELEMENT_NODE and \
 *                cetree.tagMatches(c_node, href, name):
 *             index = index - 1             # <<<<<<<<<<<<<< 
 *             if index < 0:
 *                 return c_node
 */
    __pyx_v_index = (__pyx_v_index - 1);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":444
 *                cetree.tagMatches(c_node, href, name):
 *             index = index - 1
 *             if index < 0:             # <<<<<<<<<<<<<< 
 *                 return c_node
 *         c_node = next(c_node)
 */
    __pyx_1 = (__pyx_v_index < 0);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":445
 *             index = index - 1
 *             if index < 0:
 *                 return c_node             # <<<<<<<<<<<<<< 
 *         c_node = next(c_node)
 *     return NULL
 */
      __pyx_r = __pyx_v_c_node;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":446
 *             if index < 0:
 *                 return c_node
 *         c_node = next(c_node)             # <<<<<<<<<<<<<< 
 *     return NULL
 * 
 */
  __pyx_v_c_node = __pyx_v_next(__pyx_v_c_node);
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":447
 *                 return c_node
 *         c_node = next(c_node)
 *     return NULL             # <<<<<<<<<<<<<< 
 * 
 * cdef object _lookupChild(_Element parent, tag):
 */
__pyx_r = NULL;
goto __pyx_L0;

__pyx_r = 0;
__pyx_L0:;
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":449
 *     return NULL
 * 
 * cdef object _lookupChild(_Element parent, tag):             # <<<<<<<<<<<<<< 
 *     cdef tree.xmlNode* c_result
 *     cdef tree.xmlNode* c_node
 */

static  PyObject *__pyx_f_4lxml_9objectify__lookupChild(struct LxmlElement *__pyx_v_parent,PyObject *__pyx_v_tag) {
xmlNode *__pyx_v_c_result;
xmlNode *__pyx_v_c_node;
char *__pyx_v_c_href;
char *__pyx_v_c_tag;
PyObject *__pyx_v_ns;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
Py_INCREF(__pyx_v_parent);
Py_INCREF(__pyx_v_tag);
__pyx_v_ns = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":454
 *     cdef char* c_href
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<< 
 *     c_tag = _cstr(tag)
 *     c_node = parent._c_node
 */
__pyx_1 = getNsTag(__pyx_v_tag); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
if (PyTuple_CheckExact(__pyx_1) && PyTuple_GET_SIZE(__pyx_1) == 2) {
  __pyx_3 = PyTuple_GET_ITEM(__pyx_1, 0);
  Py_INCREF(__pyx_3);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":454
 *     cdef char* c_href
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<< 
 *     c_tag = _cstr(tag)
 *     c_node = parent._c_node
 */
  Py_DECREF(__pyx_v_ns);
  __pyx_v_ns = __pyx_3;
  __pyx_3 = 0;
  __pyx_3 = PyTuple_GET_ITEM(__pyx_1, 1);
  Py_INCREF(__pyx_3);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":454
 *     cdef char* c_href
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<< 
 *     c_tag = _cstr(tag)
 *     c_node = parent._c_node
 */
  Py_DECREF(__pyx_v_tag);
  __pyx_v_tag = __pyx_3;
  __pyx_3 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
}
else {
  __pyx_2 = PyObject_GetIter(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_3 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":454
 *     cdef char* c_href
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<< 
 *     c_tag = _cstr(tag)
 *     c_node = parent._c_node
 */
  Py_DECREF(__pyx_v_ns);
  __pyx_v_ns = __pyx_3;
  __pyx_3 = 0;
  __pyx_3 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":454
 *     cdef char* c_href
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<< 
 *     c_tag = _cstr(tag)
 *     c_node = parent._c_node
 */
  Py_DECREF(__pyx_v_tag);
  __pyx_v_tag = __pyx_3;
  __pyx_3 = 0;
  if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":455
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)
 *     c_tag = _cstr(tag)             # <<<<<<<<<<<<<< 
 *     c_node = parent._c_node
 *     if ns is None:
 */
__pyx_v_c_tag = _cstr(__pyx_v_tag);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":456
 *     ns, tag = cetree.getNsTag(tag)
 *     c_tag = _cstr(tag)
 *     c_node = parent._c_node             # <<<<<<<<<<<<<< 
 *     if ns is None:
 *         c_href = tree._getNs(c_node)
 */
__pyx_v_c_node = __pyx_v_parent->_c_node;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":457
 *     c_tag = _cstr(tag)
 *     c_node = parent._c_node
 *     if ns is None:             # <<<<<<<<<<<<<< 
 *         c_href = tree._getNs(c_node)
 *     else:
 */
__pyx_4 = (__pyx_v_ns == Py_None);
if (__pyx_4) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":458
 *     c_node = parent._c_node
 *     if ns is None:
 *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<< 
 *     else:
 *         c_href = _cstr(ns)
 */
  __pyx_v_c_href = _getNs(__pyx_v_c_node);
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":460
 *         c_href = tree._getNs(c_node)
 *     else:
 *         c_href = _cstr(ns)             # <<<<<<<<<<<<<< 
 *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
 *     if c_result is NULL:
 */
  __pyx_v_c_href = _cstr(__pyx_v_ns);
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":461
 *     else:
 *         c_href = _cstr(ns)
 *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)             # <<<<<<<<<<<<<< 
 *     if c_result is NULL:
 *         return None
 */
__pyx_v_c_result = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node->children,__pyx_v_c_href,__pyx_v_c_tag,0);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":462
 *         c_href = _cstr(ns)
 *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
 *     if c_result is NULL:             # <<<<<<<<<<<<<< 
 *         return None
 *     return elementFactory(parent._doc, c_result)
 */
__pyx_4 = (__pyx_v_c_result == NULL);
if (__pyx_4) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":463
 *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
 *     if c_result is NULL:
 *         return None             # <<<<<<<<<<<<<< 
 *     return elementFactory(parent._doc, c_result)
 * 
 */
  Py_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;
  goto __pyx_L3;
}
__pyx_L3:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":464
 *     if c_result is NULL:
 *         return None
 *     return elementFactory(parent._doc, c_result)             # <<<<<<<<<<<<<< 
 * 
 * cdef object _lookupChildOrRaise(_Element parent, tag):
 */
__pyx_3 = ((PyObject *)elementFactory(__pyx_v_parent->_doc,__pyx_v_c_result)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; goto __pyx_L1;}
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify._lookupChild");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_ns);
Py_DECREF(__pyx_v_parent);
Py_DECREF(__pyx_v_tag);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":466
 *     return elementFactory(parent._doc, c_result)
 * 
 * cdef object _lookupChildOrRaise(_Element parent, tag):             # <<<<<<<<<<<<<< 
 *     element = _lookupChild(parent, tag)
 *     if element is None:
 */

static PyObject *__pyx_k75p;

static char __pyx_k75[] = "no such child: ";

static  PyObject *__pyx_f_4lxml_9objectify__lookupChildOrRaise(struct LxmlElement *__pyx_v_parent,PyObject *__pyx_v_tag) {
PyObject *__pyx_v_element;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_parent);
Py_INCREF(__pyx_v_tag);
__pyx_v_element = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":467
 * 
 * cdef object _lookupChildOrRaise(_Element parent, tag):
 *     element = _lookupChild(parent, tag)             # <<<<<<<<<<<<<< 
 *     if element is None:
 *         raise AttributeError, "no such child: " + \
 */
__pyx_1 = __pyx_f_4lxml_9objectify__lookupChild(__pyx_v_parent,__pyx_v_tag); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; goto __pyx_L1;}
Py_DECREF(__pyx_v_element);
__pyx_v_element = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":468
 * cdef object _lookupChildOrRaise(_Element parent, tag):
 *     element = _lookupChild(parent, tag)
 *     if element is None:             # <<<<<<<<<<<<<< 
 *         raise AttributeError, "no such child: " + \
 *               _buildChildTag(parent, tag)
 */
__pyx_2 = (__pyx_v_element == Py_None);
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":470
 *     if element is None:
 *         raise AttributeError, "no such child: " + \
 *               _buildChildTag(parent, tag)             # <<<<<<<<<<<<<< 
 *     return element
 * 
 */
  __pyx_1 = __pyx_f_4lxml_9objectify__buildChildTag(__pyx_v_parent,__pyx_v_tag); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; goto __pyx_L1;}
  __pyx_3 = PyNumber_Add(__pyx_k75p, __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_3, 0);
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; goto __pyx_L1;}
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":471
 *         raise AttributeError, "no such child: " + \
 *               _buildChildTag(parent, tag)
 *     return element             # <<<<<<<<<<<<<< 
 * 
 * cdef object _buildChildTag(_Element parent, tag):
 */
Py_INCREF(__pyx_v_element);
__pyx_r = __pyx_v_element;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify._lookupChildOrRaise");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_element);
Py_DECREF(__pyx_v_parent);
Py_DECREF(__pyx_v_tag);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":473
 *     return element
 * 
 * cdef object _buildChildTag(_Element parent, tag):             # <<<<<<<<<<<<<< 
 *     cdef char* c_href
 *     cdef char* c_tag
 */

static  PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *__pyx_v_parent,PyObject *__pyx_v_tag) {
char *__pyx_v_c_href;
char *__pyx_v_c_tag;
PyObject *__pyx_v_ns;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
Py_INCREF(__pyx_v_parent);
Py_INCREF(__pyx_v_tag);
__pyx_v_ns = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":476
 *     cdef char* c_href
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<< 
 *     c_tag = _cstr(tag)
 *     if ns is None:
 */
__pyx_1 = getNsTag(__pyx_v_tag); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;}
if (PyTuple_CheckExact(__pyx_1) && PyTuple_GET_SIZE(__pyx_1) == 2) {
  __pyx_3 = PyTuple_GET_ITEM(__pyx_1, 0);
  Py_INCREF(__pyx_3);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":476
 *     cdef char* c_href
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<< 
 *     c_tag = _cstr(tag)
 *     if ns is None:
 */
  Py_DECREF(__pyx_v_ns);
  __pyx_v_ns = __pyx_3;
  __pyx_3 = 0;
  __pyx_3 = PyTuple_GET_ITEM(__pyx_1, 1);
  Py_INCREF(__pyx_3);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":476
 *     cdef char* c_href
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<< 
 *     c_tag = _cstr(tag)
 *     if ns is None:
 */
  Py_DECREF(__pyx_v_tag);
  __pyx_v_tag = __pyx_3;
  __pyx_3 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
}
else {
  __pyx_2 = PyObject_GetIter(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_3 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":476
 *     cdef char* c_href
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<< 
 *     c_tag = _cstr(tag)
 *     if ns is None:
 */
  Py_DECREF(__pyx_v_ns);
  __pyx_v_ns = __pyx_3;
  __pyx_3 = 0;
  __pyx_3 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":476
 *     cdef char* c_href
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<< 
 *     c_tag = _cstr(tag)
 *     if ns is None:
 */
  Py_DECREF(__pyx_v_tag);
  __pyx_v_tag = __pyx_3;
  __pyx_3 = 0;
  if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":477
 *     cdef char* c_tag
 *     ns, tag = cetree.getNsTag(tag)
 *     c_tag = _cstr(tag)             # <<<<<<<<<<<<<< 
 *     if ns is None:
 *         c_href = tree._getNs(parent._c_node)
 */
__pyx_v_c_tag = _cstr(__pyx_v_tag);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":478
 *     ns, tag = cetree.getNsTag(tag)
 *     c_tag = _cstr(tag)
 *     if ns is None:             # <<<<<<<<<<<<<< 
 *         c_href = tree._getNs(parent._c_node)
 *     else:
 */
__pyx_4 = (__pyx_v_ns == Py_None);
if (__pyx_4) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":479
 *     c_tag = _cstr(tag)
 *     if ns is None:
 *         c_href = tree._getNs(parent._c_node)             # <<<<<<<<<<<<<< 
 *     else:
 *         c_href = _cstr(ns)
 */
  __pyx_v_c_href = _getNs(__pyx_v_parent->_c_node);
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":481
 *         c_href = tree._getNs(parent._c_node)
 *     else:
 *         c_href = _cstr(ns)             # <<<<<<<<<<<<<< 
 *     return cetree.namespacedNameFromNsName(c_href, c_tag)
 * 
 */
  __pyx_v_c_href = _cstr(__pyx_v_ns);
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":482
 *     else:
 *         c_href = _cstr(ns)
 *     return cetree.namespacedNameFromNsName(c_href, c_tag)             # <<<<<<<<<<<<<< 
 * 
 * cdef object _replaceElement(_Element element, value):
 */
__pyx_3 = namespacedNameFromNsName(__pyx_v_c_href,__pyx_v_c_tag); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; goto __pyx_L1;}
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify._buildChildTag");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_ns);
Py_DECREF(__pyx_v_parent);
Py_DECREF(__pyx_v_tag);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":484
 *     return cetree.namespacedNameFromNsName(c_href, c_tag)
 * 
 * cdef object _replaceElement(_Element element, value):             # <<<<<<<<<<<<<< 
 *     cdef _Element new_element
 *     if isinstance(value, _Element):
 */

static PyObject *__pyx_n_makeelement;
static PyObject *__pyx_n_replace;

static  PyObject *__pyx_f_4lxml_9objectify__replaceElement(struct LxmlElement *__pyx_v_element,PyObject *__pyx_v_value) {
struct LxmlElement *__pyx_v_new_element;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
Py_INCREF(__pyx_v_element);
Py_INCREF(__pyx_v_value);
__pyx_v_new_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":486
 * cdef object _replaceElement(_Element element, value):
 *     cdef _Element new_element
 *     if isinstance(value, _Element):             # <<<<<<<<<<<<<< 
 *         # deep copy the new element
 *         new_element = cetree.deepcopyNodeToDocument(
 */
__pyx_1 = PyObject_IsInstance(__pyx_v_value,((PyObject*)__pyx_ptype_11etreepublic__Element)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":489
 *         # deep copy the new element
 *         new_element = cetree.deepcopyNodeToDocument(
 *             element._doc, (<_Element>value)._c_node)             # <<<<<<<<<<<<<< 
 *         new_element.tag = element.tag
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 */
  __pyx_2 = ((PyObject *)deepcopyNodeToDocument(__pyx_v_element->_doc,((struct LxmlElement *)__pyx_v_value)->_c_node)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; goto __pyx_L1;}
  Py_DECREF(((PyObject *)__pyx_v_new_element));
  __pyx_v_new_element = ((struct LxmlElement *)__pyx_2);
  __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":490
 *         new_element = cetree.deepcopyNodeToDocument(
 *             element._doc, (<_Element>value)._c_node)
 *         new_element.tag = element.tag             # <<<<<<<<<<<<<< 
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         element[:] = value
 */
  __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_tag); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":490
 *         new_element = cetree.deepcopyNodeToDocument(
 *             element._doc, (<_Element>value)._c_node)
 *         new_element.tag = element.tag             # <<<<<<<<<<<<<< 
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         element[:] = value
 */
  if (PyObject_SetAttr(((PyObject *)__pyx_v_new_element), __pyx_n_tag, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  goto __pyx_L2;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":491
 *             element._doc, (<_Element>value)._c_node)
 *         new_element.tag = element.tag
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):             # <<<<<<<<<<<<<< 
 *         element[:] = value
 *         return
 */
__pyx_1 = PyList_Check(__pyx_v_value);
if (!__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":491
 *             element._doc, (<_Element>value)._c_node)
 *         new_element.tag = element.tag
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):             # <<<<<<<<<<<<<< 
 *         element[:] = value
 *         return
 */
  __pyx_1 = PyTuple_Check(__pyx_v_value);
}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":492
 *         new_element.tag = element.tag
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         element[:] = value             # <<<<<<<<<<<<<< 
 *         return
 *     else:
 */
  if (PySequence_SetSlice(((PyObject *)__pyx_v_element), 0, PY_SSIZE_T_MAX, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":493
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         element[:] = value
 *         return             # <<<<<<<<<<<<<< 
 *     else:
 *         new_element = element.makeelement(element.tag)
 */
  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":495
 *         return
 *     else:
 *         new_element = element.makeelement(element.tag)             # <<<<<<<<<<<<<< 
 *         _setElementValue(new_element, value)
 *     element.getparent().replace(element, new_element)
 */
  __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_makeelement); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":495
 *         return
 *     else:
 *         new_element = element.makeelement(element.tag)             # <<<<<<<<<<<<<< 
 *         _setElementValue(new_element, value)
 *     element.getparent().replace(element, new_element)
 */
  __pyx_3 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_tag); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
  __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
  __pyx_3 = 0;
  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_11etreepublic__Element)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
  Py_DECREF(((PyObject *)__pyx_v_new_element));
  __pyx_v_new_element = ((struct LxmlElement *)__pyx_3);
  __pyx_3 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":496
 *     else:
 *         new_element = element.makeelement(element.tag)
 *         _setElementValue(new_element, value)             # <<<<<<<<<<<<<< 
 *     element.getparent().replace(element, new_element)
 * 
 */
  __pyx_2 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element,__pyx_v_value); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":497
 *         new_element = element.makeelement(element.tag)
 *         _setElementValue(new_element, value)
 *     element.getparent().replace(element, new_element)             # <<<<<<<<<<<<<< 
 * 
 * cdef object _appendValue(_Element parent, tag, value):
 */
__pyx_4 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_getparent); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_4, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_replace); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":497
 *         new_element = element.makeelement(element.tag)
 *         _setElementValue(new_element, value)
 *     element.getparent().replace(element, new_element)             # <<<<<<<<<<<<<< 
 * 
 * cdef object _appendValue(_Element parent, tag, value):
 */
__pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; goto __pyx_L1;}
Py_INCREF(((PyObject *)__pyx_v_element));
PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_element));
Py_INCREF(((PyObject *)__pyx_v_new_element));
PyTuple_SET_ITEM(__pyx_4, 1, ((PyObject *)__pyx_v_new_element));
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("lxml.objectify._replaceElement");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_new_element);
Py_DECREF(__pyx_v_element);
Py_DECREF(__pyx_v_value);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":499
 *     element.getparent().replace(element, new_element)
 * 
 * cdef object _appendValue(_Element parent, tag, value):             # <<<<<<<<<<<<<< 
 *     cdef _Element new_element
 *     if isinstance(value, _Element):
 */

static  PyObject *__pyx_f_4lxml_9objectify__appendValue(struct LxmlElement *__pyx_v_parent,PyObject *__pyx_v_tag,PyObject *__pyx_v_value) {
struct LxmlElement *__pyx_v_new_element;
PyObject *__pyx_v_item;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
Py_ssize_t __pyx_3;
PyObject *__pyx_4 = 0;
Py_INCREF(__pyx_v_parent);
Py_INCREF(__pyx_v_tag);
Py_INCREF(__pyx_v_value);
__pyx_v_new_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
__pyx_v_item = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":501
 * cdef object _appendValue(_Element parent, tag, value):
 *     cdef _Element new_element
 *     if isinstance(value, _Element):             # <<<<<<<<<<<<<< 
 *         # deep copy the new element
 *         new_element = cetree.deepcopyNodeToDocument(
 */
__pyx_1 = PyObject_IsInstance(__pyx_v_value,((PyObject*)__pyx_ptype_11etreepublic__Element)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":504
 *         # deep copy the new element
 *         new_element = cetree.deepcopyNodeToDocument(
 *             parent._doc, (<_Element>value)._c_node)             # <<<<<<<<<<<<<< 
 *         new_element.tag = tag
 *         cetree.appendChild(parent, new_element)
 */
  __pyx_2 = ((PyObject *)deepcopyNodeToDocument(__pyx_v_parent->_doc,((struct LxmlElement *)__pyx_v_value)->_c_node)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; goto __pyx_L1;}
  Py_DECREF(((PyObject *)__pyx_v_new_element));
  __pyx_v_new_element = ((struct LxmlElement *)__pyx_2);
  __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":505
 *         new_element = cetree.deepcopyNodeToDocument(
 *             parent._doc, (<_Element>value)._c_node)
 *         new_element.tag = tag             # <<<<<<<<<<<<<< 
 *         cetree.appendChild(parent, new_element)
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 */
  if (PyObject_SetAttr(((PyObject *)__pyx_v_new_element), __pyx_n_tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":506
 *             parent._doc, (<_Element>value)._c_node)
 *         new_element.tag = tag
 *         cetree.appendChild(parent, new_element)             # <<<<<<<<<<<<<< 
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         for item in value:
 */
  appendChild(__pyx_v_parent,__pyx_v_new_element);
  goto __pyx_L2;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":507
 *         new_element.tag = tag
 *         cetree.appendChild(parent, new_element)
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):             # <<<<<<<<<<<<<< 
 *         for item in value:
 *             _appendValue(parent, tag, item)
 */
__pyx_1 = PyList_Check(__pyx_v_value);
if (!__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":507
 *         new_element.tag = tag
 *         cetree.appendChild(parent, new_element)
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):             # <<<<<<<<<<<<<< 
 *         for item in value:
 *             _appendValue(parent, tag, item)
 */
  __pyx_1 = PyTuple_Check(__pyx_v_value);
}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":508
 *         cetree.appendChild(parent, new_element)
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         for item in value:             # <<<<<<<<<<<<<< 
 *             _appendValue(parent, tag, item)
 *     else:
 */
  if (PyList_CheckExact(__pyx_v_value)) { __pyx_3 = 0; __pyx_2 = __pyx_v_value; Py_INCREF(__pyx_2); }
  else { __pyx_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; goto __pyx_L1;} }
  for (;;) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":508
 *         cetree.appendChild(parent, new_element)
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         for item in value:             # <<<<<<<<<<<<<< 
 *             _appendValue(parent, tag, item)
 *     else:
 */
    if (PyList_CheckExact(__pyx_2)) { if (__pyx_3 >= PyList_GET_SIZE(__pyx_2)) break; __pyx_4 = PyList_GET_ITEM(__pyx_2, __pyx_3++); Py_INCREF(__pyx_4); }
    else {
      __pyx_4 = PyIter_Next(__pyx_2);
      if (!__pyx_4) {
        break;
      }
    }
    Py_DECREF(__pyx_v_item);
    __pyx_v_item = __pyx_4;
    __pyx_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":509
 *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
 *         for item in value:
 *             _appendValue(parent, tag, item)             # <<<<<<<<<<<<<< 
 *     else:
 *         new_element = cetree.makeSubElement(
 */
    __pyx_4 = __pyx_f_4lxml_9objectify__appendValue(__pyx_v_parent,__pyx_v_tag,__pyx_v_item); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
  }
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":512
 *     else:
 *         new_element = cetree.makeSubElement(
 *             parent, tag, None, None, None, None)             # <<<<<<<<<<<<<< 
 *         _setElementValue(new_element, value)
 * 
 */
  __pyx_4 = ((PyObject *)makeSubElement(__pyx_v_parent,__pyx_v_tag,Py_None,Py_None,Py_None,Py_None)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;}
  Py_DECREF(((PyObject *)__pyx_v_new_element));
  __pyx_v_new_element = ((struct LxmlElement *)__pyx_4);
  __pyx_4 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":513
 *         new_element = cetree.makeSubElement(
 *             parent, tag, None, None, None, None)
 *         _setElementValue(new_element, value)             # <<<<<<<<<<<<<< 
 * 
 * cdef _setElementValue(_Element element, value):
 */
  __pyx_2 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element,__pyx_v_value); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("lxml.objectify._appendValue");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_new_element);
Py_DECREF(__pyx_v_item);
Py_DECREF(__pyx_v_parent);
Py_DECREF(__pyx_v_tag);
Py_DECREF(__pyx_v_value);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":515
 *         _setElementValue(new_element, value)
 * 
 * cdef _setElementValue(_Element element, value):             # <<<<<<<<<<<<<< 
 *     cdef python.PyObject* dict_result
 *     if value is None:
 */

static PyObject *__pyx_n_true;
static PyObject *__pyx_n_str;
static PyObject *__pyx_n_bool;

static PyObject *__pyx_builtin_bool;

static char __pyx_k77[] = "nil";

static  PyObject *__pyx_f_4lxml_9objectify__setElementValue(struct LxmlElement *__pyx_v_element,PyObject *__pyx_v_value) {
PyObject *__pyx_v_dict_result;
PyObject *__pyx_v_pytype_name;
PyObject *__pyx_r;
int __pyx_1;
int __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
char *__pyx_5;
char *__pyx_6;
Py_INCREF(__pyx_v_element);
Py_INCREF(__pyx_v_value);
__pyx_v_pytype_name = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":517
 * cdef _setElementValue(_Element element, value):
 *     cdef python.PyObject* dict_result
 *     if value is None:             # <<<<<<<<<<<<<< 
 *         cetree.setAttributeValue(
 *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, "true")
 */
__pyx_1 = (__pyx_v_value == Py_None);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":519
 *     if value is None:
 *         cetree.setAttributeValue(
 *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, "true")             # <<<<<<<<<<<<<< 
 *     elif isinstance(value, _Element):
 *         _replaceElement(element, value)
 */
  __pyx_2 = setAttributeValue(__pyx_v_element,__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR,__pyx_n_true); if (unlikely(__pyx_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; goto __pyx_L1;}
  goto __pyx_L2;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":520
 *         cetree.setAttributeValue(
 *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, "true")
 *     elif isinstance(value, _Element):             # <<<<<<<<<<<<<< 
 *         _replaceElement(element, value)
 *     else:
 */
__pyx_1 = PyObject_IsInstance(__pyx_v_value,((PyObject*)__pyx_ptype_11etreepublic__Element)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":521
 *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, "true")
 *     elif isinstance(value, _Element):
 *         _replaceElement(element, value)             # <<<<<<<<<<<<<< 
 *     else:
 *         cetree.delAttributeFromNsName(
 */
  __pyx_3 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element,__pyx_v_value); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":524
 *     else:
 *         cetree.delAttributeFromNsName(
 *             element._c_node, _XML_SCHEMA_INSTANCE_NS, "nil")             # <<<<<<<<<<<<<< 
 *         if python._isString(value):
 *             pytype_name = "str"
 */
  delAttributeFromNsName(__pyx_v_element->_c_node,__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS,__pyx_k77);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":525
 *         cetree.delAttributeFromNsName(
 *             element._c_node, _XML_SCHEMA_INSTANCE_NS, "nil")
 *         if python._isString(value):             # <<<<<<<<<<<<<< 
 *             pytype_name = "str"
 *         else:
 */
  __pyx_2 = _isString(__pyx_v_value);
  if (__pyx_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":526
 *             element._c_node, _XML_SCHEMA_INSTANCE_NS, "nil")
 *         if python._isString(value):
 *             pytype_name = "str"             # <<<<<<<<<<<<<< 
 *         else:
 *             pytype_name = _typename(value)
 */
    Py_INCREF(__pyx_n_str);
    Py_DECREF(__pyx_v_pytype_name);
    __pyx_v_pytype_name = __pyx_n_str;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":528
 *             pytype_name = "str"
 *         else:
 *             pytype_name = _typename(value)             # <<<<<<<<<<<<<< 
 *             if isinstance(value, bool):
 *                 value = _lower_bool(value)
 */
    __pyx_3 = __pyx_f_4lxml_9objectify__typename(__pyx_v_value); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; goto __pyx_L1;}
    Py_DECREF(__pyx_v_pytype_name);
    __pyx_v_pytype_name = __pyx_3;
    __pyx_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":529
 *         else:
 *             pytype_name = _typename(value)
 *             if isinstance(value, bool):             # <<<<<<<<<<<<<< 
 *                 value = _lower_bool(value)
 *             else:
 */
    __pyx_1 = PyObject_IsInstance(__pyx_v_value,__pyx_builtin_bool); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;}
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":530
 *             pytype_name = _typename(value)
 *             if isinstance(value, bool):
 *                 value = _lower_bool(value)             # <<<<<<<<<<<<<< 
 *             else:
 *                 value = str(value)
 */
      __pyx_3 = __pyx_f_4lxml_9objectify__lower_bool(__pyx_v_value); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; goto __pyx_L1;}
      Py_DECREF(__pyx_v_value);
      __pyx_v_value = __pyx_3;
      __pyx_3 = 0;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":532
 *                 value = _lower_bool(value)
 *             else:
 *                 value = str(value)             # <<<<<<<<<<<<<< 
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *         if dict_result is not NULL:
 */
      __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
      Py_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_value);
      __pyx_4 = PyObject_CallObject(((PyObject*)&PyString_Type), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_v_value);
      __pyx_v_value = __pyx_4;
      __pyx_4 = 0;
    }
    __pyx_L4:;
  }
  __pyx_L3:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":533
 *             else:
 *                 value = str(value)
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)             # <<<<<<<<<<<<<< 
 *         if dict_result is not NULL:
 *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 */
  __pyx_v_dict_result = PyDict_GetItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT,__pyx_v_pytype_name);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":534
 *                 value = str(value)
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *         if dict_result is not NULL:             # <<<<<<<<<<<<<< 
 *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 *         else:
 */
  __pyx_1 = (__pyx_v_dict_result != NULL);
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":535
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *         if dict_result is not NULL:
 *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<< 
 *         else:
 *             cetree.delAttributeFromNsName(element._c_node, PYTYPE_NAMESPACE,
 */
    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":535
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *         if dict_result is not NULL:
 *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<< 
 *         else:
 *             cetree.delAttributeFromNsName(element._c_node, PYTYPE_NAMESPACE,
 */
    __pyx_2 = setAttributeValue(__pyx_v_element,__pyx_3,__pyx_v_pytype_name); if (unlikely(__pyx_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":537
 *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 *         else:
 *             cetree.delAttributeFromNsName(element._c_node, PYTYPE_NAMESPACE,             # <<<<<<<<<<<<<< 
 *                                           PYTYPE_ATTRIBUTE_NAME)
 *     cetree.setNodeText(element._c_node, value)
 */
    __pyx_5 = PyString_AsString(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE); if (unlikely((!__pyx_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":538
 *         else:
 *             cetree.delAttributeFromNsName(element._c_node, PYTYPE_NAMESPACE,
 *                                           PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<< 
 *     cetree.setNodeText(element._c_node, value)
 * 
 */
    __pyx_6 = PyString_AsString(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME); if (unlikely((!__pyx_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;}
    delAttributeFromNsName(__pyx_v_element->_c_node,__pyx_5,__pyx_6);
  }
  __pyx_L5:;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":539
 *             cetree.delAttributeFromNsName(element._c_node, PYTYPE_NAMESPACE,
 *                                           PYTYPE_ATTRIBUTE_NAME)
 *     cetree.setNodeText(element._c_node, value)             # <<<<<<<<<<<<<< 
 * 
 * ################################################################################
 */
__pyx_2 = setNodeText(__pyx_v_element->_c_node,__pyx_v_value); if (unlikely(__pyx_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; goto __pyx_L1;}

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("lxml.objectify._setElementValue");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_pytype_name);
Py_DECREF(__pyx_v_element);
Py_DECREF(__pyx_v_value);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":549
 *     """
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<< 
 *             return textOf(self._c_node)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":550
 *     property pyval:
 *         def __get__(self):
 *             return textOf(self._c_node)             # <<<<<<<<<<<<<< 
 * 
 *     def __str__(self):
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.pyval.__get__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":552
 *             return textOf(self._c_node)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<< 
 *         return textOf(self._c_node) or ''
 * 
 */

static PyObject *__pyx_k79p;

static char __pyx_k79[] = "";

static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":553
 * 
 *     def __str__(self):
 *         return textOf(self._c_node) or ''             # <<<<<<<<<<<<<< 
 * 
 *     def __repr__(self):
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; goto __pyx_L1;}
__pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; goto __pyx_L1;}
if (!__pyx_2) {
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":553
 * 
 *     def __str__(self):
 *         return textOf(self._c_node) or ''             # <<<<<<<<<<<<<< 
 * 
 *     def __repr__(self):
 */
  __pyx_1 = __pyx_k79p;
  Py_INCREF(__pyx_1);
}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.__str__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":555
 *         return textOf(self._c_node) or ''
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<< 
 *         return textOf(self._c_node) or ''
 * 
 */

static PyObject *__pyx_k80p;

static char __pyx_k80[] = "";

static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":556
 * 
 *     def __repr__(self):
 *         return textOf(self._c_node) or ''             # <<<<<<<<<<<<<< 
 * 
 *     def _setText(self, s):
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;}
__pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;}
if (!__pyx_2) {
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":556
 * 
 *     def __repr__(self):
 *         return textOf(self._c_node) or ''             # <<<<<<<<<<<<<< 
 * 
 *     def _setText(self, s):
 */
  __pyx_1 = __pyx_k80p;
  Py_INCREF(__pyx_1);
}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.__repr__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":558
 *         return textOf(self._c_node) or ''
 * 
 *     def _setText(self, s):             # <<<<<<<<<<<<<< 
 *         """For use in subclasses only. Don't use unless you know what you are
 *         doing.
 */

static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement__setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s); /*proto*/
static char __pyx_doc_4lxml_9objectify_22ObjectifiedDataElement__setText[] = "For use in subclasses only. Don\'t use unless you know what you are\n        doing.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement__setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s) {
PyObject *__pyx_r;
int __pyx_1;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_s);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":562
 *         doing.
 *         """
 *         cetree.setNodeText(self._c_node, s)             # <<<<<<<<<<<<<< 
 * 
 * cdef class NumberElement(ObjectifiedDataElement):
 */
__pyx_1 = setNodeText(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node,__pyx_v_s); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; goto __pyx_L1;}

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement._setText");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_s);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":566
 * cdef class NumberElement(ObjectifiedDataElement):
 *     cdef object _type
 *     def _setValueParser(self, function):             # <<<<<<<<<<<<<< 
 *         "Set the function that parses the Python value from a string."
 *         self._type = function
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function); /*proto*/
static char __pyx_doc_4lxml_9objectify_13NumberElement__setValueParser[] = "Set the function that parses the Python value from a string.";
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function) {
PyObject *__pyx_r;
Py_INCREF((PyObject *)__pyx_v_self);
Py_INCREF(__pyx_v_function);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":568
 *     def _setValueParser(self, function):
 *         "Set the function that parses the Python value from a string."
 *         self._type = function             # <<<<<<<<<<<<<< 
 * 
 *     cdef _value(self):
 */
Py_INCREF(__pyx_v_function);
Py_DECREF(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_type);
((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_type = __pyx_v_function;

__pyx_r = Py_None; Py_INCREF(Py_None);
Py_DECREF((PyObject *)__pyx_v_self);
Py_DECREF(__pyx_v_function);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":570
 *         self._type = function
 * 
 *     cdef _value(self):             # <<<<<<<<<<<<<< 
 *         return self._type(textOf(self._c_node))
 * 
 */

static  PyObject *__pyx_f_4lxml_9objectify_13NumberElement__value(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":571
 * 
 *     cdef _value(self):
 *         return self._type(textOf(self._c_node))             # <<<<<<<<<<<<<< 
 * 
 *     property pyval:
 */
__pyx_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(__pyx_v_self->_type, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.NumberElement._value");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":574
 * 
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<< 
 *             return self._value()
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":575
 *     property pyval:
 *         def __get__(self):
 *             return self._value()             # <<<<<<<<<<<<<< 
 * 
 *     def __int__(self):
 */
__pyx_1 = ((struct __pyx_vtabstruct_4lxml_9objectify_NumberElement *)((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->__pyx_vtab)->_value(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.NumberElement.pyval.__get__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":577
 *             return self._value()
 * 
 *     def __int__(self):             # <<<<<<<<<<<<<< 
 *         return int(textOf(self._c_node))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___int__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___int__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":578
 * 
 *     def __int__(self):
 *         return int(textOf(self._c_node))             # <<<<<<<<<<<<<< 
 * 
 *     def __long__(self):
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(((PyObject*)&PyInt_Type), __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__int__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":580
 *         return int(textOf(self._c_node))
 * 
 *     def __long__(self):             # <<<<<<<<<<<<<< 
 *         return long(textOf(self._c_node))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___long__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___long__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":581
 * 
 *     def __long__(self):
 *         return long(textOf(self._c_node))             # <<<<<<<<<<<<<< 
 * 
 *     def __float__(self):
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(((PyObject*)&PyLong_Type), __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__long__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":583
 *         return long(textOf(self._c_node))
 * 
 *     def __float__(self):             # <<<<<<<<<<<<<< 
 *         return float(textOf(self._c_node))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___float__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___float__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":584
 * 
 *     def __float__(self):
 *         return float(textOf(self._c_node))             # <<<<<<<<<<<<<< 
 * 
 *     def __str__(self):
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(((PyObject*)&PyFloat_Type), __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__float__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":586
 *         return float(textOf(self._c_node))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<< 
 *         return str(self._type(textOf(self._c_node)))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___str__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":587
 * 
 *     def __str__(self):
 *         return str(self._type(textOf(self._c_node)))             # <<<<<<<<<<<<<< 
 * 
 *     def __repr__(self):
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_type, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(((PyObject*)&PyString_Type), __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__str__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":589
 *         return str(self._type(textOf(self._c_node)))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<< 
 *         return repr(self._type(textOf(self._c_node)))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___repr__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":590
 * 
 *     def __repr__(self):
 *         return repr(self._type(textOf(self._c_node)))             # <<<<<<<<<<<<<< 
 * 
 * #    def __oct__(self):
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_type, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_2 = PyObject_Repr(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__repr__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":595
 * #    def __hex__(self):
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<< 
 *         if hasattr(other, 'pyval'):
 *             other = other.pyval
 */


static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":596
 * 
 *     def __richcmp__(self, other, int op):
 *         if hasattr(other, 'pyval'):             # <<<<<<<<<<<<<< 
 *             other = other.pyval
 *         return python.PyObject_RichCompare(
 */
__pyx_1 = PyObject_HasAttr(__pyx_v_other,__pyx_n_pyval); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":597
 *     def __richcmp__(self, other, int op):
 *         if hasattr(other, 'pyval'):
 *             other = other.pyval             # <<<<<<<<<<<<<< 
 *         return python.PyObject_RichCompare(
 *             _numericValueOf(self), other, op)
 */
  __pyx_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_pyval); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; goto __pyx_L1;}
  Py_DECREF(__pyx_v_other);
  __pyx_v_other = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":599
 *             other = other.pyval
 *         return python.PyObject_RichCompare(
 *             _numericValueOf(self), other, op)             # <<<<<<<<<<<<<< 
 * 
 *     def __add__(self, other):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":599
 *             other = other.pyval
 *         return python.PyObject_RichCompare(
 *             _numericValueOf(self), other, op)             # <<<<<<<<<<<<<< 
 * 
 *     def __add__(self, other):
 */
__pyx_3 = PyObject_RichCompare(__pyx_2,__pyx_v_other,__pyx_v_op); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__richcmp__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":601
 *             _numericValueOf(self), other, op)
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<< 
 *         return _numericValueOf(self) + _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":602
 * 
 *     def __add__(self, other):
 *         return _numericValueOf(self) + _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __sub__(self, other):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":602
 * 
 *     def __add__(self, other):
 *         return _numericValueOf(self) + _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __sub__(self, other):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; goto __pyx_L1;}
__pyx_3 = PyNumber_Add(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__add__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":604
 *         return _numericValueOf(self) + _numericValueOf(other)
 * 
 *     def __sub__(self, other):             # <<<<<<<<<<<<<< 
 *         return _numericValueOf(self) - _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":605
 * 
 *     def __sub__(self, other):
 *         return _numericValueOf(self) - _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __mul__(self, other):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":605
 * 
 *     def __sub__(self, other):
 *         return _numericValueOf(self) - _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __mul__(self, other):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; goto __pyx_L1;}
__pyx_3 = PyNumber_Subtract(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__sub__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":607
 *         return _numericValueOf(self) - _numericValueOf(other)
 * 
 *     def __mul__(self, other):             # <<<<<<<<<<<<<< 
 *         return _numericValueOf(self) * _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":608
 * 
 *     def __mul__(self, other):
 *         return _numericValueOf(self) * _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __div__(self, other):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":608
 * 
 *     def __mul__(self, other):
 *         return _numericValueOf(self) * _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __div__(self, other):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; goto __pyx_L1;}
__pyx_3 = PyNumber_Multiply(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__mul__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":610
 *         return _numericValueOf(self) * _numericValueOf(other)
 * 
 *     def __div__(self, other):             # <<<<<<<<<<<<<< 
 *         return _numericValueOf(self) / _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":611
 * 
 *     def __div__(self, other):
 *         return _numericValueOf(self) / _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __truediv__(self, other):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":611
 * 
 *     def __div__(self, other):
 *         return _numericValueOf(self) / _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __truediv__(self, other):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; goto __pyx_L1;}
__pyx_3 = PyNumber_Divide(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__div__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":613
 *         return _numericValueOf(self) / _numericValueOf(other)
 * 
 *     def __truediv__(self, other):             # <<<<<<<<<<<<<< 
 *         return _numericValueOf(self) / _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":614
 * 
 *     def __truediv__(self, other):
 *         return _numericValueOf(self) / _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __mod__(self, other):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":614
 * 
 *     def __truediv__(self, other):
 *         return _numericValueOf(self) / _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __mod__(self, other):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; goto __pyx_L1;}
__pyx_3 = PyNumber_Divide(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__truediv__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":616
 *         return _numericValueOf(self) / _numericValueOf(other)
 * 
 *     def __mod__(self, other):             # <<<<<<<<<<<<<< 
 *         return _numericValueOf(self) % _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":617
 * 
 *     def __mod__(self, other):
 *         return _numericValueOf(self) % _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __pow__(self, other, modulo):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":617
 * 
 *     def __mod__(self, other):
 *         return _numericValueOf(self) % _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __pow__(self, other, modulo):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; goto __pyx_L1;}
__pyx_3 = PyNumber_Remainder(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__mod__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":619
 *         return _numericValueOf(self) % _numericValueOf(other)
 * 
 *     def __pow__(self, other, modulo):             # <<<<<<<<<<<<<< 
 *         if modulo is None:
 *             return _numericValueOf(self) ** _numericValueOf(other)
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) {
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);
Py_INCREF(__pyx_v_modulo);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":620
 * 
 *     def __pow__(self, other, modulo):
 *         if modulo is None:             # <<<<<<<<<<<<<< 
 *             return _numericValueOf(self) ** _numericValueOf(other)
 *         else:
 */
__pyx_1 = (__pyx_v_modulo == Py_None);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":621
 *     def __pow__(self, other, modulo):
 *         if modulo is None:
 *             return _numericValueOf(self) ** _numericValueOf(other)             # <<<<<<<<<<<<<< 
 *         else:
 *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
 */
  __pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":621
 *     def __pow__(self, other, modulo):
 *         if modulo is None:
 *             return _numericValueOf(self) ** _numericValueOf(other)             # <<<<<<<<<<<<<< 
 *         else:
 *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
 */
  __pyx_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; goto __pyx_L1;}
  __pyx_4 = PyNumber_Power(__pyx_2, __pyx_3, Py_None); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_r = __pyx_4;
  __pyx_4 = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":623
 *             return _numericValueOf(self) ** _numericValueOf(other)
 *         else:
 *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)             # <<<<<<<<<<<<<< 
 * 
 *     def __neg__(self):
 */
  __pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":623
 *             return _numericValueOf(self) ** _numericValueOf(other)
 *         else:
 *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)             # <<<<<<<<<<<<<< 
 * 
 *     def __neg__(self):
 */
  __pyx_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":623
 *             return _numericValueOf(self) ** _numericValueOf(other)
 *         else:
 *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)             # <<<<<<<<<<<<<< 
 * 
 *     def __neg__(self):
 */
  __pyx_4 = PyNumber_Power(__pyx_2,__pyx_3,__pyx_v_modulo); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_r = __pyx_4;
  __pyx_4 = 0;
  goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__pow__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
Py_DECREF(__pyx_v_modulo);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":625
 *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
 * 
 *     def __neg__(self):             # <<<<<<<<<<<<<< 
 *         return - _numericValueOf(self)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___neg__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___neg__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":626
 * 
 *     def __neg__(self):
 *         return - _numericValueOf(self)             # <<<<<<<<<<<<<< 
 * 
 *     def __pos__(self):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; goto __pyx_L1;}
__pyx_2 = PyNumber_Negative(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__neg__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":628
 *         return - _numericValueOf(self)
 * 
 *     def __pos__(self):             # <<<<<<<<<<<<<< 
 *         return + _numericValueOf(self)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pos__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pos__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":629
 * 
 *     def __pos__(self):
 *         return + _numericValueOf(self)             # <<<<<<<<<<<<<< 
 * 
 *     def __abs__(self):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; goto __pyx_L1;}
__pyx_2 = PyNumber_Positive(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__pos__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":631
 *         return + _numericValueOf(self)
 * 
 *     def __abs__(self):             # <<<<<<<<<<<<<< 
 *         return abs( _numericValueOf(self) )
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___abs__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___abs__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":632
 * 
 *     def __abs__(self):
 *         return abs( _numericValueOf(self) )             # <<<<<<<<<<<<<< 
 * 
 *     def __nonzero__(self):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; goto __pyx_L1;}
__pyx_2 = PyNumber_Absolute(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__abs__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":634
 *         return abs( _numericValueOf(self) )
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<< 
 *         return _numericValueOf(self) != 0
 * 
 */

static int __pyx_pf_4lxml_9objectify_13NumberElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_4lxml_9objectify_13NumberElement___nonzero__(PyObject *__pyx_v_self) {
int __pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
int __pyx_3;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":635
 * 
 *     def __nonzero__(self):
 *         return _numericValueOf(self) != 0             # <<<<<<<<<<<<<< 
 * 
 *     def __invert__(self):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":635
 * 
 *     def __nonzero__(self):
 *         return _numericValueOf(self) != 0             # <<<<<<<<<<<<<< 
 * 
 *     def __invert__(self):
 */
__pyx_2 = PyObject_RichCompare(__pyx_1, __pyx_num_0, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_3 = PyInt_AsLong(__pyx_2); if (unlikely((__pyx_3 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
goto __pyx_L0;

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__nonzero__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":637
 *         return _numericValueOf(self) != 0
 * 
 *     def __invert__(self):             # <<<<<<<<<<<<<< 
 *         return ~ _numericValueOf(self)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___invert__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___invert__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":638
 * 
 *     def __invert__(self):
 *         return ~ _numericValueOf(self)             # <<<<<<<<<<<<<< 
 * 
 *     def __lshift__(self, other):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;}
__pyx_2 = PyNumber_Invert(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__invert__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":640
 *         return ~ _numericValueOf(self)
 * 
 *     def __lshift__(self, other):             # <<<<<<<<<<<<<< 
 *         return _numericValueOf(self) << _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":641
 * 
 *     def __lshift__(self, other):
 *         return _numericValueOf(self) << _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __rshift__(self, other):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":641
 * 
 *     def __lshift__(self, other):
 *         return _numericValueOf(self) << _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __rshift__(self, other):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; goto __pyx_L1;}
__pyx_3 = PyNumber_Lshift(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__lshift__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":643
 *         return _numericValueOf(self) << _numericValueOf(other)
 * 
 *     def __rshift__(self, other):             # <<<<<<<<<<<<<< 
 *         return _numericValueOf(self) >> _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":644
 * 
 *     def __rshift__(self, other):
 *         return _numericValueOf(self) >> _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __and__(self, other):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":644
 * 
 *     def __rshift__(self, other):
 *         return _numericValueOf(self) >> _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __and__(self, other):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
__pyx_3 = PyNumber_Rshift(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__rshift__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":646
 *         return _numericValueOf(self) >> _numericValueOf(other)
 * 
 *     def __and__(self, other):             # <<<<<<<<<<<<<< 
 *         return _numericValueOf(self) & _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":647
 * 
 *     def __and__(self, other):
 *         return _numericValueOf(self) & _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __or__(self, other):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":647
 * 
 *     def __and__(self, other):
 *         return _numericValueOf(self) & _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __or__(self, other):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;}
__pyx_3 = PyNumber_And(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__and__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":649
 *         return _numericValueOf(self) & _numericValueOf(other)
 * 
 *     def __or__(self, other):             # <<<<<<<<<<<<<< 
 *         return _numericValueOf(self) | _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":650
 * 
 *     def __or__(self, other):
 *         return _numericValueOf(self) | _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __xor__(self, other):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":650
 * 
 *     def __or__(self, other):
 *         return _numericValueOf(self) | _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 *     def __xor__(self, other):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; goto __pyx_L1;}
__pyx_3 = PyNumber_Or(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__or__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":652
 *         return _numericValueOf(self) | _numericValueOf(other)
 * 
 *     def __xor__(self, other):             # <<<<<<<<<<<<<< 
 *         return _numericValueOf(self) ^ _numericValueOf(other)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":653
 * 
 *     def __xor__(self, other):
 *         return _numericValueOf(self) ^ _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 * cdef class IntElement(NumberElement):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":653
 * 
 *     def __xor__(self, other):
 *         return _numericValueOf(self) ^ _numericValueOf(other)             # <<<<<<<<<<<<<< 
 * 
 * cdef class IntElement(NumberElement):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; goto __pyx_L1;}
__pyx_3 = PyNumber_Xor(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.NumberElement.__xor__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":656
 * 
 * cdef class IntElement(NumberElement):
 *     def _init(self):             # <<<<<<<<<<<<<< 
 *         self._type = int
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(PyObject *__pyx_v_self, PyObject *unused) {
PyObject *__pyx_r;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":657
 * cdef class IntElement(NumberElement):
 *     def _init(self):
 *         self._type = int             # <<<<<<<<<<<<<< 
 * 
 * cdef class LongElement(NumberElement):
 */
Py_INCREF(((PyObject*)&PyInt_Type));
Py_DECREF(((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self)->__pyx_base._type);
((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self)->__pyx_base._type = ((PyObject*)&PyInt_Type);

__pyx_r = Py_None; Py_INCREF(Py_None);
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":660
 * 
 * cdef class LongElement(NumberElement):
 *     def _init(self):             # <<<<<<<<<<<<<< 
 *         self._type = long
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(PyObject *__pyx_v_self, PyObject *unused) {
PyObject *__pyx_r;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":661
 * cdef class LongElement(NumberElement):
 *     def _init(self):
 *         self._type = long             # <<<<<<<<<<<<<< 
 * 
 * cdef class FloatElement(NumberElement):
 */
Py_INCREF(((PyObject*)&PyLong_Type));
Py_DECREF(((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self)->__pyx_base._type);
((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self)->__pyx_base._type = ((PyObject*)&PyLong_Type);

__pyx_r = Py_None; Py_INCREF(Py_None);
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":664
 * 
 * cdef class FloatElement(NumberElement):
 *     def _init(self):             # <<<<<<<<<<<<<< 
 *         self._type = float
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(PyObject *__pyx_v_self, PyObject *unused) {
PyObject *__pyx_r;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":665
 * cdef class FloatElement(NumberElement):
 *     def _init(self):
 *         self._type = float             # <<<<<<<<<<<<<< 
 * 
 * cdef class StringElement(ObjectifiedDataElement):
 */
Py_INCREF(((PyObject*)&PyFloat_Type));
Py_DECREF(((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self)->__pyx_base._type);
((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self)->__pyx_base._type = ((PyObject*)&PyFloat_Type);

__pyx_r = Py_None; Py_INCREF(Py_None);
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":675
 *     """
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<< 
 *             return textOf(self._c_node) or ''
 * 
 */

static PyObject *__pyx_k82p;

static char __pyx_k82[] = "";

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":676
 *     property pyval:
 *         def __get__(self):
 *             return textOf(self._c_node) or ''             # <<<<<<<<<<<<<< 
 * 
 *     def __repr__(self):
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; goto __pyx_L1;}
__pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; goto __pyx_L1;}
if (!__pyx_2) {
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":676
 *     property pyval:
 *         def __get__(self):
 *             return textOf(self._c_node) or ''             # <<<<<<<<<<<<<< 
 * 
 *     def __repr__(self):
 */
  __pyx_1 = __pyx_k82p;
  Py_INCREF(__pyx_1);
}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.StringElement.pyval.__get__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":678
 *             return textOf(self._c_node) or ''
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<< 
 *         return repr(textOf(self._c_node) or '')
 * 
 */

static PyObject *__pyx_k83p;

static char __pyx_k83[] = "";

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
PyObject *__pyx_3 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":679
 * 
 *     def __repr__(self):
 *         return repr(textOf(self._c_node) or '')             # <<<<<<<<<<<<<< 
 * 
 *     def strlen(self):
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; goto __pyx_L1;}
__pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; goto __pyx_L1;}
if (!__pyx_2) {
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":679
 * 
 *     def __repr__(self):
 *         return repr(textOf(self._c_node) or '')             # <<<<<<<<<<<<<< 
 * 
 *     def strlen(self):
 */
  __pyx_1 = __pyx_k83p;
  Py_INCREF(__pyx_1);
}
__pyx_3 = PyObject_Repr(__pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.StringElement.__repr__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":681
 *         return repr(textOf(self._c_node) or '')
 * 
 *     def strlen(self):             # <<<<<<<<<<<<<< 
 *         text = textOf(self._c_node)
 *         if text is None:
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_strlen(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_strlen(PyObject *__pyx_v_self, PyObject *unused) {
PyObject *__pyx_v_text;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
Py_ssize_t __pyx_3;
Py_INCREF((PyObject *)__pyx_v_self);
__pyx_v_text = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":682
 * 
 *     def strlen(self):
 *         text = textOf(self._c_node)             # <<<<<<<<<<<<<< 
 *         if text is None:
 *             return 0
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; goto __pyx_L1;}
Py_DECREF(__pyx_v_text);
__pyx_v_text = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":683
 *     def strlen(self):
 *         text = textOf(self._c_node)
 *         if text is None:             # <<<<<<<<<<<<<< 
 *             return 0
 *         else:
 */
__pyx_2 = (__pyx_v_text == Py_None);
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":684
 *         text = textOf(self._c_node)
 *         if text is None:
 *             return 0             # <<<<<<<<<<<<<< 
 *         else:
 *             return len(text)
 */
  Py_INCREF(__pyx_num_0);
  __pyx_r = __pyx_num_0;
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":686
 *             return 0
 *         else:
 *             return len(text)             # <<<<<<<<<<<<<< 
 * 
 *     def __nonzero__(self):
 */
  __pyx_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; goto __pyx_L1;}
  __pyx_1 = PyInt_FromSsize_t(__pyx_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.StringElement.strlen");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_text);
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":688
 *             return len(text)
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<< 
 *         text = textOf(self._c_node)
 *         if text is None:
 */

static int __pyx_pf_4lxml_9objectify_13StringElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_4lxml_9objectify_13StringElement___nonzero__(PyObject *__pyx_v_self) {
PyObject *__pyx_v_text;
int __pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
int __pyx_3;
Py_ssize_t __pyx_4;
Py_INCREF((PyObject *)__pyx_v_self);
__pyx_v_text = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":689
 * 
 *     def __nonzero__(self):
 *         text = textOf(self._c_node)             # <<<<<<<<<<<<<< 
 *         if text is None:
 *             return False
 */
__pyx_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; goto __pyx_L1;}
Py_DECREF(__pyx_v_text);
__pyx_v_text = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":690
 *     def __nonzero__(self):
 *         text = textOf(self._c_node)
 *         if text is None:             # <<<<<<<<<<<<<< 
 *             return False
 *         return len(text) > 0
 */
__pyx_2 = (__pyx_v_text == Py_None);
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":691
 *         text = textOf(self._c_node)
 *         if text is None:
 *             return False             # <<<<<<<<<<<<<< 
 *         return len(text) > 0
 * 
 */
  __pyx_3 = PyInt_AsLong(Py_False); if (unlikely((__pyx_3 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; goto __pyx_L1;}
  __pyx_r = __pyx_3;
  goto __pyx_L0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":692
 *         if text is None:
 *             return False
 *         return len(text) > 0             # <<<<<<<<<<<<<< 
 * 
 *     def __richcmp__(self, other, int op):
 */
__pyx_4 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":692
 *         if text is None:
 *             return False
 *         return len(text) > 0             # <<<<<<<<<<<<<< 
 * 
 *     def __richcmp__(self, other, int op):
 */
__pyx_r = (__pyx_4 > 0);
goto __pyx_L0;

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.StringElement.__nonzero__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_text);
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":694
 *         return len(text) > 0
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<< 
 *         if hasattr(other, 'pyval'):
 *             other = other.pyval
 */


static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":695
 * 
 *     def __richcmp__(self, other, int op):
 *         if hasattr(other, 'pyval'):             # <<<<<<<<<<<<<< 
 *             other = other.pyval
 *         return python.PyObject_RichCompare(
 */
__pyx_1 = PyObject_HasAttr(__pyx_v_other,__pyx_n_pyval); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":696
 *     def __richcmp__(self, other, int op):
 *         if hasattr(other, 'pyval'):
 *             other = other.pyval             # <<<<<<<<<<<<<< 
 *         return python.PyObject_RichCompare(
 *             _strValueOf(self), other, op)
 */
  __pyx_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_pyval); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; goto __pyx_L1;}
  Py_DECREF(__pyx_v_other);
  __pyx_v_other = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":698
 *             other = other.pyval
 *         return python.PyObject_RichCompare(
 *             _strValueOf(self), other, op)             # <<<<<<<<<<<<<< 
 * 
 *     def __add__(self, other):
 */
__pyx_2 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":698
 *             other = other.pyval
 *         return python.PyObject_RichCompare(
 *             _strValueOf(self), other, op)             # <<<<<<<<<<<<<< 
 * 
 *     def __add__(self, other):
 */
__pyx_3 = PyObject_RichCompare(__pyx_2,__pyx_v_other,__pyx_v_op); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.StringElement.__richcmp__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":700
 *             _strValueOf(self), other, op)
 * 
 *     def __add__(self, other):             # <<<<<<<<<<<<<< 
 *         text  = _strValueOf(self)
 *         other = _strValueOf(other)
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_v_text;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);
__pyx_v_text = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":701
 * 
 *     def __add__(self, other):
 *         text  = _strValueOf(self)             # <<<<<<<<<<<<<< 
 *         other = _strValueOf(other)
 *         if text is None:
 */
__pyx_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; goto __pyx_L1;}
Py_DECREF(__pyx_v_text);
__pyx_v_text = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":702
 *     def __add__(self, other):
 *         text  = _strValueOf(self)
 *         other = _strValueOf(other)             # <<<<<<<<<<<<<< 
 *         if text is None:
 *             return other
 */
__pyx_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_other); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; goto __pyx_L1;}
Py_DECREF(__pyx_v_other);
__pyx_v_other = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":703
 *         text  = _strValueOf(self)
 *         other = _strValueOf(other)
 *         if text is None:             # <<<<<<<<<<<<<< 
 *             return other
 *         if other is None:
 */
__pyx_2 = (__pyx_v_text == Py_None);
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":704
 *         other = _strValueOf(other)
 *         if text is None:
 *             return other             # <<<<<<<<<<<<<< 
 *         if other is None:
 *             return text
 */
  Py_INCREF(__pyx_v_other);
  __pyx_r = __pyx_v_other;
  goto __pyx_L0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":705
 *         if text is None:
 *             return other
 *         if other is None:             # <<<<<<<<<<<<<< 
 *             return text
 *         return text + other
 */
__pyx_2 = (__pyx_v_other == Py_None);
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":706
 *             return other
 *         if other is None:
 *             return text             # <<<<<<<<<<<<<< 
 *         return text + other
 * 
 */
  Py_INCREF(__pyx_v_text);
  __pyx_r = __pyx_v_text;
  goto __pyx_L0;
  goto __pyx_L3;
}
__pyx_L3:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":707
 *         if other is None:
 *             return text
 *         return text + other             # <<<<<<<<<<<<<< 
 * 
 *     def __mul__(self, other):
 */
__pyx_1 = PyNumber_Add(__pyx_v_text, __pyx_v_other); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.StringElement.__add__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_text);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":709
 *         return text + other
 * 
 *     def __mul__(self, other):             # <<<<<<<<<<<<<< 
 *         if isinstance(self, StringElement):
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
 */

static PyObject *__pyx_k85p;

static char __pyx_k85[] = "invalid types for * operator";

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":710
 * 
 *     def __mul__(self, other):
 *         if isinstance(self, StringElement):             # <<<<<<<<<<<<<< 
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
 *         elif isinstance(other, StringElement):
 */
__pyx_1 = PyObject_IsInstance(__pyx_v_self,((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":711
 *     def __mul__(self, other):
 *         if isinstance(self, StringElement):
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)             # <<<<<<<<<<<<<< 
 *         elif isinstance(other, StringElement):
 *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
 */
  __pyx_2 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":711
 *     def __mul__(self, other):
 *         if isinstance(self, StringElement):
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)             # <<<<<<<<<<<<<< 
 *         elif isinstance(other, StringElement):
 *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
 */
  __pyx_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;}
  __pyx_4 = PyNumber_Multiply(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_r = __pyx_4;
  __pyx_4 = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":712
 *         if isinstance(self, StringElement):
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
 *         elif isinstance(other, StringElement):             # <<<<<<<<<<<<<< 
 *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
 *         else:
 */
__pyx_1 = PyObject_IsInstance(__pyx_v_other,((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":713
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
 *         elif isinstance(other, StringElement):
 *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)             # <<<<<<<<<<<<<< 
 *         else:
 *             raise TypeError, "invalid types for * operator"
 */
  __pyx_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":713
 *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
 *         elif isinstance(other, StringElement):
 *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)             # <<<<<<<<<<<<<< 
 *         else:
 *             raise TypeError, "invalid types for * operator"
 */
  __pyx_3 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_other)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; goto __pyx_L1;}
  __pyx_4 = PyNumber_Multiply(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_r = __pyx_4;
  __pyx_4 = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":715
 *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
 *         else:
 *             raise TypeError, "invalid types for * operator"             # <<<<<<<<<<<<<< 
 * 
 *     def __mod__(self, other):
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_k85p, 0);
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; goto __pyx_L1;}
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("lxml.objectify.StringElement.__mul__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":717
 *             raise TypeError, "invalid types for * operator"
 * 
 *     def __mod__(self, other):             # <<<<<<<<<<<<<< 
 *         return _strValueOf(self) % other
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":718
 * 
 *     def __mod__(self, other):
 *         return _strValueOf(self) % other             # <<<<<<<<<<<<<< 
 * 
 * cdef class NoneElement(ObjectifiedDataElement):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":718
 * 
 *     def __mod__(self, other):
 *         return _strValueOf(self) % other             # <<<<<<<<<<<<<< 
 * 
 * cdef class NoneElement(ObjectifiedDataElement):
 */
__pyx_2 = PyNumber_Remainder(__pyx_1, __pyx_v_other); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.StringElement.__mod__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":721
 * 
 * cdef class NoneElement(ObjectifiedDataElement):
 *     def __str__(self):             # <<<<<<<<<<<<<< 
 *         return "None"
 * 
 */

static PyObject *__pyx_n_None;


static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":722
 * cdef class NoneElement(ObjectifiedDataElement):
 *     def __str__(self):
 *         return "None"             # <<<<<<<<<<<<<< 
 * 
 *     def __repr__(self):
 */
Py_INCREF(__pyx_n_None);
__pyx_r = __pyx_n_None;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":724
 *         return "None"
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<< 
 *         return "None"
 * 
 */


static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___repr__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":725
 * 
 *     def __repr__(self):
 *         return "None"             # <<<<<<<<<<<<<< 
 * 
 *     def __nonzero__(self):
 */
Py_INCREF(__pyx_n_None);
__pyx_r = __pyx_n_None;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":727
 *         return "None"
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<< 
 *         return False
 * 
 */

static int __pyx_pf_4lxml_9objectify_11NoneElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_4lxml_9objectify_11NoneElement___nonzero__(PyObject *__pyx_v_self) {
int __pyx_r;
int __pyx_1;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":728
 * 
 *     def __nonzero__(self):
 *         return False             # <<<<<<<<<<<<<< 
 * 
 *     def __richcmp__(self, other, int op):
 */
__pyx_1 = PyInt_AsLong(Py_False); if (unlikely((__pyx_1 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; goto __pyx_L1;}
__pyx_r = __pyx_1;
goto __pyx_L0;

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("lxml.objectify.NoneElement.__nonzero__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":730
 *         return False
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<< 
 *         if other is None or self is None:
 *             return python.PyObject_RichCompare(None, None, op)
 */

static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":731
 * 
 *     def __richcmp__(self, other, int op):
 *         if other is None or self is None:             # <<<<<<<<<<<<<< 
 *             return python.PyObject_RichCompare(None, None, op)
 *         if isinstance(self, NoneElement):
 */
__pyx_1 = (__pyx_v_other == Py_None);
if (!__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":731
 * 
 *     def __richcmp__(self, other, int op):
 *         if other is None or self is None:             # <<<<<<<<<<<<<< 
 *             return python.PyObject_RichCompare(None, None, op)
 *         if isinstance(self, NoneElement):
 */
  __pyx_1 = (__pyx_v_self == Py_None);
}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":732
 *     def __richcmp__(self, other, int op):
 *         if other is None or self is None:
 *             return python.PyObject_RichCompare(None, None, op)             # <<<<<<<<<<<<<< 
 *         if isinstance(self, NoneElement):
 *             return python.PyObject_RichCompare(None, other, op)
 */
  __pyx_2 = PyObject_RichCompare(Py_None,Py_None,__pyx_v_op); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":733
 *         if other is None or self is None:
 *             return python.PyObject_RichCompare(None, None, op)
 *         if isinstance(self, NoneElement):             # <<<<<<<<<<<<<< 
 *             return python.PyObject_RichCompare(None, other, op)
 *         else:
 */
__pyx_1 = PyObject_IsInstance(__pyx_v_self,((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":734
 *             return python.PyObject_RichCompare(None, None, op)
 *         if isinstance(self, NoneElement):
 *             return python.PyObject_RichCompare(None, other, op)             # <<<<<<<<<<<<<< 
 *         else:
 *             return python.PyObject_RichCompare(self, None, op)
 */
  __pyx_2 = PyObject_RichCompare(Py_None,__pyx_v_other,__pyx_v_op); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;
  goto __pyx_L3;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":736
 *             return python.PyObject_RichCompare(None, other, op)
 *         else:
 *             return python.PyObject_RichCompare(self, None, op)             # <<<<<<<<<<<<<< 
 * 
 *     property pyval:
 */
  __pyx_2 = PyObject_RichCompare(__pyx_v_self,Py_None,__pyx_v_op); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;
}
__pyx_L3:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.NoneElement.__richcmp__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":739
 * 
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<< 
 *             return None
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":740
 *     property pyval:
 *         def __get__(self):
 *             return None             # <<<<<<<<<<<<<< 
 * 
 * cdef class BoolElement(ObjectifiedDataElement):
 */
Py_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":745
 *     """Boolean type base on string values: 'true' or 'false'.
 *     """
 *     cdef int _boolval(self) except -1:             # <<<<<<<<<<<<<< 
 *         cdef char* c_str
 *         text = textOf(self._c_node)
 */

static PyObject *__pyx_n_false;
static PyObject *__pyx_n_lower;

static PyObject *__pyx_k92p;

static char __pyx_k92[] = "Invalid boolean value: '%s'";

static  int __pyx_f_4lxml_9objectify_11BoolElement__boolval(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
char *__pyx_v_c_str;
PyObject *__pyx_v_text;
int __pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
Py_INCREF((PyObject *)__pyx_v_self);
__pyx_v_text = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":747
 *     cdef int _boolval(self) except -1:
 *         cdef char* c_str
 *         text = textOf(self._c_node)             # <<<<<<<<<<<<<< 
 *         if text is None:
 *             return 0
 */
__pyx_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; goto __pyx_L1;}
Py_DECREF(__pyx_v_text);
__pyx_v_text = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":748
 *         cdef char* c_str
 *         text = textOf(self._c_node)
 *         if text is None:             # <<<<<<<<<<<<<< 
 *             return 0
 *         c_str = _cstr(text)
 */
__pyx_2 = (__pyx_v_text == Py_None);
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":749
 *         text = textOf(self._c_node)
 *         if text is None:
 *             return 0             # <<<<<<<<<<<<<< 
 *         c_str = _cstr(text)
 *         if c_str[0] == c'0' or c_str[0] == c'f' or c_str[0] == c'F':
 */
  __pyx_r = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":750
 *         if text is None:
 *             return 0
 *         c_str = _cstr(text)             # <<<<<<<<<<<<<< 
 *         if c_str[0] == c'0' or c_str[0] == c'f' or c_str[0] == c'F':
 *             if c_str[1] == c'\0' or text == "false" or text.lower() == "false":
 */
__pyx_v_c_str = _cstr(__pyx_v_text);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":751
 *             return 0
 *         c_str = _cstr(text)
 *         if c_str[0] == c'0' or c_str[0] == c'f' or c_str[0] == c'F':             # <<<<<<<<<<<<<< 
 *             if c_str[1] == c'\0' or text == "false" or text.lower() == "false":
 *                 # '0' or 'f' or 'false'
 */
__pyx_2 = ((__pyx_v_c_str[0]) == '0');
if (!__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":751
 *             return 0
 *         c_str = _cstr(text)
 *         if c_str[0] == c'0' or c_str[0] == c'f' or c_str[0] == c'F':             # <<<<<<<<<<<<<< 
 *             if c_str[1] == c'\0' or text == "false" or text.lower() == "false":
 *                 # '0' or 'f' or 'false'
 */
  __pyx_2 = ((__pyx_v_c_str[0]) == 'f');
  if (!__pyx_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":751
 *             return 0
 *         c_str = _cstr(text)
 *         if c_str[0] == c'0' or c_str[0] == c'f' or c_str[0] == c'F':             # <<<<<<<<<<<<<< 
 *             if c_str[1] == c'\0' or text == "false" or text.lower() == "false":
 *                 # '0' or 'f' or 'false'
 */
    __pyx_2 = ((__pyx_v_c_str[0]) == 'F');
  }
}
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":752
 *         c_str = _cstr(text)
 *         if c_str[0] == c'0' or c_str[0] == c'f' or c_str[0] == c'F':
 *             if c_str[1] == c'\0' or text == "false" or text.lower() == "false":             # <<<<<<<<<<<<<< 
 *                 # '0' or 'f' or 'false'
 *                 return 0
 */
  __pyx_1 = __Pyx_PyBool_FromLong(((__pyx_v_c_str[1]) == '\0')); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;}
  __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;}
  if (!__pyx_2) {
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":752
 *         c_str = _cstr(text)
 *         if c_str[0] == c'0' or c_str[0] == c'f' or c_str[0] == c'F':
 *             if c_str[1] == c'\0' or text == "false" or text.lower() == "false":             # <<<<<<<<<<<<<< 
 *                 # '0' or 'f' or 'false'
 *                 return 0
 */
    __pyx_1 = PyObject_RichCompare(__pyx_v_text, __pyx_n_false, Py_EQ); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;}
    __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;}
    if (!__pyx_2) {
      Py_DECREF(__pyx_1); __pyx_1 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":752
 *         c_str = _cstr(text)
 *         if c_str[0] == c'0' or c_str[0] == c'f' or c_str[0] == c'F':
 *             if c_str[1] == c'\0' or text == "false" or text.lower() == "false":             # <<<<<<<<<<<<<< 
 *                 # '0' or 'f' or 'false'
 *                 return 0
 */
      __pyx_3 = PyObject_GetAttr(__pyx_v_text, __pyx_n_lower); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;}
      __pyx_4 = PyObject_CallObject(__pyx_3, 0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":752
 *         c_str = _cstr(text)
 *         if c_str[0] == c'0' or c_str[0] == c'f' or c_str[0] == c'F':
 *             if c_str[1] == c'\0' or text == "false" or text.lower() == "false":             # <<<<<<<<<<<<<< 
 *                 # '0' or 'f' or 'false'
 *                 return 0
 */
      __pyx_1 = PyObject_RichCompare(__pyx_4, __pyx_n_false, Py_EQ); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
    }
  }
  __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":754
 *             if c_str[1] == c'\0' or text == "false" or text.lower() == "false":
 *                 # '0' or 'f' or 'false'
 *                 return 0             # <<<<<<<<<<<<<< 
 *         elif c_str[0] == c'1' or c_str[0] == c't' or c_str[0] == c'T':
 *             if c_str[1] == c'\0' or text == "true" or text.lower() == "true":
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;
  goto __pyx_L3;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":755
 *                 # '0' or 'f' or 'false'
 *                 return 0
 *         elif c_str[0] == c'1' or c_str[0] == c't' or c_str[0] == c'T':             # <<<<<<<<<<<<<< 
 *             if c_str[1] == c'\0' or text == "true" or text.lower() == "true":
 *                 # '1' or 't' or 'true'
 */
__pyx_2 = ((__pyx_v_c_str[0]) == '1');
if (!__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":755
 *                 # '0' or 'f' or 'false'
 *                 return 0
 *         elif c_str[0] == c'1' or c_str[0] == c't' or c_str[0] == c'T':             # <<<<<<<<<<<<<< 
 *             if c_str[1] == c'\0' or text == "true" or text.lower() == "true":
 *                 # '1' or 't' or 'true'
 */
  __pyx_2 = ((__pyx_v_c_str[0]) == 't');
  if (!__pyx_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":755
 *                 # '0' or 'f' or 'false'
 *                 return 0
 *         elif c_str[0] == c'1' or c_str[0] == c't' or c_str[0] == c'T':             # <<<<<<<<<<<<<< 
 *             if c_str[1] == c'\0' or text == "true" or text.lower() == "true":
 *                 # '1' or 't' or 'true'
 */
    __pyx_2 = ((__pyx_v_c_str[0]) == 'T');
  }
}
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":756
 *                 return 0
 *         elif c_str[0] == c'1' or c_str[0] == c't' or c_str[0] == c'T':
 *             if c_str[1] == c'\0' or text == "true" or text.lower() == "true":             # <<<<<<<<<<<<<< 
 *                 # '1' or 't' or 'true'
 *                 return 1
 */
  __pyx_3 = __Pyx_PyBool_FromLong(((__pyx_v_c_str[1]) == '\0')); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; goto __pyx_L1;}
  __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; goto __pyx_L1;}
  if (!__pyx_2) {
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":756
 *                 return 0
 *         elif c_str[0] == c'1' or c_str[0] == c't' or c_str[0] == c'T':
 *             if c_str[1] == c'\0' or text == "true" or text.lower() == "true":             # <<<<<<<<<<<<<< 
 *                 # '1' or 't' or 'true'
 *                 return 1
 */
    __pyx_3 = PyObject_RichCompare(__pyx_v_text, __pyx_n_true, Py_EQ); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; goto __pyx_L1;}
    __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; goto __pyx_L1;}
    if (!__pyx_2) {
      Py_DECREF(__pyx_3); __pyx_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":756
 *                 return 0
 *         elif c_str[0] == c'1' or c_str[0] == c't' or c_str[0] == c'T':
 *             if c_str[1] == c'\0' or text == "true" or text.lower() == "true":             # <<<<<<<<<<<<<< 
 *                 # '1' or 't' or 'true'
 *                 return 1
 */
      __pyx_4 = PyObject_GetAttr(__pyx_v_text, __pyx_n_lower); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; goto __pyx_L1;}
      __pyx_1 = PyObject_CallObject(__pyx_4, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":756
 *                 return 0
 *         elif c_str[0] == c'1' or c_str[0] == c't' or c_str[0] == c'T':
 *             if c_str[1] == c'\0' or text == "true" or text.lower() == "true":             # <<<<<<<<<<<<<< 
 *                 # '1' or 't' or 'true'
 *                 return 1
 */
      __pyx_3 = PyObject_RichCompare(__pyx_1, __pyx_n_true, Py_EQ); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
    }
  }
  __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  if (__pyx_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":758
 *             if c_str[1] == c'\0' or text == "true" or text.lower() == "true":
 *                 # '1' or 't' or 'true'
 *                 return 1             # <<<<<<<<<<<<<< 
 *         raise ValueError, "Invalid boolean value: '%s'" % text
 * 
 */
    __pyx_r = 1;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;
  goto __pyx_L3;
}
__pyx_L3:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":759
 *                 # '1' or 't' or 'true'
 *                 return 1
 *         raise ValueError, "Invalid boolean value: '%s'" % text             # <<<<<<<<<<<<<< 
 * 
 *     def __nonzero__(self):
 */
__pyx_4 = PyNumber_Remainder(__pyx_k92p, __pyx_v_text); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;}
__Pyx_Raise(__pyx_builtin_ValueError, __pyx_4, 0);
Py_DECREF(__pyx_4); __pyx_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;}

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("lxml.objectify.BoolElement._boolval");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_text);
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":761
 *         raise ValueError, "Invalid boolean value: '%s'" % text
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<< 
 *         if self._boolval():
 *             return True
 */

static int __pyx_pf_4lxml_9objectify_11BoolElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pf_4lxml_9objectify_11BoolElement___nonzero__(PyObject *__pyx_v_self) {
int __pyx_r;
int __pyx_1;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":762
 * 
 *     def __nonzero__(self):
 *         if self._boolval():             # <<<<<<<<<<<<<< 
 *             return True
 *         else:
 */
__pyx_1 = ((struct __pyx_vtabstruct_4lxml_9objectify_BoolElement *)((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_vtab)->_boolval(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":763
 *     def __nonzero__(self):
 *         if self._boolval():
 *             return True             # <<<<<<<<<<<<<< 
 *         else:
 *             return False
 */
  __pyx_1 = PyInt_AsLong(Py_True); if (unlikely((__pyx_1 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":765
 *             return True
 *         else:
 *             return False             # <<<<<<<<<<<<<< 
 * 
 *     def __richcmp__(self, other, int op):
 */
  __pyx_1 = PyInt_AsLong(Py_False); if (unlikely((__pyx_1 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("lxml.objectify.BoolElement.__nonzero__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":767
 *             return False
 * 
 *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<< 
 *         if hasattr(other, 'pyval'):
 *             other = other.pyval
 */


static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
PyObject *__pyx_v_self_val;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);
__pyx_v_self_val = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":768
 * 
 *     def __richcmp__(self, other, int op):
 *         if hasattr(other, 'pyval'):             # <<<<<<<<<<<<<< 
 *             other = other.pyval
 *         if hasattr(self, 'pyval'):
 */
__pyx_1 = PyObject_HasAttr(__pyx_v_other,__pyx_n_pyval); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":769
 *     def __richcmp__(self, other, int op):
 *         if hasattr(other, 'pyval'):
 *             other = other.pyval             # <<<<<<<<<<<<<< 
 *         if hasattr(self, 'pyval'):
 *             self_val = self.pyval
 */
  __pyx_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_pyval); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
  Py_DECREF(__pyx_v_other);
  __pyx_v_other = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":770
 *         if hasattr(other, 'pyval'):
 *             other = other.pyval
 *         if hasattr(self, 'pyval'):             # <<<<<<<<<<<<<< 
 *             self_val = self.pyval
 *         else:
 */
__pyx_1 = PyObject_HasAttr(__pyx_v_self,__pyx_n_pyval); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":771
 *             other = other.pyval
 *         if hasattr(self, 'pyval'):
 *             self_val = self.pyval             # <<<<<<<<<<<<<< 
 *         else:
 *             self_val = bool(self)
 */
  __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_pyval); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; goto __pyx_L1;}
  Py_DECREF(__pyx_v_self_val);
  __pyx_v_self_val = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L3;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":773
 *             self_val = self.pyval
 *         else:
 *             self_val = bool(self)             # <<<<<<<<<<<<<< 
 *         return python.PyObject_RichCompare(self_val, other, op)
 * 
 */
  __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; goto __pyx_L1;}
  Py_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self);
  __pyx_3 = PyObject_CallObject(__pyx_builtin_bool, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_v_self_val);
  __pyx_v_self_val = __pyx_3;
  __pyx_3 = 0;
}
__pyx_L3:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":774
 *         else:
 *             self_val = bool(self)
 *         return python.PyObject_RichCompare(self_val, other, op)             # <<<<<<<<<<<<<< 
 * 
 *     def __str__(self):
 */
__pyx_2 = PyObject_RichCompare(__pyx_v_self_val,__pyx_v_other,__pyx_v_op); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.BoolElement.__richcmp__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self_val);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":776
 *         return python.PyObject_RichCompare(self_val, other, op)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<< 
 *         if self._boolval():
 *             return "True"
 */

static PyObject *__pyx_n_True;
static PyObject *__pyx_n_False;


static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___str__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
int __pyx_1;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":777
 * 
 *     def __str__(self):
 *         if self._boolval():             # <<<<<<<<<<<<<< 
 *             return "True"
 *         else:
 */
__pyx_1 = ((struct __pyx_vtabstruct_4lxml_9objectify_BoolElement *)((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_vtab)->_boolval(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":778
 *     def __str__(self):
 *         if self._boolval():
 *             return "True"             # <<<<<<<<<<<<<< 
 *         else:
 *             return "False"
 */
  Py_INCREF(__pyx_n_True);
  __pyx_r = __pyx_n_True;
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":780
 *             return "True"
 *         else:
 *             return "False"             # <<<<<<<<<<<<<< 
 * 
 *     def __repr__(self):
 */
  Py_INCREF(__pyx_n_False);
  __pyx_r = __pyx_n_False;
  goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("lxml.objectify.BoolElement.__str__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":782
 *             return "False"
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<< 
 *         if self._boolval():
 *             return "True"
 */


static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___repr__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
int __pyx_1;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":783
 * 
 *     def __repr__(self):
 *         if self._boolval():             # <<<<<<<<<<<<<< 
 *             return "True"
 *         else:
 */
__pyx_1 = ((struct __pyx_vtabstruct_4lxml_9objectify_BoolElement *)((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_vtab)->_boolval(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":784
 *     def __repr__(self):
 *         if self._boolval():
 *             return "True"             # <<<<<<<<<<<<<< 
 *         else:
 *             return "False"
 */
  Py_INCREF(__pyx_n_True);
  __pyx_r = __pyx_n_True;
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":786
 *             return "True"
 *         else:
 *             return "False"             # <<<<<<<<<<<<<< 
 * 
 *     property pyval:
 */
  Py_INCREF(__pyx_n_False);
  __pyx_r = __pyx_n_False;
  goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("lxml.objectify.BoolElement.__repr__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":789
 * 
 *     property pyval:
 *         def __get__(self):             # <<<<<<<<<<<<<< 
 *             return self.__nonzero__()
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF((PyObject *)__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":790
 *     property pyval:
 *         def __get__(self):
 *             return self.__nonzero__()             # <<<<<<<<<<<<<< 
 * 
 * def __checkBool(s):
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___nonzero__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; goto __pyx_L1;}
__pyx_2 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.BoolElement.pyval.__get__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF((PyObject *)__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":792
 *             return self.__nonzero__()
 * 
 * def __checkBool(s):             # <<<<<<<<<<<<<< 
 *     if s != 'true' and s != 'false' and s != '1' and s != '0':
 *         raise ValueError
 */

static PyObject *__pyx_k101p;
static PyObject *__pyx_k102p;

static char __pyx_k101[] = "1";
static char __pyx_k102[] = "0";

static PyObject *__pyx_pf_4lxml_9objectify___checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify___checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
Py_INCREF(__pyx_v_s);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":793
 * 
 * def __checkBool(s):
 *     if s != 'true' and s != 'false' and s != '1' and s != '0':             # <<<<<<<<<<<<<< 
 *         raise ValueError
 * 
 */
__pyx_1 = PyObject_RichCompare(__pyx_v_s, __pyx_n_true, Py_NE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;}
__pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;}
if (__pyx_2) {
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":793
 * 
 * def __checkBool(s):
 *     if s != 'true' and s != 'false' and s != '1' and s != '0':             # <<<<<<<<<<<<<< 
 *         raise ValueError
 * 
 */
  __pyx_1 = PyObject_RichCompare(__pyx_v_s, __pyx_n_false, Py_NE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;}
  __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;}
  if (__pyx_2) {
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":793
 * 
 * def __checkBool(s):
 *     if s != 'true' and s != 'false' and s != '1' and s != '0':             # <<<<<<<<<<<<<< 
 *         raise ValueError
 * 
 */
    __pyx_1 = PyObject_RichCompare(__pyx_v_s, __pyx_k101p, Py_NE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;}
    __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;}
    if (__pyx_2) {
      Py_DECREF(__pyx_1); __pyx_1 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":793
 * 
 * def __checkBool(s):
 *     if s != 'true' and s != 'false' and s != '1' and s != '0':             # <<<<<<<<<<<<<< 
 *         raise ValueError
 * 
 */
      __pyx_1 = PyObject_RichCompare(__pyx_v_s, __pyx_k102p, Py_NE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;}
    }
  }
}
__pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":794
 * def __checkBool(s):
 *     if s != 'true' and s != 'false' and s != '1' and s != '0':
 *         raise ValueError             # <<<<<<<<<<<<<< 
 * 
 * cdef object _strValueOf(obj):
 */
  __Pyx_Raise(__pyx_builtin_ValueError, 0, 0);
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; goto __pyx_L1;}
  goto __pyx_L2;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.__checkBool");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_s);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":796
 *         raise ValueError
 * 
 * cdef object _strValueOf(obj):             # <<<<<<<<<<<<<< 
 *     if python._isString(obj):
 *         return obj
 */

static PyObject *__pyx_k103p;
static PyObject *__pyx_k104p;

static char __pyx_k103[] = "";
static char __pyx_k104[] = "";

static  PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) {
PyObject *__pyx_r;
int __pyx_1;
int __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
Py_INCREF(__pyx_v_obj);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":797
 * 
 * cdef object _strValueOf(obj):
 *     if python._isString(obj):             # <<<<<<<<<<<<<< 
 *         return obj
 *     if isinstance(obj, _Element):
 */
__pyx_1 = _isString(__pyx_v_obj);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":798
 * cdef object _strValueOf(obj):
 *     if python._isString(obj):
 *         return obj             # <<<<<<<<<<<<<< 
 *     if isinstance(obj, _Element):
 *         return textOf((<_Element>obj)._c_node) or ''
 */
  Py_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":799
 *     if python._isString(obj):
 *         return obj
 *     if isinstance(obj, _Element):             # <<<<<<<<<<<<<< 
 *         return textOf((<_Element>obj)._c_node) or ''
 *     if obj is None:
 */
__pyx_2 = PyObject_IsInstance(__pyx_v_obj,((PyObject*)__pyx_ptype_11etreepublic__Element)); if (unlikely(__pyx_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; goto __pyx_L1;}
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":800
 *         return obj
 *     if isinstance(obj, _Element):
 *         return textOf((<_Element>obj)._c_node) or ''             # <<<<<<<<<<<<<< 
 *     if obj is None:
 *         return ''
 */
  __pyx_3 = textOf(((struct LxmlElement *)__pyx_v_obj)->_c_node); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; goto __pyx_L1;}
  __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; goto __pyx_L1;}
  if (!__pyx_2) {
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":800
 *         return obj
 *     if isinstance(obj, _Element):
 *         return textOf((<_Element>obj)._c_node) or ''             # <<<<<<<<<<<<<< 
 *     if obj is None:
 *         return ''
 */
    __pyx_3 = __pyx_k103p;
    Py_INCREF(__pyx_3);
  }
  __pyx_r = __pyx_3;
  __pyx_3 = 0;
  goto __pyx_L0;
  goto __pyx_L3;
}
__pyx_L3:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":801
 *     if isinstance(obj, _Element):
 *         return textOf((<_Element>obj)._c_node) or ''
 *     if obj is None:             # <<<<<<<<<<<<<< 
 *         return ''
 *     return str(obj)
 */
__pyx_2 = (__pyx_v_obj == Py_None);
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":802
 *         return textOf((<_Element>obj)._c_node) or ''
 *     if obj is None:
 *         return ''             # <<<<<<<<<<<<<< 
 *     return str(obj)
 * 
 */
  Py_INCREF(__pyx_k104p);
  __pyx_r = __pyx_k104p;
  goto __pyx_L0;
  goto __pyx_L4;
}
__pyx_L4:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":803
 *     if obj is None:
 *         return ''
 *     return str(obj)             # <<<<<<<<<<<<<< 
 * 
 * cdef object _numericValueOf(obj):
 */
__pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; goto __pyx_L1;}
Py_INCREF(__pyx_v_obj);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_obj);
__pyx_4 = PyObject_CallObject(((PyObject*)&PyString_Type), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_r = __pyx_4;
__pyx_4 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("lxml.objectify._strValueOf");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_obj);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":805
 *     return str(obj)
 * 
 * cdef object _numericValueOf(obj):             # <<<<<<<<<<<<<< 
 *     if isinstance(obj, NumberElement):
 *         return (<NumberElement>obj)._type(
 */


static  PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) {
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
Py_INCREF(__pyx_v_obj);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":806
 * 
 * cdef object _numericValueOf(obj):
 *     if isinstance(obj, NumberElement):             # <<<<<<<<<<<<<< 
 *         return (<NumberElement>obj)._type(
 *             textOf((<NumberElement>obj)._c_node))
 */
__pyx_1 = PyObject_IsInstance(__pyx_v_obj,((PyObject*)__pyx_ptype_4lxml_9objectify_NumberElement)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":808
 *     if isinstance(obj, NumberElement):
 *         return (<NumberElement>obj)._type(
 *             textOf((<NumberElement>obj)._c_node))             # <<<<<<<<<<<<<< 
 *     elif hasattr(obj, 'pyval'):
 *         # not always numeric, but Python will raise the right exception
 */
  __pyx_2 = textOf(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_obj)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
  __pyx_2 = 0;
  __pyx_2 = PyObject_CallObject(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_obj)->_type, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":809
 *         return (<NumberElement>obj)._type(
 *             textOf((<NumberElement>obj)._c_node))
 *     elif hasattr(obj, 'pyval'):             # <<<<<<<<<<<<<< 
 *         # not always numeric, but Python will raise the right exception
 *         return obj.pyval
 */
__pyx_1 = PyObject_HasAttr(__pyx_v_obj,__pyx_n_pyval); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":811
 *     elif hasattr(obj, 'pyval'):
 *         # not always numeric, but Python will raise the right exception
 *         return obj.pyval             # <<<<<<<<<<<<<< 
 *     return obj
 * 
 */
  __pyx_3 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_pyval); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;}
  __pyx_r = __pyx_3;
  __pyx_3 = 0;
  goto __pyx_L0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":812
 *         # not always numeric, but Python will raise the right exception
 *         return obj.pyval
 *     return obj             # <<<<<<<<<<<<<< 
 * 
 * ################################################################################
 */
Py_INCREF(__pyx_v_obj);
__pyx_r = __pyx_v_obj;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify._numericValueOf");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_obj);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":837
 *     cdef object _type
 *     cdef object _schema_types
 *     def __init__(self, name, type_check, type_class, stringify=None):             # <<<<<<<<<<<<<< 
 *         if not python._isString(name):
 *             raise TypeError, "Type name must be a string"
 */

static PyObject *__pyx_k106p;
static PyObject *__pyx_k107p;
static PyObject *__pyx_k108p;

static char __pyx_k106[] = "Type name must be a string";
static char __pyx_k107[] = "Type check function must be callable (or None)";
static char __pyx_k108[] = "Data classes must inherit from ObjectifiedDataElement";

static int __pyx_pf_4lxml_9objectify_6PyType___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4lxml_9objectify_6PyType___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_name = 0;
PyObject *__pyx_v_type_check = 0;
PyObject *__pyx_v_type_class = 0;
PyObject *__pyx_v_stringify = 0;
int __pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"name","type_check","type_class","stringify",0};
__pyx_v_stringify = __pyx_k19;
if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO|O", __pyx_argnames, &__pyx_v_name, &__pyx_v_type_check, &__pyx_v_type_class, &__pyx_v_stringify))) return -1;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_name);
Py_INCREF(__pyx_v_type_check);
Py_INCREF(__pyx_v_type_class);
Py_INCREF(__pyx_v_stringify);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":838
 *     cdef object _schema_types
 *     def __init__(self, name, type_check, type_class, stringify=None):
 *         if not python._isString(name):             # <<<<<<<<<<<<<< 
 *             raise TypeError, "Type name must be a string"
 *         if type_check is not None and not callable(type_check):
 */
__pyx_1 = (!_isString(__pyx_v_name));
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":839
 *     def __init__(self, name, type_check, type_class, stringify=None):
 *         if not python._isString(name):
 *             raise TypeError, "Type name must be a string"             # <<<<<<<<<<<<<< 
 *         if type_check is not None and not callable(type_check):
 *             raise TypeError, "Type check function must be callable (or None)"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_k106p, 0);
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;}
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":840
 *         if not python._isString(name):
 *             raise TypeError, "Type name must be a string"
 *         if type_check is not None and not callable(type_check):             # <<<<<<<<<<<<<< 
 *             raise TypeError, "Type check function must be callable (or None)"
 *         if name != TREE_PYTYPE_NAME and \
 */
__pyx_1 = (__pyx_v_type_check != Py_None);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":840
 *         if not python._isString(name):
 *             raise TypeError, "Type name must be a string"
 *         if type_check is not None and not callable(type_check):             # <<<<<<<<<<<<<< 
 *             raise TypeError, "Type check function must be callable (or None)"
 *         if name != TREE_PYTYPE_NAME and \
 */
  __pyx_1 = (!callable(__pyx_v_type_check));
}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":841
 *             raise TypeError, "Type name must be a string"
 *         if type_check is not None and not callable(type_check):
 *             raise TypeError, "Type check function must be callable (or None)"             # <<<<<<<<<<<<<< 
 *         if name != TREE_PYTYPE_NAME and \
 *                not issubclass(type_class, ObjectifiedDataElement):
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_k107p, 0);
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; goto __pyx_L1;}
  goto __pyx_L3;
}
__pyx_L3:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":842
 *         if type_check is not None and not callable(type_check):
 *             raise TypeError, "Type check function must be callable (or None)"
 *         if name != TREE_PYTYPE_NAME and \             # <<<<<<<<<<<<<< 
 *                not issubclass(type_class, ObjectifiedDataElement):
 *             raise TypeError, \
 */
__pyx_2 = PyObject_RichCompare(__pyx_v_name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;}
__pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;}
if (__pyx_1) {
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":843
 *             raise TypeError, "Type check function must be callable (or None)"
 *         if name != TREE_PYTYPE_NAME and \
 *                not issubclass(type_class, ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *             raise TypeError, \
 *                   "Data classes must inherit from ObjectifiedDataElement"
 */
  __pyx_1 = PyObject_IsSubclass(__pyx_v_type_class,((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
  __pyx_2 = __Pyx_PyBool_FromLong((!__pyx_1)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
}
__pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":845
 *                not issubclass(type_class, ObjectifiedDataElement):
 *             raise TypeError, \
 *                   "Data classes must inherit from ObjectifiedDataElement"             # <<<<<<<<<<<<<< 
 *         self.name  = name
 *         self._type = type_class
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_k108p, 0);
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; goto __pyx_L1;}
  goto __pyx_L4;
}
__pyx_L4:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":846
 *             raise TypeError, \
 *                   "Data classes must inherit from ObjectifiedDataElement"
 *         self.name  = name             # <<<<<<<<<<<<<< 
 *         self._type = type_class
 *         self.type_check = type_check
 */
Py_INCREF(__pyx_v_name);
Py_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name = __pyx_v_name;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":847
 *                   "Data classes must inherit from ObjectifiedDataElement"
 *         self.name  = name
 *         self._type = type_class             # <<<<<<<<<<<<<< 
 *         self.type_check = type_check
 *         if stringify is None:
 */
Py_INCREF(__pyx_v_type_class);
Py_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type);
((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type = __pyx_v_type_class;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":848
 *         self.name  = name
 *         self._type = type_class
 *         self.type_check = type_check             # <<<<<<<<<<<<<< 
 *         if stringify is None:
 *             self._add_text = _StringValueSetter(str)
 */
Py_INCREF(__pyx_v_type_check);
Py_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check = __pyx_v_type_check;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":849
 *         self._type = type_class
 *         self.type_check = type_check
 *         if stringify is None:             # <<<<<<<<<<<<<< 
 *             self._add_text = _StringValueSetter(str)
 *         else:
 */
__pyx_1 = (__pyx_v_stringify == Py_None);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":850
 *         self.type_check = type_check
 *         if stringify is None:
 *             self._add_text = _StringValueSetter(str)             # <<<<<<<<<<<<<< 
 *         else:
 *             self._add_text = _StringValueSetter(stringify)
 */
  __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;}
  Py_INCREF(((PyObject*)&PyString_Type));
  PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject*)&PyString_Type));
  __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_4lxml_9objectify__StringValueSetter), __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":850
 *         self.type_check = type_check
 *         if stringify is None:
 *             self._add_text = _StringValueSetter(str)             # <<<<<<<<<<<<<< 
 *         else:
 *             self._add_text = _StringValueSetter(stringify)
 */
  Py_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_add_text);
  ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_add_text = __pyx_3;
  __pyx_3 = 0;
  goto __pyx_L5;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":852
 *             self._add_text = _StringValueSetter(str)
 *         else:
 *             self._add_text = _StringValueSetter(stringify)             # <<<<<<<<<<<<<< 
 *         self._schema_types = []
 * 
 */
  __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; goto __pyx_L1;}
  Py_INCREF(__pyx_v_stringify);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_stringify);
  __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_4lxml_9objectify__StringValueSetter), __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":852
 *             self._add_text = _StringValueSetter(str)
 *         else:
 *             self._add_text = _StringValueSetter(stringify)             # <<<<<<<<<<<<<< 
 *         self._schema_types = []
 * 
 */
  Py_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_add_text);
  ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_add_text = __pyx_3;
  __pyx_3 = 0;
}
__pyx_L5:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":853
 *         else:
 *             self._add_text = _StringValueSetter(stringify)
 *         self._schema_types = []             # <<<<<<<<<<<<<< 
 * 
 *     def __repr__(self):
 */
__pyx_2 = PyList_New(0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":853
 *         else:
 *             self._add_text = _StringValueSetter(stringify)
 *         self._schema_types = []             # <<<<<<<<<<<<<< 
 * 
 *     def __repr__(self):
 */
Py_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types);
((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types = __pyx_2;
__pyx_2 = 0;

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify.PyType.__init__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_name);
Py_DECREF(__pyx_v_type_check);
Py_DECREF(__pyx_v_type_class);
Py_DECREF(__pyx_v_stringify);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":855
 *         self._schema_types = []
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<< 
 *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
 * 
 */

static PyObject *__pyx_n___name__;

static PyObject *__pyx_k109p;

static char __pyx_k109[] = "PyType(%s, %s)";

static PyObject *__pyx_pf_4lxml_9objectify_6PyType___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_6PyType___repr__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF(__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":856
 * 
 *     def __repr__(self):
 *         return "PyType(%s, %s)" % (self.name, self._type.__name__)             # <<<<<<<<<<<<<< 
 * 
 *     def register(self, before=None, after=None):
 */
__pyx_1 = PyObject_GetAttr(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type, __pyx_n___name__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; goto __pyx_L1;}
Py_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyNumber_Remainder(__pyx_k109p, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.PyType.__repr__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":858
 *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
 * 
 *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<< 
 *         """Register the type.
 * 
 */

static PyObject *__pyx_num_neg_1;

static PyObject *__pyx_n_enumerate;
static PyObject *__pyx_n_name;
static PyObject *__pyx_n_append;
static PyObject *__pyx_n_insert;

static PyObject *__pyx_k110p;
static PyObject *__pyx_k111p;

static PyObject *__pyx_builtin_enumerate;

static char __pyx_k110[] = "Cannot register tree type";
static char __pyx_k111[] = "inconsistent before/after dependencies";

static PyObject *__pyx_pf_4lxml_9objectify_6PyType_register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_6PyType_register[] = "Register the type.\n\n        The additional keyword arguments \'before\' and \'after\' accept a\n        sequence of type names that must appear before/after the new type in\n        the type list.  If any of them is not currently known, it is simply\n        ignored.  Raises ValueError if the dependencies cannot be fulfilled.\n        ";
static PyObject *__pyx_pf_4lxml_9objectify_6PyType_register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_before = 0;
PyObject *__pyx_v_after = 0;
PyObject *__pyx_v_item;
PyObject *__pyx_v_entry;
PyObject *__pyx_v_first_pos;
PyObject *__pyx_v_last_pos;
PyObject *__pyx_v_i;
PyObject *__pyx_v_check;
PyObject *__pyx_v_pytype;
PyObject *__pyx_v_xs_type;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
Py_ssize_t __pyx_3;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
PyObject *__pyx_7 = 0;
PyObject *__pyx_8 = 0;
static char *__pyx_argnames[] = {"before","after",0};
__pyx_v_before = __pyx_k20;
__pyx_v_after = __pyx_k21;
if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_before, &__pyx_v_after))) return NULL;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_before);
Py_INCREF(__pyx_v_after);
__pyx_v_item = Py_None; Py_INCREF(Py_None);
__pyx_v_entry = Py_None; Py_INCREF(Py_None);
__pyx_v_first_pos = Py_None; Py_INCREF(Py_None);
__pyx_v_last_pos = Py_None; Py_INCREF(Py_None);
__pyx_v_i = Py_None; Py_INCREF(Py_None);
__pyx_v_check = Py_None; Py_INCREF(Py_None);
__pyx_v_pytype = Py_None; Py_INCREF(Py_None);
__pyx_v_xs_type = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":866
 *         ignored.  Raises ValueError if the dependencies cannot be fulfilled.
 *         """
 *         if self.name == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<< 
 *             raise ValueError, "Cannot register tree type"
 *         if self.type_check is not None:
 */
__pyx_1 = PyObject_RichCompare(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; goto __pyx_L1;}
__pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":867
 *         """
 *         if self.name == TREE_PYTYPE_NAME:
 *             raise ValueError, "Cannot register tree type"             # <<<<<<<<<<<<<< 
 *         if self.type_check is not None:
 *             for item in _TYPE_CHECKS:
 */
  __Pyx_Raise(__pyx_builtin_ValueError, __pyx_k110p, 0);
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; goto __pyx_L1;}
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":868
 *         if self.name == TREE_PYTYPE_NAME:
 *             raise ValueError, "Cannot register tree type"
 *         if self.type_check is not None:             # <<<<<<<<<<<<<< 
 *             for item in _TYPE_CHECKS:
 *                 if item[0] is self.type_check:
 */
__pyx_2 = (((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check != Py_None);
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":869
 *             raise ValueError, "Cannot register tree type"
 *         if self.type_check is not None:
 *             for item in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *                 if item[0] is self.type_check:
 *                     _TYPE_CHECKS.remove(item)
 */
  if (PyList_CheckExact(__pyx_v_4lxml_9objectify__TYPE_CHECKS)) { __pyx_3 = 0; __pyx_1 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; Py_INCREF(__pyx_1); }
  else { __pyx_1 = PyObject_GetIter(__pyx_v_4lxml_9objectify__TYPE_CHECKS); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; goto __pyx_L1;} }
  for (;;) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":869
 *             raise ValueError, "Cannot register tree type"
 *         if self.type_check is not None:
 *             for item in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *                 if item[0] is self.type_check:
 *                     _TYPE_CHECKS.remove(item)
 */
    if (PyList_CheckExact(__pyx_1)) { if (__pyx_3 >= PyList_GET_SIZE(__pyx_1)) break; __pyx_4 = PyList_GET_ITEM(__pyx_1, __pyx_3++); Py_INCREF(__pyx_4); }
    else {
      __pyx_4 = PyIter_Next(__pyx_1);
      if (!__pyx_4) {
        break;
      }
    }
    Py_DECREF(__pyx_v_item);
    __pyx_v_item = __pyx_4;
    __pyx_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":870
 *         if self.type_check is not None:
 *             for item in _TYPE_CHECKS:
 *                 if item[0] is self.type_check:             # <<<<<<<<<<<<<< 
 *                     _TYPE_CHECKS.remove(item)
 *                     break
 */
    if (PyList_CheckExact(__pyx_v_item) && 0 <= 0 && 0 < PyList_GET_SIZE(__pyx_v_item)) {
      __pyx_5 = PyList_GET_ITEM(__pyx_v_item, 0); Py_INCREF(__pyx_5);
      } else if (PyTuple_CheckExact(__pyx_v_item) && 0 <= 0 && 0 < PyTuple_GET_SIZE(__pyx_v_item)) {
      __pyx_5 = PyTuple_GET_ITEM(__pyx_v_item, 0); Py_INCREF(__pyx_5);
      } else {
      __pyx_4 = PyInt_FromLong(0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; goto __pyx_L1;}
      __pyx_5 = PyObject_GetItem(__pyx_v_item, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":870
 *         if self.type_check is not None:
 *             for item in _TYPE_CHECKS:
 *                 if item[0] is self.type_check:             # <<<<<<<<<<<<<< 
 *                     _TYPE_CHECKS.remove(item)
 *                     break
 */
    __pyx_2 = (__pyx_5 == ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    if (__pyx_2) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":871
 *             for item in _TYPE_CHECKS:
 *                 if item[0] is self.type_check:
 *                     _TYPE_CHECKS.remove(item)             # <<<<<<<<<<<<<< 
 *                     break
 *             entry = (self.type_check, self)
 */
      __pyx_4 = PyObject_GetAttr(__pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_n_remove); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":871
 *             for item in _TYPE_CHECKS:
 *                 if item[0] is self.type_check:
 *                     _TYPE_CHECKS.remove(item)             # <<<<<<<<<<<<<< 
 *                     break
 *             entry = (self.type_check, self)
 */
      __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;}
      Py_INCREF(__pyx_v_item);
      PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_item);
      __pyx_6 = PyObject_CallObject(__pyx_4, __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      Py_DECREF(__pyx_6); __pyx_6 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":872
 *                 if item[0] is self.type_check:
 *                     _TYPE_CHECKS.remove(item)
 *                     break             # <<<<<<<<<<<<<< 
 *             entry = (self.type_check, self)
 *             first_pos = 0
 */
      goto __pyx_L5;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }
  __pyx_L5:;
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":873
 *                     _TYPE_CHECKS.remove(item)
 *                     break
 *             entry = (self.type_check, self)             # <<<<<<<<<<<<<< 
 *             first_pos = 0
 *             last_pos = -1
 */
  __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;}
  Py_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
  PyTuple_SET_ITEM(__pyx_4, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
  Py_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_self);
  Py_DECREF(__pyx_v_entry);
  __pyx_v_entry = __pyx_4;
  __pyx_4 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":874
 *                     break
 *             entry = (self.type_check, self)
 *             first_pos = 0             # <<<<<<<<<<<<<< 
 *             last_pos = -1
 *             if before or after:
 */
  Py_INCREF(__pyx_num_0);
  Py_DECREF(__pyx_v_first_pos);
  __pyx_v_first_pos = __pyx_num_0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":875
 *             entry = (self.type_check, self)
 *             first_pos = 0
 *             last_pos = -1             # <<<<<<<<<<<<<< 
 *             if before or after:
 *                 if before is None:
 */
  Py_INCREF(__pyx_num_neg_1);
  Py_DECREF(__pyx_v_last_pos);
  __pyx_v_last_pos = __pyx_num_neg_1;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":876
 *             first_pos = 0
 *             last_pos = -1
 *             if before or after:             # <<<<<<<<<<<<<< 
 *                 if before is None:
 *                     before = ()
 */
  __pyx_5 = __pyx_v_before;
  Py_INCREF(__pyx_5);
  __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_5); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; goto __pyx_L1;}
  if (!__pyx_2) {
    Py_DECREF(__pyx_5); __pyx_5 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":876
 *             first_pos = 0
 *             last_pos = -1
 *             if before or after:             # <<<<<<<<<<<<<< 
 *                 if before is None:
 *                     before = ()
 */
    __pyx_5 = __pyx_v_after;
    Py_INCREF(__pyx_5);
  }
  __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_5); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; goto __pyx_L1;}
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  if (__pyx_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":877
 *             last_pos = -1
 *             if before or after:
 *                 if before is None:             # <<<<<<<<<<<<<< 
 *                     before = ()
 *                 elif after is None:
 */
    __pyx_2 = (__pyx_v_before == Py_None);
    if (__pyx_2) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":878
 *             if before or after:
 *                 if before is None:
 *                     before = ()             # <<<<<<<<<<<<<< 
 *                 elif after is None:
 *                     after = ()
 */
      __pyx_6 = PyTuple_New(0); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; goto __pyx_L1;}
      Py_DECREF(__pyx_v_before);
      __pyx_v_before = __pyx_6;
      __pyx_6 = 0;
      goto __pyx_L8;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":879
 *                 if before is None:
 *                     before = ()
 *                 elif after is None:             # <<<<<<<<<<<<<< 
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
 */
    __pyx_2 = (__pyx_v_after == Py_None);
    if (__pyx_2) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":880
 *                     before = ()
 *                 elif after is None:
 *                     after = ()             # <<<<<<<<<<<<<< 
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
 *                     if last_pos == -1 and pytype.name in before:
 */
      __pyx_1 = PyTuple_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; goto __pyx_L1;}
      Py_DECREF(__pyx_v_after);
      __pyx_v_after = __pyx_1;
      __pyx_1 = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
    __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}
    Py_INCREF(__pyx_v_4lxml_9objectify__TYPE_CHECKS);
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_4lxml_9objectify__TYPE_CHECKS);
    __pyx_5 = PyObject_CallObject(__pyx_builtin_enumerate, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    if (PyList_CheckExact(__pyx_5)) { __pyx_3 = 0; __pyx_6 = __pyx_5; Py_INCREF(__pyx_6); }
    else { __pyx_6 = PyObject_GetIter(__pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;} }
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    for (;;) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
      if (PyList_CheckExact(__pyx_6)) { if (__pyx_3 >= PyList_GET_SIZE(__pyx_6)) break; __pyx_1 = PyList_GET_ITEM(__pyx_6, __pyx_3++); Py_INCREF(__pyx_1); }
      else {
        __pyx_1 = PyIter_Next(__pyx_6);
        if (!__pyx_1) {
          break;
        }
      }
      if (PyTuple_CheckExact(__pyx_1) && PyTuple_GET_SIZE(__pyx_1) == 2) {
        __pyx_5 = PyTuple_GET_ITEM(__pyx_1, 0);
        Py_INCREF(__pyx_5);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
        Py_DECREF(__pyx_v_i);
        __pyx_v_i = __pyx_5;
        __pyx_5 = 0;
        __pyx_5 = PyTuple_GET_ITEM(__pyx_1, 1);
        Py_INCREF(__pyx_5);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
        if (PyTuple_CheckExact(__pyx_5) && PyTuple_GET_SIZE(__pyx_5) == 2) {
          __pyx_8 = PyTuple_GET_ITEM(__pyx_5, 0);
          Py_INCREF(__pyx_8);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
          Py_DECREF(__pyx_v_check);
          __pyx_v_check = __pyx_8;
          __pyx_8 = 0;
          __pyx_8 = PyTuple_GET_ITEM(__pyx_5, 1);
          Py_INCREF(__pyx_8);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
          Py_DECREF(__pyx_v_pytype);
          __pyx_v_pytype = __pyx_8;
          __pyx_8 = 0;
          Py_DECREF(__pyx_5); __pyx_5 = 0;
        }
        else {
          __pyx_7 = PyObject_GetIter(__pyx_5); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          __pyx_8 = __Pyx_UnpackItem(__pyx_7); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
          Py_DECREF(__pyx_v_check);
          __pyx_v_check = __pyx_8;
          __pyx_8 = 0;
          __pyx_8 = __Pyx_UnpackItem(__pyx_7); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
          Py_DECREF(__pyx_v_pytype);
          __pyx_v_pytype = __pyx_8;
          __pyx_8 = 0;
          if (__Pyx_EndUnpack(__pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}
          Py_DECREF(__pyx_7); __pyx_7 = 0;
        }
        Py_DECREF(__pyx_1); __pyx_1 = 0;
      }
      else {
        __pyx_4 = PyObject_GetIter(__pyx_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
        Py_DECREF(__pyx_v_i);
        __pyx_v_i = __pyx_5;
        __pyx_5 = 0;
        __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
        if (PyTuple_CheckExact(__pyx_5) && PyTuple_GET_SIZE(__pyx_5) == 2) {
          __pyx_8 = PyTuple_GET_ITEM(__pyx_5, 0);
          Py_INCREF(__pyx_8);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
          Py_DECREF(__pyx_v_check);
          __pyx_v_check = __pyx_8;
          __pyx_8 = 0;
          __pyx_8 = PyTuple_GET_ITEM(__pyx_5, 1);
          Py_INCREF(__pyx_8);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
          Py_DECREF(__pyx_v_pytype);
          __pyx_v_pytype = __pyx_8;
          __pyx_8 = 0;
          Py_DECREF(__pyx_5); __pyx_5 = 0;
        }
        else {
          __pyx_7 = PyObject_GetIter(__pyx_5); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          __pyx_8 = __Pyx_UnpackItem(__pyx_7); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
          Py_DECREF(__pyx_v_check);
          __pyx_v_check = __pyx_8;
          __pyx_8 = 0;
          __pyx_8 = __Pyx_UnpackItem(__pyx_7); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":881
 *                 elif after is None:
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<< 
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 */
          Py_DECREF(__pyx_v_pytype);
          __pyx_v_pytype = __pyx_8;
          __pyx_8 = 0;
          if (__Pyx_EndUnpack(__pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}
          Py_DECREF(__pyx_7); __pyx_7 = 0;
        }
        if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":882
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
 *                     if last_pos == -1 and pytype.name in before:             # <<<<<<<<<<<<<< 
 *                         last_pos = i
 *                     if pytype.name in after:
 */
      __pyx_8 = PyObject_RichCompare(__pyx_v_last_pos, __pyx_num_neg_1, Py_EQ); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; goto __pyx_L1;}
      __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_8); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; goto __pyx_L1;}
      if (__pyx_2) {
        Py_DECREF(__pyx_8); __pyx_8 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":882
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
 *                     if last_pos == -1 and pytype.name in before:             # <<<<<<<<<<<<<< 
 *                         last_pos = i
 *                     if pytype.name in after:
 */
        __pyx_5 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_name); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":882
 *                     after = ()
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
 *                     if last_pos == -1 and pytype.name in before:             # <<<<<<<<<<<<<< 
 *                         last_pos = i
 *                     if pytype.name in after:
 */
        __pyx_2 = (PySequence_Contains(__pyx_v_before, __pyx_5)); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        __pyx_8 = __Pyx_PyBool_FromLong(__pyx_2); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; goto __pyx_L1;}
      }
      __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_8); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; goto __pyx_L1;}
      Py_DECREF(__pyx_8); __pyx_8 = 0;
      if (__pyx_2) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":883
 *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i             # <<<<<<<<<<<<<< 
 *                     if pytype.name in after:
 *                         first_pos = i+1
 */
        Py_INCREF(__pyx_v_i);
        Py_DECREF(__pyx_v_last_pos);
        __pyx_v_last_pos = __pyx_v_i;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":884
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 *                     if pytype.name in after:             # <<<<<<<<<<<<<< 
 *                         first_pos = i+1
 *             if last_pos == -1:
 */
      __pyx_7 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_name); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":884
 *                     if last_pos == -1 and pytype.name in before:
 *                         last_pos = i
 *                     if pytype.name in after:             # <<<<<<<<<<<<<< 
 *                         first_pos = i+1
 *             if last_pos == -1:
 */
      __pyx_2 = (PySequence_Contains(__pyx_v_after, __pyx_7)); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      if (__pyx_2) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":885
 *                         last_pos = i
 *                     if pytype.name in after:
 *                         first_pos = i+1             # <<<<<<<<<<<<<< 
 *             if last_pos == -1:
 *                 _TYPE_CHECKS.append(entry)
 */
        __pyx_1 = PyNumber_Add(__pyx_v_i, __pyx_num_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;}
        Py_DECREF(__pyx_v_first_pos);
        __pyx_v_first_pos = __pyx_1;
        __pyx_1 = 0;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":886
 *                     if pytype.name in after:
 *                         first_pos = i+1
 *             if last_pos == -1:             # <<<<<<<<<<<<<< 
 *                 _TYPE_CHECKS.append(entry)
 *             elif first_pos > last_pos:
 */
  __pyx_4 = PyObject_RichCompare(__pyx_v_last_pos, __pyx_num_neg_1, Py_EQ); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;}
  __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_4); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  if (__pyx_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":887
 *                         first_pos = i+1
 *             if last_pos == -1:
 *                 _TYPE_CHECKS.append(entry)             # <<<<<<<<<<<<<< 
 *             elif first_pos > last_pos:
 *                 raise ValueError, "inconsistent before/after dependencies"
 */
    __pyx_5 = PyObject_GetAttr(__pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_n_append); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":887
 *                         first_pos = i+1
 *             if last_pos == -1:
 *                 _TYPE_CHECKS.append(entry)             # <<<<<<<<<<<<<< 
 *             elif first_pos > last_pos:
 *                 raise ValueError, "inconsistent before/after dependencies"
 */
    __pyx_8 = PyTuple_New(1); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
    Py_INCREF(__pyx_v_entry);
    PyTuple_SET_ITEM(__pyx_8, 0, __pyx_v_entry);
    __pyx_7 = PyObject_CallObject(__pyx_5, __pyx_8); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_8); __pyx_8 = 0;
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    goto __pyx_L13;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":888
 *             if last_pos == -1:
 *                 _TYPE_CHECKS.append(entry)
 *             elif first_pos > last_pos:             # <<<<<<<<<<<<<< 
 *                 raise ValueError, "inconsistent before/after dependencies"
 *             else:
 */
  __pyx_1 = PyObject_RichCompare(__pyx_v_first_pos, __pyx_v_last_pos, Py_GT); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
  __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":889
 *                 _TYPE_CHECKS.append(entry)
 *             elif first_pos > last_pos:
 *                 raise ValueError, "inconsistent before/after dependencies"             # <<<<<<<<<<<<<< 
 *             else:
 *                 _TYPE_CHECKS.insert(last_pos, entry)
 */
    __Pyx_Raise(__pyx_builtin_ValueError, __pyx_k111p, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;}
    goto __pyx_L13;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":891
 *                 raise ValueError, "inconsistent before/after dependencies"
 *             else:
 *                 _TYPE_CHECKS.insert(last_pos, entry)             # <<<<<<<<<<<<<< 
 * 
 *         _PYTYPE_DICT[self.name] = self
 */
    __pyx_6 = PyObject_GetAttr(__pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_n_insert); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":891
 *                 raise ValueError, "inconsistent before/after dependencies"
 *             else:
 *                 _TYPE_CHECKS.insert(last_pos, entry)             # <<<<<<<<<<<<<< 
 * 
 *         _PYTYPE_DICT[self.name] = self
 */
    __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; goto __pyx_L1;}
    Py_INCREF(__pyx_v_last_pos);
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_last_pos);
    Py_INCREF(__pyx_v_entry);
    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_entry);
    __pyx_5 = PyObject_CallObject(__pyx_6, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; goto __pyx_L1;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
  }
  __pyx_L13:;
  goto __pyx_L3;
}
__pyx_L3:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":893
 *                 _TYPE_CHECKS.insert(last_pos, entry)
 * 
 *         _PYTYPE_DICT[self.name] = self             # <<<<<<<<<<<<<< 
 *         for xs_type in self._schema_types:
 *             _SCHEMA_TYPE_DICT[xs_type] = self
 */
if (PyObject_SetItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":894
 * 
 *         _PYTYPE_DICT[self.name] = self
 *         for xs_type in self._schema_types:             # <<<<<<<<<<<<<< 
 *             _SCHEMA_TYPE_DICT[xs_type] = self
 * 
 */
if (PyList_CheckExact(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types)) { __pyx_3 = 0; __pyx_8 = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types; Py_INCREF(__pyx_8); }
else { __pyx_8 = PyObject_GetIter(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;} }
for (;;) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":894
 * 
 *         _PYTYPE_DICT[self.name] = self
 *         for xs_type in self._schema_types:             # <<<<<<<<<<<<<< 
 *             _SCHEMA_TYPE_DICT[xs_type] = self
 * 
 */
  if (PyList_CheckExact(__pyx_8)) { if (__pyx_3 >= PyList_GET_SIZE(__pyx_8)) break; __pyx_7 = PyList_GET_ITEM(__pyx_8, __pyx_3++); Py_INCREF(__pyx_7); }
  else {
    __pyx_7 = PyIter_Next(__pyx_8);
    if (!__pyx_7) {
      break;
    }
  }
  Py_DECREF(__pyx_v_xs_type);
  __pyx_v_xs_type = __pyx_7;
  __pyx_7 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":895
 *         _PYTYPE_DICT[self.name] = self
 *         for xs_type in self._schema_types:
 *             _SCHEMA_TYPE_DICT[xs_type] = self             # <<<<<<<<<<<<<< 
 * 
 *     def unregister(self):
 */
  if (PyObject_SetItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_xs_type, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;}
}
Py_DECREF(__pyx_8); __pyx_8 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
Py_XDECREF(__pyx_7);
Py_XDECREF(__pyx_8);
__Pyx_AddTraceback("lxml.objectify.PyType.register");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_item);
Py_DECREF(__pyx_v_entry);
Py_DECREF(__pyx_v_first_pos);
Py_DECREF(__pyx_v_last_pos);
Py_DECREF(__pyx_v_i);
Py_DECREF(__pyx_v_check);
Py_DECREF(__pyx_v_pytype);
Py_DECREF(__pyx_v_xs_type);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_before);
Py_DECREF(__pyx_v_after);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":897
 *             _SCHEMA_TYPE_DICT[xs_type] = self
 * 
 *     def unregister(self):             # <<<<<<<<<<<<<< 
 *         if _PYTYPE_DICT.get(self.name) is self:
 *             del _PYTYPE_DICT[self.name]
 */

static PyObject *__pyx_n_get;
static PyObject *__pyx_n_items;

static PyObject *__pyx_pf_4lxml_9objectify_6PyType_unregister(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_6PyType_unregister(PyObject *__pyx_v_self, PyObject *unused) {
PyObject *__pyx_v_xs_type;
PyObject *__pyx_v_pytype;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
Py_ssize_t __pyx_5;
PyObject *__pyx_6 = 0;
int __pyx_7;
Py_INCREF(__pyx_v_self);
__pyx_v_xs_type = Py_None; Py_INCREF(Py_None);
__pyx_v_pytype = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":898
 * 
 *     def unregister(self):
 *         if _PYTYPE_DICT.get(self.name) is self:             # <<<<<<<<<<<<<< 
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in _SCHEMA_TYPE_DICT.items():
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_n_get); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":898
 * 
 *     def unregister(self):
 *         if _PYTYPE_DICT.get(self.name) is self:             # <<<<<<<<<<<<<< 
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in _SCHEMA_TYPE_DICT.items():
 */
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
Py_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":898
 * 
 *     def unregister(self):
 *         if _PYTYPE_DICT.get(self.name) is self:             # <<<<<<<<<<<<<< 
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in _SCHEMA_TYPE_DICT.items():
 */
__pyx_4 = (__pyx_3 == __pyx_v_self);
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (__pyx_4) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":899
 *     def unregister(self):
 *         if _PYTYPE_DICT.get(self.name) is self:
 *             del _PYTYPE_DICT[self.name]             # <<<<<<<<<<<<<< 
 *         for xs_type, pytype in _SCHEMA_TYPE_DICT.items():
 *             if pytype is self:
 */
  if (PyObject_DelItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;}
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":900
 *         if _PYTYPE_DICT.get(self.name) is self:
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in _SCHEMA_TYPE_DICT.items():             # <<<<<<<<<<<<<< 
 *             if pytype is self:
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_n_items); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
__pyx_2 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyList_CheckExact(__pyx_2)) { __pyx_5 = 0; __pyx_3 = __pyx_2; Py_INCREF(__pyx_3); }
else { __pyx_3 = PyObject_GetIter(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;} }
Py_DECREF(__pyx_2); __pyx_2 = 0;
for (;;) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":900
 *         if _PYTYPE_DICT.get(self.name) is self:
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in _SCHEMA_TYPE_DICT.items():             # <<<<<<<<<<<<<< 
 *             if pytype is self:
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 */
  if (PyList_CheckExact(__pyx_3)) { if (__pyx_5 >= PyList_GET_SIZE(__pyx_3)) break; __pyx_1 = PyList_GET_ITEM(__pyx_3, __pyx_5++); Py_INCREF(__pyx_1); }
  else {
    __pyx_1 = PyIter_Next(__pyx_3);
    if (!__pyx_1) {
      break;
    }
  }
  if (PyTuple_CheckExact(__pyx_1) && PyTuple_GET_SIZE(__pyx_1) == 2) {
    __pyx_6 = PyTuple_GET_ITEM(__pyx_1, 0);
    Py_INCREF(__pyx_6);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":900
 *         if _PYTYPE_DICT.get(self.name) is self:
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in _SCHEMA_TYPE_DICT.items():             # <<<<<<<<<<<<<< 
 *             if pytype is self:
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 */
    Py_DECREF(__pyx_v_xs_type);
    __pyx_v_xs_type = __pyx_6;
    __pyx_6 = 0;
    __pyx_6 = PyTuple_GET_ITEM(__pyx_1, 1);
    Py_INCREF(__pyx_6);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":900
 *         if _PYTYPE_DICT.get(self.name) is self:
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in _SCHEMA_TYPE_DICT.items():             # <<<<<<<<<<<<<< 
 *             if pytype is self:
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 */
    Py_DECREF(__pyx_v_pytype);
    __pyx_v_pytype = __pyx_6;
    __pyx_6 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
  }
  else {
    __pyx_2 = PyObject_GetIter(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_6 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":900
 *         if _PYTYPE_DICT.get(self.name) is self:
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in _SCHEMA_TYPE_DICT.items():             # <<<<<<<<<<<<<< 
 *             if pytype is self:
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 */
    Py_DECREF(__pyx_v_xs_type);
    __pyx_v_xs_type = __pyx_6;
    __pyx_6 = 0;
    __pyx_6 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":900
 *         if _PYTYPE_DICT.get(self.name) is self:
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in _SCHEMA_TYPE_DICT.items():             # <<<<<<<<<<<<<< 
 *             if pytype is self:
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 */
    Py_DECREF(__pyx_v_pytype);
    __pyx_v_pytype = __pyx_6;
    __pyx_6 = 0;
    if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":901
 *             del _PYTYPE_DICT[self.name]
 *         for xs_type, pytype in _SCHEMA_TYPE_DICT.items():
 *             if pytype is self:             # <<<<<<<<<<<<<< 
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 *         if self.type_check is None:
 */
  __pyx_4 = (__pyx_v_pytype == __pyx_v_self);
  if (__pyx_4) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":902
 *         for xs_type, pytype in _SCHEMA_TYPE_DICT.items():
 *             if pytype is self:
 *                 del _SCHEMA_TYPE_DICT[xs_type]             # <<<<<<<<<<<<<< 
 *         if self.type_check is None:
 *             return
 */
    if (PyObject_DelItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_xs_type) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
    goto __pyx_L5;
  }
  __pyx_L5:;
}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":903
 *             if pytype is self:
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 *         if self.type_check is None:             # <<<<<<<<<<<<<< 
 *             return
 *         try:
 */
__pyx_4 = (((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check == Py_None);
if (__pyx_4) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":904
 *                 del _SCHEMA_TYPE_DICT[xs_type]
 *         if self.type_check is None:
 *             return             # <<<<<<<<<<<<<< 
 *         try:
 *             _TYPE_CHECKS.remove( (self.type_check, self) )
 */
  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  goto __pyx_L6;
}
__pyx_L6:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":905
 *         if self.type_check is None:
 *             return
 *         try:             # <<<<<<<<<<<<<< 
 *             _TYPE_CHECKS.remove( (self.type_check, self) )
 *         except ValueError:
 */
/*try:*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":906
 *             return
 *         try:
 *             _TYPE_CHECKS.remove( (self.type_check, self) )             # <<<<<<<<<<<<<< 
 *         except ValueError:
 *             pass
 */
  __pyx_6 = PyObject_GetAttr(__pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_n_remove); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; goto __pyx_L7;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":906
 *             return
 *         try:
 *             _TYPE_CHECKS.remove( (self.type_check, self) )             # <<<<<<<<<<<<<< 
 *         except ValueError:
 *             pass
 */
  __pyx_1 = PyTuple_New(2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; goto __pyx_L7;}
  Py_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
  PyTuple_SET_ITEM(__pyx_1, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
  Py_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_self);
  __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; goto __pyx_L7;}
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
  __pyx_1 = 0;
  __pyx_3 = PyObject_CallObject(__pyx_6, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; goto __pyx_L7;}
  Py_DECREF(__pyx_6); __pyx_6 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
}
goto __pyx_L8;
__pyx_L7:;
Py_XDECREF(__pyx_1); __pyx_1 = 0;
Py_XDECREF(__pyx_6); __pyx_6 = 0;
Py_XDECREF(__pyx_2); __pyx_2 = 0;
Py_XDECREF(__pyx_3); __pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":907
 *         try:
 *             _TYPE_CHECKS.remove( (self.type_check, self) )
 *         except ValueError:             # <<<<<<<<<<<<<< 
 *             pass
 * 
 */
__pyx_7 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
if (__pyx_7) {
  __Pyx_AddTraceback("lxml.objectify.unregister");
  if (__Pyx_GetException(&__pyx_1, &__pyx_6, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_6); __pyx_6 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  goto __pyx_L8;
}
goto __pyx_L1;
__pyx_L8:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_6);
__Pyx_AddTraceback("lxml.objectify.PyType.unregister");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_xs_type);
Py_DECREF(__pyx_v_pytype);
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":915
 *         Note that this must be set before registering the type!
 *         """
 *         def __get__(self):             # <<<<<<<<<<<<<< 
 *             return self._schema_types
 *         def __set__(self, types):
 */

static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(PyObject *__pyx_v_self) {
PyObject *__pyx_r;
Py_INCREF(__pyx_v_self);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":916
 *         """
 *         def __get__(self):
 *             return self._schema_types             # <<<<<<<<<<<<<< 
 *         def __set__(self, types):
 *             self._schema_types = list(types)
 */
Py_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types);
__pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":917
 *         def __get__(self):
 *             return self._schema_types
 *         def __set__(self, types):             # <<<<<<<<<<<<<< 
 *             self._schema_types = list(types)
 * 
 */

static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types); /*proto*/
static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types) {
int __pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_types);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":918
 *             return self._schema_types
 *         def __set__(self, types):
 *             self._schema_types = list(types)             # <<<<<<<<<<<<<< 
 * 
 * cdef class _StringValueSetter:
 */
__pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; goto __pyx_L1;}
Py_INCREF(__pyx_v_types);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_types);
__pyx_2 = PyObject_CallObject(((PyObject*)&PyList_Type), __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":918
 *             return self._schema_types
 *         def __set__(self, types):
 *             self._schema_types = list(types)             # <<<<<<<<<<<<<< 
 * 
 * cdef class _StringValueSetter:
 */
Py_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types);
((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types = __pyx_2;
__pyx_2 = 0;

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.PyType.xmlSchemaTypes.__set__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_types);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":922
 * cdef class _StringValueSetter:
 *     cdef object _stringify
 *     def __init__(self, stringify):             # <<<<<<<<<<<<<< 
 *         self._stringify = stringify
 * 
 */

static int __pyx_pf_4lxml_9objectify_18_StringValueSetter___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4lxml_9objectify_18_StringValueSetter___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_stringify = 0;
int __pyx_r;
static char *__pyx_argnames[] = {"stringify",0};
if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_stringify))) return -1;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_stringify);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":923
 *     cdef object _stringify
 *     def __init__(self, stringify):
 *         self._stringify = stringify             # <<<<<<<<<<<<<< 
 * 
 *     def __call__(self, elem, value):
 */
Py_INCREF(__pyx_v_stringify);
Py_DECREF(((struct __pyx_obj_4lxml_9objectify__StringValueSetter *)__pyx_v_self)->_stringify);
((struct __pyx_obj_4lxml_9objectify__StringValueSetter *)__pyx_v_self)->_stringify = __pyx_v_stringify;

__pyx_r = 0;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_stringify);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":925
 *         self._stringify = stringify
 * 
 *     def __call__(self, elem, value):             # <<<<<<<<<<<<<< 
 *         _add_text(elem, self._stringify(value))
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify_18_StringValueSetter___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_18_StringValueSetter___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_elem = 0;
PyObject *__pyx_v_value = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
static char *__pyx_argnames[] = {"elem","value",0};
if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_elem, &__pyx_v_value))) return NULL;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_elem);
Py_INCREF(__pyx_v_value);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":926
 * 
 *     def __call__(self, elem, value):
 *         _add_text(elem, self._stringify(value))             # <<<<<<<<<<<<<< 
 * 
 * 
 */
if (!__Pyx_TypeTest(__pyx_v_elem, __pyx_ptype_11etreepublic__Element)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":926
 * 
 *     def __call__(self, elem, value):
 *         _add_text(elem, self._stringify(value))             # <<<<<<<<<<<<<< 
 * 
 * 
 */
__pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; goto __pyx_L1;}
Py_INCREF(__pyx_v_value);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_value);
__pyx_2 = PyObject_CallObject(((struct __pyx_obj_4lxml_9objectify__StringValueSetter *)__pyx_v_self)->_stringify, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = __pyx_f_4lxml_9objectify__add_text(((struct LxmlElement *)__pyx_v_elem),__pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify._StringValueSetter.__call__");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_elem);
Py_DECREF(__pyx_v_value);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":938
 * _TYPE_CHECKS = []
 * 
 * cdef _lower_bool(b):             # <<<<<<<<<<<<<< 
 *     if b:
 *         return "true"
 */


static  PyObject *__pyx_f_4lxml_9objectify__lower_bool(PyObject *__pyx_v_b) {
PyObject *__pyx_r;
int __pyx_1;
Py_INCREF(__pyx_v_b);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":939
 * 
 * cdef _lower_bool(b):
 *     if b:             # <<<<<<<<<<<<<< 
 *         return "true"
 *     else:
 */
__pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;}
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":940
 * cdef _lower_bool(b):
 *     if b:
 *         return "true"             # <<<<<<<<<<<<<< 
 *     else:
 *         return "false"
 */
  Py_INCREF(__pyx_n_true);
  __pyx_r = __pyx_n_true;
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":942
 *         return "true"
 *     else:
 *         return "false"             # <<<<<<<<<<<<<< 
 * 
 * def __lower_bool(b):
 */
  Py_INCREF(__pyx_n_false);
  __pyx_r = __pyx_n_false;
  goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("lxml.objectify._lower_bool");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_b);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":944
 *         return "false"
 * 
 * def __lower_bool(b):             # <<<<<<<<<<<<<< 
 *     return _lower_bool(b)
 * 
 */

static PyObject *__pyx_pf_4lxml_9objectify___lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify___lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
Py_INCREF(__pyx_v_b);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":945
 * 
 * def __lower_bool(b):
 *     return _lower_bool(b)             # <<<<<<<<<<<<<< 
 * 
 * cdef _pytypename(obj):
 */
__pyx_1 = __pyx_f_4lxml_9objectify__lower_bool(__pyx_v_b); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.__lower_bool");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_b);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":947
 *     return _lower_bool(b)
 * 
 * cdef _pytypename(obj):             # <<<<<<<<<<<<<< 
 *     if python._isString(obj):
 *         return "str"
 */


static  PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *__pyx_v_obj) {
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
Py_INCREF(__pyx_v_obj);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":948
 * 
 * cdef _pytypename(obj):
 *     if python._isString(obj):             # <<<<<<<<<<<<<< 
 *         return "str"
 *     else:
 */
__pyx_1 = _isString(__pyx_v_obj);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":949
 * cdef _pytypename(obj):
 *     if python._isString(obj):
 *         return "str"             # <<<<<<<<<<<<<< 
 *     else:
 *         return _typename(obj)
 */
  Py_INCREF(__pyx_n_str);
  __pyx_r = __pyx_n_str;
  goto __pyx_L0;
  goto __pyx_L2;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":951
 *         return "str"
 *     else:
 *         return _typename(obj)             # <<<<<<<<<<<<<< 
 * 
 * def pytypename(obj):
 */
  __pyx_2 = __pyx_f_4lxml_9objectify__typename(__pyx_v_obj); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify._pytypename");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_obj);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":953
 *         return _typename(obj)
 * 
 * def pytypename(obj):             # <<<<<<<<<<<<<< 
 *     """Find the name of the corresponding PyType for a Python object.
 *     """
 */

static PyObject *__pyx_pf_4lxml_9objectify_pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static char __pyx_doc_4lxml_9objectify_pytypename[] = "Find the name of the corresponding PyType for a Python object.\n    ";
static PyObject *__pyx_pf_4lxml_9objectify_pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
Py_INCREF(__pyx_v_obj);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":956
 *     """Find the name of the corresponding PyType for a Python object.
 *     """
 *     return _pytypename(obj)             # <<<<<<<<<<<<<< 
 * 
 * cdef _registerPyTypes():
 */
__pyx_1 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v_obj); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("lxml.objectify.pytypename");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_obj);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":958
 *     return _pytypename(obj)
 * 
 * cdef _registerPyTypes():             # <<<<<<<<<<<<<< 
 *     pytype = PyType('int', int, IntElement)
 *     pytype.xmlSchemaTypes = ("int", "short", "byte", "unsignedShort",
 */

static PyObject *__pyx_n_int;
static PyObject *__pyx_n_short;
static PyObject *__pyx_n_byte;
static PyObject *__pyx_n_unsignedShort;
static PyObject *__pyx_n_unsignedByte;
static PyObject *__pyx_n_xmlSchemaTypes;
static PyObject *__pyx_n_long;
static PyObject *__pyx_n_integer;
static PyObject *__pyx_n_nonPositiveInteger;
static PyObject *__pyx_n_negativeInteger;
static PyObject *__pyx_n_nonNegativeInteger;
static PyObject *__pyx_n_unsignedLong;
static PyObject *__pyx_n_unsignedInt;
static PyObject *__pyx_n_positiveInteger;
static PyObject *__pyx_n_float;
static PyObject *__pyx_n_double;
static PyObject *__pyx_n___checkBool;
static PyObject *__pyx_n___lower_bool;
static PyObject *__pyx_n_boolean;
static PyObject *__pyx_n_string;
static PyObject *__pyx_n_normalizedString;
static PyObject *__pyx_n_token;
static PyObject *__pyx_n_language;
static PyObject *__pyx_n_Name;
static PyObject *__pyx_n_NCName;
static PyObject *__pyx_n_ID;
static PyObject *__pyx_n_IDREF;
static PyObject *__pyx_n_ENTITY;
static PyObject *__pyx_n_NMTOKEN;
static PyObject *__pyx_n_NoneType;
static PyObject *__pyx_n_none;


static  PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) {
PyObject *__pyx_v_pytype;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
__pyx_v_pytype = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":959
 * 
 * cdef _registerPyTypes():
 *     pytype = PyType('int', int, IntElement)             # <<<<<<<<<<<<<< 
 *     pytype.xmlSchemaTypes = ("int", "short", "byte", "unsignedShort",
 *                              "unsignedByte",)
 */
__pyx_1 = PyTuple_New(3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; goto __pyx_L1;}
Py_INCREF(__pyx_n_int);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_int);
Py_INCREF(((PyObject*)&PyInt_Type));
PyTuple_SET_ITEM(__pyx_1, 1, ((PyObject*)&PyInt_Type));
Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement));
PyTuple_SET_ITEM(__pyx_1, 2, ((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement));
__pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_4lxml_9objectify_PyType), __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_pytype);
__pyx_v_pytype = __pyx_2;
__pyx_2 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":961
 *     pytype = PyType('int', int, IntElement)
 *     pytype.xmlSchemaTypes = ("int", "short", "byte", "unsignedShort",
 *                              "unsignedByte",)             # <<<<<<<<<<<<<< 
 *     
 *     pytype.register()
 */
__pyx_1 = PyTuple_New(5); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; goto __pyx_L1;}
Py_INCREF(__pyx_n_int);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_int);
Py_INCREF(__pyx_n_short);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_short);
Py_INCREF(__pyx_n_byte);
PyTuple_SET_ITEM(__pyx_1, 2, __pyx_n_byte);
Py_INCREF(__pyx_n_unsignedShort);
PyTuple_SET_ITEM(__pyx_1, 3, __pyx_n_unsignedShort);
Py_INCREF(__pyx_n_unsignedByte);
PyTuple_SET_ITEM(__pyx_1, 4, __pyx_n_unsignedByte);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":960
 * cdef _registerPyTypes():
 *     pytype = PyType('int', int, IntElement)
 *     pytype.xmlSchemaTypes = ("int", "short", "byte", "unsignedShort",             # <<<<<<<<<<<<<< 
 *                              "unsignedByte",)
 *     
 */
if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_xmlSchemaTypes, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":963
 *                              "unsignedByte",)
 *     
 *     pytype.register()             # <<<<<<<<<<<<<< 
 * 
 *     pytype = PyType('long', long, LongElement)
 */
__pyx_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_register); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;}
__pyx_1 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":965
 *     pytype.register()
 * 
 *     pytype = PyType('long', long, LongElement)             # <<<<<<<<<<<<<< 
 *     pytype.xmlSchemaTypes = ("integer", "nonPositiveInteger", "negativeInteger",
 *                              "long", "nonNegativeInteger", "unsignedLong",
 */
__pyx_2 = PyTuple_New(3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; goto __pyx_L1;}
Py_INCREF(__pyx_n_long);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_long);
Py_INCREF(((PyObject*)&PyLong_Type));
PyTuple_SET_ITEM(__pyx_2, 1, ((PyObject*)&PyLong_Type));
Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_LongElement));
PyTuple_SET_ITEM(__pyx_2, 2, ((PyObject*)__pyx_ptype_4lxml_9objectify_LongElement));
__pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_4lxml_9objectify_PyType), __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_pytype);
__pyx_v_pytype = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":968
 *     pytype.xmlSchemaTypes = ("integer", "nonPositiveInteger", "negativeInteger",
 *                              "long", "nonNegativeInteger", "unsignedLong",
 *                              "unsignedInt", "positiveInteger",)             # <<<<<<<<<<<<<< 
 *     pytype.register()
 * 
 */
__pyx_2 = PyTuple_New(8); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; goto __pyx_L1;}
Py_INCREF(__pyx_n_integer);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_integer);
Py_INCREF(__pyx_n_nonPositiveInteger);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_n_nonPositiveInteger);
Py_INCREF(__pyx_n_negativeInteger);
PyTuple_SET_ITEM(__pyx_2, 2, __pyx_n_negativeInteger);
Py_INCREF(__pyx_n_long);
PyTuple_SET_ITEM(__pyx_2, 3, __pyx_n_long);
Py_INCREF(__pyx_n_nonNegativeInteger);
PyTuple_SET_ITEM(__pyx_2, 4, __pyx_n_nonNegativeInteger);
Py_INCREF(__pyx_n_unsignedLong);
PyTuple_SET_ITEM(__pyx_2, 5, __pyx_n_unsignedLong);
Py_INCREF(__pyx_n_unsignedInt);
PyTuple_SET_ITEM(__pyx_2, 6, __pyx_n_unsignedInt);
Py_INCREF(__pyx_n_positiveInteger);
PyTuple_SET_ITEM(__pyx_2, 7, __pyx_n_positiveInteger);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":966
 * 
 *     pytype = PyType('long', long, LongElement)
 *     pytype.xmlSchemaTypes = ("integer", "nonPositiveInteger", "negativeInteger",             # <<<<<<<<<<<<<< 
 *                              "long", "nonNegativeInteger", "unsignedLong",
 *                              "unsignedInt", "positiveInteger",)
 */
if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_xmlSchemaTypes, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":969
 *                              "long", "nonNegativeInteger", "unsignedLong",
 *                              "unsignedInt", "positiveInteger",)
 *     pytype.register()             # <<<<<<<<<<<<<< 
 * 
 *     pytype = PyType('float', float, FloatElement)
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_register); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; goto __pyx_L1;}
__pyx_2 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":971
 *     pytype.register()
 * 
 *     pytype = PyType('float', float, FloatElement)             # <<<<<<<<<<<<<< 
 *     pytype.xmlSchemaTypes = ("double", "float")
 *     pytype.register()
 */
__pyx_1 = PyTuple_New(3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; goto __pyx_L1;}
Py_INCREF(__pyx_n_float);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_float);
Py_INCREF(((PyObject*)&PyFloat_Type));
PyTuple_SET_ITEM(__pyx_1, 1, ((PyObject*)&PyFloat_Type));
Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_FloatElement));
PyTuple_SET_ITEM(__pyx_1, 2, ((PyObject*)__pyx_ptype_4lxml_9objectify_FloatElement));
__pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_4lxml_9objectify_PyType), __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_pytype);
__pyx_v_pytype = __pyx_2;
__pyx_2 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":972
 * 
 *     pytype = PyType('float', float, FloatElement)
 *     pytype.xmlSchemaTypes = ("double", "float")             # <<<<<<<<<<<<<< 
 *     pytype.register()
 * 
 */
__pyx_1 = PyTuple_New(2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; goto __pyx_L1;}
Py_INCREF(__pyx_n_double);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_double);
Py_INCREF(__pyx_n_float);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_float);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":972
 * 
 *     pytype = PyType('float', float, FloatElement)
 *     pytype.xmlSchemaTypes = ("double", "float")             # <<<<<<<<<<<<<< 
 *     pytype.register()
 * 
 */
if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_xmlSchemaTypes, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":973
 *     pytype = PyType('float', float, FloatElement)
 *     pytype.xmlSchemaTypes = ("double", "float")
 *     pytype.register()             # <<<<<<<<<<<<<< 
 * 
 *     pytype = PyType('bool', __checkBool, BoolElement, __lower_bool)
 */
__pyx_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_register); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; goto __pyx_L1;}
__pyx_1 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":975
 *     pytype.register()
 * 
 *     pytype = PyType('bool', __checkBool, BoolElement, __lower_bool)             # <<<<<<<<<<<<<< 
 *     pytype.xmlSchemaTypes = ("boolean",)
 *     pytype.register()
 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n___checkBool); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":975
 *     pytype.register()
 * 
 *     pytype = PyType('bool', __checkBool, BoolElement, __lower_bool)             # <<<<<<<<<<<<<< 
 *     pytype.xmlSchemaTypes = ("boolean",)
 *     pytype.register()
 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n___lower_bool); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;}
__pyx_3 = PyTuple_New(4); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;}
Py_INCREF(__pyx_n_bool);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_bool);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement));
PyTuple_SET_ITEM(__pyx_3, 2, ((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement));
PyTuple_SET_ITEM(__pyx_3, 3, __pyx_1);
__pyx_2 = 0;
__pyx_1 = 0;
__pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_4lxml_9objectify_PyType), __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_pytype);
__pyx_v_pytype = __pyx_2;
__pyx_2 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":976
 * 
 *     pytype = PyType('bool', __checkBool, BoolElement, __lower_bool)
 *     pytype.xmlSchemaTypes = ("boolean",)             # <<<<<<<<<<<<<< 
 *     pytype.register()
 * 
 */
__pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;}
Py_INCREF(__pyx_n_boolean);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_boolean);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":976
 * 
 *     pytype = PyType('bool', __checkBool, BoolElement, __lower_bool)
 *     pytype.xmlSchemaTypes = ("boolean",)             # <<<<<<<<<<<<<< 
 *     pytype.register()
 * 
 */
if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_xmlSchemaTypes, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":977
 *     pytype = PyType('bool', __checkBool, BoolElement, __lower_bool)
 *     pytype.xmlSchemaTypes = ("boolean",)
 *     pytype.register()             # <<<<<<<<<<<<<< 
 * 
 *     pytype = PyType('str', None, StringElement)
 */
__pyx_3 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_register); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; goto __pyx_L1;}
__pyx_2 = PyObject_CallObject(__pyx_3, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":979
 *     pytype.register()
 * 
 *     pytype = PyType('str', None, StringElement)             # <<<<<<<<<<<<<< 
 *     pytype.xmlSchemaTypes = ("string", "normalizedString", "token", "language",
 *                              "Name", "NCName", "ID", "IDREF", "ENTITY",
 */
__pyx_1 = PyTuple_New(3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; goto __pyx_L1;}
Py_INCREF(__pyx_n_str);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_str);
Py_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_1, 1, Py_None);
Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement));
PyTuple_SET_ITEM(__pyx_1, 2, ((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement));
__pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_4lxml_9objectify_PyType), __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_pytype);
__pyx_v_pytype = __pyx_3;
__pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":982
 *     pytype.xmlSchemaTypes = ("string", "normalizedString", "token", "language",
 *                              "Name", "NCName", "ID", "IDREF", "ENTITY",
 *                              "NMTOKEN", )             # <<<<<<<<<<<<<< 
 *     pytype.register()
 * 
 */
__pyx_2 = PyTuple_New(10); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; goto __pyx_L1;}
Py_INCREF(__pyx_n_string);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_string);
Py_INCREF(__pyx_n_normalizedString);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_n_normalizedString);
Py_INCREF(__pyx_n_token);
PyTuple_SET_ITEM(__pyx_2, 2, __pyx_n_token);
Py_INCREF(__pyx_n_language);
PyTuple_SET_ITEM(__pyx_2, 3, __pyx_n_language);
Py_INCREF(__pyx_n_Name);
PyTuple_SET_ITEM(__pyx_2, 4, __pyx_n_Name);
Py_INCREF(__pyx_n_NCName);
PyTuple_SET_ITEM(__pyx_2, 5, __pyx_n_NCName);
Py_INCREF(__pyx_n_ID);
PyTuple_SET_ITEM(__pyx_2, 6, __pyx_n_ID);
Py_INCREF(__pyx_n_IDREF);
PyTuple_SET_ITEM(__pyx_2, 7, __pyx_n_IDREF);
Py_INCREF(__pyx_n_ENTITY);
PyTuple_SET_ITEM(__pyx_2, 8, __pyx_n_ENTITY);
Py_INCREF(__pyx_n_NMTOKEN);
PyTuple_SET_ITEM(__pyx_2, 9, __pyx_n_NMTOKEN);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":980
 * 
 *     pytype = PyType('str', None, StringElement)
 *     pytype.xmlSchemaTypes = ("string", "normalizedString", "token", "language",             # <<<<<<<<<<<<<< 
 *                              "Name", "NCName", "ID", "IDREF", "ENTITY",
 *                              "NMTOKEN", )
 */
if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_xmlSchemaTypes, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":983
 *                              "Name", "NCName", "ID", "IDREF", "ENTITY",
 *                              "NMTOKEN", )
 *     pytype.register()             # <<<<<<<<<<<<<< 
 * 
 *     # since lxml 2.0
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_register); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":986
 * 
 *     # since lxml 2.0
 *     pytype = PyType('NoneType', None, NoneElement)             # <<<<<<<<<<<<<< 
 *     pytype.register()
 * 
 */
__pyx_2 = PyTuple_New(3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; goto __pyx_L1;}
Py_INCREF(__pyx_n_NoneType);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_NoneType);
Py_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement));
PyTuple_SET_ITEM(__pyx_2, 2, ((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement));
__pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_4lxml_9objectify_PyType), __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_pytype);
__pyx_v_pytype = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":987
 *     # since lxml 2.0
 *     pytype = PyType('NoneType', None, NoneElement)
 *     pytype.register()             # <<<<<<<<<<<<<< 
 * 
 *     # backwards compatibility
 */
__pyx_3 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_register); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; goto __pyx_L1;}
__pyx_2 = PyObject_CallObject(__pyx_3, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":990
 * 
 *     # backwards compatibility
 *     pytype = PyType('none', None, NoneElement)             # <<<<<<<<<<<<<< 
 *     pytype.register()
 * 
 */
__pyx_1 = PyTuple_New(3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;}
Py_INCREF(__pyx_n_none);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_none);
Py_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_1, 1, Py_None);
Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement));
PyTuple_SET_ITEM(__pyx_1, 2, ((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement));
__pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_4lxml_9objectify_PyType), __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_pytype);
__pyx_v_pytype = __pyx_3;
__pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":991
 *     # backwards compatibility
 *     pytype = PyType('none', None, NoneElement)
 *     pytype.register()             # <<<<<<<<<<<<<< 
 * 
 * # non-registered PyType for inner tree elements
 */
__pyx_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_register); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;}
__pyx_1 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("lxml.objectify._registerPyTypes");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_pytype);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":999
 * _registerPyTypes()
 * 
 * def getRegisteredTypes():             # <<<<<<<<<<<<<< 
 *     """Returns a list of the currently registered PyType objects.
 * 
 */

static PyObject *__pyx_n_add;
static PyObject *__pyx_n_itervalues;

static PyObject *__pyx_pf_4lxml_9objectify_getRegisteredTypes(PyObject *__pyx_self, PyObject *unused); /*proto*/
static char __pyx_doc_4lxml_9objectify_getRegisteredTypes[] = "Returns a list of the currently registered PyType objects.\n\n    To add a new type, retrieve this list and call unregister() for all\n    entries.  Then add the new type at a suitable position (possibly replacing\n    an existing one) and call register() for all entries.\n\n    This is necessary if the new type interferes with the type check functions\n    of existing ones (normally only int/float/bool) and must the tried before\n    other types.  To add a type that is not yet parsable by the current type\n    check functions, you can simply register() it, which will append it to the\n    end of the type list.\n    ";
static PyObject *__pyx_pf_4lxml_9objectify_getRegisteredTypes(PyObject *__pyx_self, PyObject *unused) {
PyObject *__pyx_v_types;
PyObject *__pyx_v_known;
PyObject *__pyx_v_add_to_known;
PyObject *__pyx_v_check;
PyObject *__pyx_v_pytype;
PyObject *__pyx_v_name;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
Py_ssize_t __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
int __pyx_6;
int __pyx_7;
__pyx_v_types = Py_None; Py_INCREF(Py_None);
__pyx_v_known = Py_None; Py_INCREF(Py_None);
__pyx_v_add_to_known = Py_None; Py_INCREF(Py_None);
__pyx_v_check = Py_None; Py_INCREF(Py_None);
__pyx_v_pytype = Py_None; Py_INCREF(Py_None);
__pyx_v_name = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1012
 *     end of the type list.
 *     """
 *     types = []             # <<<<<<<<<<<<<< 
 *     known = set()
 *     add_to_known = known.add
 */
__pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;}
Py_DECREF(__pyx_v_types);
__pyx_v_types = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1013
 *     """
 *     types = []
 *     known = set()             # <<<<<<<<<<<<<< 
 *     add_to_known = known.add
 *     for check, pytype in _TYPE_CHECKS:
 */
__pyx_1 = PyObject_CallObject(__pyx_v_4lxml_9objectify_set, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; goto __pyx_L1;}
Py_DECREF(__pyx_v_known);
__pyx_v_known = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1014
 *     types = []
 *     known = set()
 *     add_to_known = known.add             # <<<<<<<<<<<<<< 
 *     for check, pytype in _TYPE_CHECKS:
 *         name = pytype.name
 */
__pyx_1 = PyObject_GetAttr(__pyx_v_known, __pyx_n_add); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; goto __pyx_L1;}
Py_DECREF(__pyx_v_add_to_known);
__pyx_v_add_to_known = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1015
 *     known = set()
 *     add_to_known = known.add
 *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         name = pytype.name
 *         if name not in known:
 */
if (PyList_CheckExact(__pyx_v_4lxml_9objectify__TYPE_CHECKS)) { __pyx_2 = 0; __pyx_1 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; Py_INCREF(__pyx_1); }
else { __pyx_1 = PyObject_GetIter(__pyx_v_4lxml_9objectify__TYPE_CHECKS); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; goto __pyx_L1;} }
for (;;) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1015
 *     known = set()
 *     add_to_known = known.add
 *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         name = pytype.name
 *         if name not in known:
 */
  if (PyList_CheckExact(__pyx_1)) { if (__pyx_2 >= PyList_GET_SIZE(__pyx_1)) break; __pyx_3 = PyList_GET_ITEM(__pyx_1, __pyx_2++); Py_INCREF(__pyx_3); }
  else {
    __pyx_3 = PyIter_Next(__pyx_1);
    if (!__pyx_3) {
      break;
    }
  }
  if (PyTuple_CheckExact(__pyx_3) && PyTuple_GET_SIZE(__pyx_3) == 2) {
    __pyx_5 = PyTuple_GET_ITEM(__pyx_3, 0);
    Py_INCREF(__pyx_5);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1015
 *     known = set()
 *     add_to_known = known.add
 *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         name = pytype.name
 *         if name not in known:
 */
    Py_DECREF(__pyx_v_check);
    __pyx_v_check = __pyx_5;
    __pyx_5 = 0;
    __pyx_5 = PyTuple_GET_ITEM(__pyx_3, 1);
    Py_INCREF(__pyx_5);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1015
 *     known = set()
 *     add_to_known = known.add
 *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         name = pytype.name
 *         if name not in known:
 */
    Py_DECREF(__pyx_v_pytype);
    __pyx_v_pytype = __pyx_5;
    __pyx_5 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
  }
  else {
    __pyx_4 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1015
 *     known = set()
 *     add_to_known = known.add
 *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         name = pytype.name
 *         if name not in known:
 */
    Py_DECREF(__pyx_v_check);
    __pyx_v_check = __pyx_5;
    __pyx_5 = 0;
    __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1015
 *     known = set()
 *     add_to_known = known.add
 *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         name = pytype.name
 *         if name not in known:
 */
    Py_DECREF(__pyx_v_pytype);
    __pyx_v_pytype = __pyx_5;
    __pyx_5 = 0;
    if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1016
 *     add_to_known = known.add
 *     for check, pytype in _TYPE_CHECKS:
 *         name = pytype.name             # <<<<<<<<<<<<<< 
 *         if name not in known:
 *             add_to_known(name)
 */
  __pyx_5 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_name); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; goto __pyx_L1;}
  Py_DECREF(__pyx_v_name);
  __pyx_v_name = __pyx_5;
  __pyx_5 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1017
 *     for check, pytype in _TYPE_CHECKS:
 *         name = pytype.name
 *         if name not in known:             # <<<<<<<<<<<<<< 
 *             add_to_known(name)
 *             python.PyList_Append(types, pytype)
 */
  __pyx_6 = (!PySequence_Contains(__pyx_v_known, __pyx_v_name)); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;}
  if (__pyx_6) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1018
 *         name = pytype.name
 *         if name not in known:
 *             add_to_known(name)             # <<<<<<<<<<<<<< 
 *             python.PyList_Append(types, pytype)
 *     for pytype in _PYTYPE_DICT.itervalues():
 */
    __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
    Py_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_name);
    __pyx_4 = PyObject_CallObject(__pyx_v_add_to_known, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1019
 *         if name not in known:
 *             add_to_known(name)
 *             python.PyList_Append(types, pytype)             # <<<<<<<<<<<<<< 
 *     for pytype in _PYTYPE_DICT.itervalues():
 *         name = pytype.name
 */
    __pyx_7 = PyList_Append(__pyx_v_types,__pyx_v_pytype); if (unlikely(__pyx_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; goto __pyx_L1;}
    goto __pyx_L4;
  }
  __pyx_L4:;
}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1020
 *             add_to_known(name)
 *             python.PyList_Append(types, pytype)
 *     for pytype in _PYTYPE_DICT.itervalues():             # <<<<<<<<<<<<<< 
 *         name = pytype.name
 *         if name not in known:
 */
__pyx_5 = PyObject_GetAttr(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_n_itervalues); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_5, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyList_CheckExact(__pyx_3)) { __pyx_2 = 0; __pyx_4 = __pyx_3; Py_INCREF(__pyx_4); }
else { __pyx_4 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; goto __pyx_L1;} }
Py_DECREF(__pyx_3); __pyx_3 = 0;
for (;;) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1020
 *             add_to_known(name)
 *             python.PyList_Append(types, pytype)
 *     for pytype in _PYTYPE_DICT.itervalues():             # <<<<<<<<<<<<<< 
 *         name = pytype.name
 *         if name not in known:
 */
  if (PyList_CheckExact(__pyx_4)) { if (__pyx_2 >= PyList_GET_SIZE(__pyx_4)) break; __pyx_1 = PyList_GET_ITEM(__pyx_4, __pyx_2++); Py_INCREF(__pyx_1); }
  else {
    __pyx_1 = PyIter_Next(__pyx_4);
    if (!__pyx_1) {
      break;
    }
  }
  Py_DECREF(__pyx_v_pytype);
  __pyx_v_pytype = __pyx_1;
  __pyx_1 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1021
 *             python.PyList_Append(types, pytype)
 *     for pytype in _PYTYPE_DICT.itervalues():
 *         name = pytype.name             # <<<<<<<<<<<<<< 
 *         if name not in known:
 *             add_to_known(name)
 */
  __pyx_5 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_name); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; goto __pyx_L1;}
  Py_DECREF(__pyx_v_name);
  __pyx_v_name = __pyx_5;
  __pyx_5 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1022
 *     for pytype in _PYTYPE_DICT.itervalues():
 *         name = pytype.name
 *         if name not in known:             # <<<<<<<<<<<<<< 
 *             add_to_known(name)
 *             python.PyList_Append(types, pytype)
 */
  __pyx_6 = (!PySequence_Contains(__pyx_v_known, __pyx_v_name)); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; goto __pyx_L1;}
  if (__pyx_6) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1023
 *         name = pytype.name
 *         if name not in known:
 *             add_to_known(name)             # <<<<<<<<<<<<<< 
 *             python.PyList_Append(types, pytype)
 *     return types
 */
    __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; goto __pyx_L1;}
    Py_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_name);
    __pyx_1 = PyObject_CallObject(__pyx_v_add_to_known, __pyx_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1024
 *         if name not in known:
 *             add_to_known(name)
 *             python.PyList_Append(types, pytype)             # <<<<<<<<<<<<<< 
 *     return types
 * 
 */
    __pyx_7 = PyList_Append(__pyx_v_types,__pyx_v_pytype); if (unlikely(__pyx_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;}
    goto __pyx_L7;
  }
  __pyx_L7:;
}
Py_DECREF(__pyx_4); __pyx_4 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1025
 *             add_to_known(name)
 *             python.PyList_Append(types, pytype)
 *     return types             # <<<<<<<<<<<<<< 
 * 
 * cdef PyType _guessPyType(value, PyType defaulttype):
 */
Py_INCREF(__pyx_v_types);
__pyx_r = __pyx_v_types;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("lxml.objectify.getRegisteredTypes");
__pyx_r = NULL;
__pyx_L0:;
Py_DECREF(__pyx_v_types);
Py_DECREF(__pyx_v_known);
Py_DECREF(__pyx_v_add_to_known);
Py_DECREF(__pyx_v_check);
Py_DECREF(__pyx_v_pytype);
Py_DECREF(__pyx_v_name);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1027
 *     return types
 * 
 * cdef PyType _guessPyType(value, PyType defaulttype):             # <<<<<<<<<<<<<< 
 *     if value is None:
 *         return None
 */

static  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guessPyType(PyObject *__pyx_v_value,struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_defaulttype) {
PyObject *__pyx_v_type_check;
PyObject *__pyx_v_tested_pytype;
struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r;
int __pyx_1;
Py_ssize_t __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
int __pyx_7;
Py_INCREF(__pyx_v_value);
Py_INCREF(__pyx_v_defaulttype);
__pyx_v_type_check = Py_None; Py_INCREF(Py_None);
__pyx_v_tested_pytype = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1028
 * 
 * cdef PyType _guessPyType(value, PyType defaulttype):
 *     if value is None:             # <<<<<<<<<<<<<< 
 *         return None
 *     for type_check, tested_pytype in _TYPE_CHECKS:
 */
__pyx_1 = (__pyx_v_value == Py_None);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1029
 * cdef PyType _guessPyType(value, PyType defaulttype):
 *     if value is None:
 *         return None             # <<<<<<<<<<<<<< 
 *     for type_check, tested_pytype in _TYPE_CHECKS:
 *         try:
 */
  Py_INCREF(Py_None);
  __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
  goto __pyx_L0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1030
 *     if value is None:
 *         return None
 *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         try:
 *             type_check(value)
 */
if (PyList_CheckExact(__pyx_v_4lxml_9objectify__TYPE_CHECKS)) { __pyx_2 = 0; __pyx_3 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; Py_INCREF(__pyx_3); }
else { __pyx_3 = PyObject_GetIter(__pyx_v_4lxml_9objectify__TYPE_CHECKS); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; goto __pyx_L1;} }
for (;;) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1030
 *     if value is None:
 *         return None
 *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         try:
 *             type_check(value)
 */
  if (PyList_CheckExact(__pyx_3)) { if (__pyx_2 >= PyList_GET_SIZE(__pyx_3)) break; __pyx_4 = PyList_GET_ITEM(__pyx_3, __pyx_2++); Py_INCREF(__pyx_4); }
  else {
    __pyx_4 = PyIter_Next(__pyx_3);
    if (!__pyx_4) {
      break;
    }
  }
  if (PyTuple_CheckExact(__pyx_4) && PyTuple_GET_SIZE(__pyx_4) == 2) {
    __pyx_6 = PyTuple_GET_ITEM(__pyx_4, 0);
    Py_INCREF(__pyx_6);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1030
 *     if value is None:
 *         return None
 *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         try:
 *             type_check(value)
 */
    Py_DECREF(__pyx_v_type_check);
    __pyx_v_type_check = __pyx_6;
    __pyx_6 = 0;
    __pyx_6 = PyTuple_GET_ITEM(__pyx_4, 1);
    Py_INCREF(__pyx_6);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1030
 *     if value is None:
 *         return None
 *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         try:
 *             type_check(value)
 */
    Py_DECREF(__pyx_v_tested_pytype);
    __pyx_v_tested_pytype = __pyx_6;
    __pyx_6 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
  }
  else {
    __pyx_5 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    __pyx_6 = __Pyx_UnpackItem(__pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1030
 *     if value is None:
 *         return None
 *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         try:
 *             type_check(value)
 */
    Py_DECREF(__pyx_v_type_check);
    __pyx_v_type_check = __pyx_6;
    __pyx_6 = 0;
    __pyx_6 = __Pyx_UnpackItem(__pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1030
 *     if value is None:
 *         return None
 *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         try:
 *             type_check(value)
 */
    Py_DECREF(__pyx_v_tested_pytype);
    __pyx_v_tested_pytype = __pyx_6;
    __pyx_6 = 0;
    if (__Pyx_EndUnpack(__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
  }
  /*try:*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1032
 *     for type_check, tested_pytype in _TYPE_CHECKS:
 *         try:
 *             type_check(value)             # <<<<<<<<<<<<<< 
 *             return <PyType>tested_pytype
 *         except IGNORABLE_ERRORS:
 */
    __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; goto __pyx_L5;}
    Py_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_value);
    __pyx_4 = PyObject_CallObject(__pyx_v_type_check, __pyx_6); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; goto __pyx_L5;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1033
 *         try:
 *             type_check(value)
 *             return <PyType>tested_pytype             # <<<<<<<<<<<<<< 
 *         except IGNORABLE_ERRORS:
 *             # could not be parsed as the specififed type => ignore
 */
    Py_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_tested_pytype)));
    __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_tested_pytype);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    goto __pyx_L0;
  }
  goto __pyx_L6;
  __pyx_L5:;
  Py_XDECREF(__pyx_5); __pyx_5 = 0;
  Py_XDECREF(__pyx_6); __pyx_6 = 0;
  Py_XDECREF(__pyx_4); __pyx_4 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1034
 *             type_check(value)
 *             return <PyType>tested_pytype
 *         except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<< 
 *             # could not be parsed as the specififed type => ignore
 *             pass
 */
  __pyx_7 = PyErr_ExceptionMatches(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
  if (__pyx_7) {
    __Pyx_AddTraceback("lxml.objectify._guessPyType");
    if (__Pyx_GetException(&__pyx_5, &__pyx_6, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    goto __pyx_L6;
  }
  goto __pyx_L1;
  __pyx_L6:;
}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1037
 *             # could not be parsed as the specififed type => ignore
 *             pass
 *     return defaulttype             # <<<<<<<<<<<<<< 
 * 
 * cdef object _guessElementClass(tree.xmlNode* c_node):
 */
Py_INCREF(((PyObject *)__pyx_v_defaulttype));
__pyx_r = __pyx_v_defaulttype;
goto __pyx_L0;

__pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
__Pyx_AddTraceback("lxml.objectify._guessPyType");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_type_check);
Py_DECREF(__pyx_v_tested_pytype);
Py_DECREF(__pyx_v_value);
Py_DECREF(__pyx_v_defaulttype);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1039
 *     return defaulttype
 * 
 * cdef object _guessElementClass(tree.xmlNode* c_node):             # <<<<<<<<<<<<<< 
 *     value = textOf(c_node)
 *     if value is None:
 */

static PyObject *__pyx_k148p;

static char __pyx_k148[] = "";

static  PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_node) {
PyObject *__pyx_v_value;
PyObject *__pyx_v_type_check;
PyObject *__pyx_v_pytype;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
Py_ssize_t __pyx_3;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
int __pyx_7;
__pyx_v_value = Py_None; Py_INCREF(Py_None);
__pyx_v_type_check = Py_None; Py_INCREF(Py_None);
__pyx_v_pytype = Py_None; Py_INCREF(Py_None);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1040
 * 
 * cdef object _guessElementClass(tree.xmlNode* c_node):
 *     value = textOf(c_node)             # <<<<<<<<<<<<<< 
 *     if value is None:
 *         return None
 */
__pyx_1 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; goto __pyx_L1;}
Py_DECREF(__pyx_v_value);
__pyx_v_value = __pyx_1;
__pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1041
 * cdef object _guessElementClass(tree.xmlNode* c_node):
 *     value = textOf(c_node)
 *     if value is None:             # <<<<<<<<<<<<<< 
 *         return None
 *     if value == '':
 */
__pyx_2 = (__pyx_v_value == Py_None);
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1042
 *     value = textOf(c_node)
 *     if value is None:
 *         return None             # <<<<<<<<<<<<<< 
 *     if value == '':
 *         return StringElement
 */
  Py_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1043
 *     if value is None:
 *         return None
 *     if value == '':             # <<<<<<<<<<<<<< 
 *         return StringElement
 *     
 */
__pyx_1 = PyObject_RichCompare(__pyx_v_value, __pyx_k148p, Py_EQ); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; goto __pyx_L1;}
__pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_2) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1044
 *         return None
 *     if value == '':
 *         return StringElement             # <<<<<<<<<<<<<< 
 *     
 *     for type_check, pytype in _TYPE_CHECKS:
 */
  Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement));
  __pyx_r = ((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement);
  goto __pyx_L0;
  goto __pyx_L3;
}
__pyx_L3:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1046
 *         return StringElement
 *     
 *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         try:
 *             type_check(value)
 */
if (PyList_CheckExact(__pyx_v_4lxml_9objectify__TYPE_CHECKS)) { __pyx_3 = 0; __pyx_1 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; Py_INCREF(__pyx_1); }
else { __pyx_1 = PyObject_GetIter(__pyx_v_4lxml_9objectify__TYPE_CHECKS); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; goto __pyx_L1;} }
for (;;) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1046
 *         return StringElement
 *     
 *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         try:
 *             type_check(value)
 */
  if (PyList_CheckExact(__pyx_1)) { if (__pyx_3 >= PyList_GET_SIZE(__pyx_1)) break; __pyx_4 = PyList_GET_ITEM(__pyx_1, __pyx_3++); Py_INCREF(__pyx_4); }
  else {
    __pyx_4 = PyIter_Next(__pyx_1);
    if (!__pyx_4) {
      break;
    }
  }
  if (PyTuple_CheckExact(__pyx_4) && PyTuple_GET_SIZE(__pyx_4) == 2) {
    __pyx_6 = PyTuple_GET_ITEM(__pyx_4, 0);
    Py_INCREF(__pyx_6);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1046
 *         return StringElement
 *     
 *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         try:
 *             type_check(value)
 */
    Py_DECREF(__pyx_v_type_check);
    __pyx_v_type_check = __pyx_6;
    __pyx_6 = 0;
    __pyx_6 = PyTuple_GET_ITEM(__pyx_4, 1);
    Py_INCREF(__pyx_6);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1046
 *         return StringElement
 *     
 *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         try:
 *             type_check(value)
 */
    Py_DECREF(__pyx_v_pytype);
    __pyx_v_pytype = __pyx_6;
    __pyx_6 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
  }
  else {
    __pyx_5 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    __pyx_6 = __Pyx_UnpackItem(__pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1046
 *         return StringElement
 *     
 *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         try:
 *             type_check(value)
 */
    Py_DECREF(__pyx_v_type_check);
    __pyx_v_type_check = __pyx_6;
    __pyx_6 = 0;
    __pyx_6 = __Pyx_UnpackItem(__pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1046
 *         return StringElement
 *     
 *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<< 
 *         try:
 *             type_check(value)
 */
    Py_DECREF(__pyx_v_pytype);
    __pyx_v_pytype = __pyx_6;
    __pyx_6 = 0;
    if (__Pyx_EndUnpack(__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
  }
  /*try:*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1048
 *     for type_check, pytype in _TYPE_CHECKS:
 *         try:
 *             type_check(value)             # <<<<<<<<<<<<<< 
 *             return (<PyType>pytype)._type
 *         except IGNORABLE_ERRORS:
 */
    __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; goto __pyx_L6;}
    Py_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_value);
    __pyx_4 = PyObject_CallObject(__pyx_v_type_check, __pyx_6); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; goto __pyx_L6;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1049
 *         try:
 *             type_check(value)
 *             return (<PyType>pytype)._type             # <<<<<<<<<<<<<< 
 *         except IGNORABLE_ERRORS:
 *             pass
 */
    Py_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->_type);
    __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->_type;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    goto __pyx_L0;
  }
  goto __pyx_L7;
  __pyx_L6:;
  Py_XDECREF(__pyx_5); __pyx_5 = 0;
  Py_XDECREF(__pyx_6); __pyx_6 = 0;
  Py_XDECREF(__pyx_4); __pyx_4 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1050
 *             type_check(value)
 *             return (<PyType>pytype)._type
 *         except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<< 
 *             pass
 *     return None
 */
  __pyx_7 = PyErr_ExceptionMatches(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
  if (__pyx_7) {
    __Pyx_AddTraceback("lxml.objectify._guessElementClass");
    if (__Pyx_GetException(&__pyx_5, &__pyx_6, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    goto __pyx_L7;
  }
  goto __pyx_L1;
  __pyx_L7:;
}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1052
 *         except IGNORABLE_ERRORS:
 *             pass
 *     return None             # <<<<<<<<<<<<<< 
 * 
 * ################################################################################
 */
Py_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
__Pyx_AddTraceback("lxml.objectify._guessElementClass");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_value);
Py_DECREF(__pyx_v_type_check);
Py_DECREF(__pyx_v_pytype);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1068
 *     cdef object _nsmap
 *     cdef bint _annotate
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<< 
 *                  makeelement=None):
 *         if nsmap is None:
 */

static PyObject *__pyx_k149p;

static char __pyx_k149[] = "{%s}";

static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_namespace = 0;
PyObject *__pyx_v_nsmap = 0;
PyObject *__pyx_v_annotate = 0;
PyObject *__pyx_v_makeelement = 0;
int __pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
static char *__pyx_argnames[] = {"namespace","nsmap","annotate","makeelement",0};
__pyx_v_namespace = __pyx_k22;
__pyx_v_nsmap = __pyx_k23;
__pyx_v_annotate = __pyx_k24;
__pyx_v_makeelement = __pyx_k25;
if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, 0, 0, 0) < 0) return -1;
if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOOO", __pyx_argnames, &__pyx_v_namespace, &__pyx_v_nsmap, &__pyx_v_annotate, &__pyx_v_makeelement))) {
  Py_XDECREF(__pyx_args);
  Py_XDECREF(__pyx_kwds);
  return -1;
}
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_namespace);
Py_INCREF(__pyx_v_nsmap);
Py_INCREF(__pyx_v_annotate);
Py_INCREF(__pyx_v_makeelement);

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1070
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
 *                  makeelement=None):
 *         if nsmap is None:             # <<<<<<<<<<<<<< 
 *             nsmap = _DEFAULT_NSMAP
 *         self._nsmap = nsmap
 */
__pyx_1 = (__pyx_v_nsmap == Py_None);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1071
 *                  makeelement=None):
 *         if nsmap is None:
 *             nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<< 
 *         self._nsmap = nsmap
 *         if namespace is None:
 */
  Py_INCREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
  Py_DECREF(__pyx_v_nsmap);
  __pyx_v_nsmap = __pyx_v_4lxml_9objectify__DEFAULT_NSMAP;
  goto __pyx_L2;
}
__pyx_L2:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1072
 *         if nsmap is None:
 *             nsmap = _DEFAULT_NSMAP
 *         self._nsmap = nsmap             # <<<<<<<<<<<<<< 
 *         if namespace is None:
 *             self._namespace = None
 */
Py_INCREF(__pyx_v_nsmap);
Py_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap = __pyx_v_nsmap;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1073
 *             nsmap = _DEFAULT_NSMAP
 *         self._nsmap = nsmap
 *         if namespace is None:             # <<<<<<<<<<<<<< 
 *             self._namespace = None
 *         else:
 */
__pyx_1 = (__pyx_v_namespace == Py_None);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1074
 *         self._nsmap = nsmap
 *         if namespace is None:
 *             self._namespace = None             # <<<<<<<<<<<<<< 
 *         else:
 *             self._namespace = "{%s}" % namespace
 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
  ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace = Py_None;
  goto __pyx_L3;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1076
 *             self._namespace = None
 *         else:
 *             self._namespace = "{%s}" % namespace             # <<<<<<<<<<<<<< 
 *         self._annotate = annotate
 *         if makeelement is not None:
 */
  __pyx_2 = PyNumber_Remainder(__pyx_k149p, __pyx_v_namespace); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1076
 *             self._namespace = None
 *         else:
 *             self._namespace = "{%s}" % namespace             # <<<<<<<<<<<<<< 
 *         self._annotate = annotate
 *         if makeelement is not None:
 */
  Py_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
  ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace = __pyx_2;
  __pyx_2 = 0;
}
__pyx_L3:;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1077
 *         else:
 *             self._namespace = "{%s}" % namespace
 *         self._annotate = annotate             # <<<<<<<<<<<<<< 
 *         if makeelement is not None:
 *             assert callable(makeelement)
 */
__pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely((__pyx_1 == -1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; goto __pyx_L1;}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1077
 *         else:
 *             self._namespace = "{%s}" % namespace
 *         self._annotate = annotate             # <<<<<<<<<<<<<< 
 *         if makeelement is not None:
 *             assert callable(makeelement)
 */
((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_annotate = __pyx_1;

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1078
 *             self._namespace = "{%s}" % namespace
 *         self._annotate = annotate
 *         if makeelement is not None:             # <<<<<<<<<<<<<< 
 *             assert callable(makeelement)
 *             self._makeelement = makeelement
 */
__pyx_1 = (__pyx_v_makeelement != Py_None);
if (__pyx_1) {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1079
 *         self._annotate = annotate
 *         if makeelement is not None:
 *             assert callable(makeelement)             # <<<<<<<<<<<<<< 
 *             self._makeelement = makeelement
 *         else:
 */
  #ifndef PYREX_WITHOUT_ASSERTIONS

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1079
 *         self._annotate = annotate
 *         if makeelement is not None:
 *             assert callable(makeelement)             # <<<<<<<<<<<<<< 
 *             self._makeelement = makeelement
 *         else:
 */
  if (unlikely(!callable(__pyx_v_makeelement))) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; goto __pyx_L1;}
  }
  #endif

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1080
 *         if makeelement is not None:
 *             assert callable(makeelement)
 *             self._makeelement = makeelement             # <<<<<<<<<<<<<< 
 *         else:
 *             self._makeelement = None
 */
  Py_INCREF(__pyx_v_makeelement);
  Py_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
  ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement = __pyx_v_makeelement;
  goto __pyx_L4;
}
/*else*/ {

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1082
 *             self._makeelement = makeelement
 *         else:
 *             self._makeelement = None             # <<<<<<<<<<<<<< 
 * 
 *     def __getattr__(self, tag):
 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
  ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement = Py_None;
}
__pyx_L4:;

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_namespace);
Py_DECREF(__pyx_v_nsmap);
Py_DECREF(__pyx_v_annotate);
Py_DECREF(__pyx_v_makeelement);
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1084
 *             self._makeelement = None
 * 
 *     def __getattr__(self, tag):             # <<<<<<<<<<<<<< 
 *         cdef _ObjectifyElementMakerCaller element_maker
 *         if self._namespace is not None and tag[0] != "{":
 */

static PyObject *__pyx_k150p;

static char __pyx_k150[] = "{";

static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
  struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_element_maker;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  int __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_tag);
  __pyx_v_element_maker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)Py_None); Py_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1086
 *     def __getattr__(self, tag):
 *         cdef _ObjectifyElementMakerCaller element_maker
 *         if self._namespace is not None and tag[0] != "{":             # <<<<<<<<<<<<<< 
 *             tag = self._namespace + tag
 *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
 */
  __pyx_2 = (((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace != Py_None);
  __pyx_1 = __Pyx_PyBool_FromLong(__pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;}
  __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;}
  if (__pyx_2) {
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1086
 *     def __getattr__(self, tag):
 *         cdef _ObjectifyElementMakerCaller element_maker
 *         if self._namespace is not None and tag[0] != "{":             # <<<<<<<<<<<<<< 
 *             tag = self._namespace + tag
 *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
 */
    if (PyList_CheckExact(__pyx_v_tag) && 0 <= 0 && 0 < PyList_GET_SIZE(__pyx_v_tag)) {
      __pyx_4 = PyList_GET_ITEM(__pyx_v_tag, 0); Py_INCREF(__pyx_4);
      } else if (PyTuple_CheckExact(__pyx_v_tag) && 0 <= 0 && 0 < PyTuple_GET_SIZE(__pyx_v_tag)) {
      __pyx_4 = PyTuple_GET_ITEM(__pyx_v_tag, 0); Py_INCREF(__pyx_4);
      } else {
      __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;}
      __pyx_4 = PyObject_GetItem(__pyx_v_tag, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1086
 *     def __getattr__(self, tag):
 *         cdef _ObjectifyElementMakerCaller element_maker
 *         if self._namespace is not None and tag[0] != "{":             # <<<<<<<<<<<<<< 
 *             tag = self._namespace + tag
 *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
 */
    __pyx_1 = PyObject_RichCompare(__pyx_4, __pyx_k150p, Py_NE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
  }
  __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_2) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1087
 *         cdef _ObjectifyElementMakerCaller element_maker
 *         if self._namespace is not None and tag[0] != "{":
 *             tag = self._namespace + tag             # <<<<<<<<<<<<<< 
 *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
 *         element_maker._tag = tag
 */
    __pyx_3 = PyNumber_Add(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace, __pyx_v_tag); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; goto __pyx_L1;}
    Py_DECREF(__pyx_v_tag);
    __pyx_v_tag = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1088
 *         if self._namespace is not None and tag[0] != "{":
 *             tag = self._namespace + tag
 *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)             # <<<<<<<<<<<<<< 
 *         element_maker._tag = tag
 *         element_maker._nsmap = self._nsmap
 */
  __pyx_4 = ((PyObject *)PY_NEW(((PyObject*)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller))); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; goto __pyx_L1;}
  Py_DECREF(((PyObject *)__pyx_v_element_maker));
  __pyx_v_element_maker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_4);
  __pyx_4 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1089
 *             tag = self._namespace + tag
 *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
 *         element_maker._tag = tag             # <<<<<<<<<<<<<< 
 *         element_maker._nsmap = self._nsmap
 *         element_maker._annotate = self._annotate
 */
  Py_INCREF(__pyx_v_tag);
  Py_DECREF(__pyx_v_element_maker->_tag);
  __pyx_v_element_maker->_tag = __pyx_v_tag;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1090
 *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
 *         element_maker._tag = tag
 *         element_maker._nsmap = self._nsmap             # <<<<<<<<<<<<<< 
 *         element_maker._annotate = self._annotate
 *         element_maker._element_factory = self._makeelement
 */
  Py_INCREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
  Py_DECREF(__pyx_v_element_maker->_nsmap);
  __pyx_v_element_maker->_nsmap = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1091
 *         element_maker._tag = tag
 *         element_maker._nsmap = self._nsmap
 *         element_maker._annotate = self._annotate             # <<<<<<<<<<<<<< 
 *         element_maker._element_factory = self._makeelement
 *         return element_maker
 */
  __pyx_v_element_maker->_annotate = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_annotate;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1092
 *         element_maker._nsmap = self._nsmap
 *         element_maker._annotate = self._annotate
 *         element_maker._element_factory = self._makeelement             # <<<<<<<<<<<<<< 
 *         return element_maker
 * 
 */
  Py_INCREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
  Py_DECREF(__pyx_v_element_maker->_element_factory);
  __pyx_v_element_maker->_element_factory = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1093
 *         element_maker._annotate = self._annotate
 *         element_maker._element_factory = self._makeelement
 *         return element_maker             # <<<<<<<<<<<<<< 
 * 
 * cdef class _ObjectifyElementMakerCaller:
 */
  Py_INCREF(((PyObject *)__pyx_v_element_maker));
  __pyx_r = ((PyObject *)__pyx_v_element_maker);
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("lxml.objectify.ElementMaker.__getattr__");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_element_maker);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_tag);
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1101
 *     cdef bint _annotate
 * 
 *     def __call__(self, *children, **attrib):             # <<<<<<<<<<<<<< 
 *         cdef _ObjectifyElementMakerCaller elementMaker
 *         cdef python.PyObject* pytype
 */


static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_children = 0;
  PyObject *__pyx_v_attrib = 0;
  struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_elementMaker;
  PyObject *__pyx_v_pytype;
  struct LxmlElement *__pyx_v_element;
  struct LxmlElement *__pyx_v_childElement;
  int __pyx_v_has_children;
  int __pyx_v_has_string_value;
  PyObject *__pyx_v_pytype_name;
  PyObject *__pyx_v_child;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  Py_ssize_t __pyx_4;
  int __pyx_5;
  PyObject *__pyx_6 = 0;
  PyObject *__pyx_7 = 0;
  static char *__pyx_argnames[] = {0};
  if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, &__pyx_v_children, &__pyx_v_attrib, 0) < 0) return NULL;
  if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames))) {
    Py_XDECREF(__pyx_args);
    Py_XDECREF(__pyx_kwds);
    Py_XDECREF(__pyx_v_children);
    Py_XDECREF(__pyx_v_attrib);
    return NULL;
  }
  Py_INCREF(__pyx_v_self);
  __pyx_v_elementMaker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)Py_None); Py_INCREF(Py_None);
  __pyx_v_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
  __pyx_v_childElement = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
  __pyx_v_pytype_name = Py_None; Py_INCREF(Py_None);
  __pyx_v_child = Py_None; Py_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1108
 *         cdef bint has_children
 *         cdef bint has_string_value
 *         if self._element_factory is None:             # <<<<<<<<<<<<<< 
 *             element = _makeElement(self._tag, None, attrib, self._nsmap)
 *         else:
 */
  __pyx_1 = (((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_element_factory == Py_None);
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1109
 *         cdef bint has_string_value
 *         if self._element_factory is None:
 *             element = _makeElement(self._tag, None, attrib, self._nsmap)             # <<<<<<<<<<<<<< 
 *         else:
 *             element = self._element_factory(self._tag, attrib, self._nsmap)
 */
    __pyx_2 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag,Py_None,__pyx_v_attrib,((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; goto __pyx_L1;}
    Py_DECREF(((PyObject *)__pyx_v_element));
    __pyx_v_element = ((struct LxmlElement *)__pyx_2);
    __pyx_2 = 0;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1111
 *             element = _makeElement(self._tag, None, attrib, self._nsmap)
 *         else:
 *             element = self._element_factory(self._tag, attrib, self._nsmap)             # <<<<<<<<<<<<<< 
 * 
 *         pytype_name = None
 */
    __pyx_2 = PyTuple_New(3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; goto __pyx_L1;}
    Py_INCREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag);
    PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag);
    Py_INCREF(__pyx_v_attrib);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_attrib);
    Py_INCREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap);
    PyTuple_SET_ITEM(__pyx_2, 2, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap);
    __pyx_3 = PyObject_CallObject(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_element_factory, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_11etreepublic__Element)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; goto __pyx_L1;}
    Py_DECREF(((PyObject *)__pyx_v_element));
    __pyx_v_element = ((struct LxmlElement *)__pyx_3);
    __pyx_3 = 0;
  }
  __pyx_L2:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1113
 *             element = self._element_factory(self._tag, attrib, self._nsmap)
 * 
 *         pytype_name = None             # <<<<<<<<<<<<<< 
 *         has_children = 0
 *         has_string_value = 0
 */
  Py_INCREF(Py_None);
  Py_DECREF(__pyx_v_pytype_name);
  __pyx_v_pytype_name = Py_None;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1114
 * 
 *         pytype_name = None
 *         has_children = 0             # <<<<<<<<<<<<<< 
 *         has_string_value = 0
 *         for child in children:
 */
  __pyx_v_has_children = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1115
 *         pytype_name = None
 *         has_children = 0
 *         has_string_value = 0             # <<<<<<<<<<<<<< 
 *         for child in children:
 *             if child is None:
 */
  __pyx_v_has_string_value = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1116
 *         has_children = 0
 *         has_string_value = 0
 *         for child in children:             # <<<<<<<<<<<<<< 
 *             if child is None:
 *                 if python.PyTuple_GET_SIZE(children) == 1:
 */
  if (PyList_CheckExact(__pyx_v_children)) { __pyx_4 = 0; __pyx_2 = __pyx_v_children; Py_INCREF(__pyx_2); }
  else { __pyx_2 = PyObject_GetIter(__pyx_v_children); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; goto __pyx_L1;} }
  for (;;) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1116
 *         has_children = 0
 *         has_string_value = 0
 *         for child in children:             # <<<<<<<<<<<<<< 
 *             if child is None:
 *                 if python.PyTuple_GET_SIZE(children) == 1:
 */
    if (PyList_CheckExact(__pyx_2)) { if (__pyx_4 >= PyList_GET_SIZE(__pyx_2)) break; __pyx_3 = PyList_GET_ITEM(__pyx_2, __pyx_4++); Py_INCREF(__pyx_3); }
    else {
      __pyx_3 = PyIter_Next(__pyx_2);
      if (!__pyx_3) {
        break;
      }
    }
    Py_DECREF(__pyx_v_child);
    __pyx_v_child = __pyx_3;
    __pyx_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1117
 *         has_string_value = 0
 *         for child in children:
 *             if child is None:             # <<<<<<<<<<<<<< 
 *                 if python.PyTuple_GET_SIZE(children) == 1:
 *                     cetree.setAttributeValue(
 */
    __pyx_1 = (__pyx_v_child == Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1118
 *         for child in children:
 *             if child is None:
 *                 if python.PyTuple_GET_SIZE(children) == 1:             # <<<<<<<<<<<<<< 
 *                     cetree.setAttributeValue(
 *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, "true")
 */
      __pyx_1 = (PyTuple_GET_SIZE(__pyx_v_children) == 1);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1120
 *                 if python.PyTuple_GET_SIZE(children) == 1:
 *                     cetree.setAttributeValue(
 *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, "true")             # <<<<<<<<<<<<<< 
 *             elif python._isString(child):
 *                 _add_text(element, child)
 */
        __pyx_5 = setAttributeValue(__pyx_v_element,__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR,__pyx_n_true); if (unlikely(__pyx_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; goto __pyx_L1;}
        goto __pyx_L6;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1121
 *                     cetree.setAttributeValue(
 *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, "true")
 *             elif python._isString(child):             # <<<<<<<<<<<<<< 
 *                 _add_text(element, child)
 *                 has_string_value = 1
 */
    __pyx_5 = _isString(__pyx_v_child);
    if (__pyx_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1122
 *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, "true")
 *             elif python._isString(child):
 *                 _add_text(element, child)             # <<<<<<<<<<<<<< 
 *                 has_string_value = 1
 *             elif isinstance(child, _Element):
 */
      __pyx_3 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element,__pyx_v_child); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1123
 *             elif python._isString(child):
 *                 _add_text(element, child)
 *                 has_string_value = 1             # <<<<<<<<<<<<<< 
 *             elif isinstance(child, _Element):
 *                 cetree.appendChild(element, <_Element>child)
 */
      __pyx_v_has_string_value = 1;
      goto __pyx_L5;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1124
 *                 _add_text(element, child)
 *                 has_string_value = 1
 *             elif isinstance(child, _Element):             # <<<<<<<<<<<<<< 
 *                 cetree.appendChild(element, <_Element>child)
 *                 has_children = 1
 */
    __pyx_1 = PyObject_IsInstance(__pyx_v_child,((PyObject*)__pyx_ptype_11etreepublic__Element)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; goto __pyx_L1;}
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1125
 *                 has_string_value = 1
 *             elif isinstance(child, _Element):
 *                 cetree.appendChild(element, <_Element>child)             # <<<<<<<<<<<<<< 
 *                 has_children = 1
 *             elif isinstance(child, _ObjectifyElementMakerCaller):
 */
      appendChild(__pyx_v_element,((struct LxmlElement *)__pyx_v_child));

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1126
 *             elif isinstance(child, _Element):
 *                 cetree.appendChild(element, <_Element>child)
 *                 has_children = 1             # <<<<<<<<<<<<<< 
 *             elif isinstance(child, _ObjectifyElementMakerCaller):
 *                 elementMaker = <_ObjectifyElementMakerCaller>child
 */
      __pyx_v_has_children = 1;
      goto __pyx_L5;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1127
 *                 cetree.appendChild(element, <_Element>child)
 *                 has_children = 1
 *             elif isinstance(child, _ObjectifyElementMakerCaller):             # <<<<<<<<<<<<<< 
 *                 elementMaker = <_ObjectifyElementMakerCaller>child
 *                 if elementMaker._element_factory is None:
 */
    __pyx_1 = PyObject_IsInstance(__pyx_v_child,((PyObject*)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; goto __pyx_L1;}
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1128
 *                 has_children = 1
 *             elif isinstance(child, _ObjectifyElementMakerCaller):
 *                 elementMaker = <_ObjectifyElementMakerCaller>child             # <<<<<<<<<<<<<< 
 *                 if elementMaker._element_factory is None:
 *                     cetree.makeSubElement(element, elementMaker._tag,
 */
      Py_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_child)));
      Py_DECREF(((PyObject *)__pyx_v_elementMaker));
      __pyx_v_elementMaker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_child);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1129
 *             elif isinstance(child, _ObjectifyElementMakerCaller):
 *                 elementMaker = <_ObjectifyElementMakerCaller>child
 *                 if elementMaker._element_factory is None:             # <<<<<<<<<<<<<< 
 *                     cetree.makeSubElement(element, elementMaker._tag,
 *                                           None, None, None, None)
 */
      __pyx_1 = (__pyx_v_elementMaker->_element_factory == Py_None);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1131
 *                 if elementMaker._element_factory is None:
 *                     cetree.makeSubElement(element, elementMaker._tag,
 *                                           None, None, None, None)             # <<<<<<<<<<<<<< 
 *                 else:
 *                     childElement = elementMaker._element_factory(
 */
        __pyx_3 = ((PyObject *)makeSubElement(__pyx_v_element,__pyx_v_elementMaker->_tag,Py_None,Py_None,Py_None,Py_None)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1134
 *                 else:
 *                     childElement = elementMaker._element_factory(
 *                         elementMaker._tag)             # <<<<<<<<<<<<<< 
 *                     cetree.appendChild(element, childElement)
 *                 has_children = 1
 */
        __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;}
        Py_INCREF(__pyx_v_elementMaker->_tag);
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_elementMaker->_tag);
        __pyx_6 = PyObject_CallObject(__pyx_v_elementMaker->_element_factory, __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        if (!__Pyx_TypeTest(__pyx_6, __pyx_ptype_11etreepublic__Element)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;}
        Py_DECREF(((PyObject *)__pyx_v_childElement));
        __pyx_v_childElement = ((struct LxmlElement *)__pyx_6);
        __pyx_6 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1135
 *                     childElement = elementMaker._element_factory(
 *                         elementMaker._tag)
 *                     cetree.appendChild(element, childElement)             # <<<<<<<<<<<<<< 
 *                 has_children = 1
 *             else:
 */
        appendChild(__pyx_v_element,__pyx_v_childElement);
      }
      __pyx_L7:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1136
 *                         elementMaker._tag)
 *                     cetree.appendChild(element, childElement)
 *                 has_children = 1             # <<<<<<<<<<<<<< 
 *             else:
 *                 if pytype_name is not None:
 */
      __pyx_v_has_children = 1;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1138
 *                 has_children = 1
 *             else:
 *                 if pytype_name is not None:             # <<<<<<<<<<<<<< 
 *                     # concatenation always makes the result a string
 *                     has_string_value = 1
 */
      __pyx_1 = (__pyx_v_pytype_name != Py_None);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1140
 *                 if pytype_name is not None:
 *                     # concatenation always makes the result a string
 *                     has_string_value = 1             # <<<<<<<<<<<<<< 
 *                 pytype_name = _typename(child)
 *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 */
        __pyx_v_has_string_value = 1;
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1141
 *                     # concatenation always makes the result a string
 *                     has_string_value = 1
 *                 pytype_name = _typename(child)             # <<<<<<<<<<<<<< 
 *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *                 if pytype is not NULL:
 */
      __pyx_3 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; goto __pyx_L1;}
      Py_DECREF(__pyx_v_pytype_name);
      __pyx_v_pytype_name = __pyx_3;
      __pyx_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1142
 *                     has_string_value = 1
 *                 pytype_name = _typename(child)
 *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)             # <<<<<<<<<<<<<< 
 *                 if pytype is not NULL:
 *                     (<PyType>pytype)._add_text(element, child)
 */
      __pyx_v_pytype = PyDict_GetItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT,__pyx_v_pytype_name);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1143
 *                 pytype_name = _typename(child)
 *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *                 if pytype is not NULL:             # <<<<<<<<<<<<<< 
 *                     (<PyType>pytype)._add_text(element, child)
 *                 else:
 */
      __pyx_1 = (__pyx_v_pytype != NULL);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1144
 *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *                 if pytype is not NULL:
 *                     (<PyType>pytype)._add_text(element, child)             # <<<<<<<<<<<<<< 
 *                 else:
 *                     has_string_value = 1
 */
        __pyx_6 = (PyObject *)__pyx_v_pytype;
        Py_INCREF(__pyx_6);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1144
 *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
 *                 if pytype is not NULL:
 *                     (<PyType>pytype)._add_text(element, child)             # <<<<<<<<<<<<<< 
 *                 else:
 *                     has_string_value = 1
 */
        __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; goto __pyx_L1;}
        Py_INCREF(((PyObject *)__pyx_v_element));
        PyTuple_SET_ITEM(__pyx_3, 0, ((PyObject *)__pyx_v_element));
        Py_INCREF(__pyx_v_child);
        PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_child);
        __pyx_7 = PyObject_CallObject(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_6)->_add_text, __pyx_3); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; goto __pyx_L1;}
        Py_DECREF(__pyx_6); __pyx_6 = 0;
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_7); __pyx_7 = 0;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1146
 *                     (<PyType>pytype)._add_text(element, child)
 *                 else:
 *                     has_string_value = 1             # <<<<<<<<<<<<<< 
 *                     child = str(child)
 *                     _add_text(element, child)
 */
        __pyx_v_has_string_value = 1;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1147
 *                 else:
 *                     has_string_value = 1
 *                     child = str(child)             # <<<<<<<<<<<<<< 
 *                     _add_text(element, child)
 * 
 */
        __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; goto __pyx_L1;}
        Py_INCREF(__pyx_v_child);
        PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_child);
        __pyx_3 = PyObject_CallObject(((PyObject*)&PyString_Type), __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; goto __pyx_L1;}
        Py_DECREF(__pyx_6); __pyx_6 = 0;
        Py_DECREF(__pyx_v_child);
        __pyx_v_child = __pyx_3;
        __pyx_3 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1148
 *                     has_string_value = 1
 *                     child = str(child)
 *                     _add_text(element, child)             # <<<<<<<<<<<<<< 
 * 
 *         if self._annotate and not has_children:
 */
        __pyx_7 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element,__pyx_v_child); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; goto __pyx_L1;}
        Py_DECREF(__pyx_7); __pyx_7 = 0;
      }
      __pyx_L9:;
    }
    __pyx_L5:;
  }
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1150
 *                     _add_text(element, child)
 * 
 *         if self._annotate and not has_children:             # <<<<<<<<<<<<<< 
 *             if has_string_value:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, "str")
 */
  __pyx_1 = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_annotate;
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1150
 *                     _add_text(element, child)
 * 
 *         if self._annotate and not has_children:             # <<<<<<<<<<<<<< 
 *             if has_string_value:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, "str")
 */
    __pyx_1 = (!__pyx_v_has_children);
  }
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1151
 * 
 *         if self._annotate and not has_children:
 *             if has_string_value:             # <<<<<<<<<<<<<< 
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, "str")
 *             elif pytype_name is not None:
 */
    __pyx_1 = __pyx_v_has_string_value;
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1152
 *         if self._annotate and not has_children:
 *             if has_string_value:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, "str")             # <<<<<<<<<<<<<< 
 *             elif pytype_name is not None:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 */
      __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1152
 *         if self._annotate and not has_children:
 *             if has_string_value:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, "str")             # <<<<<<<<<<<<<< 
 *             elif pytype_name is not None:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 */
      __pyx_5 = setAttributeValue(__pyx_v_element,__pyx_6,__pyx_n_str); if (unlikely(__pyx_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; goto __pyx_L1;}
      Py_DECREF(__pyx_6); __pyx_6 = 0;
      goto __pyx_L11;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1153
 *             if has_string_value:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, "str")
 *             elif pytype_name is not None:             # <<<<<<<<<<<<<< 
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 * 
 */
    __pyx_1 = (__pyx_v_pytype_name != Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1154
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, "str")
 *             elif pytype_name is not None:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<< 
 * 
 *         return element
 */
      __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1154
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, "str")
 *             elif pytype_name is not None:
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<< 
 * 
 *         return element
 */
      __pyx_5 = setAttributeValue(__pyx_v_element,__pyx_3,__pyx_v_pytype_name); if (unlikely(__pyx_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      goto __pyx_L11;
    }
    __pyx_L11:;
    goto __pyx_L10;
  }
  __pyx_L10:;

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1156
 *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
 * 
 *         return element             # <<<<<<<<<<<<<< 
 * 
 * cdef _add_text(_Element elem, text):
 */
  Py_INCREF(((PyObject *)__pyx_v_element));
  __pyx_r = ((PyObject *)__pyx_v_element);
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_6);
  Py_XDECREF(__pyx_7);
  __Pyx_AddTraceback("lxml.objectify._ObjectifyElementMakerCaller.__call__");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_XDECREF(__pyx_v_children);
  Py_XDECREF(__pyx_v_attrib);
  Py_DECREF(__pyx_v_elementMaker);
  Py_DECREF(__pyx_v_element);
  Py_DECREF(__pyx_v_childElement);
  Py_DECREF(__pyx_v_pytype_name);
  Py_DECREF(__pyx_v_child);
  Py_DECREF(__pyx_v_self);
  Py_XDECREF(__pyx_args);
  Py_XDECREF(__pyx_kwds);
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1158
 *         return element
 * 
 * cdef _add_text(_Element elem, text):             # <<<<<<<<<<<<<< 
 *     cdef tree.xmlNode* c_child
 *     c_child = cetree.findChildBackwards(elem._c_node, 0)
 */

static  PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_elem,PyObject *__pyx_v_text) {
  xmlNode *__pyx_v_c_child;
  PyObject *__pyx_v_old;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  int __pyx_3;
  Py_INCREF(__pyx_v_elem);
  Py_INCREF(__pyx_v_text);
  __pyx_v_old = Py_None; Py_INCREF(Py_None);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1160
 * cdef _add_text(_Element elem, text):
 *     cdef tree.xmlNode* c_child
 *     c_child = cetree.findChildBackwards(elem._c_node, 0)             # <<<<<<<<<<<<<< 
 *     if c_child is not NULL:
 *         old = cetree.tailOf(c_child)
 */
  __pyx_v_c_child = findChildBackwards(__pyx_v_elem->_c_node,0);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1161
 *     cdef tree.xmlNode* c_child
 *     c_child = cetree.findChildBackwards(elem._c_node, 0)
 *     if c_child is not NULL:             # <<<<<<<<<<<<<< 
 *         old = cetree.tailOf(c_child)
 *         if old is not None:
 */
  __pyx_1 = (__pyx_v_c_child != NULL);
  if (__pyx_1) {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1162
 *     c_child = cetree.findChildBackwards(elem._c_node, 0)
 *     if c_child is not NULL:
 *         old = cetree.tailOf(c_child)             # <<<<<<<<<<<<<< 
 *         if old is not None:
 *             text = old + text
 */
    __pyx_2 = tailOf(__pyx_v_c_child); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; goto __pyx_L1;}
    Py_DECREF(__pyx_v_old);
    __pyx_v_old = __pyx_2;
    __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1163
 *     if c_child is not NULL:
 *         old = cetree.tailOf(c_child)
 *         if old is not None:             # <<<<<<<<<<<<<< 
 *             text = old + text
 *         cetree.setTailText(c_child, text)
 */
    __pyx_1 = (__pyx_v_old != Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1164
 *         old = cetree.tailOf(c_child)
 *         if old is not None:
 *             text = old + text             # <<<<<<<<<<<<<< 
 *         cetree.setTailText(c_child, text)
 *     else:
 */
      __pyx_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; goto __pyx_L1;}
      Py_DECREF(__pyx_v_text);
      __pyx_v_text = __pyx_2;
      __pyx_2 = 0;
      goto __pyx_L3;
    }
    __pyx_L3:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1165
 *         if old is not None:
 *             text = old + text
 *         cetree.setTailText(c_child, text)             # <<<<<<<<<<<<<< 
 *     else:
 *         old = cetree.textOf(elem._c_node)
 */
    __pyx_3 = setTailText(__pyx_v_c_child,__pyx_v_text); if (unlikely(__pyx_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; goto __pyx_L1;}
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1167
 *         cetree.setTailText(c_child, text)
 *     else:
 *         old = cetree.textOf(elem._c_node)             # <<<<<<<<<<<<<< 
 *         if old is not None:
 *             text = old + text
 */
    __pyx_2 = textOf(__pyx_v_elem->_c_node); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; goto __pyx_L1;}
    Py_DECREF(__pyx_v_old);
    __pyx_v_old = __pyx_2;
    __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1168
 *     else:
 *         old = cetree.textOf(elem._c_node)
 *         if old is not None:             # <<<<<<<<<<<<<< 
 *             text = old + text
 *         cetree.setNodeText(elem._c_node, text)
 */
    __pyx_1 = (__pyx_v_old != Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1169
 *         old = cetree.textOf(elem._c_node)
 *         if old is not None:
 *             text = old + text             # <<<<<<<<<<<<<< 
 *         cetree.setNodeText(elem._c_node, text)
 * 
 */
      __pyx_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; goto __pyx_L1;}
      Py_DECREF(__pyx_v_text);
      __pyx_v_text = __pyx_2;
      __pyx_2 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1170
 *         if old is not None:
 *             text = old + text
 *         cetree.setNodeText(elem._c_node, text)             # <<<<<<<<<<<<<< 
 * 
 * ################################################################################
 */
    __pyx_3 = setNodeText(__pyx_v_elem->_c_node,__pyx_v_text); if (unlikely(__pyx_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; goto __pyx_L1;}
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("lxml.objectify._add_text");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_old);
  Py_DECREF(__pyx_v_elem);
  Py_DECREF(__pyx_v_text);
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1178
 * __RECURSIVE_STR = 0 # default: off
 * 
 * def enableRecursiveStr(on=True):             # <<<<<<<<<<<<<< 
 *     """Enable a recursively generated tree representation for str(element),
 *     based on objectify.dump(element).
 */

static PyObject *__pyx_pf_4lxml_9objectify_enableRecursiveStr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_4lxml_9objectify_enableRecursiveStr[] = "Enable a recursively generated tree representation for str(element),\n    based on objectify.dump(element).\n    ";
static PyObject *__pyx_pf_4lxml_9objectify_enableRecursiveStr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_on = 0;
  PyObject *__pyx_r;
  int __pyx_1;
  static char *__pyx_argnames[] = {"on",0};
  __pyx_v_on = __pyx_k26;
  if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_on))) return NULL;
  Py_INCREF(__pyx_v_on);

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1183
 *     """
 *     global __RECURSIVE_STR
 *     __RECURSIVE_STR = on             # <<<<<<<<<<<<<< 
 * 
 * def dump(_Element element not None):
 */
  __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_on); if (unlikely((__pyx_1 == -1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;}
  __pyx_v_4lxml_9objectify___RECURSIVE_STR = __pyx_1;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("lxml.objectify.enableRecursiveStr");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_on);
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1185
 *     __RECURSIVE_STR = on
 * 
 * def dump(_Element element not None):             # <<<<<<<<<<<<<< 
 *     """Return a recursively generated string representation of an element.
 *     """
 */

static PyObject *__pyx_pf_4lxml_9objectify_dump(PyObject *__pyx_self, PyObject *__pyx_v_element); /*proto*/
static char __pyx_doc_4lxml_9objectify_dump[] = "Return a recursively generated string representation of an element.\n    ";
static PyObject *__pyx_pf_4lxml_9objectify_dump(PyObject *__pyx_self, PyObject *__pyx_v_element) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  Py_INCREF(__pyx_v_element);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_11etreepublic__Element, 0, "element"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; goto __pyx_L1;}

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1188
 *     """Return a recursively generated string representation of an element.
 *     """
 *     return _dump(element, 0)             # <<<<<<<<<<<<<< 
 * 
 * cdef object _dump(_Element element, int indent):
 */
  __pyx_1 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_element),0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  __Pyx_AddTraceback("lxml.objectify.dump");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_element);
  return __pyx_r;
}

/* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1190
 *     return _dump(element, 0)
 * 
 * cdef object _dump(_Element element, int indent):             # <<<<<<<<<<<<<< 
 *     indentstr = "    " * indent
 *     if isinstance(element, ObjectifiedDataElement):
 */

static PyObject *__pyx_n_strip;
static PyObject *__pyx_n_iterchildren;

static PyObject *__pyx_k153p;
static PyObject *__pyx_k154p;
static PyObject *__pyx_k155p;
static PyObject *__pyx_k156p;
static PyObject *__pyx_k157p;
static PyObject *__pyx_k158p;
static PyObject *__pyx_k159p;
static PyObject *__pyx_k160p;

static char __pyx_k153[] = "    ";
static char __pyx_k154[] = "%s%s = %s [%s]\n";
static char __pyx_k155[] = "{%s}";
static char __pyx_k156[] = "{%s}";
static char __pyx_k157[] = "{";
  static char __pyx_k158[] = "py:";
  static char __pyx_k159[] = "xsi:";
  static char __pyx_k160[] = "%s  * %s = %r\n";

  static  PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_element,int __pyx_v_indent) {
    PyObject *__pyx_v_indentstr;
    PyObject *__pyx_v_value;
    PyObject *__pyx_v_result;
    PyObject *__pyx_v_xsi_ns;
    PyObject *__pyx_v_pytype_ns;
    PyObject *__pyx_v_name;
    PyObject *__pyx_v_child;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    PyObject *__pyx_2 = 0;
    int __pyx_3;
    PyObject *__pyx_4 = 0;
    Py_ssize_t __pyx_5;
    PyObject *__pyx_6 = 0;
    Py_INCREF(__pyx_v_element);
    __pyx_v_indentstr = Py_None; Py_INCREF(Py_None);
    __pyx_v_value = Py_None; Py_INCREF(Py_None);
    __pyx_v_result = Py_None; Py_INCREF(Py_None);
    __pyx_v_xsi_ns = Py_None; Py_INCREF(Py_None);
    __pyx_v_pytype_ns = Py_None; Py_INCREF(Py_None);
    __pyx_v_name = Py_None; Py_INCREF(Py_None);
    __pyx_v_child = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1191
 * 
 * cdef object _dump(_Element element, int indent):
 *     indentstr = "    " * indent             # <<<<<<<<<<<<<< 
 *     if isinstance(element, ObjectifiedDataElement):
 *         value = repr(element)
 */
    __pyx_1 = PyInt_FromLong(__pyx_v_indent); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;}
    __pyx_2 = PyNumber_Multiply(__pyx_k153p, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_indentstr);
    __pyx_v_indentstr = __pyx_2;
    __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1192
 * cdef object _dump(_Element element, int indent):
 *     indentstr = "    " * indent
 *     if isinstance(element, ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *         value = repr(element)
 *     else:
 */
    __pyx_3 = PyObject_IsInstance(((PyObject *)__pyx_v_element),((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement)); if (unlikely(__pyx_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;}
    if (__pyx_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1193
 *     indentstr = "    " * indent
 *     if isinstance(element, ObjectifiedDataElement):
 *         value = repr(element)             # <<<<<<<<<<<<<< 
 *     else:
 *         value = textOf(element._c_node)
 */
      __pyx_1 = PyObject_Repr(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; goto __pyx_L1;}
      Py_DECREF(__pyx_v_value);
      __pyx_v_value = __pyx_1;
      __pyx_1 = 0;
      goto __pyx_L2;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1195
 *         value = repr(element)
 *     else:
 *         value = textOf(element._c_node)             # <<<<<<<<<<<<<< 
 *         if value is not None:
 *             if python.PyString_GET_SIZE( value.strip() ) == 0:
 */
      __pyx_2 = textOf(__pyx_v_element->_c_node); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; goto __pyx_L1;}
      Py_DECREF(__pyx_v_value);
      __pyx_v_value = __pyx_2;
      __pyx_2 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1196
 *     else:
 *         value = textOf(element._c_node)
 *         if value is not None:             # <<<<<<<<<<<<<< 
 *             if python.PyString_GET_SIZE( value.strip() ) == 0:
 *                 value = None
 */
      __pyx_3 = (__pyx_v_value != Py_None);
      if (__pyx_3) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1197
 *         value = textOf(element._c_node)
 *         if value is not None:
 *             if python.PyString_GET_SIZE( value.strip() ) == 0:             # <<<<<<<<<<<<<< 
 *                 value = None
 *             else:
 */
        __pyx_1 = PyObject_GetAttr(__pyx_v_value, __pyx_n_strip); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;}
        __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1197
 *         value = textOf(element._c_node)
 *         if value is not None:
 *             if python.PyString_GET_SIZE( value.strip() ) == 0:             # <<<<<<<<<<<<<< 
 *                 value = None
 *             else:
 */
        __pyx_3 = (PyString_GET_SIZE(__pyx_2) == 0);
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        if (__pyx_3) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1198
 *         if value is not None:
 *             if python.PyString_GET_SIZE( value.strip() ) == 0:
 *                 value = None             # <<<<<<<<<<<<<< 
 *             else:
 *                 value = repr(value)
 */
          Py_INCREF(Py_None);
          Py_DECREF(__pyx_v_value);
          __pyx_v_value = Py_None;
          goto __pyx_L4;
        }
        /*else*/ {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1200
 *                 value = None
 *             else:
 *                 value = repr(value)             # <<<<<<<<<<<<<< 
 *     result = "%s%s = %s [%s]\n" % (indentstr, element.tag,
 *                                    value, _typename(element))
 */
          __pyx_1 = PyObject_Repr(__pyx_v_value); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; goto __pyx_L1;}
          Py_DECREF(__pyx_v_value);
          __pyx_v_value = __pyx_1;
          __pyx_1 = 0;
        }
        __pyx_L4:;
        goto __pyx_L3;
      }
      __pyx_L3:;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1201
 *             else:
 *                 value = repr(value)
 *     result = "%s%s = %s [%s]\n" % (indentstr, element.tag,             # <<<<<<<<<<<<<< 
 *                                    value, _typename(element))
 *     xsi_ns    = "{%s}" % XML_SCHEMA_INSTANCE_NS
 */
    __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_tag); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1202
 *                 value = repr(value)
 *     result = "%s%s = %s [%s]\n" % (indentstr, element.tag,
 *                                    value, _typename(element))             # <<<<<<<<<<<<<< 
 *     xsi_ns    = "{%s}" % XML_SCHEMA_INSTANCE_NS
 *     pytype_ns = "{%s}" % PYTYPE_NAMESPACE
 */
    __pyx_1 = __pyx_f_4lxml_9objectify__typename(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; goto __pyx_L1;}
    __pyx_4 = PyTuple_New(4); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;}
    Py_INCREF(__pyx_v_indentstr);
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_indentstr);
    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2);
    Py_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_4, 2, __pyx_v_value);
    PyTuple_SET_ITEM(__pyx_4, 3, __pyx_1);
    __pyx_2 = 0;
    __pyx_1 = 0;
    __pyx_2 = PyNumber_Remainder(__pyx_k154p, __pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_2;
    __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1203
 *     result = "%s%s = %s [%s]\n" % (indentstr, element.tag,
 *                                    value, _typename(element))
 *     xsi_ns    = "{%s}" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<< 
 *     pytype_ns = "{%s}" % PYTYPE_NAMESPACE
 *     for name, value in cetree.iterattributes(element, 3):
 */
    __pyx_1 = PyNumber_Remainder(__pyx_k155p, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;}
    Py_DECREF(__pyx_v_xsi_ns);
    __pyx_v_xsi_ns = __pyx_1;
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1204
 *                                    value, _typename(element))
 *     xsi_ns    = "{%s}" % XML_SCHEMA_INSTANCE_NS
 *     pytype_ns = "{%s}" % PYTYPE_NAMESPACE             # <<<<<<<<<<<<<< 
 *     for name, value in cetree.iterattributes(element, 3):
 *         if '{' in name:
 */
    __pyx_4 = PyNumber_Remainder(__pyx_k156p, __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; goto __pyx_L1;}
    Py_DECREF(__pyx_v_pytype_ns);
    __pyx_v_pytype_ns = __pyx_4;
    __pyx_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1205
 *     xsi_ns    = "{%s}" % XML_SCHEMA_INSTANCE_NS
 *     pytype_ns = "{%s}" % PYTYPE_NAMESPACE
 *     for name, value in cetree.iterattributes(element, 3):             # <<<<<<<<<<<<<< 
 *         if '{' in name:
 *             if name == PYTYPE_ATTRIBUTE:
 */
    __pyx_2 = iterattributes(__pyx_v_element,3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; goto __pyx_L1;}
    if (PyList_CheckExact(__pyx_2)) { __pyx_5 = 0; __pyx_1 = __pyx_2; Py_INCREF(__pyx_1); }
    else { __pyx_1 = PyObject_GetIter(__pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; goto __pyx_L1;} }
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    for (;;) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1205
 *     xsi_ns    = "{%s}" % XML_SCHEMA_INSTANCE_NS
 *     pytype_ns = "{%s}" % PYTYPE_NAMESPACE
 *     for name, value in cetree.iterattributes(element, 3):             # <<<<<<<<<<<<<< 
 *         if '{' in name:
 *             if name == PYTYPE_ATTRIBUTE:
 */
      if (PyList_CheckExact(__pyx_1)) { if (__pyx_5 >= PyList_GET_SIZE(__pyx_1)) break; __pyx_4 = PyList_GET_ITEM(__pyx_1, __pyx_5++); Py_INCREF(__pyx_4); }
      else {
        __pyx_4 = PyIter_Next(__pyx_1);
        if (!__pyx_4) {
          break;
        }
      }
      if (PyTuple_CheckExact(__pyx_4) && PyTuple_GET_SIZE(__pyx_4) == 2) {
        __pyx_6 = PyTuple_GET_ITEM(__pyx_4, 0);
        Py_INCREF(__pyx_6);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1205
 *     xsi_ns    = "{%s}" % XML_SCHEMA_INSTANCE_NS
 *     pytype_ns = "{%s}" % PYTYPE_NAMESPACE
 *     for name, value in cetree.iterattributes(element, 3):             # <<<<<<<<<<<<<< 
 *         if '{' in name:
 *             if name == PYTYPE_ATTRIBUTE:
 */
        Py_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_6;
        __pyx_6 = 0;
        __pyx_6 = PyTuple_GET_ITEM(__pyx_4, 1);
        Py_INCREF(__pyx_6);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1205
 *     xsi_ns    = "{%s}" % XML_SCHEMA_INSTANCE_NS
 *     pytype_ns = "{%s}" % PYTYPE_NAMESPACE
 *     for name, value in cetree.iterattributes(element, 3):             # <<<<<<<<<<<<<< 
 *         if '{' in name:
 *             if name == PYTYPE_ATTRIBUTE:
 */
        Py_DECREF(__pyx_v_value);
        __pyx_v_value = __pyx_6;
        __pyx_6 = 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
      }
      else {
        __pyx_2 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; goto __pyx_L1;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        __pyx_6 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1205
 *     xsi_ns    = "{%s}" % XML_SCHEMA_INSTANCE_NS
 *     pytype_ns = "{%s}" % PYTYPE_NAMESPACE
 *     for name, value in cetree.iterattributes(element, 3):             # <<<<<<<<<<<<<< 
 *         if '{' in name:
 *             if name == PYTYPE_ATTRIBUTE:
 */
        Py_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_6;
        __pyx_6 = 0;
        __pyx_6 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1205
 *     xsi_ns    = "{%s}" % XML_SCHEMA_INSTANCE_NS
 *     pytype_ns = "{%s}" % PYTYPE_NAMESPACE
 *     for name, value in cetree.iterattributes(element, 3):             # <<<<<<<<<<<<<< 
 *         if '{' in name:
 *             if name == PYTYPE_ATTRIBUTE:
 */
        Py_DECREF(__pyx_v_value);
        __pyx_v_value = __pyx_6;
        __pyx_6 = 0;
        if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; goto __pyx_L1;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1206
 *     pytype_ns = "{%s}" % PYTYPE_NAMESPACE
 *     for name, value in cetree.iterattributes(element, 3):
 *         if '{' in name:             # <<<<<<<<<<<<<< 
 *             if name == PYTYPE_ATTRIBUTE:
 *                 if value == TREE_PYTYPE_NAME:
 */
      __pyx_3 = (PySequence_Contains(__pyx_v_name, __pyx_k157p)); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; goto __pyx_L1;}
      if (__pyx_3) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1207
 *     for name, value in cetree.iterattributes(element, 3):
 *         if '{' in name:
 *             if name == PYTYPE_ATTRIBUTE:             # <<<<<<<<<<<<<< 
 *                 if value == TREE_PYTYPE_NAME:
 *                     continue
 */
        __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; goto __pyx_L1;}
        __pyx_4 = PyObject_RichCompare(__pyx_v_name, __pyx_6, Py_EQ); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; goto __pyx_L1;}
        Py_DECREF(__pyx_6); __pyx_6 = 0;
        __pyx_3 = __Pyx_PyObject_IsTrue(__pyx_4); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; goto __pyx_L1;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        if (__pyx_3) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1208
 *         if '{' in name:
 *             if name == PYTYPE_ATTRIBUTE:
 *                 if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<< 
 *                     continue
 *                 else:
 */
          __pyx_2 = PyObject_RichCompare(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;}
          __pyx_3 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          if (__pyx_3) {
            goto __pyx_L5;
            goto __pyx_L9;
          }
          /*else*/ {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1211
 *                     continue
 *                 else:
 *                     name = name.replace(pytype_ns, 'py:')             # <<<<<<<<<<<<<< 
 *             name = name.replace(xsi_ns, 'xsi:')
 *         result = result + "%s  * %s = %r\n" % (indentstr, name, value)
 */
            __pyx_6 = PyObject_GetAttr(__pyx_v_name, __pyx_n_replace); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; goto __pyx_L1;}

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1211
 *                     continue
 *                 else:
 *                     name = name.replace(pytype_ns, 'py:')             # <<<<<<<<<<<<<< 
 *             name = name.replace(xsi_ns, 'xsi:')
 *         result = result + "%s  * %s = %r\n" % (indentstr, name, value)
 */
            __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; goto __pyx_L1;}
            Py_INCREF(__pyx_v_pytype_ns);
            PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_pytype_ns);
            Py_INCREF(__pyx_k158p);
            PyTuple_SET_ITEM(__pyx_4, 1, __pyx_k158p);
            __pyx_2 = PyObject_CallObject(__pyx_6, __pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; goto __pyx_L1;}
            Py_DECREF(__pyx_6); __pyx_6 = 0;
            Py_DECREF(__pyx_4); __pyx_4 = 0;
            Py_DECREF(__pyx_v_name);
            __pyx_v_name = __pyx_2;
            __pyx_2 = 0;
          }
          __pyx_L9:;
          goto __pyx_L8;
        }
        __pyx_L8:;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1212
 *                 else:
 *                     name = name.replace(pytype_ns, 'py:')
 *             name = name.replace(xsi_ns, 'xsi:')             # <<<<<<<<<<<<<< 
 *         result = result + "%s  * %s = %r\n" % (indentstr, name, value)
 * 
 */
        __pyx_6 = PyObject_GetAttr(__pyx_v_name, __pyx_n_replace); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1212
 *                 else:
 *                     name = name.replace(pytype_ns, 'py:')
 *             name = name.replace(xsi_ns, 'xsi:')             # <<<<<<<<<<<<<< 
 *         result = result + "%s  * %s = %r\n" % (indentstr, name, value)
 * 
 */
        __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;}
        Py_INCREF(__pyx_v_xsi_ns);
        PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_xsi_ns);
        Py_INCREF(__pyx_k159p);
        PyTuple_SET_ITEM(__pyx_4, 1, __pyx_k159p);
        __pyx_2 = PyObject_CallObject(__pyx_6, __pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;}
        Py_DECREF(__pyx_6); __pyx_6 = 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        Py_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_2;
        __pyx_2 = 0;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1213
 *                     name = name.replace(pytype_ns, 'py:')
 *             name = name.replace(xsi_ns, 'xsi:')
 *         result = result + "%s  * %s = %r\n" % (indentstr, name, value)             # <<<<<<<<<<<<<< 
 * 
 *     indent = indent + 1
 */
      __pyx_6 = PyTuple_New(3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;}
      Py_INCREF(__pyx_v_indentstr);
      PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_indentstr);
      Py_INCREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_6, 1, __pyx_v_name);
      Py_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_6, 2, __pyx_v_value);
      __pyx_4 = PyNumber_Remainder(__pyx_k160p, __pyx_6); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;}
      Py_DECREF(__pyx_6); __pyx_6 = 0;
      __pyx_2 = PyNumber_Add(__pyx_v_result, __pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_2;
      __pyx_2 = 0;
      __pyx_L5:;
    }
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1215
 *         result = result + "%s  * %s = %r\n" % (indentstr, name, value)
 * 
 *     indent = indent + 1             # <<<<<<<<<<<<<< 
 *     for child in element.iterchildren():
 *         result = result + _dump(child, indent)
 */
    __pyx_v_indent = (__pyx_v_indent + 1);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1216
 * 
 *     indent = indent + 1
 *     for child in element.iterchildren():             # <<<<<<<<<<<<<< 
 *         result = result + _dump(child, indent)
 *     if indent == 1:
 */
    __pyx_6 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_iterchildren); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;}
    __pyx_4 = PyObject_CallObject(__pyx_6, 0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    if (PyList_CheckExact(__pyx_4)) { __pyx_5 = 0; __pyx_2 = __pyx_4; Py_INCREF(__pyx_2); }
    else { __pyx_2 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;} }
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    for (;;) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1216
 * 
 *     indent = indent + 1
 *     for child in element.iterchildren():             # <<<<<<<<<<<<<< 
 *         result = result + _dump(child, indent)
 *     if indent == 1:
 */
      if (PyList_CheckExact(__pyx_2)) { if (__pyx_5 >= PyList_GET_SIZE(__pyx_2)) break; __pyx_1 = PyList_GET_ITEM(__pyx_2, __pyx_5++); Py_INCREF(__pyx_1); }
      else {
        __pyx_1 = PyIter_Next(__pyx_2);
        if (!__pyx_1) {
          break;
        }
      }
      Py_DECREF(__pyx_v_child);
      __pyx_v_child = __pyx_1;
      __pyx_1 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1217
 *     indent = indent + 1
 *     for child in element.iterchildren():
 *         result = result + _dump(child, indent)             # <<<<<<<<<<<<<< 
 *     if indent == 1:
 *         return result[:-1] # strip last '\n'
 */
      if (!__Pyx_TypeTest(__pyx_v_child, __pyx_ptype_11etreepublic__Element)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1217
 *     indent = indent + 1
 *     for child in element.iterchildren():
 *         result = result + _dump(child, indent)             # <<<<<<<<<<<<<< 
 *     if indent == 1:
 *         return result[:-1] # strip last '\n'
 */
      __pyx_6 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_child),__pyx_v_indent); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; goto __pyx_L1;}
      __pyx_4 = PyNumber_Add(__pyx_v_result, __pyx_6); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; goto __pyx_L1;}
      Py_DECREF(__pyx_6); __pyx_6 = 0;
      Py_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_4;
      __pyx_4 = 0;
    }
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1218
 *     for child in element.iterchildren():
 *         result = result + _dump(child, indent)
 *     if indent == 1:             # <<<<<<<<<<<<<< 
 *         return result[:-1] # strip last '\n'
 *     else:
 */
    __pyx_3 = (__pyx_v_indent == 1);
    if (__pyx_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1219
 *         result = result + _dump(child, indent)
 *     if indent == 1:
 *         return result[:-1] # strip last '\n'             # <<<<<<<<<<<<<< 
 *     else:
 *         return result
 */
      __pyx_1 = PySequence_GetSlice(__pyx_v_result, 0, -1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; goto __pyx_L1;}
      __pyx_r = __pyx_1;
      __pyx_1 = 0;
      goto __pyx_L0;
      goto __pyx_L12;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1221
 *         return result[:-1] # strip last '\n'
 *     else:
 *         return result             # <<<<<<<<<<<<<< 
 * 
 * 
 */
      Py_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;
    }
    __pyx_L12:;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_4);
    Py_XDECREF(__pyx_6);
    __Pyx_AddTraceback("lxml.objectify._dump");
    __pyx_r = 0;
    __pyx_L0:;
    Py_DECREF(__pyx_v_indentstr);
    Py_DECREF(__pyx_v_value);
    Py_DECREF(__pyx_v_result);
    Py_DECREF(__pyx_v_xsi_ns);
    Py_DECREF(__pyx_v_pytype_ns);
    Py_DECREF(__pyx_v_name);
    Py_DECREF(__pyx_v_child);
    Py_DECREF(__pyx_v_element);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1227
 * # Pickle support
 * 
 * cdef _setupPickle(reduceFunction):             # <<<<<<<<<<<<<< 
 *     import copy_reg
 *     copy_reg.constructor(fromstring)
 */

  static PyObject *__pyx_n_copy_reg;
  static PyObject *__pyx_n_constructor;
  static PyObject *__pyx_n_pickle;


  static  PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_reduceFunction) {
    PyObject *__pyx_v_copy_reg;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    PyObject *__pyx_2 = 0;
    PyObject *__pyx_3 = 0;
    Py_INCREF(__pyx_v_reduceFunction);
    __pyx_v_copy_reg = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1228
 * 
 * cdef _setupPickle(reduceFunction):
 *     import copy_reg             # <<<<<<<<<<<<<< 
 *     copy_reg.constructor(fromstring)
 *     copy_reg.pickle(ObjectifiedElement, reduceFunction, fromstring)
 */
    __pyx_1 = __Pyx_Import(__pyx_n_copy_reg, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;}
    Py_DECREF(__pyx_v_copy_reg);
    __pyx_v_copy_reg = __pyx_1;
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1229
 * cdef _setupPickle(reduceFunction):
 *     import copy_reg
 *     copy_reg.constructor(fromstring)             # <<<<<<<<<<<<<< 
 *     copy_reg.pickle(ObjectifiedElement, reduceFunction, fromstring)
 * 
 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_copy_reg, __pyx_n_constructor); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1229
 * cdef _setupPickle(reduceFunction):
 *     import copy_reg
 *     copy_reg.constructor(fromstring)             # <<<<<<<<<<<<<< 
 *     copy_reg.pickle(ObjectifiedElement, reduceFunction, fromstring)
 * 
 */
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_fromstring); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
    __pyx_2 = 0;
    __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1230
 *     import copy_reg
 *     copy_reg.constructor(fromstring)
 *     copy_reg.pickle(ObjectifiedElement, reduceFunction, fromstring)             # <<<<<<<<<<<<<< 
 * 
 * def pickleReduce(obj):
 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_copy_reg, __pyx_n_pickle); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1230
 *     import copy_reg
 *     copy_reg.constructor(fromstring)
 *     copy_reg.pickle(ObjectifiedElement, reduceFunction, fromstring)             # <<<<<<<<<<<<<< 
 * 
 * def pickleReduce(obj):
 */
    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_fromstring); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; goto __pyx_L1;}
    __pyx_2 = PyTuple_New(3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; goto __pyx_L1;}
    Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
    PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
    Py_INCREF(__pyx_v_reduceFunction);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_reduceFunction);
    PyTuple_SET_ITEM(__pyx_2, 2, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_3);
    __Pyx_AddTraceback("lxml.objectify._setupPickle");
    __pyx_r = 0;
    __pyx_L0:;
    Py_DECREF(__pyx_v_copy_reg);
    Py_DECREF(__pyx_v_reduceFunction);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1232
 *     copy_reg.pickle(ObjectifiedElement, reduceFunction, fromstring)
 * 
 * def pickleReduce(obj):             # <<<<<<<<<<<<<< 
 *     return (fromstring, (etree.tostring(obj),))
 * 
 */

  static PyObject *__pyx_n_tostring;

  static PyObject *__pyx_pf_4lxml_9objectify_pickleReduce(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
  static PyObject *__pyx_pf_4lxml_9objectify_pickleReduce(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    PyObject *__pyx_2 = 0;
    PyObject *__pyx_3 = 0;
    PyObject *__pyx_4 = 0;
    Py_INCREF(__pyx_v_obj);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1233
 * 
 * def pickleReduce(obj):
 *     return (fromstring, (etree.tostring(obj),))             # <<<<<<<<<<<<<< 
 * 
 * _setupPickle(pickleReduce)
 */
    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_fromstring); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1233
 * 
 * def pickleReduce(obj):
 *     return (fromstring, (etree.tostring(obj),))             # <<<<<<<<<<<<<< 
 * 
 * _setupPickle(pickleReduce)
 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_tostring); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1233
 * 
 * def pickleReduce(obj):
 *     return (fromstring, (etree.tostring(obj),))             # <<<<<<<<<<<<<< 
 * 
 * _setupPickle(pickleReduce)
 */
    __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
    Py_INCREF(__pyx_v_obj);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_obj);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
    __pyx_4 = 0;
    __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
    __pyx_1 = 0;
    __pyx_2 = 0;
    __pyx_r = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_3);
    Py_XDECREF(__pyx_4);
    __Pyx_AddTraceback("lxml.objectify.pickleReduce");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_obj);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1246
 *     cdef object empty_data_class
 *     cdef object tree_class
 *     def __init__(self, tree_class=None, empty_data_class=None):             # <<<<<<<<<<<<<< 
 *         """Lookup mechanism for objectify.
 * 
 */

  static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_27ObjectifyElementClassLookup___init__[] = "Lookup mechanism for objectify.\n\n        The default Element classes can be replaced by passing subclasses of\n        ObjectifiedElement and ObjectifiedDataElement as keyword arguments.\n        \'tree_class\' defines inner tree classes (defaults to\n        ObjectifiedElement), \'empty_data_class\' defines the default class for\n        empty data elements (defauls to StringElement).\n        ";
  static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_tree_class = 0;
    PyObject *__pyx_v_empty_data_class = 0;
    int __pyx_r;
    int __pyx_1;
    static char *__pyx_argnames[] = {"tree_class","empty_data_class",0};
    __pyx_v_tree_class = __pyx_k27;
    __pyx_v_empty_data_class = __pyx_k28;
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_tree_class, &__pyx_v_empty_data_class))) return -1;
    Py_INCREF((PyObject *)__pyx_v_self);
    Py_INCREF(__pyx_v_tree_class);
    Py_INCREF(__pyx_v_empty_data_class);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1255
 *         empty data elements (defauls to StringElement).
 *         """
 *         self._lookup_function = _lookupElementClass             # <<<<<<<<<<<<<< 
 *         if tree_class is None:
 *             tree_class = ObjectifiedElement
 */
    ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->__pyx_base._lookup_function = __pyx_f_4lxml_9objectify__lookupElementClass;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1256
 *         """
 *         self._lookup_function = _lookupElementClass
 *         if tree_class is None:             # <<<<<<<<<<<<<< 
 *             tree_class = ObjectifiedElement
 *         self.tree_class = tree_class
 */
    __pyx_1 = (__pyx_v_tree_class == Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1257
 *         self._lookup_function = _lookupElementClass
 *         if tree_class is None:
 *             tree_class = ObjectifiedElement             # <<<<<<<<<<<<<< 
 *         self.tree_class = tree_class
 *         if empty_data_class is None:
 */
      Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
      Py_DECREF(__pyx_v_tree_class);
      __pyx_v_tree_class = ((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement);
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1258
 *         if tree_class is None:
 *             tree_class = ObjectifiedElement
 *         self.tree_class = tree_class             # <<<<<<<<<<<<<< 
 *         if empty_data_class is None:
 *             empty_data_class = StringElement
 */
    Py_INCREF(__pyx_v_tree_class);
    Py_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->tree_class);
    ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->tree_class = __pyx_v_tree_class;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1259
 *             tree_class = ObjectifiedElement
 *         self.tree_class = tree_class
 *         if empty_data_class is None:             # <<<<<<<<<<<<<< 
 *             empty_data_class = StringElement
 *         self.empty_data_class = empty_data_class
 */
    __pyx_1 = (__pyx_v_empty_data_class == Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1260
 *         self.tree_class = tree_class
 *         if empty_data_class is None:
 *             empty_data_class = StringElement             # <<<<<<<<<<<<<< 
 *         self.empty_data_class = empty_data_class
 * 
 */
      Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement));
      Py_DECREF(__pyx_v_empty_data_class);
      __pyx_v_empty_data_class = ((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement);
      goto __pyx_L3;
    }
    __pyx_L3:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1261
 *         if empty_data_class is None:
 *             empty_data_class = StringElement
 *         self.empty_data_class = empty_data_class             # <<<<<<<<<<<<<< 
 * 
 * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):
 */
    Py_INCREF(__pyx_v_empty_data_class);
    Py_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->empty_data_class);
    ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->empty_data_class = __pyx_v_empty_data_class;

    __pyx_r = 0;
    Py_DECREF((PyObject *)__pyx_v_self);
    Py_DECREF(__pyx_v_tree_class);
    Py_DECREF(__pyx_v_empty_data_class);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1263
 *         self.empty_data_class = empty_data_class
 * 
 * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):             # <<<<<<<<<<<<<< 
 *     cdef ObjectifyElementClassLookup lookup
 *     cdef python.PyObject* dict_result
 */

  static PyObject *__pyx_n_split;

  static PyObject *__pyx_k165p;
  static PyObject *__pyx_k166p;

  static char __pyx_k163[] = "nil";
  static char __pyx_k164[] = "type";
  static char __pyx_k165[] = ":";
  static char __pyx_k166[] = ":";

  static  PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_state,struct LxmlDocument *__pyx_v_doc,xmlNode *__pyx_v_c_node) {
    struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *__pyx_v_lookup;
    PyObject *__pyx_v_dict_result;
    PyObject *__pyx_v_value;
    PyObject *__pyx_v_prefix;
    PyObject *__pyx_v_el_class;
    PyObject *__pyx_r;
    int __pyx_1;
    PyObject *__pyx_2 = 0;
    PyObject *__pyx_3 = 0;
    PyObject *__pyx_4 = 0;
    Py_INCREF(__pyx_v_state);
    Py_INCREF(__pyx_v_doc);
    __pyx_v_lookup = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)Py_None); Py_INCREF(Py_None);
    __pyx_v_value = Py_None; Py_INCREF(Py_None);
    __pyx_v_prefix = Py_None; Py_INCREF(Py_None);
    __pyx_v_el_class = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1266
 *     cdef ObjectifyElementClassLookup lookup
 *     cdef python.PyObject* dict_result
 *     lookup = <ObjectifyElementClassLookup>state             # <<<<<<<<<<<<<< 
 *     # if element has children => no data class
 *     if cetree.hasChild(c_node):
 */
    Py_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_state)));
    Py_DECREF(((PyObject *)__pyx_v_lookup));
    __pyx_v_lookup = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_state);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1268
 *     lookup = <ObjectifyElementClassLookup>state
 *     # if element has children => no data class
 *     if cetree.hasChild(c_node):             # <<<<<<<<<<<<<< 
 *         return lookup.tree_class
 * 
 */
    __pyx_1 = hasChild(__pyx_v_c_node);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1269
 *     # if element has children => no data class
 *     if cetree.hasChild(c_node):
 *         return lookup.tree_class             # <<<<<<<<<<<<<< 
 * 
 *     # if element is defined as xsi:nil, return NoneElement class
 */
      Py_INCREF(__pyx_v_lookup->tree_class);
      __pyx_r = __pyx_v_lookup->tree_class;
      goto __pyx_L0;
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1273
 *     # if element is defined as xsi:nil, return NoneElement class
 *     if "true" == cetree.attributeValueFromNsName(
 *         c_node, _XML_SCHEMA_INSTANCE_NS, "nil"):             # <<<<<<<<<<<<<< 
 *         return NoneElement
 * 
 */
    __pyx_2 = attributeValueFromNsName(__pyx_v_c_node,__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS,__pyx_k163); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; goto __pyx_L1;}
    __pyx_3 = PyObject_RichCompare(__pyx_n_true, __pyx_2, Py_EQ); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1274
 *     if "true" == cetree.attributeValueFromNsName(
 *         c_node, _XML_SCHEMA_INSTANCE_NS, "nil"):
 *         return NoneElement             # <<<<<<<<<<<<<< 
 * 
 *     # check for Python type hint
 */
      Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement));
      __pyx_r = ((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement);
      goto __pyx_L0;
      goto __pyx_L3;
    }
    __pyx_L3:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1278
 *     # check for Python type hint
 *     value = cetree.attributeValueFromNsName(
 *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<< 
 *     if value is not None:
 *         if value == TREE_PYTYPE_NAME:
 */
    __pyx_2 = attributeValueFromNsName(__pyx_v_c_node,__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE,__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; goto __pyx_L1;}
    Py_DECREF(__pyx_v_value);
    __pyx_v_value = __pyx_2;
    __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1279
 *     value = cetree.attributeValueFromNsName(
 *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 *     if value is not None:             # <<<<<<<<<<<<<< 
 *         if value == TREE_PYTYPE_NAME:
 *             return lookup.tree_class
 */
    __pyx_1 = (__pyx_v_value != Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1280
 *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 *     if value is not None:
 *         if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<< 
 *             return lookup.tree_class
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
 */
      __pyx_3 = PyObject_RichCompare(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; goto __pyx_L1;}
      __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1281
 *     if value is not None:
 *         if value == TREE_PYTYPE_NAME:
 *             return lookup.tree_class             # <<<<<<<<<<<<<< 
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
 *         if dict_result is not NULL:
 */
        Py_INCREF(__pyx_v_lookup->tree_class);
        __pyx_r = __pyx_v_lookup->tree_class;
        goto __pyx_L0;
        goto __pyx_L5;
      }
      __pyx_L5:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1282
 *         if value == TREE_PYTYPE_NAME:
 *             return lookup.tree_class
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)             # <<<<<<<<<<<<<< 
 *         if dict_result is not NULL:
 *             return (<PyType>dict_result)._type
 */
      __pyx_v_dict_result = PyDict_GetItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT,__pyx_v_value);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1283
 *             return lookup.tree_class
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
 *         if dict_result is not NULL:             # <<<<<<<<<<<<<< 
 *             return (<PyType>dict_result)._type
 *         # unknown 'pyval' => try to figure it out ourself, just go on
 */
      __pyx_1 = (__pyx_v_dict_result != NULL);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1284
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
 *         if dict_result is not NULL:
 *             return (<PyType>dict_result)._type             # <<<<<<<<<<<<<< 
 *         # unknown 'pyval' => try to figure it out ourself, just go on
 * 
 */
        __pyx_2 = (PyObject *)__pyx_v_dict_result;
        Py_INCREF(__pyx_2);
        Py_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_2)->_type);
        __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_2)->_type;
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        goto __pyx_L0;
        goto __pyx_L6;
      }
      __pyx_L6:;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1289
 *     # check for XML Schema type hint
 *     value = cetree.attributeValueFromNsName(
 *         c_node, _XML_SCHEMA_INSTANCE_NS, "type")             # <<<<<<<<<<<<<< 
 * 
 *     if value is not None:
 */
    __pyx_3 = attributeValueFromNsName(__pyx_v_c_node,__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS,__pyx_k164); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;}
    Py_DECREF(__pyx_v_value);
    __pyx_v_value = __pyx_3;
    __pyx_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1291
 *         c_node, _XML_SCHEMA_INSTANCE_NS, "type")
 * 
 *     if value is not None:             # <<<<<<<<<<<<<< 
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and ':' in value:
 */
    __pyx_1 = (__pyx_v_value != Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1292
 * 
 *     if value is not None:
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)             # <<<<<<<<<<<<<< 
 *         if dict_result is NULL and ':' in value:
 *             prefix, value = value.split(':', 1)
 */
      __pyx_v_dict_result = PyDict_GetItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT,__pyx_v_value);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1293
 *     if value is not None:
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and ':' in value:             # <<<<<<<<<<<<<< 
 *             prefix, value = value.split(':', 1)
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 */
      __pyx_1 = (__pyx_v_dict_result == NULL);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1293
 *     if value is not None:
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and ':' in value:             # <<<<<<<<<<<<<< 
 *             prefix, value = value.split(':', 1)
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 */
        __pyx_1 = (PySequence_Contains(__pyx_v_value, __pyx_k165p)); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; goto __pyx_L1;}
      }
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1294
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and ':' in value:
 *             prefix, value = value.split(':', 1)             # <<<<<<<<<<<<<< 
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is not NULL:
 */
        __pyx_2 = PyObject_GetAttr(__pyx_v_value, __pyx_n_split); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1294
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and ':' in value:
 *             prefix, value = value.split(':', 1)             # <<<<<<<<<<<<<< 
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is not NULL:
 */
        __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; goto __pyx_L1;}
        Py_INCREF(__pyx_k166p);
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k166p);
        Py_INCREF(__pyx_num_1);
        PyTuple_SET_ITEM(__pyx_3, 1, __pyx_num_1);
        __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; goto __pyx_L1;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        if (PyTuple_CheckExact(__pyx_4) && PyTuple_GET_SIZE(__pyx_4) == 2) {
          __pyx_3 = PyTuple_GET_ITEM(__pyx_4, 0);
          Py_INCREF(__pyx_3);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1294
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and ':' in value:
 *             prefix, value = value.split(':', 1)             # <<<<<<<<<<<<<< 
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is not NULL:
 */
          Py_DECREF(__pyx_v_prefix);
          __pyx_v_prefix = __pyx_3;
          __pyx_3 = 0;
          __pyx_3 = PyTuple_GET_ITEM(__pyx_4, 1);
          Py_INCREF(__pyx_3);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1294
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and ':' in value:
 *             prefix, value = value.split(':', 1)             # <<<<<<<<<<<<<< 
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is not NULL:
 */
          Py_DECREF(__pyx_v_value);
          __pyx_v_value = __pyx_3;
          __pyx_3 = 0;
          Py_DECREF(__pyx_4); __pyx_4 = 0;
        }
        else {
          __pyx_2 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; goto __pyx_L1;}
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          __pyx_3 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; goto __pyx_L1;}

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1294
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and ':' in value:
 *             prefix, value = value.split(':', 1)             # <<<<<<<<<<<<<< 
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is not NULL:
 */
          Py_DECREF(__pyx_v_prefix);
          __pyx_v_prefix = __pyx_3;
          __pyx_3 = 0;
          __pyx_3 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; goto __pyx_L1;}

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1294
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is NULL and ':' in value:
 *             prefix, value = value.split(':', 1)             # <<<<<<<<<<<<<< 
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is not NULL:
 */
          Py_DECREF(__pyx_v_value);
          __pyx_v_value = __pyx_3;
          __pyx_3 = 0;
          if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; goto __pyx_L1;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
        }

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1295
 *         if dict_result is NULL and ':' in value:
 *             prefix, value = value.split(':', 1)
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)             # <<<<<<<<<<<<<< 
 *         if dict_result is not NULL:
 *             return (<PyType>dict_result)._type
 */
        __pyx_v_dict_result = PyDict_GetItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT,__pyx_v_value);
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1296
 *             prefix, value = value.split(':', 1)
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is not NULL:             # <<<<<<<<<<<<<< 
 *             return (<PyType>dict_result)._type
 * 
 */
      __pyx_1 = (__pyx_v_dict_result != NULL);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1297
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
 *         if dict_result is not NULL:
 *             return (<PyType>dict_result)._type             # <<<<<<<<<<<<<< 
 * 
 *     # otherwise determine class based on text content type
 */
        __pyx_3 = (PyObject *)__pyx_v_dict_result;
        Py_INCREF(__pyx_3);
        Py_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_3)->_type);
        __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_3)->_type;
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        goto __pyx_L0;
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1300
 * 
 *     # otherwise determine class based on text content type
 *     el_class = _guessElementClass(c_node)             # <<<<<<<<<<<<<< 
 *     if el_class is not None:
 *         return el_class
 */
    __pyx_4 = __pyx_f_4lxml_9objectify__guessElementClass(__pyx_v_c_node); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; goto __pyx_L1;}
    Py_DECREF(__pyx_v_el_class);
    __pyx_v_el_class = __pyx_4;
    __pyx_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1301
 *     # otherwise determine class based on text content type
 *     el_class = _guessElementClass(c_node)
 *     if el_class is not None:             # <<<<<<<<<<<<<< 
 *         return el_class
 * 
 */
    __pyx_1 = (__pyx_v_el_class != Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1302
 *     el_class = _guessElementClass(c_node)
 *     if el_class is not None:
 *         return el_class             # <<<<<<<<<<<<<< 
 * 
 *     # if element is a root node => default to tree node
 */
      Py_INCREF(__pyx_v_el_class);
      __pyx_r = __pyx_v_el_class;
      goto __pyx_L0;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1305
 * 
 *     # if element is a root node => default to tree node
 *     if c_node.parent is NULL or not tree._isElement(c_node.parent):             # <<<<<<<<<<<<<< 
 *         return lookup.tree_class
 * 
 */
    __pyx_1 = (__pyx_v_c_node->parent == NULL);
    if (!__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1305
 * 
 *     # if element is a root node => default to tree node
 *     if c_node.parent is NULL or not tree._isElement(c_node.parent):             # <<<<<<<<<<<<<< 
 *         return lookup.tree_class
 * 
 */
      __pyx_1 = (!_isElement(__pyx_v_c_node->parent));
    }
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1306
 *     # if element is a root node => default to tree node
 *     if c_node.parent is NULL or not tree._isElement(c_node.parent):
 *         return lookup.tree_class             # <<<<<<<<<<<<<< 
 * 
 *     return lookup.empty_data_class
 */
      Py_INCREF(__pyx_v_lookup->tree_class);
      __pyx_r = __pyx_v_lookup->tree_class;
      goto __pyx_L0;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1308
 *         return lookup.tree_class
 * 
 *     return lookup.empty_data_class             # <<<<<<<<<<<<<< 
 * 
 * 
 */
    Py_INCREF(__pyx_v_lookup->empty_data_class);
    __pyx_r = __pyx_v_lookup->empty_data_class;
    goto __pyx_L0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_3);
    Py_XDECREF(__pyx_4);
    __Pyx_AddTraceback("lxml.objectify._lookupElementClass");
    __pyx_r = 0;
    __pyx_L0:;
    Py_DECREF((PyObject *)__pyx_v_lookup);
    Py_DECREF(__pyx_v_value);
    Py_DECREF(__pyx_v_prefix);
    Py_DECREF(__pyx_v_el_class);
    Py_DECREF(__pyx_v_state);
    Py_DECREF(__pyx_v_doc);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1314
 * # Type annotations
 * 
 * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):             # <<<<<<<<<<<<<< 
 *     if pytype is None:
 *         return None
 */

  static  struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check_type(xmlNode *__pyx_v_c_node,struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype) {
    PyObject *__pyx_v_value;
    struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r;
    int __pyx_1;
    PyObject *__pyx_2 = 0;
    PyObject *__pyx_3 = 0;
    int __pyx_4;
    PyObject *__pyx_5 = 0;
    Py_INCREF(__pyx_v_pytype);
    __pyx_v_value = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1315
 * 
 * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
 *     if pytype is None:             # <<<<<<<<<<<<<< 
 *         return None
 *     value = textOf(c_node)
 */
    __pyx_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1316
 * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
 *     if pytype is None:
 *         return None             # <<<<<<<<<<<<<< 
 *     value = textOf(c_node)
 *     try:
 */
      Py_INCREF(Py_None);
      __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
      goto __pyx_L0;
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1317
 *     if pytype is None:
 *         return None
 *     value = textOf(c_node)             # <<<<<<<<<<<<<< 
 *     try:
 *         pytype.type_check(value)
 */
    __pyx_2 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; goto __pyx_L1;}
    Py_DECREF(__pyx_v_value);
    __pyx_v_value = __pyx_2;
    __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1318
 *         return None
 *     value = textOf(c_node)
 *     try:             # <<<<<<<<<<<<<< 
 *         pytype.type_check(value)
 *         return pytype
 */
    /*try:*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1319
 *     value = textOf(c_node)
 *     try:
 *         pytype.type_check(value)             # <<<<<<<<<<<<<< 
 *         return pytype
 *     except IGNORABLE_ERRORS:
 */
      __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L3;}
      Py_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_value);
      __pyx_3 = PyObject_CallObject(__pyx_v_pytype->type_check, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L3;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1320
 *     try:
 *         pytype.type_check(value)
 *         return pytype             # <<<<<<<<<<<<<< 
 *     except IGNORABLE_ERRORS:
 *         # could not be parsed as the specified type => ignore
 */
      Py_INCREF(((PyObject *)__pyx_v_pytype));
      __pyx_r = __pyx_v_pytype;
      goto __pyx_L0;
    }
    goto __pyx_L4;
    __pyx_L3:;
    Py_XDECREF(__pyx_2); __pyx_2 = 0;
    Py_XDECREF(__pyx_3); __pyx_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1321
 *         pytype.type_check(value)
 *         return pytype
 *     except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<< 
 *         # could not be parsed as the specified type => ignore
 *         pass
 */
    __pyx_4 = PyErr_ExceptionMatches(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
    if (__pyx_4) {
      __Pyx_AddTraceback("lxml.objectify._check_type");
      if (__Pyx_GetException(&__pyx_2, &__pyx_3, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      goto __pyx_L4;
    }
    goto __pyx_L1;
    __pyx_L4:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1324
 *         # could not be parsed as the specified type => ignore
 *         pass
 *     return None             # <<<<<<<<<<<<<< 
 * 
 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,
 */
    Py_INCREF(Py_None);
    __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
    goto __pyx_L0;

    __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_3);
    Py_XDECREF(__pyx_5);
    __Pyx_AddTraceback("lxml.objectify._check_type");
    __pyx_r = 0;
    __pyx_L0:;
    Py_DECREF(__pyx_v_value);
    Py_DECREF(__pyx_v_pytype);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1326
 *     return None
 * 
 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<< 
 *              empty_pytype=None):
 *     """Recursively annotates the elements of an XML tree with 'pytype'
 */

  static PyObject *__pyx_pf_4lxml_9objectify_pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_pyannotate[] = "Recursively annotates the elements of an XML tree with \'pytype\'\n    attributes.\n\n    If the \'ignore_old\' keyword argument is True (the default), current \'pytype\'\n    attributes will be ignored and replaced.  Otherwise, they will be checked\n    and only replaced if they no longer fit the current text value.\n\n    Setting the keyword argument ``ignore_xsi`` to True makes the function\n    additionally ignore existing ``xsi:type`` annotations.  The default is to\n    use them as a type hint.\n\n    The default annotation of empty elements can be set with the\n    ``empty_pytype`` keyword argument.  The default is not to annotate empty\n    elements.  Pass \'str\', for example, to make string values the default.\n    ";
  static PyObject *__pyx_pf_4lxml_9objectify_pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_element_or_tree = 0;
    PyObject *__pyx_v_ignore_old = 0;
    PyObject *__pyx_v_ignore_xsi = 0;
    PyObject *__pyx_v_empty_pytype = 0;
    struct LxmlElement *__pyx_v_element;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    int __pyx_2;
    int __pyx_3;
    static char *__pyx_argnames[] = {"element_or_tree","ignore_old","ignore_xsi","empty_pytype",0};
    __pyx_v_ignore_old = __pyx_k29;
    __pyx_v_ignore_xsi = __pyx_k30;
    __pyx_v_empty_pytype = __pyx_k31;
    if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 1, 0, 0, 0) < 0) return NULL;
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|OOO", __pyx_argnames, &__pyx_v_element_or_tree, &__pyx_v_ignore_old, &__pyx_v_ignore_xsi, &__pyx_v_empty_pytype))) {
      Py_XDECREF(__pyx_args);
      Py_XDECREF(__pyx_kwds);
      return NULL;
    }
    Py_INCREF(__pyx_v_element_or_tree);
    Py_INCREF(__pyx_v_ignore_old);
    Py_INCREF(__pyx_v_ignore_xsi);
    Py_INCREF(__pyx_v_empty_pytype);
    __pyx_v_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1344
 *     """
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<< 
 *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
 * 
 */
    __pyx_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; goto __pyx_L1;}
    Py_DECREF(((PyObject *)__pyx_v_element));
    __pyx_v_element = ((struct LxmlElement *)__pyx_1);
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1345
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)             # <<<<<<<<<<<<<< 
 * 
 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
 */
    __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_2 == -1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1345
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)             # <<<<<<<<<<<<<< 
 * 
 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
 */
    __pyx_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_3 == -1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1345
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)             # <<<<<<<<<<<<<< 
 * 
 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
 */
    __pyx_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element,0,1,__pyx_2,__pyx_3,Py_None,__pyx_v_empty_pytype); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    __Pyx_AddTraceback("lxml.objectify.pyannotate");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_element);
    Py_DECREF(__pyx_v_element_or_tree);
    Py_DECREF(__pyx_v_ignore_old);
    Py_DECREF(__pyx_v_ignore_xsi);
    Py_DECREF(__pyx_v_empty_pytype);
    Py_XDECREF(__pyx_args);
    Py_XDECREF(__pyx_kwds);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1347
 *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
 * 
 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<< 
 *                 empty_type=None):
 *     """Recursively annotates the elements of an XML tree with 'xsi:type'
 */

  static PyObject *__pyx_pf_4lxml_9objectify_xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_xsiannotate[] = "Recursively annotates the elements of an XML tree with \'xsi:type\'\n    attributes.\n\n    If the \'ignore_old\' keyword argument is True (the default), current\n    \'xsi:type\' attributes will be ignored and replaced.  Otherwise, they will be\n    checked and only replaced if they no longer fit the current text value.\n\n    Note that the mapping from Python types to XSI types is usually ambiguous.\n    Currently, only the first XSI type name in the corresponding PyType\n    definition will be used for annotation.  Thus, you should consider naming\n    the widest type first if you define additional types.\n\n    Setting the keyword argument ``ignore_pytype`` to True makes the function\n    additionally ignore existing ``pytype`` annotations.  The default is to\n    use them as a type hint.\n\n    The default annotation of empty elements can be set with the\n    ``empty_type`` keyword argument.  The default is not to annotate empty\n    elements.  Pass \'string\', for example, to make string values the default.\n    ";
  static PyObject *__pyx_pf_4lxml_9objectify_xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_element_or_tree = 0;
    PyObject *__pyx_v_ignore_old = 0;
    PyObject *__pyx_v_ignore_pytype = 0;
    PyObject *__pyx_v_empty_type = 0;
    struct LxmlElement *__pyx_v_element;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    int __pyx_2;
    int __pyx_3;
    static char *__pyx_argnames[] = {"element_or_tree","ignore_old","ignore_pytype","empty_type",0};
    __pyx_v_ignore_old = __pyx_k32;
    __pyx_v_ignore_pytype = __pyx_k33;
    __pyx_v_empty_type = __pyx_k34;
    if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 1, 0, 0, 0) < 0) return NULL;
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|OOO", __pyx_argnames, &__pyx_v_element_or_tree, &__pyx_v_ignore_old, &__pyx_v_ignore_pytype, &__pyx_v_empty_type))) {
      Py_XDECREF(__pyx_args);
      Py_XDECREF(__pyx_kwds);
      return NULL;
    }
    Py_INCREF(__pyx_v_element_or_tree);
    Py_INCREF(__pyx_v_ignore_old);
    Py_INCREF(__pyx_v_ignore_pytype);
    Py_INCREF(__pyx_v_empty_type);
    __pyx_v_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1370
 *     """
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<< 
 *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
 * 
 */
    __pyx_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; goto __pyx_L1;}
    Py_DECREF(((PyObject *)__pyx_v_element));
    __pyx_v_element = ((struct LxmlElement *)__pyx_1);
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1371
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)             # <<<<<<<<<<<<<< 
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
 */
    __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_2 == -1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1371
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)             # <<<<<<<<<<<<<< 
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
 */
    __pyx_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_pytype); if (unlikely((__pyx_3 == -1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1371
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)             # <<<<<<<<<<<<<< 
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
 */
    __pyx_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element,1,0,__pyx_2,__pyx_3,__pyx_v_empty_type,Py_None); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    __Pyx_AddTraceback("lxml.objectify.xsiannotate");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_element);
    Py_DECREF(__pyx_v_element_or_tree);
    Py_DECREF(__pyx_v_ignore_old);
    Py_DECREF(__pyx_v_ignore_pytype);
    Py_DECREF(__pyx_v_empty_type);
    Py_XDECREF(__pyx_args);
    Py_XDECREF(__pyx_kwds);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1373
 *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<< 
 *              empty_pytype=None, empty_type=None, annotate_xsi=0,
 *              annotate_pytype=1):
 */

  static PyObject *__pyx_pf_4lxml_9objectify_annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_annotate[] = "Recursively annotates the elements of an XML tree with \'xsi:type\'\n    and/or \'py:pytype\' attributes.\n\n    If the \'ignore_old\' keyword argument is True (the default), current\n    \'py:pytype\' attributes will be ignored for the type annotation. Set to False\n    if you want reuse existing \'py:pytype\' information (iff appropriate for the\n    element text value).\n\n    If the \'ignore_xsi\' keyword argument is False (the default), existing\n    \'xsi:type\' attributes will be used for the type annotation, if they fit the\n    element text values. \n    \n    Note that the mapping from Python types to XSI types is usually ambiguous.\n    Currently, only the first XSI type name in the corresponding PyType\n    definition will be used for annotation.  Thus, you should consider naming\n    the widest type first if you define additional types.\n\n    The default \'py:pytype\' annotation of empty elements can be set with the\n    ``empty_pytype`` keyword argument. Pass \'str\', for example, to make\n    string values the default.\n\n    The default \'xsi:type\' annotation of empty elements can be set with the\n    ``empty_type`` keyword argument.  The default is not to annotate empty\n    elements.  Pass \'string\', for example, to make string values the default.\n\n    The keyword arguments \'annotate_xsi\' (default: 0) and \'annotate_pytype\'\n    (default: 1) control which kind(s) of annotation to use. \n    ";
  static PyObject *__pyx_pf_4lxml_9objectify_annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_element_or_tree = 0;
    PyObject *__pyx_v_ignore_old = 0;
    PyObject *__pyx_v_ignore_xsi = 0;
    PyObject *__pyx_v_empty_pytype = 0;
    PyObject *__pyx_v_empty_type = 0;
    PyObject *__pyx_v_annotate_xsi = 0;
    PyObject *__pyx_v_annotate_pytype = 0;
    struct LxmlElement *__pyx_v_element;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    int __pyx_2;
    int __pyx_3;
    int __pyx_4;
    int __pyx_5;
    static char *__pyx_argnames[] = {"element_or_tree","ignore_old","ignore_xsi","empty_pytype","empty_type","annotate_xsi","annotate_pytype",0};
    __pyx_v_ignore_old = __pyx_k35;
    __pyx_v_ignore_xsi = __pyx_k36;
    __pyx_v_empty_pytype = __pyx_k37;
    __pyx_v_empty_type = __pyx_k38;
    __pyx_v_annotate_xsi = __pyx_k39;
    __pyx_v_annotate_pytype = __pyx_k40;
    if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 1, 0, 0, 0) < 0) return NULL;
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|OOOOOO", __pyx_argnames, &__pyx_v_element_or_tree, &__pyx_v_ignore_old, &__pyx_v_ignore_xsi, &__pyx_v_empty_pytype, &__pyx_v_empty_type, &__pyx_v_annotate_xsi, &__pyx_v_annotate_pytype))) {
      Py_XDECREF(__pyx_args);
      Py_XDECREF(__pyx_kwds);
      return NULL;
    }
    Py_INCREF(__pyx_v_element_or_tree);
    Py_INCREF(__pyx_v_ignore_old);
    Py_INCREF(__pyx_v_ignore_xsi);
    Py_INCREF(__pyx_v_empty_pytype);
    Py_INCREF(__pyx_v_empty_type);
    Py_INCREF(__pyx_v_annotate_xsi);
    Py_INCREF(__pyx_v_annotate_pytype);
    __pyx_v_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1405
 *     """
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<< 
 *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,
 *               ignore_old, empty_type, empty_pytype)
 */
    __pyx_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; goto __pyx_L1;}
    Py_DECREF(((PyObject *)__pyx_v_element));
    __pyx_v_element = ((struct LxmlElement *)__pyx_1);
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1406
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,             # <<<<<<<<<<<<<< 
 *               ignore_old, empty_type, empty_pytype)
 * 
 */
    __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_xsi); if (unlikely((__pyx_2 == -1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1406
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,             # <<<<<<<<<<<<<< 
 *               ignore_old, empty_type, empty_pytype)
 * 
 */
    __pyx_3 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_pytype); if (unlikely((__pyx_3 == -1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1406
 *     cdef _Element  element
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,             # <<<<<<<<<<<<<< 
 *               ignore_old, empty_type, empty_pytype)
 * 
 */
    __pyx_4 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_4 == -1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1407
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,
 *               ignore_old, empty_type, empty_pytype)             # <<<<<<<<<<<<<< 
 * 
 * 
 */
    __pyx_5 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_5 == -1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1407
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,
 *               ignore_old, empty_type, empty_pytype)             # <<<<<<<<<<<<<< 
 * 
 * 
 */
    __pyx_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element,__pyx_2,__pyx_3,__pyx_4,__pyx_5,__pyx_v_empty_type,__pyx_v_empty_pytype); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    __Pyx_AddTraceback("lxml.objectify.annotate");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_element);
    Py_DECREF(__pyx_v_element_or_tree);
    Py_DECREF(__pyx_v_ignore_old);
    Py_DECREF(__pyx_v_ignore_xsi);
    Py_DECREF(__pyx_v_empty_pytype);
    Py_DECREF(__pyx_v_empty_type);
    Py_DECREF(__pyx_v_annotate_xsi);
    Py_DECREF(__pyx_v_annotate_pytype);
    Py_XDECREF(__pyx_args);
    Py_XDECREF(__pyx_kwds);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1410
 * 
 * 
 * cdef _annotate(_Element element, bint annotate_xsi, bint annotate_pytype,             # <<<<<<<<<<<<<< 
 *                bint ignore_xsi, bint ignore_pytype,
 *                empty_type_name, empty_pytype_name):
 */

  static PyObject *__pyx_k172p;
  static PyObject *__pyx_k173p;
  static PyObject *__pyx_k178p;
  static PyObject *__pyx_k179p;
  static PyObject *__pyx_k180p;
  static PyObject *__pyx_k181p;

  static char __pyx_k169[] = "nil";
  static char __pyx_k171[] = "type";
  static char __pyx_k172[] = ":";
  static char __pyx_k173[] = ":";
  static char __pyx_k176[] = "type";
  static char __pyx_k177[] = "xsd";
  static char __pyx_k178[] = ":";
  static char __pyx_k179[] = ":";
  static char __pyx_k180[] = ":";
  static char __pyx_k181[] = ":";
  static char __pyx_k182[] = "xsi";
  static char __pyx_k183[] = "type";
  static char __pyx_k184[] = "py";
  static char __pyx_k185[] = "xsi";
  static char __pyx_k186[] = "nil";
  static char __pyx_k187[] = "true";

  static  PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_element,int __pyx_v_annotate_xsi,int __pyx_v_annotate_pytype,int __pyx_v_ignore_xsi,int __pyx_v_ignore_pytype,PyObject *__pyx_v_empty_type_name,PyObject *__pyx_v_empty_pytype_name) {
    struct LxmlDocument *__pyx_v_doc;
    xmlNode *__pyx_v_c_node;
    xmlNs *__pyx_v_c_ns;
    PyObject *__pyx_v_dict_result;
    struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype;
    struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_empty_pytype;
    struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_StrType;
    struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_NoneType;
    PyObject *__pyx_v_typename;
    PyObject *__pyx_v_value;
    PyObject *__pyx_v_istree;
    PyObject *__pyx_v_prefix;
    PyObject *__pyx_v_old_pytypename;
    PyObject *__pyx_v_name;
    PyObject *__pyx_r;
    int __pyx_1;
    PyObject *__pyx_2 = 0;
    PyObject *__pyx_3 = 0;
    PyObject *__pyx_4 = 0;
    int __pyx_5;
    Py_INCREF(__pyx_v_element);
    Py_INCREF(__pyx_v_empty_type_name);
    Py_INCREF(__pyx_v_empty_pytype_name);
    __pyx_v_doc = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
    __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); Py_INCREF(Py_None);
    __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); Py_INCREF(Py_None);
    __pyx_v_StrType = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); Py_INCREF(Py_None);
    __pyx_v_NoneType = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); Py_INCREF(Py_None);
    __pyx_v_typename = Py_None; Py_INCREF(Py_None);
    __pyx_v_value = Py_None; Py_INCREF(Py_None);
    __pyx_v_istree = Py_None; Py_INCREF(Py_None);
    __pyx_v_prefix = Py_None; Py_INCREF(Py_None);
    __pyx_v_old_pytypename = Py_None; Py_INCREF(Py_None);
    __pyx_v_name = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1419
 *     cdef PyType pytype, empty_pytype, StrType, NoneType
 * 
 *     if not annotate_xsi and not annotate_pytype:             # <<<<<<<<<<<<<< 
 *         return
 * 
 */
    __pyx_1 = (!__pyx_v_annotate_xsi);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1419
 *     cdef PyType pytype, empty_pytype, StrType, NoneType
 * 
 *     if not annotate_xsi and not annotate_pytype:             # <<<<<<<<<<<<<< 
 *         return
 * 
 */
      __pyx_1 = (!__pyx_v_annotate_pytype);
    }
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1420
 * 
 *     if not annotate_xsi and not annotate_pytype:
 *         return             # <<<<<<<<<<<<<< 
 * 
 *     doc = element._doc
 */
      __pyx_r = Py_None; Py_INCREF(Py_None);
      goto __pyx_L0;
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1422
 *         return
 * 
 *     doc = element._doc             # <<<<<<<<<<<<<< 
 * 
 *     if empty_type_name is not None:
 */
    Py_INCREF(((PyObject *)__pyx_v_element->_doc));
    Py_DECREF(((PyObject *)__pyx_v_doc));
    __pyx_v_doc = __pyx_v_element->_doc;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1424
 *     doc = element._doc
 * 
 *     if empty_type_name is not None:             # <<<<<<<<<<<<<< 
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
 *     elif empty_pytype_name is not None:
 */
    __pyx_1 = (__pyx_v_empty_type_name != Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1425
 * 
 *     if empty_type_name is not None:
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)             # <<<<<<<<<<<<<< 
 *     elif empty_pytype_name is not None:
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)
 */
      __pyx_v_dict_result = PyDict_GetItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT,__pyx_v_empty_type_name);
      goto __pyx_L3;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1426
 *     if empty_type_name is not None:
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
 *     elif empty_pytype_name is not None:             # <<<<<<<<<<<<<< 
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)
 *     else:
 */
    __pyx_1 = (__pyx_v_empty_pytype_name != Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1427
 *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
 *     elif empty_pytype_name is not None:
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)             # <<<<<<<<<<<<<< 
 *     else:
 *         dict_result = NULL
 */
      __pyx_v_dict_result = PyDict_GetItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT,__pyx_v_empty_pytype_name);
      goto __pyx_L3;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1429
 *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)
 *     else:
 *         dict_result = NULL             # <<<<<<<<<<<<<< 
 *     if dict_result is not NULL:
 *         empty_pytype = <PyType>dict_result
 */
      __pyx_v_dict_result = NULL;
    }
    __pyx_L3:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1430
 *     else:
 *         dict_result = NULL
 *     if dict_result is not NULL:             # <<<<<<<<<<<<<< 
 *         empty_pytype = <PyType>dict_result
 *     else:
 */
    __pyx_1 = (__pyx_v_dict_result != NULL);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1431
 *         dict_result = NULL
 *     if dict_result is not NULL:
 *         empty_pytype = <PyType>dict_result             # <<<<<<<<<<<<<< 
 *     else:
 *         empty_pytype = None
 */
      __pyx_2 = (PyObject *)__pyx_v_dict_result;
      Py_INCREF(__pyx_2);
      Py_DECREF(((PyObject *)__pyx_v_empty_pytype));
      __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_2);
      __pyx_2 = 0;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1433
 *         empty_pytype = <PyType>dict_result
 *     else:
 *         empty_pytype = None             # <<<<<<<<<<<<<< 
 * 
 *     StrType  = _PYTYPE_DICT.get('str')
 */
      Py_INCREF(Py_None);
      Py_DECREF(((PyObject *)__pyx_v_empty_pytype));
      __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
    }
    __pyx_L4:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1435
 *         empty_pytype = None
 * 
 *     StrType  = _PYTYPE_DICT.get('str')             # <<<<<<<<<<<<<< 
 *     NoneType = _PYTYPE_DICT.get('NoneType')
 *     c_node = element._c_node
 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_n_get); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1435
 *         empty_pytype = None
 * 
 *     StrType  = _PYTYPE_DICT.get('str')             # <<<<<<<<<<<<<< 
 *     NoneType = _PYTYPE_DICT.get('NoneType')
 *     c_node = element._c_node
 */
    __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; goto __pyx_L1;}
    Py_INCREF(__pyx_n_str);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_str);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_4lxml_9objectify_PyType)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; goto __pyx_L1;}
    Py_DECREF(((PyObject *)__pyx_v_StrType));
    __pyx_v_StrType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_4);
    __pyx_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1436
 * 
 *     StrType  = _PYTYPE_DICT.get('str')
 *     NoneType = _PYTYPE_DICT.get('NoneType')             # <<<<<<<<<<<<<< 
 *     c_node = element._c_node
 *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_n_get); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1436
 * 
 *     StrType  = _PYTYPE_DICT.get('str')
 *     NoneType = _PYTYPE_DICT.get('NoneType')             # <<<<<<<<<<<<<< 
 *     c_node = element._c_node
 *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 */
    __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; goto __pyx_L1;}
    Py_INCREF(__pyx_n_NoneType);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_NoneType);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_4lxml_9objectify_PyType)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; goto __pyx_L1;}
    Py_DECREF(((PyObject *)__pyx_v_NoneType));
    __pyx_v_NoneType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_4);
    __pyx_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1437
 *     StrType  = _PYTYPE_DICT.get('str')
 *     NoneType = _PYTYPE_DICT.get('NoneType')
 *     c_node = element._c_node             # <<<<<<<<<<<<<< 
 *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 *     if c_node.type == tree.XML_ELEMENT_NODE:
 */
    __pyx_v_c_node = __pyx_v_element->_c_node;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1438
 *     NoneType = _PYTYPE_DICT.get('NoneType')
 *     c_node = element._c_node
 *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)             # <<<<<<<<<<<<<< 
 *     if c_node.type == tree.XML_ELEMENT_NODE:
 *         typename = None
 */
    BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node,__pyx_v_c_node,1);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1439
 *     c_node = element._c_node
 *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 *     if c_node.type == tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<< 
 *         typename = None
 *         pytype = None
 */
    __pyx_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1440
 *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 *     if c_node.type == tree.XML_ELEMENT_NODE:
 *         typename = None             # <<<<<<<<<<<<<< 
 *         pytype = None
 *         value  = None
 */
      Py_INCREF(Py_None);
      Py_DECREF(__pyx_v_typename);
      __pyx_v_typename = Py_None;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1441
 *     if c_node.type == tree.XML_ELEMENT_NODE:
 *         typename = None
 *         pytype = None             # <<<<<<<<<<<<<< 
 *         value  = None
 *         istree = 0
 */
      Py_INCREF(Py_None);
      Py_DECREF(((PyObject *)__pyx_v_pytype));
      __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1442
 *         typename = None
 *         pytype = None
 *         value  = None             # <<<<<<<<<<<<<< 
 *         istree = 0
 *         # if element is defined as xsi:nil, represent it as None
 */
      Py_INCREF(Py_None);
      Py_DECREF(__pyx_v_value);
      __pyx_v_value = Py_None;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1443
 *         pytype = None
 *         value  = None
 *         istree = 0             # <<<<<<<<<<<<<< 
 *         # if element is defined as xsi:nil, represent it as None
 *         if cetree.attributeValueFromNsName(
 */
      Py_INCREF(__pyx_num_0);
      Py_DECREF(__pyx_v_istree);
      __pyx_v_istree = __pyx_num_0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1446
 *         # if element is defined as xsi:nil, represent it as None
 *         if cetree.attributeValueFromNsName(
 *             c_node, _XML_SCHEMA_INSTANCE_NS, "nil") == "true":             # <<<<<<<<<<<<<< 
 *             pytype = NoneType
 * 
 */
      __pyx_2 = attributeValueFromNsName(__pyx_v_c_node,__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS,__pyx_k169); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1446
 *         # if element is defined as xsi:nil, represent it as None
 *         if cetree.attributeValueFromNsName(
 *             c_node, _XML_SCHEMA_INSTANCE_NS, "nil") == "true":             # <<<<<<<<<<<<<< 
 *             pytype = NoneType
 * 
 */
      __pyx_3 = PyObject_RichCompare(__pyx_2, __pyx_n_true, Py_EQ); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1447
 *         if cetree.attributeValueFromNsName(
 *             c_node, _XML_SCHEMA_INSTANCE_NS, "nil") == "true":
 *             pytype = NoneType             # <<<<<<<<<<<<<< 
 * 
 *         if  pytype is None and not ignore_xsi:
 */
        Py_INCREF(((PyObject *)__pyx_v_NoneType));
        Py_DECREF(((PyObject *)__pyx_v_pytype));
        __pyx_v_pytype = __pyx_v_NoneType;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1449
 *             pytype = NoneType
 * 
 *         if  pytype is None and not ignore_xsi:             # <<<<<<<<<<<<<< 
 *             # check that old xsi type value is valid
 *             typename = cetree.attributeValueFromNsName(
 */
      __pyx_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1449
 *             pytype = NoneType
 * 
 *         if  pytype is None and not ignore_xsi:             # <<<<<<<<<<<<<< 
 *             # check that old xsi type value is valid
 *             typename = cetree.attributeValueFromNsName(
 */
        __pyx_1 = (!__pyx_v_ignore_xsi);
      }
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1452
 *             # check that old xsi type value is valid
 *             typename = cetree.attributeValueFromNsName(
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")             # <<<<<<<<<<<<<< 
 *             if typename is not None:
 *                 dict_result = python.PyDict_GetItem(
 */
        __pyx_4 = attributeValueFromNsName(__pyx_v_c_node,__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS,__pyx_k171); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; goto __pyx_L1;}
        Py_DECREF(__pyx_v_typename);
        __pyx_v_typename = __pyx_4;
        __pyx_4 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1453
 *             typename = cetree.attributeValueFromNsName(
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")
 *             if typename is not None:             # <<<<<<<<<<<<<< 
 *                 dict_result = python.PyDict_GetItem(
 *                     _SCHEMA_TYPE_DICT, typename)
 */
        __pyx_1 = (__pyx_v_typename != Py_None);
        if (__pyx_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1455
 *             if typename is not None:
 *                 dict_result = python.PyDict_GetItem(
 *                     _SCHEMA_TYPE_DICT, typename)             # <<<<<<<<<<<<<< 
 *                 if dict_result is NULL and ':' in typename:
 *                     prefix, typename = typename.split(':', 1)
 */
          __pyx_v_dict_result = PyDict_GetItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT,__pyx_v_typename);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1456
 *                 dict_result = python.PyDict_GetItem(
 *                     _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is NULL and ':' in typename:             # <<<<<<<<<<<<<< 
 *                     prefix, typename = typename.split(':', 1)
 *                     dict_result = python.PyDict_GetItem(
 */
          __pyx_1 = (__pyx_v_dict_result == NULL);
          if (__pyx_1) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1456
 *                 dict_result = python.PyDict_GetItem(
 *                     _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is NULL and ':' in typename:             # <<<<<<<<<<<<<< 
 *                     prefix, typename = typename.split(':', 1)
 *                     dict_result = python.PyDict_GetItem(
 */
            __pyx_1 = (PySequence_Contains(__pyx_v_typename, __pyx_k172p)); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;}
          }
          if (__pyx_1) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1457
 *                     _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is NULL and ':' in typename:
 *                     prefix, typename = typename.split(':', 1)             # <<<<<<<<<<<<<< 
 *                     dict_result = python.PyDict_GetItem(
 *                         _SCHEMA_TYPE_DICT, typename)
 */
            __pyx_2 = PyObject_GetAttr(__pyx_v_typename, __pyx_n_split); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; goto __pyx_L1;}

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1457
 *                     _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is NULL and ':' in typename:
 *                     prefix, typename = typename.split(':', 1)             # <<<<<<<<<<<<<< 
 *                     dict_result = python.PyDict_GetItem(
 *                         _SCHEMA_TYPE_DICT, typename)
 */
            __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; goto __pyx_L1;}
            Py_INCREF(__pyx_k173p);
            PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k173p);
            Py_INCREF(__pyx_num_1);
            PyTuple_SET_ITEM(__pyx_3, 1, __pyx_num_1);
            __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; goto __pyx_L1;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            if (PyTuple_CheckExact(__pyx_4) && PyTuple_GET_SIZE(__pyx_4) == 2) {
              __pyx_3 = PyTuple_GET_ITEM(__pyx_4, 0);
              Py_INCREF(__pyx_3);

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1457
 *                     _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is NULL and ':' in typename:
 *                     prefix, typename = typename.split(':', 1)             # <<<<<<<<<<<<<< 
 *                     dict_result = python.PyDict_GetItem(
 *                         _SCHEMA_TYPE_DICT, typename)
 */
              Py_DECREF(__pyx_v_prefix);
              __pyx_v_prefix = __pyx_3;
              __pyx_3 = 0;
              __pyx_3 = PyTuple_GET_ITEM(__pyx_4, 1);
              Py_INCREF(__pyx_3);

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1457
 *                     _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is NULL and ':' in typename:
 *                     prefix, typename = typename.split(':', 1)             # <<<<<<<<<<<<<< 
 *                     dict_result = python.PyDict_GetItem(
 *                         _SCHEMA_TYPE_DICT, typename)
 */
              Py_DECREF(__pyx_v_typename);
              __pyx_v_typename = __pyx_3;
              __pyx_3 = 0;
              Py_DECREF(__pyx_4); __pyx_4 = 0;
            }
            else {
              __pyx_2 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; goto __pyx_L1;}
              Py_DECREF(__pyx_4); __pyx_4 = 0;
              __pyx_3 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; goto __pyx_L1;}

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1457
 *                     _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is NULL and ':' in typename:
 *                     prefix, typename = typename.split(':', 1)             # <<<<<<<<<<<<<< 
 *                     dict_result = python.PyDict_GetItem(
 *                         _SCHEMA_TYPE_DICT, typename)
 */
              Py_DECREF(__pyx_v_prefix);
              __pyx_v_prefix = __pyx_3;
              __pyx_3 = 0;
              __pyx_3 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; goto __pyx_L1;}

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1457
 *                     _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is NULL and ':' in typename:
 *                     prefix, typename = typename.split(':', 1)             # <<<<<<<<<<<<<< 
 *                     dict_result = python.PyDict_GetItem(
 *                         _SCHEMA_TYPE_DICT, typename)
 */
              Py_DECREF(__pyx_v_typename);
              __pyx_v_typename = __pyx_3;
              __pyx_3 = 0;
              if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; goto __pyx_L1;}
              Py_DECREF(__pyx_2); __pyx_2 = 0;
            }

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1459
 *                     prefix, typename = typename.split(':', 1)
 *                     dict_result = python.PyDict_GetItem(
 *                         _SCHEMA_TYPE_DICT, typename)             # <<<<<<<<<<<<<< 
 *                 if dict_result is not NULL:
 *                     pytype = <PyType>dict_result
 */
            __pyx_v_dict_result = PyDict_GetItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT,__pyx_v_typename);
            goto __pyx_L9;
          }
          __pyx_L9:;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1460
 *                     dict_result = python.PyDict_GetItem(
 *                         _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is not NULL:             # <<<<<<<<<<<<<< 
 *                     pytype = <PyType>dict_result
 *                     if pytype is not StrType:
 */
          __pyx_1 = (__pyx_v_dict_result != NULL);
          if (__pyx_1) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1461
 *                         _SCHEMA_TYPE_DICT, typename)
 *                 if dict_result is not NULL:
 *                     pytype = <PyType>dict_result             # <<<<<<<<<<<<<< 
 *                     if pytype is not StrType:
 *                         # StrType does not have a typecheck but is the default
 */
            __pyx_3 = (PyObject *)__pyx_v_dict_result;
            Py_INCREF(__pyx_3);
            Py_DECREF(((PyObject *)__pyx_v_pytype));
            __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_3);
            __pyx_3 = 0;

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1462
 *                 if dict_result is not NULL:
 *                     pytype = <PyType>dict_result
 *                     if pytype is not StrType:             # <<<<<<<<<<<<<< 
 *                         # StrType does not have a typecheck but is the default
 *                         # anyway, so just accept it if given as type
 */
            __pyx_1 = (__pyx_v_pytype != __pyx_v_StrType);
            if (__pyx_1) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1466
 *                         # anyway, so just accept it if given as type
 *                         # information
 *                         pytype = _check_type(c_node, pytype)             # <<<<<<<<<<<<<< 
 *                         if pytype is None:
 *                             typename = None
 */
              __pyx_4 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node,__pyx_v_pytype)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; goto __pyx_L1;}
              Py_DECREF(((PyObject *)__pyx_v_pytype));
              __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_4);
              __pyx_4 = 0;

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1467
 *                         # information
 *                         pytype = _check_type(c_node, pytype)
 *                         if pytype is None:             # <<<<<<<<<<<<<< 
 *                             typename = None
 * 
 */
              __pyx_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
              if (__pyx_1) {

                /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1468
 *                         pytype = _check_type(c_node, pytype)
 *                         if pytype is None:
 *                             typename = None             # <<<<<<<<<<<<<< 
 * 
 *         if pytype is None and not ignore_pytype:
 */
                Py_INCREF(Py_None);
                Py_DECREF(__pyx_v_typename);
                __pyx_v_typename = Py_None;
                goto __pyx_L12;
              }
              __pyx_L12:;
              goto __pyx_L11;
            }
            __pyx_L11:;
            goto __pyx_L10;
          }
          __pyx_L10:;
          goto __pyx_L8;
        }
        __pyx_L8:;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1470
 *                             typename = None
 * 
 *         if pytype is None and not ignore_pytype:             # <<<<<<<<<<<<<< 
 *             # check that old pytype value is valid
 *             old_pytypename = cetree.attributeValueFromNsName(
 */
      __pyx_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1470
 *                             typename = None
 * 
 *         if pytype is None and not ignore_pytype:             # <<<<<<<<<<<<<< 
 *             # check that old pytype value is valid
 *             old_pytypename = cetree.attributeValueFromNsName(
 */
        __pyx_1 = (!__pyx_v_ignore_pytype);
      }
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1473
 *             # check that old pytype value is valid
 *             old_pytypename = cetree.attributeValueFromNsName(
 *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<< 
 *             if old_pytypename is not None:
 *                 if old_pytypename == TREE_PYTYPE_NAME:
 */
        __pyx_2 = attributeValueFromNsName(__pyx_v_c_node,__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE,__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; goto __pyx_L1;}
        Py_DECREF(__pyx_v_old_pytypename);
        __pyx_v_old_pytypename = __pyx_2;
        __pyx_2 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1474
 *             old_pytypename = cetree.attributeValueFromNsName(
 *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 *             if old_pytypename is not None:             # <<<<<<<<<<<<<< 
 *                 if old_pytypename == TREE_PYTYPE_NAME:
 *                     if not cetree.hasChild(c_node):
 */
        __pyx_1 = (__pyx_v_old_pytypename != Py_None);
        if (__pyx_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1475
 *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 *             if old_pytypename is not None:
 *                 if old_pytypename == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<< 
 *                     if not cetree.hasChild(c_node):
 *                         # only case where we should keep it,
 */
          __pyx_3 = PyObject_RichCompare(__pyx_v_old_pytypename, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; goto __pyx_L1;}
          __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          if (__pyx_1) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1476
 *             if old_pytypename is not None:
 *                 if old_pytypename == TREE_PYTYPE_NAME:
 *                     if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<< 
 *                         # only case where we should keep it,
 *                         # everything else is clear enough
 */
            __pyx_1 = (!hasChild(__pyx_v_c_node));
            if (__pyx_1) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1479
 *                         # only case where we should keep it,
 *                         # everything else is clear enough
 *                         pytype = TREE_PYTYPE             # <<<<<<<<<<<<<< 
 *                 else:
 *                     if old_pytypename == 'none':
 */
              if (!__Pyx_TypeTest(__pyx_v_4lxml_9objectify_TREE_PYTYPE, __pyx_ptype_4lxml_9objectify_PyType)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1479; goto __pyx_L1;}
              Py_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE);
              Py_DECREF(((PyObject *)__pyx_v_pytype));
              __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_4lxml_9objectify_TREE_PYTYPE);
              goto __pyx_L16;
            }
            __pyx_L16:;
            goto __pyx_L15;
          }
          /*else*/ {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1481
 *                         pytype = TREE_PYTYPE
 *                 else:
 *                     if old_pytypename == 'none':             # <<<<<<<<<<<<<< 
 *                         # transition from lxml 1.x
 *                         old_pytypename = "NoneType"
 */
            __pyx_4 = PyObject_RichCompare(__pyx_v_old_pytypename, __pyx_n_none, Py_EQ); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;}
            __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_4); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;}
            Py_DECREF(__pyx_4); __pyx_4 = 0;
            if (__pyx_1) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1483
 *                     if old_pytypename == 'none':
 *                         # transition from lxml 1.x
 *                         old_pytypename = "NoneType"             # <<<<<<<<<<<<<< 
 *                     dict_result = python.PyDict_GetItem(
 *                         _PYTYPE_DICT, old_pytypename)
 */
              Py_INCREF(__pyx_n_NoneType);
              Py_DECREF(__pyx_v_old_pytypename);
              __pyx_v_old_pytypename = __pyx_n_NoneType;
              goto __pyx_L17;
            }
            __pyx_L17:;

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1485
 *                         old_pytypename = "NoneType"
 *                     dict_result = python.PyDict_GetItem(
 *                         _PYTYPE_DICT, old_pytypename)             # <<<<<<<<<<<<<< 
 *                     if dict_result is not NULL:
 *                         pytype = <PyType>dict_result
 */
            __pyx_v_dict_result = PyDict_GetItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT,__pyx_v_old_pytypename);

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1486
 *                     dict_result = python.PyDict_GetItem(
 *                         _PYTYPE_DICT, old_pytypename)
 *                     if dict_result is not NULL:             # <<<<<<<<<<<<<< 
 *                         pytype = <PyType>dict_result
 *                         if pytype is not StrType:
 */
            __pyx_1 = (__pyx_v_dict_result != NULL);
            if (__pyx_1) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1487
 *                         _PYTYPE_DICT, old_pytypename)
 *                     if dict_result is not NULL:
 *                         pytype = <PyType>dict_result             # <<<<<<<<<<<<<< 
 *                         if pytype is not StrType:
 *                             # StrType does not have a typecheck but is the
 */
              __pyx_2 = (PyObject *)__pyx_v_dict_result;
              Py_INCREF(__pyx_2);
              Py_DECREF(((PyObject *)__pyx_v_pytype));
              __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_2);
              __pyx_2 = 0;

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1488
 *                     if dict_result is not NULL:
 *                         pytype = <PyType>dict_result
 *                         if pytype is not StrType:             # <<<<<<<<<<<<<< 
 *                             # StrType does not have a typecheck but is the
 *                             # default anyway, so just accept it if given as
 */
              __pyx_1 = (__pyx_v_pytype != __pyx_v_StrType);
              if (__pyx_1) {

                /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1492
 *                             # default anyway, so just accept it if given as
 *                             # type information
 *                             pytype = _check_type(c_node, pytype)             # <<<<<<<<<<<<<< 
 * 
 *         if pytype is None:
 */
                __pyx_3 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node,__pyx_v_pytype)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; goto __pyx_L1;}
                Py_DECREF(((PyObject *)__pyx_v_pytype));
                __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_3);
                __pyx_3 = 0;
                goto __pyx_L19;
              }
              __pyx_L19:;
              goto __pyx_L18;
            }
            __pyx_L18:;
          }
          __pyx_L15:;
          goto __pyx_L14;
        }
        __pyx_L14:;
        goto __pyx_L13;
      }
      __pyx_L13:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1494
 *                             pytype = _check_type(c_node, pytype)
 * 
 *         if pytype is None:             # <<<<<<<<<<<<<< 
 *             # try to guess type
 *             if not cetree.hasChild(c_node):
 */
      __pyx_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1496
 *         if pytype is None:
 *             # try to guess type
 *             if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<< 
 *                 # element has no children => data class
 *                 pytype = _guessPyType(textOf(c_node), StrType)
 */
        __pyx_1 = (!hasChild(__pyx_v_c_node));
        if (__pyx_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1498
 *             if not cetree.hasChild(c_node):
 *                 # element has no children => data class
 *                 pytype = _guessPyType(textOf(c_node), StrType)             # <<<<<<<<<<<<<< 
 *             else:
 *                 istree = 1
 */
          __pyx_4 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; goto __pyx_L1;}

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1498
 *             if not cetree.hasChild(c_node):
 *                 # element has no children => data class
 *                 pytype = _guessPyType(textOf(c_node), StrType)             # <<<<<<<<<<<<<< 
 *             else:
 *                 istree = 1
 */
          __pyx_2 = ((PyObject *)__pyx_f_4lxml_9objectify__guessPyType(__pyx_4,__pyx_v_StrType)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; goto __pyx_L1;}
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          Py_DECREF(((PyObject *)__pyx_v_pytype));
          __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_2);
          __pyx_2 = 0;
          goto __pyx_L21;
        }
        /*else*/ {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1500
 *                 pytype = _guessPyType(textOf(c_node), StrType)
 *             else:
 *                 istree = 1             # <<<<<<<<<<<<<< 
 * 
 *         if pytype is None:
 */
          Py_INCREF(__pyx_num_1);
          Py_DECREF(__pyx_v_istree);
          __pyx_v_istree = __pyx_num_1;
        }
        __pyx_L21:;
        goto __pyx_L20;
      }
      __pyx_L20:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1502
 *                 istree = 1
 * 
 *         if pytype is None:             # <<<<<<<<<<<<<< 
 *             # use default type for empty elements
 *             if cetree.hasText(c_node):
 */
      __pyx_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1504
 *         if pytype is None:
 *             # use default type for empty elements
 *             if cetree.hasText(c_node):             # <<<<<<<<<<<<<< 
 *                 pytype = StrType
 *             else:
 */
        __pyx_1 = hasText(__pyx_v_c_node);
        if (__pyx_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1505
 *             # use default type for empty elements
 *             if cetree.hasText(c_node):
 *                 pytype = StrType             # <<<<<<<<<<<<<< 
 *             else:
 *                 pytype = empty_pytype
 */
          Py_INCREF(((PyObject *)__pyx_v_StrType));
          Py_DECREF(((PyObject *)__pyx_v_pytype));
          __pyx_v_pytype = __pyx_v_StrType;
          goto __pyx_L23;
        }
        /*else*/ {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1507
 *                 pytype = StrType
 *             else:
 *                 pytype = empty_pytype             # <<<<<<<<<<<<<< 
 *                 if typename is None:
 *                     typename = empty_type_name
 */
          Py_INCREF(((PyObject *)__pyx_v_empty_pytype));
          Py_DECREF(((PyObject *)__pyx_v_pytype));
          __pyx_v_pytype = __pyx_v_empty_pytype;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1508
 *             else:
 *                 pytype = empty_pytype
 *                 if typename is None:             # <<<<<<<<<<<<<< 
 *                     typename = empty_type_name
 * 
 */
          __pyx_1 = (__pyx_v_typename == Py_None);
          if (__pyx_1) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1509
 *                 pytype = empty_pytype
 *                 if typename is None:
 *                     typename = empty_type_name             # <<<<<<<<<<<<<< 
 * 
 *         if pytype is not None:
 */
            Py_INCREF(__pyx_v_empty_type_name);
            Py_DECREF(__pyx_v_typename);
            __pyx_v_typename = __pyx_v_empty_type_name;
            goto __pyx_L24;
          }
          __pyx_L24:;
        }
        __pyx_L23:;
        goto __pyx_L22;
      }
      __pyx_L22:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1511
 *                     typename = empty_type_name
 * 
 *         if pytype is not None:             # <<<<<<<<<<<<<< 
 *             if typename is None:
 *                 if not istree:
 */
      __pyx_1 = (((PyObject *)__pyx_v_pytype) != Py_None);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1512
 * 
 *         if pytype is not None:
 *             if typename is None:             # <<<<<<<<<<<<<< 
 *                 if not istree:
 *                     if python.PyList_GET_SIZE(pytype._schema_types) > 0:
 */
        __pyx_1 = (__pyx_v_typename == Py_None);
        if (__pyx_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1513
 *         if pytype is not None:
 *             if typename is None:
 *                 if not istree:             # <<<<<<<<<<<<<< 
 *                     if python.PyList_GET_SIZE(pytype._schema_types) > 0:
 *                         # pytype->xsi:type is a 1:n mapping
 */
          __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_istree); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; goto __pyx_L1;}
          __pyx_5 = (!__pyx_1);
          if (__pyx_5) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1514
 *             if typename is None:
 *                 if not istree:
 *                     if python.PyList_GET_SIZE(pytype._schema_types) > 0:             # <<<<<<<<<<<<<< 
 *                         # pytype->xsi:type is a 1:n mapping
 *                         # simply take the first
 */
            __pyx_1 = (PyList_GET_SIZE(__pyx_v_pytype->_schema_types) > 0);
            if (__pyx_1) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1517
 *                         # pytype->xsi:type is a 1:n mapping
 *                         # simply take the first
 *                         typename = pytype._schema_types[0]             # <<<<<<<<<<<<<< 
 *             elif typename not in pytype._schema_types:
 *                 typename = pytype._schema_types[0]
 */
              if (PyList_CheckExact(__pyx_v_pytype->_schema_types) && 0 <= 0 && 0 < PyList_GET_SIZE(__pyx_v_pytype->_schema_types)) {
                __pyx_4 = PyList_GET_ITEM(__pyx_v_pytype->_schema_types, 0); Py_INCREF(__pyx_4);
                } else if (PyTuple_CheckExact(__pyx_v_pytype->_schema_types) && 0 <= 0 && 0 < PyTuple_GET_SIZE(__pyx_v_pytype->_schema_types)) {
                __pyx_4 = PyTuple_GET_ITEM(__pyx_v_pytype->_schema_types, 0); Py_INCREF(__pyx_4);
                } else {
                __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; goto __pyx_L1;}
                __pyx_4 = PyObject_GetItem(__pyx_v_pytype->_schema_types, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; goto __pyx_L1;}
                Py_DECREF(__pyx_3); __pyx_3 = 0;
              }
              Py_DECREF(__pyx_v_typename);
              __pyx_v_typename = __pyx_4;
              __pyx_4 = 0;
              goto __pyx_L28;
            }
            __pyx_L28:;
            goto __pyx_L27;
          }
          __pyx_L27:;
          goto __pyx_L26;
        }

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1518
 *                         # simply take the first
 *                         typename = pytype._schema_types[0]
 *             elif typename not in pytype._schema_types:             # <<<<<<<<<<<<<< 
 *                 typename = pytype._schema_types[0]
 * 
 */
        __pyx_5 = (!PySequence_Contains(__pyx_v_pytype->_schema_types, __pyx_v_typename)); if (unlikely(__pyx_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;}
        if (__pyx_5) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1519
 *                         typename = pytype._schema_types[0]
 *             elif typename not in pytype._schema_types:
 *                 typename = pytype._schema_types[0]             # <<<<<<<<<<<<<< 
 * 
 *         if annotate_xsi:
 */
          if (PyList_CheckExact(__pyx_v_pytype->_schema_types) && 0 <= 0 && 0 < PyList_GET_SIZE(__pyx_v_pytype->_schema_types)) {
            __pyx_3 = PyList_GET_ITEM(__pyx_v_pytype->_schema_types, 0); Py_INCREF(__pyx_3);
            } else if (PyTuple_CheckExact(__pyx_v_pytype->_schema_types) && 0 <= 0 && 0 < PyTuple_GET_SIZE(__pyx_v_pytype->_schema_types)) {
            __pyx_3 = PyTuple_GET_ITEM(__pyx_v_pytype->_schema_types, 0); Py_INCREF(__pyx_3);
            } else {
            __pyx_2 = PyInt_FromLong(0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; goto __pyx_L1;}
            __pyx_3 = PyObject_GetItem(__pyx_v_pytype->_schema_types, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; goto __pyx_L1;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;
          }
          Py_DECREF(__pyx_v_typename);
          __pyx_v_typename = __pyx_3;
          __pyx_3 = 0;
          goto __pyx_L26;
        }
        __pyx_L26:;
        goto __pyx_L25;
      }
      __pyx_L25:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1521
 *                 typename = pytype._schema_types[0]
 * 
 *         if annotate_xsi:             # <<<<<<<<<<<<<< 
 *             if typename is None or istree:
 *                 cetree.delAttributeFromNsName(
 */
      __pyx_1 = __pyx_v_annotate_xsi;
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1522
 * 
 *         if annotate_xsi:
 *             if typename is None or istree:             # <<<<<<<<<<<<<< 
 *                 cetree.delAttributeFromNsName(
 *                     c_node, _XML_SCHEMA_INSTANCE_NS, "type")
 */
        __pyx_5 = (__pyx_v_typename == Py_None);
        __pyx_4 = __Pyx_PyBool_FromLong(__pyx_5); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
        __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_4); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
        if (!__pyx_1) {
          Py_DECREF(__pyx_4); __pyx_4 = 0;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1522
 * 
 *         if annotate_xsi:
 *             if typename is None or istree:             # <<<<<<<<<<<<<< 
 *                 cetree.delAttributeFromNsName(
 *                     c_node, _XML_SCHEMA_INSTANCE_NS, "type")
 */
          __pyx_4 = __pyx_v_istree;
          Py_INCREF(__pyx_4);
        }
        __pyx_5 = __Pyx_PyObject_IsTrue(__pyx_4); if (unlikely(__pyx_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        if (__pyx_5) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1524
 *             if typename is None or istree:
 *                 cetree.delAttributeFromNsName(
 *                     c_node, _XML_SCHEMA_INSTANCE_NS, "type")             # <<<<<<<<<<<<<< 
 *             else:
 *                 # update or create attribute
 */
          delAttributeFromNsName(__pyx_v_c_node,__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS,__pyx_k176);
          goto __pyx_L30;
        }
        /*else*/ {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1528
 *                 # update or create attribute
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_NS, 'xsd')             # <<<<<<<<<<<<<< 
 *                 if c_ns is not NULL:
 *                     if ':' in typename:
 */
          __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc,__pyx_v_c_node,__pyx_v_4lxml_9objectify__XML_SCHEMA_NS,__pyx_k177);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1529
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_NS, 'xsd')
 *                 if c_ns is not NULL:             # <<<<<<<<<<<<<< 
 *                     if ':' in typename:
 *                         prefix, name = typename.split(':', 1)
 */
          __pyx_1 = (__pyx_v_c_ns != NULL);
          if (__pyx_1) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1530
 *                     doc, c_node, _XML_SCHEMA_NS, 'xsd')
 *                 if c_ns is not NULL:
 *                     if ':' in typename:             # <<<<<<<<<<<<<< 
 *                         prefix, name = typename.split(':', 1)
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 */
            __pyx_5 = (PySequence_Contains(__pyx_v_typename, __pyx_k178p)); if (unlikely(__pyx_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; goto __pyx_L1;}
            if (__pyx_5) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1531
 *                 if c_ns is not NULL:
 *                     if ':' in typename:
 *                         prefix, name = typename.split(':', 1)             # <<<<<<<<<<<<<< 
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename = name
 */
              __pyx_2 = PyObject_GetAttr(__pyx_v_typename, __pyx_n_split); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; goto __pyx_L1;}

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1531
 *                 if c_ns is not NULL:
 *                     if ':' in typename:
 *                         prefix, name = typename.split(':', 1)             # <<<<<<<<<<<<<< 
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename = name
 */
              __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; goto __pyx_L1;}
              Py_INCREF(__pyx_k179p);
              PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k179p);
              Py_INCREF(__pyx_num_1);
              PyTuple_SET_ITEM(__pyx_3, 1, __pyx_num_1);
              __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; goto __pyx_L1;}
              Py_DECREF(__pyx_2); __pyx_2 = 0;
              Py_DECREF(__pyx_3); __pyx_3 = 0;
              if (PyTuple_CheckExact(__pyx_4) && PyTuple_GET_SIZE(__pyx_4) == 2) {
                __pyx_3 = PyTuple_GET_ITEM(__pyx_4, 0);
                Py_INCREF(__pyx_3);

                /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1531
 *                 if c_ns is not NULL:
 *                     if ':' in typename:
 *                         prefix, name = typename.split(':', 1)             # <<<<<<<<<<<<<< 
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename = name
 */
                Py_DECREF(__pyx_v_prefix);
                __pyx_v_prefix = __pyx_3;
                __pyx_3 = 0;
                __pyx_3 = PyTuple_GET_ITEM(__pyx_4, 1);
                Py_INCREF(__pyx_3);

                /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1531
 *                 if c_ns is not NULL:
 *                     if ':' in typename:
 *                         prefix, name = typename.split(':', 1)             # <<<<<<<<<<<<<< 
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename = name
 */
                Py_DECREF(__pyx_v_name);
                __pyx_v_name = __pyx_3;
                __pyx_3 = 0;
                Py_DECREF(__pyx_4); __pyx_4 = 0;
              }
              else {
                __pyx_2 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; goto __pyx_L1;}
                Py_DECREF(__pyx_4); __pyx_4 = 0;
                __pyx_3 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; goto __pyx_L1;}

                /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1531
 *                 if c_ns is not NULL:
 *                     if ':' in typename:
 *                         prefix, name = typename.split(':', 1)             # <<<<<<<<<<<<<< 
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename = name
 */
                Py_DECREF(__pyx_v_prefix);
                __pyx_v_prefix = __pyx_3;
                __pyx_3 = 0;
                __pyx_3 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; goto __pyx_L1;}

                /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1531
 *                 if c_ns is not NULL:
 *                     if ':' in typename:
 *                         prefix, name = typename.split(':', 1)             # <<<<<<<<<<<<<< 
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename = name
 */
                Py_DECREF(__pyx_v_name);
                __pyx_v_name = __pyx_3;
                __pyx_3 = 0;
                if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; goto __pyx_L1;}
                Py_DECREF(__pyx_2); __pyx_2 = 0;
              }

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1532
 *                     if ':' in typename:
 *                         prefix, name = typename.split(':', 1)
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':             # <<<<<<<<<<<<<< 
 *                             typename = name
 *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
 */
              __pyx_1 = (__pyx_v_c_ns->prefix == NULL);
              if (!__pyx_1) {

                /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1532
 *                     if ':' in typename:
 *                         prefix, name = typename.split(':', 1)
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':             # <<<<<<<<<<<<<< 
 *                             typename = name
 *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
 */
                __pyx_1 = ((__pyx_v_c_ns->prefix[0]) == '\0');
              }
              if (__pyx_1) {

                /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1533
 *                         prefix, name = typename.split(':', 1)
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename = name             # <<<<<<<<<<<<<< 
 *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
 *                             prefix = c_ns.prefix
 */
                Py_INCREF(__pyx_v_name);
                Py_DECREF(__pyx_v_typename);
                __pyx_v_typename = __pyx_v_name;
                goto __pyx_L33;
              }

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1534
 *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
 *                             typename = name
 *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:             # <<<<<<<<<<<<<< 
 *                             prefix = c_ns.prefix
 *                             typename = prefix + ':' + name
 */
              __pyx_5 = (strcmp(_cstr(__pyx_v_prefix),__pyx_v_c_ns->prefix) != 0);
              if (__pyx_5) {

                /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1535
 *                             typename = name
 *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
 *                             prefix = c_ns.prefix             # <<<<<<<<<<<<<< 
 *                             typename = prefix + ':' + name
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 */
                __pyx_3 = PyString_FromString(__pyx_v_c_ns->prefix); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
                Py_DECREF(__pyx_v_prefix);
                __pyx_v_prefix = __pyx_3;
                __pyx_3 = 0;

                /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1536
 *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
 *                             prefix = c_ns.prefix
 *                             typename = prefix + ':' + name             # <<<<<<<<<<<<<< 
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 *                         prefix = c_ns.prefix
 */
                __pyx_4 = PyNumber_Add(__pyx_v_prefix, __pyx_k180p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; goto __pyx_L1;}

                /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1536
 *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
 *                             prefix = c_ns.prefix
 *                             typename = prefix + ':' + name             # <<<<<<<<<<<<<< 
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 *                         prefix = c_ns.prefix
 */
                __pyx_2 = PyNumber_Add(__pyx_4, __pyx_v_name); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; goto __pyx_L1;}
                Py_DECREF(__pyx_4); __pyx_4 = 0;
                Py_DECREF(__pyx_v_typename);
                __pyx_v_typename = __pyx_2;
                __pyx_2 = 0;
                goto __pyx_L33;
              }
              __pyx_L33:;
              goto __pyx_L32;
            }

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1537
 *                             prefix = c_ns.prefix
 *                             typename = prefix + ':' + name
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':             # <<<<<<<<<<<<<< 
 *                         prefix = c_ns.prefix
 *                         typename = prefix + ':' + typename
 */
            __pyx_1 = (__pyx_v_c_ns->prefix != NULL);
            if (!__pyx_1) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1537
 *                             prefix = c_ns.prefix
 *                             typename = prefix + ':' + name
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':             # <<<<<<<<<<<<<< 
 *                         prefix = c_ns.prefix
 *                         typename = prefix + ':' + typename
 */
              __pyx_1 = ((__pyx_v_c_ns->prefix[0]) != '\0');
            }
            if (__pyx_1) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1538
 *                             typename = prefix + ':' + name
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 *                         prefix = c_ns.prefix             # <<<<<<<<<<<<<< 
 *                         typename = prefix + ':' + typename
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 */
              __pyx_3 = PyString_FromString(__pyx_v_c_ns->prefix); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; goto __pyx_L1;}
              Py_DECREF(__pyx_v_prefix);
              __pyx_v_prefix = __pyx_3;
              __pyx_3 = 0;

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1539
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 *                         prefix = c_ns.prefix
 *                         typename = prefix + ':' + typename             # <<<<<<<<<<<<<< 
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
 */
              __pyx_4 = PyNumber_Add(__pyx_v_prefix, __pyx_k181p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; goto __pyx_L1;}

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1539
 *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
 *                         prefix = c_ns.prefix
 *                         typename = prefix + ':' + typename             # <<<<<<<<<<<<<< 
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
 */
              __pyx_2 = PyNumber_Add(__pyx_4, __pyx_v_typename); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; goto __pyx_L1;}
              Py_DECREF(__pyx_4); __pyx_4 = 0;
              Py_DECREF(__pyx_v_typename);
              __pyx_v_typename = __pyx_2;
              __pyx_2 = 0;
              goto __pyx_L32;
            }
            __pyx_L32:;
            goto __pyx_L31;
          }
          __pyx_L31:;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1541
 *                         typename = prefix + ':' + typename
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')             # <<<<<<<<<<<<<< 
 *                 tree.xmlSetNsProp(c_node, c_ns, "type", _cstr(typename))
 * 
 */
          __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc,__pyx_v_c_node,__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS,__pyx_k182);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1542
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
 *                 tree.xmlSetNsProp(c_node, c_ns, "type", _cstr(typename))             # <<<<<<<<<<<<<< 
 * 
 *         if annotate_pytype:
 */
          xmlSetNsProp(__pyx_v_c_node,__pyx_v_c_ns,__pyx_k183,_cstr(__pyx_v_typename));
        }
        __pyx_L30:;
        goto __pyx_L29;
      }
      __pyx_L29:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1544
 *                 tree.xmlSetNsProp(c_node, c_ns, "type", _cstr(typename))
 * 
 *         if annotate_pytype:             # <<<<<<<<<<<<<< 
 *             if pytype is None:
 *                 # delete attribute if it exists
 */
      __pyx_5 = __pyx_v_annotate_pytype;
      if (__pyx_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1545
 * 
 *         if annotate_pytype:
 *             if pytype is None:             # <<<<<<<<<<<<<< 
 *                 # delete attribute if it exists
 *                 cetree.delAttributeFromNsName(
 */
        __pyx_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
        if (__pyx_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1548
 *                 # delete attribute if it exists
 *                 cetree.delAttributeFromNsName(
 *                     c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<< 
 *             else:
 *                 # update or create attribute
 */
          delAttributeFromNsName(__pyx_v_c_node,__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE,__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME);
          goto __pyx_L35;
        }
        /*else*/ {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1552
 *                 # update or create attribute
 *                 c_ns = cetree.findOrBuildNodeNsPrefix(
 *                     doc, c_node, _PYTYPE_NAMESPACE, 'py')             # <<<<<<<<<<<<<< 
 *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
 *                                   _cstr(pytype.name))
 */
          __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc,__pyx_v_c_node,__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE,__pyx_k184);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1554
 *                     doc, c_node, _PYTYPE_NAMESPACE, 'py')
 *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
 *                                   _cstr(pytype.name))             # <<<<<<<<<<<<<< 
 *                 if pytype is NoneType:
 *                     c_ns = cetree.findOrBuildNodeNsPrefix(
 */
          xmlSetNsProp(__pyx_v_c_node,__pyx_v_c_ns,__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME,_cstr(__pyx_v_pytype->name));

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1555
 *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
 *                                   _cstr(pytype.name))
 *                 if pytype is NoneType:             # <<<<<<<<<<<<<< 
 *                     c_ns = cetree.findOrBuildNodeNsPrefix(
 *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
 */
          __pyx_5 = (__pyx_v_pytype == __pyx_v_NoneType);
          if (__pyx_5) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1557
 *                 if pytype is NoneType:
 *                     c_ns = cetree.findOrBuildNodeNsPrefix(
 *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')             # <<<<<<<<<<<<<< 
 *                     tree.xmlSetNsProp(c_node, c_ns, "nil", "true")
 *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 */
            __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc,__pyx_v_c_node,__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS,__pyx_k185);

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1558
 *                     c_ns = cetree.findOrBuildNodeNsPrefix(
 *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
 *                     tree.xmlSetNsProp(c_node, c_ns, "nil", "true")             # <<<<<<<<<<<<<< 
 *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 * 
 */
            xmlSetNsProp(__pyx_v_c_node,__pyx_v_c_ns,__pyx_k186,__pyx_k187);
            goto __pyx_L36;
          }
          __pyx_L36:;
        }
        __pyx_L35:;
        goto __pyx_L34;
      }
      __pyx_L34:;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1559
 *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
 *                     tree.xmlSetNsProp(c_node, c_ns, "nil", "true")
 *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)             # <<<<<<<<<<<<<< 
 * 
 * def deannotate(element_or_tree, *, pytype=True, xsi=True):
 */
    END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node);

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_3);
    Py_XDECREF(__pyx_4);
    __Pyx_AddTraceback("lxml.objectify._annotate");
    __pyx_r = 0;
    __pyx_L0:;
    Py_DECREF(__pyx_v_doc);
    Py_DECREF(__pyx_v_pytype);
    Py_DECREF(__pyx_v_empty_pytype);
    Py_DECREF(__pyx_v_StrType);
    Py_DECREF(__pyx_v_NoneType);
    Py_DECREF(__pyx_v_typename);
    Py_DECREF(__pyx_v_value);
    Py_DECREF(__pyx_v_istree);
    Py_DECREF(__pyx_v_prefix);
    Py_DECREF(__pyx_v_old_pytypename);
    Py_DECREF(__pyx_v_name);
    Py_DECREF(__pyx_v_element);
    Py_DECREF(__pyx_v_empty_type_name);
    Py_DECREF(__pyx_v_empty_pytype_name);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1561
 *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 * 
 * def deannotate(element_or_tree, *, pytype=True, xsi=True):             # <<<<<<<<<<<<<< 
 *     """Recursively de-annotate the elements of an XML tree by removing 'pytype'
 *     and/or 'type' attributes.
 */

  static char __pyx_k188[] = "type";
  static char __pyx_k189[] = "type";

  static PyObject *__pyx_pf_4lxml_9objectify_deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_deannotate[] = "Recursively de-annotate the elements of an XML tree by removing \'pytype\'\n    and/or \'type\' attributes.\n\n    If the \'pytype\' keyword argument is True (the default), \'pytype\' attributes\n    will be removed. If the \'xsi\' keyword argument is True (the default),\n    \'xsi:type\' attributes will be removed.\n    ";
  static PyObject *__pyx_pf_4lxml_9objectify_deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_element_or_tree = 0;
    PyObject *__pyx_v_pytype = 0;
    PyObject *__pyx_v_xsi = 0;
    struct LxmlElement *__pyx_v_element;
    xmlNode *__pyx_v_c_node;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    int __pyx_2;
    static char *__pyx_argnames[] = {"element_or_tree","pytype","xsi",0};
    __pyx_v_pytype = __pyx_k41;
    __pyx_v_xsi = __pyx_k42;
    if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 1, 0, 0, 0) < 0) return NULL;
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|OO", __pyx_argnames, &__pyx_v_element_or_tree, &__pyx_v_pytype, &__pyx_v_xsi))) {
      Py_XDECREF(__pyx_args);
      Py_XDECREF(__pyx_kwds);
      return NULL;
    }
    Py_INCREF(__pyx_v_element_or_tree);
    Py_INCREF(__pyx_v_pytype);
    Py_INCREF(__pyx_v_xsi);
    __pyx_v_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1572
 *     cdef tree.xmlNode* c_node
 * 
 *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<< 
 *     c_node = element._c_node
 *     if pytype and xsi:
 */
    __pyx_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; goto __pyx_L1;}
    Py_DECREF(((PyObject *)__pyx_v_element));
    __pyx_v_element = ((struct LxmlElement *)__pyx_1);
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1573
 * 
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     c_node = element._c_node             # <<<<<<<<<<<<<< 
 *     if pytype and xsi:
 *         tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 */
    __pyx_v_c_node = __pyx_v_element->_c_node;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1574
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     c_node = element._c_node
 *     if pytype and xsi:             # <<<<<<<<<<<<<< 
 *         tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 *         if c_node.type == tree.XML_ELEMENT_NODE:
 */
    __pyx_1 = __pyx_v_pytype;
    Py_INCREF(__pyx_1);
    __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1574; goto __pyx_L1;}
    if (__pyx_2) {
      Py_DECREF(__pyx_1); __pyx_1 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1574
 *     element = cetree.rootNodeOrRaise(element_or_tree)
 *     c_node = element._c_node
 *     if pytype and xsi:             # <<<<<<<<<<<<<< 
 *         tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 *         if c_node.type == tree.XML_ELEMENT_NODE:
 */
      __pyx_1 = __pyx_v_xsi;
      Py_INCREF(__pyx_1);
    }
    __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1574; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    if (__pyx_2) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1575
 *     c_node = element._c_node
 *     if pytype and xsi:
 *         tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)             # <<<<<<<<<<<<<< 
 *         if c_node.type == tree.XML_ELEMENT_NODE:
 *             cetree.delAttributeFromNsName(
 */
      BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node,__pyx_v_c_node,1);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1576
 *     if pytype and xsi:
 *         tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 *         if c_node.type == tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<< 
 *             cetree.delAttributeFromNsName(
 *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 */
      __pyx_2 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
      if (__pyx_2) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1578
 *         if c_node.type == tree.XML_ELEMENT_NODE:
 *             cetree.delAttributeFromNsName(
 *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<< 
 *             cetree.delAttributeFromNsName(
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")
 */
        delAttributeFromNsName(__pyx_v_c_node,__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE,__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1580
 *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 *             cetree.delAttributeFromNsName(
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")             # <<<<<<<<<<<<<< 
 *         tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 *     elif pytype:
 */
        delAttributeFromNsName(__pyx_v_c_node,__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS,__pyx_k188);
        goto __pyx_L3;
      }
      __pyx_L3:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1581
 *             cetree.delAttributeFromNsName(
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")
 *         tree.END_FOR_EACH_ELEMENT_FROM(c_node)             # <<<<<<<<<<<<<< 
 *     elif pytype:
 *         tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 */
      END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node);
      goto __pyx_L2;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1582
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")
 *         tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 *     elif pytype:             # <<<<<<<<<<<<<< 
 *         tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 *         if c_node.type == tree.XML_ELEMENT_NODE:
 */
    __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_v_pytype); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; goto __pyx_L1;}
    if (__pyx_2) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1583
 *         tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 *     elif pytype:
 *         tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)             # <<<<<<<<<<<<<< 
 *         if c_node.type == tree.XML_ELEMENT_NODE:
 *             cetree.delAttributeFromNsName(
 */
      BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node,__pyx_v_c_node,1);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1584
 *     elif pytype:
 *         tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 *         if c_node.type == tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<< 
 *             cetree.delAttributeFromNsName(
 *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 */
      __pyx_2 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
      if (__pyx_2) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1586
 *         if c_node.type == tree.XML_ELEMENT_NODE:
 *             cetree.delAttributeFromNsName(
 *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<< 
 *         tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 *     else:
 */
        delAttributeFromNsName(__pyx_v_c_node,__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE,__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME);
        goto __pyx_L4;
      }
      __pyx_L4:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1587
 *             cetree.delAttributeFromNsName(
 *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 *         tree.END_FOR_EACH_ELEMENT_FROM(c_node)             # <<<<<<<<<<<<<< 
 *     else:
 *         tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 */
      END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node);
      goto __pyx_L2;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1589
 *         tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 *     else:
 *         tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)             # <<<<<<<<<<<<<< 
 *         if c_node.type == tree.XML_ELEMENT_NODE:
 *             cetree.delAttributeFromNsName(
 */
      BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node,__pyx_v_c_node,1);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1590
 *     else:
 *         tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
 *         if c_node.type == tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<< 
 *             cetree.delAttributeFromNsName(
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")
 */
      __pyx_2 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
      if (__pyx_2) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1592
 *         if c_node.type == tree.XML_ELEMENT_NODE:
 *             cetree.delAttributeFromNsName(
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")             # <<<<<<<<<<<<<< 
 *         tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 * 
 */
        delAttributeFromNsName(__pyx_v_c_node,__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS,__pyx_k189);
        goto __pyx_L5;
      }
      __pyx_L5:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1593
 *             cetree.delAttributeFromNsName(
 *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")
 *         tree.END_FOR_EACH_ELEMENT_FROM(c_node)             # <<<<<<<<<<<<<< 
 * 
 * 
 */
      END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node);
    }
    __pyx_L2:;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    __Pyx_AddTraceback("lxml.objectify.deannotate");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_element);
    Py_DECREF(__pyx_v_element_or_tree);
    Py_DECREF(__pyx_v_pytype);
    Py_DECREF(__pyx_v_xsi);
    Py_XDECREF(__pyx_args);
    Py_XDECREF(__pyx_kwds);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1606
 * objectify_parser = __DEFAULT_PARSER
 * 
 * def setDefaultParser(new_parser = None):             # <<<<<<<<<<<<<< 
 *     set_default_parser(new_parser)
 * 
 */

  static PyObject *__pyx_n_set_default_parser;

  static PyObject *__pyx_pf_4lxml_9objectify_setDefaultParser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static PyObject *__pyx_pf_4lxml_9objectify_setDefaultParser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_new_parser = 0;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    PyObject *__pyx_2 = 0;
    PyObject *__pyx_3 = 0;
    static char *__pyx_argnames[] = {"new_parser",0};
    __pyx_v_new_parser = __pyx_k44;
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_new_parser))) return NULL;
    Py_INCREF(__pyx_v_new_parser);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1607
 * 
 * def setDefaultParser(new_parser = None):
 *     set_default_parser(new_parser)             # <<<<<<<<<<<<<< 
 * 
 * def set_default_parser(new_parser = None):
 */
    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_set_default_parser); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1607
 * 
 * def setDefaultParser(new_parser = None):
 *     set_default_parser(new_parser)             # <<<<<<<<<<<<<< 
 * 
 * def set_default_parser(new_parser = None):
 */
    __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; goto __pyx_L1;}
    Py_INCREF(__pyx_v_new_parser);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_new_parser);
    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_3);
    __Pyx_AddTraceback("lxml.objectify.setDefaultParser");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_new_parser);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1609
 *     set_default_parser(new_parser)
 * 
 * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<< 
 *     """Replace the default parser used by objectify's Element() and
 *     fromstring() functions.
 */

  static PyObject *__pyx_k190p;

  static char __pyx_k190[] = "parser must inherit from lxml.etree.XMLParser";

  static PyObject *__pyx_pf_4lxml_9objectify_set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_set_default_parser[] = "Replace the default parser used by objectify\'s Element() and\n    fromstring() functions.\n\n    The new parser must be an etree.XMLParser.\n\n    Call without arguments to reset to the original parser.\n    ";
  static PyObject *__pyx_pf_4lxml_9objectify_set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_new_parser = 0;
    PyObject *__pyx_r;
    int __pyx_1;
    PyObject *__pyx_2 = 0;
    static char *__pyx_argnames[] = {"new_parser",0};
    __pyx_v_new_parser = __pyx_k45;
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_new_parser))) return NULL;
    Py_INCREF(__pyx_v_new_parser);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1618
 *     """
 *     global objectify_parser
 *     if new_parser is None:             # <<<<<<<<<<<<<< 
 *         objectify_parser = __DEFAULT_PARSER
 *     elif isinstance(new_parser, etree.XMLParser):
 */
    __pyx_1 = (__pyx_v_new_parser == Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1619
 *     global objectify_parser
 *     if new_parser is None:
 *         objectify_parser = __DEFAULT_PARSER             # <<<<<<<<<<<<<< 
 *     elif isinstance(new_parser, etree.XMLParser):
 *         objectify_parser = new_parser
 */
      Py_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
      Py_DECREF(__pyx_v_4lxml_9objectify_objectify_parser);
      __pyx_v_4lxml_9objectify_objectify_parser = __pyx_v_4lxml_9objectify___DEFAULT_PARSER;
      goto __pyx_L2;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1620
 *     if new_parser is None:
 *         objectify_parser = __DEFAULT_PARSER
 *     elif isinstance(new_parser, etree.XMLParser):             # <<<<<<<<<<<<<< 
 *         objectify_parser = new_parser
 *     else:
 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_XMLParser); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; goto __pyx_L1;}
    __pyx_1 = PyObject_IsInstance(__pyx_v_new_parser,__pyx_2); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1621
 *         objectify_parser = __DEFAULT_PARSER
 *     elif isinstance(new_parser, etree.XMLParser):
 *         objectify_parser = new_parser             # <<<<<<<<<<<<<< 
 *     else:
 *         raise TypeError, "parser must inherit from lxml.etree.XMLParser"
 */
      Py_INCREF(__pyx_v_new_parser);
      Py_DECREF(__pyx_v_4lxml_9objectify_objectify_parser);
      __pyx_v_4lxml_9objectify_objectify_parser = __pyx_v_new_parser;
      goto __pyx_L2;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1623
 *         objectify_parser = new_parser
 *     else:
 *         raise TypeError, "parser must inherit from lxml.etree.XMLParser"             # <<<<<<<<<<<<<< 
 * 
 * cdef _Element _makeElement(tag, text, attrib, nsmap):
 */
      __Pyx_Raise(__pyx_builtin_TypeError, __pyx_k190p, 0);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; goto __pyx_L1;}
    }
    __pyx_L2:;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_2);
    __Pyx_AddTraceback("lxml.objectify.set_default_parser");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_new_parser);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1625
 *         raise TypeError, "parser must inherit from lxml.etree.XMLParser"
 * 
 * cdef _Element _makeElement(tag, text, attrib, nsmap):             # <<<<<<<<<<<<<< 
 *     return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)
 * 
 */

  static  struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *__pyx_v_tag,PyObject *__pyx_v_text,PyObject *__pyx_v_attrib,PyObject *__pyx_v_nsmap) {
    struct LxmlElement *__pyx_r;
    PyObject *__pyx_1 = 0;
    Py_INCREF(__pyx_v_tag);
    Py_INCREF(__pyx_v_text);
    Py_INCREF(__pyx_v_attrib);
    Py_INCREF(__pyx_v_nsmap);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1626
 * 
 * cdef _Element _makeElement(tag, text, attrib, nsmap):
 *     return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)             # <<<<<<<<<<<<<< 
 * 
 * ################################################################################
 */
    __pyx_1 = ((PyObject *)makeElement(__pyx_v_tag,((struct LxmlDocument *)Py_None),__pyx_v_4lxml_9objectify_objectify_parser,__pyx_v_text,Py_None,__pyx_v_attrib,__pyx_v_nsmap)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; goto __pyx_L1;}
    __pyx_r = ((struct LxmlElement *)__pyx_1);
    __pyx_1 = 0;
    goto __pyx_L0;

    __pyx_r = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    __Pyx_AddTraceback("lxml.objectify._makeElement");
    __pyx_r = 0;
    __pyx_L0:;
    Py_DECREF(__pyx_v_tag);
    Py_DECREF(__pyx_v_text);
    Py_DECREF(__pyx_v_attrib);
    Py_DECREF(__pyx_v_nsmap);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1634
 * _fromstring = etree.fromstring
 * 
 * def fromstring(xml, parser=None):             # <<<<<<<<<<<<<< 
 *     """Objectify specific version of the lxml.etree fromstring() function
 *     that uses the objectify parser.
 */

  static PyObject *__pyx_pf_4lxml_9objectify_fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_fromstring[] = "Objectify specific version of the lxml.etree fromstring() function\n    that uses the objectify parser.\n\n    You can pass a different parser as second argument.\n    ";
  static PyObject *__pyx_pf_4lxml_9objectify_fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_xml = 0;
    PyObject *__pyx_v_parser = 0;
    PyObject *__pyx_r;
    int __pyx_1;
    PyObject *__pyx_2 = 0;
    PyObject *__pyx_3 = 0;
    static char *__pyx_argnames[] = {"xml","parser",0};
    __pyx_v_parser = __pyx_k46;
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_xml, &__pyx_v_parser))) return NULL;
    Py_INCREF(__pyx_v_xml);
    Py_INCREF(__pyx_v_parser);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1640
 *     You can pass a different parser as second argument.
 *     """
 *     if parser is None:             # <<<<<<<<<<<<<< 
 *         parser = objectify_parser
 *     return _fromstring(xml, parser)
 */
    __pyx_1 = (__pyx_v_parser == Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1641
 *     """
 *     if parser is None:
 *         parser = objectify_parser             # <<<<<<<<<<<<<< 
 *     return _fromstring(xml, parser)
 * 
 */
      Py_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
      Py_DECREF(__pyx_v_parser);
      __pyx_v_parser = __pyx_v_4lxml_9objectify_objectify_parser;
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1642
 *     if parser is None:
 *         parser = objectify_parser
 *     return _fromstring(xml, parser)             # <<<<<<<<<<<<<< 
 * 
 * XML = fromstring
 */
    __pyx_2 = PyTuple_New(2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; goto __pyx_L1;}
    Py_INCREF(__pyx_v_xml);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_xml);
    Py_INCREF(__pyx_v_parser);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_parser);
    __pyx_3 = PyObject_CallObject(__pyx_v_4lxml_9objectify__fromstring, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_r = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_3);
    __Pyx_AddTraceback("lxml.objectify.fromstring");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_xml);
    Py_DECREF(__pyx_v_parser);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1649
 * _parse = etree.parse
 * 
 * def parse(f, parser=None):             # <<<<<<<<<<<<<< 
 *     """Parse a file or file-like object with the objectify parser.
 * 
 */

  static PyObject *__pyx_pf_4lxml_9objectify_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_parse[] = "Parse a file or file-like object with the objectify parser.\n\n    You can pass a different parser as second argument.\n    ";
  static PyObject *__pyx_pf_4lxml_9objectify_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_f = 0;
    PyObject *__pyx_v_parser = 0;
    PyObject *__pyx_r;
    int __pyx_1;
    PyObject *__pyx_2 = 0;
    PyObject *__pyx_3 = 0;
    static char *__pyx_argnames[] = {"f","parser",0};
    __pyx_v_parser = __pyx_k47;
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_f, &__pyx_v_parser))) return NULL;
    Py_INCREF(__pyx_v_f);
    Py_INCREF(__pyx_v_parser);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1654
 *     You can pass a different parser as second argument.
 *     """
 *     if parser is None:             # <<<<<<<<<<<<<< 
 *         parser = objectify_parser
 *     return _parse(f, parser)
 */
    __pyx_1 = (__pyx_v_parser == Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1655
 *     """
 *     if parser is None:
 *         parser = objectify_parser             # <<<<<<<<<<<<<< 
 *     return _parse(f, parser)
 * 
 */
      Py_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
      Py_DECREF(__pyx_v_parser);
      __pyx_v_parser = __pyx_v_4lxml_9objectify_objectify_parser;
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1656
 *     if parser is None:
 *         parser = objectify_parser
 *     return _parse(f, parser)             # <<<<<<<<<<<<<< 
 * 
 * cdef object _DEFAULT_NSMAP
 */
    __pyx_2 = PyTuple_New(2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; goto __pyx_L1;}
    Py_INCREF(__pyx_v_f);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_f);
    Py_INCREF(__pyx_v_parser);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_parser);
    __pyx_3 = PyObject_CallObject(__pyx_v_4lxml_9objectify__parse, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_r = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_3);
    __Pyx_AddTraceback("lxml.objectify.parse");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_f);
    Py_DECREF(__pyx_v_parser);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1665
 * E = ElementMaker()
 * 
 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<< 
 *     """Objectify specific version of the lxml.etree Element() factory that
 *     always creates a structural (tree) element.
 */

  static PyObject *__pyx_n_update;

  static PyObject *__pyx_pf_4lxml_9objectify_Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_Element[] = "Objectify specific version of the lxml.etree Element() factory that\n    always creates a structural (tree) element.\n\n    NOTE: requires parser based element class lookup activated in lxml.etree!\n    ";
  static PyObject *__pyx_pf_4lxml_9objectify_Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v__tag = 0;
    PyObject *__pyx_v_attrib = 0;
    PyObject *__pyx_v_nsmap = 0;
    PyObject *__pyx_v__pytype = 0;
    PyObject *__pyx_v__attributes = 0;
    PyObject *__pyx_r;
    int __pyx_1;
    Py_ssize_t __pyx_2;
    PyObject *__pyx_3 = 0;
    PyObject *__pyx_4 = 0;
    PyObject *__pyx_5 = 0;
    static char *__pyx_argnames[] = {"_tag","attrib","nsmap","_pytype",0};
    __pyx_v_attrib = __pyx_k51;
    __pyx_v_nsmap = __pyx_k52;
    __pyx_v__pytype = __pyx_k53;
    if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 3, 0, &__pyx_v__attributes, 0) < 0) return NULL;
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|OOO", __pyx_argnames, &__pyx_v__tag, &__pyx_v_attrib, &__pyx_v_nsmap, &__pyx_v__pytype))) {
      Py_XDECREF(__pyx_args);
      Py_XDECREF(__pyx_kwds);
      Py_XDECREF(__pyx_v__attributes);
      return NULL;
    }
    Py_INCREF(__pyx_v__tag);
    Py_INCREF(__pyx_v_attrib);
    Py_INCREF(__pyx_v_nsmap);
    Py_INCREF(__pyx_v__pytype);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1671
 *     NOTE: requires parser based element class lookup activated in lxml.etree!
 *     """
 *     if attrib is not None:             # <<<<<<<<<<<<<< 
 *         if python.PyDict_Size(_attributes):
 *             attrib.update(_attributes)
 */
    __pyx_1 = (__pyx_v_attrib != Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1672
 *     """
 *     if attrib is not None:
 *         if python.PyDict_Size(_attributes):             # <<<<<<<<<<<<<< 
 *             attrib.update(_attributes)
 *         _attributes = attrib
 */
      __pyx_2 = PyDict_Size(__pyx_v__attributes);
      if (__pyx_2) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1673
 *     if attrib is not None:
 *         if python.PyDict_Size(_attributes):
 *             attrib.update(_attributes)             # <<<<<<<<<<<<<< 
 *         _attributes = attrib
 *     if _pytype is None:
 */
        __pyx_3 = PyObject_GetAttr(__pyx_v_attrib, __pyx_n_update); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1673
 *     if attrib is not None:
 *         if python.PyDict_Size(_attributes):
 *             attrib.update(_attributes)             # <<<<<<<<<<<<<< 
 *         _attributes = attrib
 *     if _pytype is None:
 */
        __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; goto __pyx_L1;}
        Py_INCREF(__pyx_v__attributes);
        PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v__attributes);
        __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        goto __pyx_L3;
      }
      __pyx_L3:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1674
 *         if python.PyDict_Size(_attributes):
 *             attrib.update(_attributes)
 *         _attributes = attrib             # <<<<<<<<<<<<<< 
 *     if _pytype is None:
 *         _pytype = TREE_PYTYPE_NAME
 */
      Py_INCREF(__pyx_v_attrib);
      Py_DECREF(__pyx_v__attributes);
      __pyx_v__attributes = __pyx_v_attrib;
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1675
 *             attrib.update(_attributes)
 *         _attributes = attrib
 *     if _pytype is None:             # <<<<<<<<<<<<<< 
 *         _pytype = TREE_PYTYPE_NAME
 *     if nsmap is None:
 */
    __pyx_1 = (__pyx_v__pytype == Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1676
 *         _attributes = attrib
 *     if _pytype is None:
 *         _pytype = TREE_PYTYPE_NAME             # <<<<<<<<<<<<<< 
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP
 */
      Py_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
      Py_DECREF(__pyx_v__pytype);
      __pyx_v__pytype = __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1677
 *     if _pytype is None:
 *         _pytype = TREE_PYTYPE_NAME
 *     if nsmap is None:             # <<<<<<<<<<<<<< 
 *         nsmap = _DEFAULT_NSMAP
 *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
 */
    __pyx_1 = (__pyx_v_nsmap == Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1678
 *         _pytype = TREE_PYTYPE_NAME
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<< 
 *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
 *     return _makeElement(_tag, None, _attributes, nsmap)
 */
      Py_INCREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
      Py_DECREF(__pyx_v_nsmap);
      __pyx_v_nsmap = __pyx_v_4lxml_9objectify__DEFAULT_NSMAP;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1679
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP
 *     _attributes[PYTYPE_ATTRIBUTE] = _pytype             # <<<<<<<<<<<<<< 
 *     return _makeElement(_tag, None, _attributes, nsmap)
 * 
 */
    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; goto __pyx_L1;}
    if (PyObject_SetItem(__pyx_v__attributes, __pyx_3, __pyx_v__pytype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1680
 *         nsmap = _DEFAULT_NSMAP
 *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
 *     return _makeElement(_tag, None, _attributes, nsmap)             # <<<<<<<<<<<<<< 
 * 
 * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,
 */
    __pyx_4 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_v__tag,Py_None,__pyx_v__attributes,__pyx_v_nsmap)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; goto __pyx_L1;}
    __pyx_r = __pyx_4;
    __pyx_4 = 0;
    goto __pyx_L0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_3);
    Py_XDECREF(__pyx_4);
    Py_XDECREF(__pyx_5);
    __Pyx_AddTraceback("lxml.objectify.Element");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_XDECREF(__pyx_v__attributes);
    Py_DECREF(__pyx_v__tag);
    Py_DECREF(__pyx_v_attrib);
    Py_DECREF(__pyx_v_nsmap);
    Py_DECREF(__pyx_v__pytype);
    Py_XDECREF(__pyx_args);
    Py_XDECREF(__pyx_kwds);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1682
 *     return _makeElement(_tag, None, _attributes, nsmap)
 * 
 * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<< 
 *                 **_attributes):
 *     """Create a new element from a Python value and XML attributes taken from
 */

  static PyObject *__pyx_n___copy__;
  static PyObject *__pyx_n_nsmap;
  static PyObject *__pyx_n_attrib;
  static PyObject *__pyx_n_value;

  static PyObject *__pyx_k191p;
  static PyObject *__pyx_k192p;
  static PyObject *__pyx_k193p;
  static PyObject *__pyx_k194p;
  static PyObject *__pyx_k195p;
  static PyObject *__pyx_k196p;

  static char __pyx_k191[] = ":";
  static char __pyx_k192[] = ":";
  static char __pyx_k193[] = "XSD types require the XSD namespace";
  static char __pyx_k194[] = "xsd:";
  static char __pyx_k195[] = ":";
  static char __pyx_k196[] = "XSD types require the XSD namespace";

  static PyObject *__pyx_pf_4lxml_9objectify_DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_DataElement[] = "Create a new element from a Python value and XML attributes taken from\n    keyword arguments or a dictionary passed as second argument.\n\n    Automatically adds a \'pytype\' attribute for the Python type of the value,\n    if the type can be identified.  If \'_pytype\' or \'_xsi\' are among the\n    keyword arguments, they will be used instead.\n\n    If the _value argument is an ObjectifiedDataElement instance, its py:pytype,\n    xsi:type and other attributes and nsmap are reused unless they are redefined\n    in attrib and/or keyword arguments.\n    ";
  static PyObject *__pyx_pf_4lxml_9objectify_DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v__value = 0;
    PyObject *__pyx_v_attrib = 0;
    PyObject *__pyx_v_nsmap = 0;
    PyObject *__pyx_v__pytype = 0;
    PyObject *__pyx_v__xsi = 0;
    PyObject *__pyx_v__attributes = 0;
    PyObject *__pyx_v_dict_result;
    PyObject *__pyx_v_temp;
    PyObject *__pyx_v_prefix;
    PyObject *__pyx_v_name;
    PyObject *__pyx_v_ns;
    PyObject *__pyx_v_strval;
    PyObject *__pyx_v_type_check;
    PyObject *__pyx_r;
    int __pyx_1;
    PyObject *__pyx_2 = 0;
    Py_ssize_t __pyx_3;
    PyObject *__pyx_4 = 0;
    PyObject *__pyx_5 = 0;
    int __pyx_6;
    PyObject *__pyx_7 = 0;
    int __pyx_8;
    static char *__pyx_argnames[] = {"_value","attrib","nsmap","_pytype","_xsi",0};
    __pyx_v_attrib = __pyx_k54;
    __pyx_v_nsmap = __pyx_k55;
    __pyx_v__pytype = __pyx_k56;
    __pyx_v__xsi = __pyx_k57;
    if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 3, 0, &__pyx_v__attributes, 0) < 0) return NULL;
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|OOOO", __pyx_argnames, &__pyx_v__value, &__pyx_v_attrib, &__pyx_v_nsmap, &__pyx_v__pytype, &__pyx_v__xsi))) {
      Py_XDECREF(__pyx_args);
      Py_XDECREF(__pyx_kwds);
      Py_XDECREF(__pyx_v__attributes);
      return NULL;
    }
    Py_INCREF(__pyx_v__value);
    Py_INCREF(__pyx_v_attrib);
    Py_INCREF(__pyx_v_nsmap);
    Py_INCREF(__pyx_v__pytype);
    Py_INCREF(__pyx_v__xsi);
    __pyx_v_temp = Py_None; Py_INCREF(Py_None);
    __pyx_v_prefix = Py_None; Py_INCREF(Py_None);
    __pyx_v_name = Py_None; Py_INCREF(Py_None);
    __pyx_v_ns = Py_None; Py_INCREF(Py_None);
    __pyx_v_strval = Py_None; Py_INCREF(Py_None);
    __pyx_v_type_check = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1696
 *     """
 *     cdef python.PyObject* dict_result
 *     if nsmap is None:             # <<<<<<<<<<<<<< 
 *         nsmap = _DEFAULT_NSMAP
 *     if attrib is not None and attrib:
 */
    __pyx_1 = (__pyx_v_nsmap == Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1697
 *     cdef python.PyObject* dict_result
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<< 
 *     if attrib is not None and attrib:
 *         if python.PyDict_Size(_attributes):
 */
      Py_INCREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
      Py_DECREF(__pyx_v_nsmap);
      __pyx_v_nsmap = __pyx_v_4lxml_9objectify__DEFAULT_NSMAP;
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1698
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP
 *     if attrib is not None and attrib:             # <<<<<<<<<<<<<< 
 *         if python.PyDict_Size(_attributes):
 *             attrib = dict(attrib)
 */
    __pyx_1 = (__pyx_v_attrib != Py_None);
    __pyx_2 = __Pyx_PyBool_FromLong(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; goto __pyx_L1;}
    __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; goto __pyx_L1;}
    if (__pyx_1) {
      Py_DECREF(__pyx_2); __pyx_2 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1698
 *     if nsmap is None:
 *         nsmap = _DEFAULT_NSMAP
 *     if attrib is not None and attrib:             # <<<<<<<<<<<<<< 
 *         if python.PyDict_Size(_attributes):
 *             attrib = dict(attrib)
 */
      __pyx_2 = __pyx_v_attrib;
      Py_INCREF(__pyx_2);
    }
    __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1699
 *         nsmap = _DEFAULT_NSMAP
 *     if attrib is not None and attrib:
 *         if python.PyDict_Size(_attributes):             # <<<<<<<<<<<<<< 
 *             attrib = dict(attrib)
 *             attrib.update(_attributes)
 */
      __pyx_3 = PyDict_Size(__pyx_v__attributes);
      if (__pyx_3) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1700
 *     if attrib is not None and attrib:
 *         if python.PyDict_Size(_attributes):
 *             attrib = dict(attrib)             # <<<<<<<<<<<<<< 
 *             attrib.update(_attributes)
 *         _attributes = attrib
 */
        __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; goto __pyx_L1;}
        Py_INCREF(__pyx_v_attrib);
        PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_attrib);
        __pyx_4 = PyObject_CallObject(((PyObject*)&PyDict_Type), __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; goto __pyx_L1;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        Py_DECREF(__pyx_v_attrib);
        __pyx_v_attrib = __pyx_4;
        __pyx_4 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1701
 *         if python.PyDict_Size(_attributes):
 *             attrib = dict(attrib)
 *             attrib.update(_attributes)             # <<<<<<<<<<<<<< 
 *         _attributes = attrib
 *     if isinstance(_value, ObjectifiedElement):
 */
        __pyx_2 = PyObject_GetAttr(__pyx_v_attrib, __pyx_n_update); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1701
 *         if python.PyDict_Size(_attributes):
 *             attrib = dict(attrib)
 *             attrib.update(_attributes)             # <<<<<<<<<<<<<< 
 *         _attributes = attrib
 *     if isinstance(_value, ObjectifiedElement):
 */
        __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; goto __pyx_L1;}
        Py_INCREF(__pyx_v__attributes);
        PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v__attributes);
        __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; goto __pyx_L1;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        goto __pyx_L4;
      }
      __pyx_L4:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1702
 *             attrib = dict(attrib)
 *             attrib.update(_attributes)
 *         _attributes = attrib             # <<<<<<<<<<<<<< 
 *     if isinstance(_value, ObjectifiedElement):
 *         if _pytype is None:
 */
      Py_INCREF(__pyx_v_attrib);
      Py_DECREF(__pyx_v__attributes);
      __pyx_v__attributes = __pyx_v_attrib;
      goto __pyx_L3;
    }
    __pyx_L3:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1703
 *             attrib.update(_attributes)
 *         _attributes = attrib
 *     if isinstance(_value, ObjectifiedElement):             # <<<<<<<<<<<<<< 
 *         if _pytype is None:
 *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
 */
    __pyx_1 = PyObject_IsInstance(__pyx_v__value,((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)); if (unlikely(__pyx_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;}
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1704
 *         _attributes = attrib
 *     if isinstance(_value, ObjectifiedElement):
 *         if _pytype is None:             # <<<<<<<<<<<<<< 
 *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
 *                 # special case: no change!
 */
      __pyx_1 = (__pyx_v__pytype == Py_None);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1705
 *     if isinstance(_value, ObjectifiedElement):
 *         if _pytype is None:
 *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<< 
 *                 # special case: no change!
 *                 return _value.__copy__()
 */
        __pyx_1 = (__pyx_v__xsi == Py_None);
        if (__pyx_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1705
 *     if isinstance(_value, ObjectifiedElement):
 *         if _pytype is None:
 *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<< 
 *                 # special case: no change!
 *                 return _value.__copy__()
 */
          __pyx_6 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; goto __pyx_L1;}
          __pyx_1 = (!__pyx_6);
          if (__pyx_1) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1705
 *     if isinstance(_value, ObjectifiedElement):
 *         if _pytype is None:
 *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<< 
 *                 # special case: no change!
 *                 return _value.__copy__()
 */
            __pyx_1 = (__pyx_v_nsmap == __pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
          }
        }
        if (__pyx_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1707
 *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
 *                 # special case: no change!
 *                 return _value.__copy__()             # <<<<<<<<<<<<<< 
 *     if isinstance(_value, ObjectifiedDataElement):
 *         # reuse existing nsmap unless redefined in nsmap parameter
 */
          __pyx_2 = PyObject_GetAttr(__pyx_v__value, __pyx_n___copy__); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; goto __pyx_L1;}
          __pyx_4 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; goto __pyx_L1;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          __pyx_r = __pyx_4;
          __pyx_4 = 0;
          goto __pyx_L0;
          goto __pyx_L7;
        }
        __pyx_L7:;
        goto __pyx_L6;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1708
 *                 # special case: no change!
 *                 return _value.__copy__()
 *     if isinstance(_value, ObjectifiedDataElement):             # <<<<<<<<<<<<<< 
 *         # reuse existing nsmap unless redefined in nsmap parameter
 *         temp = _value.nsmap
 */
    __pyx_6 = PyObject_IsInstance(__pyx_v__value,((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement)); if (unlikely(__pyx_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; goto __pyx_L1;}
    if (__pyx_6) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1710
 *     if isinstance(_value, ObjectifiedDataElement):
 *         # reuse existing nsmap unless redefined in nsmap parameter
 *         temp = _value.nsmap             # <<<<<<<<<<<<<< 
 *         if temp is not None and temp:
 *             temp = dict(temp)
 */
      __pyx_5 = PyObject_GetAttr(__pyx_v__value, __pyx_n_nsmap); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; goto __pyx_L1;}
      Py_DECREF(__pyx_v_temp);
      __pyx_v_temp = __pyx_5;
      __pyx_5 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1711
 *         # reuse existing nsmap unless redefined in nsmap parameter
 *         temp = _value.nsmap
 *         if temp is not None and temp:             # <<<<<<<<<<<<<< 
 *             temp = dict(temp)
 *             temp.update(nsmap)
 */
      __pyx_1 = (__pyx_v_temp != Py_None);
      __pyx_2 = __Pyx_PyBool_FromLong(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; goto __pyx_L1;}
      __pyx_6 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; goto __pyx_L1;}
      if (__pyx_6) {
        Py_DECREF(__pyx_2); __pyx_2 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1711
 *         # reuse existing nsmap unless redefined in nsmap parameter
 *         temp = _value.nsmap
 *         if temp is not None and temp:             # <<<<<<<<<<<<<< 
 *             temp = dict(temp)
 *             temp.update(nsmap)
 */
        __pyx_2 = __pyx_v_temp;
        Py_INCREF(__pyx_2);
      }
      __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1712
 *         temp = _value.nsmap
 *         if temp is not None and temp:
 *             temp = dict(temp)             # <<<<<<<<<<<<<< 
 *             temp.update(nsmap)
 *             nsmap = temp
 */
        __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; goto __pyx_L1;}
        Py_INCREF(__pyx_v_temp);
        PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_temp);
        __pyx_5 = PyObject_CallObject(((PyObject*)&PyDict_Type), __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; goto __pyx_L1;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        Py_DECREF(__pyx_v_temp);
        __pyx_v_temp = __pyx_5;
        __pyx_5 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1713
 *         if temp is not None and temp:
 *             temp = dict(temp)
 *             temp.update(nsmap)             # <<<<<<<<<<<<<< 
 *             nsmap = temp
 *         # reuse existing attributes unless redefined in attrib/_attributes
 */
        __pyx_2 = PyObject_GetAttr(__pyx_v_temp, __pyx_n_update); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1713; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1713
 *         if temp is not None and temp:
 *             temp = dict(temp)
 *             temp.update(nsmap)             # <<<<<<<<<<<<<< 
 *             nsmap = temp
 *         # reuse existing attributes unless redefined in attrib/_attributes
 */
        __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1713; goto __pyx_L1;}
        Py_INCREF(__pyx_v_nsmap);
        PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_nsmap);
        __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1713; goto __pyx_L1;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        Py_DECREF(__pyx_5); __pyx_5 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1714
 *             temp = dict(temp)
 *             temp.update(nsmap)
 *             nsmap = temp             # <<<<<<<<<<<<<< 
 *         # reuse existing attributes unless redefined in attrib/_attributes
 *         temp = _value.attrib
 */
        Py_INCREF(__pyx_v_temp);
        Py_DECREF(__pyx_v_nsmap);
        __pyx_v_nsmap = __pyx_v_temp;
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1716
 *             nsmap = temp
 *         # reuse existing attributes unless redefined in attrib/_attributes
 *         temp = _value.attrib             # <<<<<<<<<<<<<< 
 *         if temp is not None and temp:
 *             temp = dict(temp)
 */
      __pyx_2 = PyObject_GetAttr(__pyx_v__value, __pyx_n_attrib); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; goto __pyx_L1;}
      Py_DECREF(__pyx_v_temp);
      __pyx_v_temp = __pyx_2;
      __pyx_2 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1717
 *         # reuse existing attributes unless redefined in attrib/_attributes
 *         temp = _value.attrib
 *         if temp is not None and temp:             # <<<<<<<<<<<<<< 
 *             temp = dict(temp)
 *             temp.update(_attributes)
 */
      __pyx_6 = (__pyx_v_temp != Py_None);
      __pyx_4 = __Pyx_PyBool_FromLong(__pyx_6); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; goto __pyx_L1;}
      __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_4); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; goto __pyx_L1;}
      if (__pyx_1) {
        Py_DECREF(__pyx_4); __pyx_4 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1717
 *         # reuse existing attributes unless redefined in attrib/_attributes
 *         temp = _value.attrib
 *         if temp is not None and temp:             # <<<<<<<<<<<<<< 
 *             temp = dict(temp)
 *             temp.update(_attributes)
 */
        __pyx_4 = __pyx_v_temp;
        Py_INCREF(__pyx_4);
      }
      __pyx_6 = __Pyx_PyObject_IsTrue(__pyx_4); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      if (__pyx_6) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1718
 *         temp = _value.attrib
 *         if temp is not None and temp:
 *             temp = dict(temp)             # <<<<<<<<<<<<<< 
 *             temp.update(_attributes)
 *             _attributes = temp
 */
        __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1718; goto __pyx_L1;}
        Py_INCREF(__pyx_v_temp);
        PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_temp);
        __pyx_2 = PyObject_CallObject(((PyObject*)&PyDict_Type), __pyx_5); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1718; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        Py_DECREF(__pyx_v_temp);
        __pyx_v_temp = __pyx_2;
        __pyx_2 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1719
 *         if temp is not None and temp:
 *             temp = dict(temp)
 *             temp.update(_attributes)             # <<<<<<<<<<<<<< 
 *             _attributes = temp
 *         # reuse existing xsi:type or py:pytype attributes, unless provided as
 */
        __pyx_4 = PyObject_GetAttr(__pyx_v_temp, __pyx_n_update); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1719
 *         if temp is not None and temp:
 *             temp = dict(temp)
 *             temp.update(_attributes)             # <<<<<<<<<<<<<< 
 *             _attributes = temp
 *         # reuse existing xsi:type or py:pytype attributes, unless provided as
 */
        __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
        Py_INCREF(__pyx_v__attributes);
        PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v__attributes);
        __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_5); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        Py_DECREF(__pyx_2); __pyx_2 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1720
 *             temp = dict(temp)
 *             temp.update(_attributes)
 *             _attributes = temp             # <<<<<<<<<<<<<< 
 *         # reuse existing xsi:type or py:pytype attributes, unless provided as
 *         # arguments
 */
        Py_INCREF(__pyx_v_temp);
        Py_DECREF(__pyx_v__attributes);
        __pyx_v__attributes = __pyx_v_temp;
        goto __pyx_L10;
      }
      __pyx_L10:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1723
 *         # reuse existing xsi:type or py:pytype attributes, unless provided as
 *         # arguments
 *         if _xsi is None and _pytype is None:             # <<<<<<<<<<<<<< 
 *             dict_result = python.PyDict_GetItem(_attributes,
 *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)
 */
      __pyx_1 = (__pyx_v__xsi == Py_None);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1723
 *         # reuse existing xsi:type or py:pytype attributes, unless provided as
 *         # arguments
 *         if _xsi is None and _pytype is None:             # <<<<<<<<<<<<<< 
 *             dict_result = python.PyDict_GetItem(_attributes,
 *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)
 */
        __pyx_1 = (__pyx_v__pytype == Py_None);
      }
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1725
 *         if _xsi is None and _pytype is None:
 *             dict_result = python.PyDict_GetItem(_attributes,
 *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)             # <<<<<<<<<<<<<< 
 *             if dict_result is not NULL:
 *                 _xsi = <object>dict_result
 */
        __pyx_v_dict_result = PyDict_GetItem(__pyx_v__attributes,__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1726
 *             dict_result = python.PyDict_GetItem(_attributes,
 *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)
 *             if dict_result is not NULL:             # <<<<<<<<<<<<<< 
 *                 _xsi = <object>dict_result
 *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
 */
        __pyx_6 = (__pyx_v_dict_result != NULL);
        if (__pyx_6) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1727
 *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)
 *             if dict_result is not NULL:
 *                 _xsi = <object>dict_result             # <<<<<<<<<<<<<< 
 *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
 *             if dict_result is not NULL:
 */
          __pyx_4 = (PyObject *)__pyx_v_dict_result;
          Py_INCREF(__pyx_4);
          Py_DECREF(__pyx_v__xsi);
          __pyx_v__xsi = __pyx_4;
          __pyx_4 = 0;
          goto __pyx_L12;
        }
        __pyx_L12:;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1728
 *             if dict_result is not NULL:
 *                 _xsi = <object>dict_result
 *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)             # <<<<<<<<<<<<<< 
 *             if dict_result is not NULL:
 *                 _pytype = <object>dict_result
 */
        __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; goto __pyx_L1;}
        __pyx_v_dict_result = PyDict_GetItem(__pyx_v__attributes,__pyx_5);
        Py_DECREF(__pyx_5); __pyx_5 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1729
 *                 _xsi = <object>dict_result
 *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
 *             if dict_result is not NULL:             # <<<<<<<<<<<<<< 
 *                 _pytype = <object>dict_result
 * 
 */
        __pyx_1 = (__pyx_v_dict_result != NULL);
        if (__pyx_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1730
 *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
 *             if dict_result is not NULL:
 *                 _pytype = <object>dict_result             # <<<<<<<<<<<<<< 
 * 
 *     if _xsi is not None:
 */
          __pyx_2 = (PyObject *)__pyx_v_dict_result;
          Py_INCREF(__pyx_2);
          Py_DECREF(__pyx_v__pytype);
          __pyx_v__pytype = __pyx_2;
          __pyx_2 = 0;
          goto __pyx_L13;
        }
        __pyx_L13:;
        goto __pyx_L11;
      }
      __pyx_L11:;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1732
 *                 _pytype = <object>dict_result
 * 
 *     if _xsi is not None:             # <<<<<<<<<<<<<< 
 *         if ':' in _xsi:
 *             prefix, name = _xsi.split(':', 1)
 */
    __pyx_6 = (__pyx_v__xsi != Py_None);
    if (__pyx_6) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1733
 * 
 *     if _xsi is not None:
 *         if ':' in _xsi:             # <<<<<<<<<<<<<< 
 *             prefix, name = _xsi.split(':', 1)
 *             ns = nsmap.get(prefix)
 */
      __pyx_1 = (PySequence_Contains(__pyx_v__xsi, __pyx_k191p)); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; goto __pyx_L1;}
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1734
 *     if _xsi is not None:
 *         if ':' in _xsi:
 *             prefix, name = _xsi.split(':', 1)             # <<<<<<<<<<<<<< 
 *             ns = nsmap.get(prefix)
 *             if ns != XML_SCHEMA_NS:
 */
        __pyx_4 = PyObject_GetAttr(__pyx_v__xsi, __pyx_n_split); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1734
 *     if _xsi is not None:
 *         if ':' in _xsi:
 *             prefix, name = _xsi.split(':', 1)             # <<<<<<<<<<<<<< 
 *             ns = nsmap.get(prefix)
 *             if ns != XML_SCHEMA_NS:
 */
        __pyx_5 = PyTuple_New(2); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; goto __pyx_L1;}
        Py_INCREF(__pyx_k192p);
        PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k192p);
        Py_INCREF(__pyx_num_1);
        PyTuple_SET_ITEM(__pyx_5, 1, __pyx_num_1);
        __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_5); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; goto __pyx_L1;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        if (PyTuple_CheckExact(__pyx_2) && PyTuple_GET_SIZE(__pyx_2) == 2) {
          __pyx_5 = PyTuple_GET_ITEM(__pyx_2, 0);
          Py_INCREF(__pyx_5);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1734
 *     if _xsi is not None:
 *         if ':' in _xsi:
 *             prefix, name = _xsi.split(':', 1)             # <<<<<<<<<<<<<< 
 *             ns = nsmap.get(prefix)
 *             if ns != XML_SCHEMA_NS:
 */
          Py_DECREF(__pyx_v_prefix);
          __pyx_v_prefix = __pyx_5;
          __pyx_5 = 0;
          __pyx_5 = PyTuple_GET_ITEM(__pyx_2, 1);
          Py_INCREF(__pyx_5);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1734
 *     if _xsi is not None:
 *         if ':' in _xsi:
 *             prefix, name = _xsi.split(':', 1)             # <<<<<<<<<<<<<< 
 *             ns = nsmap.get(prefix)
 *             if ns != XML_SCHEMA_NS:
 */
          Py_DECREF(__pyx_v_name);
          __pyx_v_name = __pyx_5;
          __pyx_5 = 0;
          Py_DECREF(__pyx_2); __pyx_2 = 0;
        }
        else {
          __pyx_4 = PyObject_GetIter(__pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; goto __pyx_L1;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; goto __pyx_L1;}

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1734
 *     if _xsi is not None:
 *         if ':' in _xsi:
 *             prefix, name = _xsi.split(':', 1)             # <<<<<<<<<<<<<< 
 *             ns = nsmap.get(prefix)
 *             if ns != XML_SCHEMA_NS:
 */
          Py_DECREF(__pyx_v_prefix);
          __pyx_v_prefix = __pyx_5;
          __pyx_5 = 0;
          __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; goto __pyx_L1;}

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1734
 *     if _xsi is not None:
 *         if ':' in _xsi:
 *             prefix, name = _xsi.split(':', 1)             # <<<<<<<<<<<<<< 
 *             ns = nsmap.get(prefix)
 *             if ns != XML_SCHEMA_NS:
 */
          Py_DECREF(__pyx_v_name);
          __pyx_v_name = __pyx_5;
          __pyx_5 = 0;
          if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; goto __pyx_L1;}
          Py_DECREF(__pyx_4); __pyx_4 = 0;
        }

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1735
 *         if ':' in _xsi:
 *             prefix, name = _xsi.split(':', 1)
 *             ns = nsmap.get(prefix)             # <<<<<<<<<<<<<< 
 *             if ns != XML_SCHEMA_NS:
 *                 raise ValueError, "XSD types require the XSD namespace"
 */
        __pyx_5 = PyObject_GetAttr(__pyx_v_nsmap, __pyx_n_get); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1735
 *         if ':' in _xsi:
 *             prefix, name = _xsi.split(':', 1)
 *             ns = nsmap.get(prefix)             # <<<<<<<<<<<<<< 
 *             if ns != XML_SCHEMA_NS:
 *                 raise ValueError, "XSD types require the XSD namespace"
 */
        __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; goto __pyx_L1;}
        Py_INCREF(__pyx_v_prefix);
        PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_prefix);
        __pyx_4 = PyObject_CallObject(__pyx_5, __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        Py_DECREF(__pyx_v_ns);
        __pyx_v_ns = __pyx_4;
        __pyx_4 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1736
 *             prefix, name = _xsi.split(':', 1)
 *             ns = nsmap.get(prefix)
 *             if ns != XML_SCHEMA_NS:             # <<<<<<<<<<<<<< 
 *                 raise ValueError, "XSD types require the XSD namespace"
 *         elif nsmap is _DEFAULT_NSMAP:
 */
        __pyx_5 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_NE); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1736; goto __pyx_L1;}
        __pyx_6 = __Pyx_PyObject_IsTrue(__pyx_5); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1736; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        if (__pyx_6) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1737
 *             ns = nsmap.get(prefix)
 *             if ns != XML_SCHEMA_NS:
 *                 raise ValueError, "XSD types require the XSD namespace"             # <<<<<<<<<<<<<< 
 *         elif nsmap is _DEFAULT_NSMAP:
 *             name = _xsi
 */
          __Pyx_Raise(__pyx_builtin_ValueError, __pyx_k193p, 0);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; goto __pyx_L1;}
          goto __pyx_L16;
        }
        __pyx_L16:;
        goto __pyx_L15;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1738
 *             if ns != XML_SCHEMA_NS:
 *                 raise ValueError, "XSD types require the XSD namespace"
 *         elif nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<< 
 *             name = _xsi
 *             _xsi = 'xsd:' + _xsi
 */
      __pyx_1 = (__pyx_v_nsmap == __pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1739
 *                 raise ValueError, "XSD types require the XSD namespace"
 *         elif nsmap is _DEFAULT_NSMAP:
 *             name = _xsi             # <<<<<<<<<<<<<< 
 *             _xsi = 'xsd:' + _xsi
 *         else:
 */
        Py_INCREF(__pyx_v__xsi);
        Py_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_v__xsi;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1740
 *         elif nsmap is _DEFAULT_NSMAP:
 *             name = _xsi
 *             _xsi = 'xsd:' + _xsi             # <<<<<<<<<<<<<< 
 *         else:
 *             name = _xsi
 */
        __pyx_2 = PyNumber_Add(__pyx_k194p, __pyx_v__xsi); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; goto __pyx_L1;}
        Py_DECREF(__pyx_v__xsi);
        __pyx_v__xsi = __pyx_2;
        __pyx_2 = 0;
        goto __pyx_L15;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1742
 *             _xsi = 'xsd:' + _xsi
 *         else:
 *             name = _xsi             # <<<<<<<<<<<<<< 
 *             for prefix, ns in nsmap.items():
 *                 if ns == XML_SCHEMA_NS:
 */
        Py_INCREF(__pyx_v__xsi);
        Py_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_v__xsi;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1743
 *         else:
 *             name = _xsi
 *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<< 
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:
 */
        __pyx_4 = PyObject_GetAttr(__pyx_v_nsmap, __pyx_n_items); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; goto __pyx_L1;}
        __pyx_5 = PyObject_CallObject(__pyx_4, 0); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; goto __pyx_L1;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        if (PyList_CheckExact(__pyx_5)) { __pyx_3 = 0; __pyx_2 = __pyx_5; Py_INCREF(__pyx_2); }
        else { __pyx_2 = PyObject_GetIter(__pyx_5); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; goto __pyx_L1;} }
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        for (;;) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1743
 *         else:
 *             name = _xsi
 *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<< 
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:
 */
          if (PyList_CheckExact(__pyx_2)) { if (__pyx_3 >= PyList_GET_SIZE(__pyx_2)) break; __pyx_4 = PyList_GET_ITEM(__pyx_2, __pyx_3++); Py_INCREF(__pyx_4); }
          else {
            __pyx_4 = PyIter_Next(__pyx_2);
            if (!__pyx_4) {
              break;
            }
          }
          if (PyTuple_CheckExact(__pyx_4) && PyTuple_GET_SIZE(__pyx_4) == 2) {
            __pyx_7 = PyTuple_GET_ITEM(__pyx_4, 0);
            Py_INCREF(__pyx_7);

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1743
 *         else:
 *             name = _xsi
 *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<< 
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:
 */
            Py_DECREF(__pyx_v_prefix);
            __pyx_v_prefix = __pyx_7;
            __pyx_7 = 0;
            __pyx_7 = PyTuple_GET_ITEM(__pyx_4, 1);
            Py_INCREF(__pyx_7);

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1743
 *         else:
 *             name = _xsi
 *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<< 
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:
 */
            Py_DECREF(__pyx_v_ns);
            __pyx_v_ns = __pyx_7;
            __pyx_7 = 0;
            Py_DECREF(__pyx_4); __pyx_4 = 0;
          }
          else {
            __pyx_5 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; goto __pyx_L1;}
            Py_DECREF(__pyx_4); __pyx_4 = 0;
            __pyx_7 = __Pyx_UnpackItem(__pyx_5); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; goto __pyx_L1;}

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1743
 *         else:
 *             name = _xsi
 *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<< 
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:
 */
            Py_DECREF(__pyx_v_prefix);
            __pyx_v_prefix = __pyx_7;
            __pyx_7 = 0;
            __pyx_7 = __Pyx_UnpackItem(__pyx_5); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; goto __pyx_L1;}

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1743
 *         else:
 *             name = _xsi
 *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<< 
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:
 */
            Py_DECREF(__pyx_v_ns);
            __pyx_v_ns = __pyx_7;
            __pyx_7 = 0;
            if (__Pyx_EndUnpack(__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; goto __pyx_L1;}
            Py_DECREF(__pyx_5); __pyx_5 = 0;
          }

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1744
 *             name = _xsi
 *             for prefix, ns in nsmap.items():
 *                 if ns == XML_SCHEMA_NS:             # <<<<<<<<<<<<<< 
 *                     if prefix is not None and prefix:
 *                         _xsi = prefix + ':' + _xsi
 */
          __pyx_7 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_EQ); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; goto __pyx_L1;}
          __pyx_6 = __Pyx_PyObject_IsTrue(__pyx_7); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; goto __pyx_L1;}
          Py_DECREF(__pyx_7); __pyx_7 = 0;
          if (__pyx_6) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1745
 *             for prefix, ns in nsmap.items():
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:             # <<<<<<<<<<<<<< 
 *                         _xsi = prefix + ':' + _xsi
 *                     break
 */
            __pyx_1 = (__pyx_v_prefix != Py_None);
            __pyx_4 = __Pyx_PyBool_FromLong(__pyx_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; goto __pyx_L1;}
            __pyx_6 = __Pyx_PyObject_IsTrue(__pyx_4); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; goto __pyx_L1;}
            if (__pyx_6) {
              Py_DECREF(__pyx_4); __pyx_4 = 0;

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1745
 *             for prefix, ns in nsmap.items():
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:             # <<<<<<<<<<<<<< 
 *                         _xsi = prefix + ':' + _xsi
 *                     break
 */
              __pyx_4 = __pyx_v_prefix;
              Py_INCREF(__pyx_4);
            }
            __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_4); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; goto __pyx_L1;}
            Py_DECREF(__pyx_4); __pyx_4 = 0;
            if (__pyx_1) {

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1746
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:
 *                         _xsi = prefix + ':' + _xsi             # <<<<<<<<<<<<<< 
 *                     break
 *             else:
 */
              __pyx_5 = PyNumber_Add(__pyx_v_prefix, __pyx_k195p); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; goto __pyx_L1;}

              /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1746
 *                 if ns == XML_SCHEMA_NS:
 *                     if prefix is not None and prefix:
 *                         _xsi = prefix + ':' + _xsi             # <<<<<<<<<<<<<< 
 *                     break
 *             else:
 */
              __pyx_7 = PyNumber_Add(__pyx_5, __pyx_v__xsi); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; goto __pyx_L1;}
              Py_DECREF(__pyx_5); __pyx_5 = 0;
              Py_DECREF(__pyx_v__xsi);
              __pyx_v__xsi = __pyx_7;
              __pyx_7 = 0;
              goto __pyx_L20;
            }
            __pyx_L20:;

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1747
 *                     if prefix is not None and prefix:
 *                         _xsi = prefix + ':' + _xsi
 *                     break             # <<<<<<<<<<<<<< 
 *             else:
 *                 raise ValueError, "XSD types require the XSD namespace"
 */
            goto __pyx_L18;
            goto __pyx_L19;
          }
          __pyx_L19:;
        }
        /*else*/ {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1749
 *                     break
 *             else:
 *                 raise ValueError, "XSD types require the XSD namespace"             # <<<<<<<<<<<<<< 
 *         python.PyDict_SetItem(_attributes, XML_SCHEMA_INSTANCE_TYPE_ATTR, _xsi)
 *         if _pytype is None:
 */
          __Pyx_Raise(__pyx_builtin_ValueError, __pyx_k196p, 0);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; goto __pyx_L1;}
        }
        __pyx_L18:;
        Py_DECREF(__pyx_2); __pyx_2 = 0;
      }
      __pyx_L15:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1750
 *             else:
 *                 raise ValueError, "XSD types require the XSD namespace"
 *         python.PyDict_SetItem(_attributes, XML_SCHEMA_INSTANCE_TYPE_ATTR, _xsi)             # <<<<<<<<<<<<<< 
 *         if _pytype is None:
 *             # allow using unregistered or even wrong xsi:type names
 */
      __pyx_8 = PyDict_SetItem(__pyx_v__attributes,__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR,__pyx_v__xsi); if (unlikely(__pyx_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1751
 *                 raise ValueError, "XSD types require the XSD namespace"
 *         python.PyDict_SetItem(_attributes, XML_SCHEMA_INSTANCE_TYPE_ATTR, _xsi)
 *         if _pytype is None:             # <<<<<<<<<<<<<< 
 *             # allow using unregistered or even wrong xsi:type names
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)
 */
      __pyx_6 = (__pyx_v__pytype == Py_None);
      if (__pyx_6) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1753
 *         if _pytype is None:
 *             # allow using unregistered or even wrong xsi:type names
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)             # <<<<<<<<<<<<<< 
 *             if dict_result is NULL:
 *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
 */
        __pyx_v_dict_result = PyDict_GetItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT,__pyx_v__xsi);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1754
 *             # allow using unregistered or even wrong xsi:type names
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)
 *             if dict_result is NULL:             # <<<<<<<<<<<<<< 
 *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
 *             if dict_result is not NULL:
 */
        __pyx_1 = (__pyx_v_dict_result == NULL);
        if (__pyx_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1755
 *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)
 *             if dict_result is NULL:
 *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)             # <<<<<<<<<<<<<< 
 *             if dict_result is not NULL:
 *                 _pytype = (<PyType>dict_result).name
 */
          __pyx_v_dict_result = PyDict_GetItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT,__pyx_v_name);
          goto __pyx_L22;
        }
        __pyx_L22:;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1756
 *             if dict_result is NULL:
 *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
 *             if dict_result is not NULL:             # <<<<<<<<<<<<<< 
 *                 _pytype = (<PyType>dict_result).name
 * 
 */
        __pyx_6 = (__pyx_v_dict_result != NULL);
        if (__pyx_6) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1757
 *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
 *             if dict_result is not NULL:
 *                 _pytype = (<PyType>dict_result).name             # <<<<<<<<<<<<<< 
 * 
 *     if _value is None and _pytype != "str":
 */
          __pyx_4 = (PyObject *)__pyx_v_dict_result;
          Py_INCREF(__pyx_4);
          Py_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_4)->name);
          Py_DECREF(__pyx_v__pytype);
          __pyx_v__pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_4)->name;
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          goto __pyx_L23;
        }
        __pyx_L23:;
        goto __pyx_L21;
      }
      __pyx_L21:;
      goto __pyx_L14;
    }
    __pyx_L14:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1759
 *                 _pytype = (<PyType>dict_result).name
 * 
 *     if _value is None and _pytype != "str":             # <<<<<<<<<<<<<< 
 *         _pytype = _pytype or "NoneType"
 *         strval = None
 */
    __pyx_1 = (__pyx_v__value == Py_None);
    __pyx_5 = __Pyx_PyBool_FromLong(__pyx_1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; goto __pyx_L1;}
    __pyx_6 = __Pyx_PyObject_IsTrue(__pyx_5); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; goto __pyx_L1;}
    if (__pyx_6) {
      Py_DECREF(__pyx_5); __pyx_5 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1759
 *                 _pytype = (<PyType>dict_result).name
 * 
 *     if _value is None and _pytype != "str":             # <<<<<<<<<<<<<< 
 *         _pytype = _pytype or "NoneType"
 *         strval = None
 */
      __pyx_5 = PyObject_RichCompare(__pyx_v__pytype, __pyx_n_str, Py_NE); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; goto __pyx_L1;}
    }
    __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_5); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1760
 * 
 *     if _value is None and _pytype != "str":
 *         _pytype = _pytype or "NoneType"             # <<<<<<<<<<<<<< 
 *         strval = None
 *     elif python._isString(_value):
 */
      __pyx_7 = __pyx_v__pytype;
      Py_INCREF(__pyx_7);
      __pyx_6 = __Pyx_PyObject_IsTrue(__pyx_7); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; goto __pyx_L1;}
      if (!__pyx_6) {
        Py_DECREF(__pyx_7); __pyx_7 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1760
 * 
 *     if _value is None and _pytype != "str":
 *         _pytype = _pytype or "NoneType"             # <<<<<<<<<<<<<< 
 *         strval = None
 *     elif python._isString(_value):
 */
        __pyx_7 = __pyx_n_NoneType;
        Py_INCREF(__pyx_7);
      }
      Py_DECREF(__pyx_v__pytype);
      __pyx_v__pytype = __pyx_7;
      __pyx_7 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1761
 *     if _value is None and _pytype != "str":
 *         _pytype = _pytype or "NoneType"
 *         strval = None             # <<<<<<<<<<<<<< 
 *     elif python._isString(_value):
 *         strval = _value
 */
      Py_INCREF(Py_None);
      Py_DECREF(__pyx_v_strval);
      __pyx_v_strval = Py_None;
      goto __pyx_L24;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1762
 *         _pytype = _pytype or "NoneType"
 *         strval = None
 *     elif python._isString(_value):             # <<<<<<<<<<<<<< 
 *         strval = _value
 *     elif python.PyBool_Check(_value):
 */
    __pyx_8 = _isString(__pyx_v__value);
    if (__pyx_8) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1763
 *         strval = None
 *     elif python._isString(_value):
 *         strval = _value             # <<<<<<<<<<<<<< 
 *     elif python.PyBool_Check(_value):
 *         if _value:
 */
      Py_INCREF(__pyx_v__value);
      Py_DECREF(__pyx_v_strval);
      __pyx_v_strval = __pyx_v__value;
      goto __pyx_L24;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1764
 *     elif python._isString(_value):
 *         strval = _value
 *     elif python.PyBool_Check(_value):             # <<<<<<<<<<<<<< 
 *         if _value:
 *             strval = "true"
 */
    __pyx_1 = PyBool_Check(__pyx_v__value);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1765
 *         strval = _value
 *     elif python.PyBool_Check(_value):
 *         if _value:             # <<<<<<<<<<<<<< 
 *             strval = "true"
 *         else:
 */
      __pyx_6 = __Pyx_PyObject_IsTrue(__pyx_v__value); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; goto __pyx_L1;}
      if (__pyx_6) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1766
 *     elif python.PyBool_Check(_value):
 *         if _value:
 *             strval = "true"             # <<<<<<<<<<<<<< 
 *         else:
 *             strval = "false"
 */
        Py_INCREF(__pyx_n_true);
        Py_DECREF(__pyx_v_strval);
        __pyx_v_strval = __pyx_n_true;
        goto __pyx_L25;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1768
 *             strval = "true"
 *         else:
 *             strval = "false"             # <<<<<<<<<<<<<< 
 *     else:
 *         strval = str(_value)
 */
        Py_INCREF(__pyx_n_false);
        Py_DECREF(__pyx_v_strval);
        __pyx_v_strval = __pyx_n_false;
      }
      __pyx_L25:;
      goto __pyx_L24;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1770
 *             strval = "false"
 *     else:
 *         strval = str(_value)             # <<<<<<<<<<<<<< 
 * 
 *     if _pytype is None:
 */
      __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; goto __pyx_L1;}
      Py_INCREF(__pyx_v__value);
      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v__value);
      __pyx_4 = PyObject_CallObject(((PyObject*)&PyString_Type), __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_v_strval);
      __pyx_v_strval = __pyx_4;
      __pyx_4 = 0;
    }
    __pyx_L24:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1772
 *         strval = str(_value)
 * 
 *     if _pytype is None:             # <<<<<<<<<<<<<< 
 *         _pytype = _pytypename(_value)
 *     
 */
    __pyx_1 = (__pyx_v__pytype == Py_None);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1773
 * 
 *     if _pytype is None:
 *         _pytype = _pytypename(_value)             # <<<<<<<<<<<<<< 
 *     
 *     if _pytype is not None: 
 */
      __pyx_5 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v__value); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; goto __pyx_L1;}
      Py_DECREF(__pyx_v__pytype);
      __pyx_v__pytype = __pyx_5;
      __pyx_5 = 0;
      goto __pyx_L26;
    }
    __pyx_L26:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1775
 *         _pytype = _pytypename(_value)
 *     
 *     if _pytype is not None:             # <<<<<<<<<<<<<< 
 *         if _pytype == "NoneType" or _pytype == "none":
 *             strval = None
 */
    __pyx_6 = (__pyx_v__pytype != Py_None);
    if (__pyx_6) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1776
 *     
 *     if _pytype is not None: 
 *         if _pytype == "NoneType" or _pytype == "none":             # <<<<<<<<<<<<<< 
 *             strval = None
 *             python.PyDict_SetItem(_attributes, XML_SCHEMA_INSTANCE_NIL_ATTR, "true")
 */
      __pyx_7 = PyObject_RichCompare(__pyx_v__pytype, __pyx_n_NoneType, Py_EQ); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
      __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_7); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
      if (!__pyx_1) {
        Py_DECREF(__pyx_7); __pyx_7 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1776
 *     
 *     if _pytype is not None: 
 *         if _pytype == "NoneType" or _pytype == "none":             # <<<<<<<<<<<<<< 
 *             strval = None
 *             python.PyDict_SetItem(_attributes, XML_SCHEMA_INSTANCE_NIL_ATTR, "true")
 */
        __pyx_7 = PyObject_RichCompare(__pyx_v__pytype, __pyx_n_none, Py_EQ); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
      }
      __pyx_6 = __Pyx_PyObject_IsTrue(__pyx_7); if (unlikely(__pyx_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      if (__pyx_6) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1777
 *     if _pytype is not None: 
 *         if _pytype == "NoneType" or _pytype == "none":
 *             strval = None             # <<<<<<<<<<<<<< 
 *             python.PyDict_SetItem(_attributes, XML_SCHEMA_INSTANCE_NIL_ATTR, "true")
 *         else:
 */
        Py_INCREF(Py_None);
        Py_DECREF(__pyx_v_strval);
        __pyx_v_strval = Py_None;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1778
 *         if _pytype == "NoneType" or _pytype == "none":
 *             strval = None
 *             python.PyDict_SetItem(_attributes, XML_SCHEMA_INSTANCE_NIL_ATTR, "true")             # <<<<<<<<<<<<<< 
 *         else:
 *             # check if type information from arguments is valid
 */
        __pyx_8 = PyDict_SetItem(__pyx_v__attributes,__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR,__pyx_n_true); if (unlikely(__pyx_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1778; goto __pyx_L1;}
        goto __pyx_L28;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1781
 *         else:
 *             # check if type information from arguments is valid
 *             dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)             # <<<<<<<<<<<<<< 
 *             if dict_result is not NULL:
 *                 type_check = (<PyType>dict_result).type_check
 */
        __pyx_v_dict_result = PyDict_GetItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT,__pyx_v__pytype);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1782
 *             # check if type information from arguments is valid
 *             dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)
 *             if dict_result is not NULL:             # <<<<<<<<<<<<<< 
 *                 type_check = (<PyType>dict_result).type_check
 *                 if type_check is not None:
 */
        __pyx_1 = (__pyx_v_dict_result != NULL);
        if (__pyx_1) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1783
 *             dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)
 *             if dict_result is not NULL:
 *                 type_check = (<PyType>dict_result).type_check             # <<<<<<<<<<<<<< 
 *                 if type_check is not None:
 *                     type_check(strval)
 */
          __pyx_2 = (PyObject *)__pyx_v_dict_result;
          Py_INCREF(__pyx_2);
          Py_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_2)->type_check);
          Py_DECREF(__pyx_v_type_check);
          __pyx_v_type_check = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_2)->type_check;
          Py_DECREF(__pyx_2); __pyx_2 = 0;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1784
 *             if dict_result is not NULL:
 *                 type_check = (<PyType>dict_result).type_check
 *                 if type_check is not None:             # <<<<<<<<<<<<<< 
 *                     type_check(strval)
 * 
 */
          __pyx_6 = (__pyx_v_type_check != Py_None);
          if (__pyx_6) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1785
 *                 type_check = (<PyType>dict_result).type_check
 *                 if type_check is not None:
 *                     type_check(strval)             # <<<<<<<<<<<<<< 
 * 
 *                 python.PyDict_SetItem(_attributes, PYTYPE_ATTRIBUTE, _pytype)
 */
            __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; goto __pyx_L1;}
            Py_INCREF(__pyx_v_strval);
            PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_strval);
            __pyx_5 = PyObject_CallObject(__pyx_v_type_check, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; goto __pyx_L1;}
            Py_DECREF(__pyx_4); __pyx_4 = 0;
            Py_DECREF(__pyx_5); __pyx_5 = 0;
            goto __pyx_L30;
          }
          __pyx_L30:;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1787
 *                     type_check(strval)
 * 
 *                 python.PyDict_SetItem(_attributes, PYTYPE_ATTRIBUTE, _pytype)             # <<<<<<<<<<<<<< 
 * 
 *     return _makeElement("value", strval, _attributes, nsmap)
 */
          __pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; goto __pyx_L1;}

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1787
 *                     type_check(strval)
 * 
 *                 python.PyDict_SetItem(_attributes, PYTYPE_ATTRIBUTE, _pytype)             # <<<<<<<<<<<<<< 
 * 
 *     return _makeElement("value", strval, _attributes, nsmap)
 */
          __pyx_8 = PyDict_SetItem(__pyx_v__attributes,__pyx_7,__pyx_v__pytype); if (unlikely(__pyx_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; goto __pyx_L1;}
          Py_DECREF(__pyx_7); __pyx_7 = 0;
          goto __pyx_L29;
        }
        __pyx_L29:;
      }
      __pyx_L28:;
      goto __pyx_L27;
    }
    __pyx_L27:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1789
 *                 python.PyDict_SetItem(_attributes, PYTYPE_ATTRIBUTE, _pytype)
 * 
 *     return _makeElement("value", strval, _attributes, nsmap)             # <<<<<<<<<<<<<< 
 * 
 * 
 */
    __pyx_2 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_n_value,__pyx_v_strval,__pyx_v__attributes,__pyx_v_nsmap)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1789; goto __pyx_L1;}
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_4);
    Py_XDECREF(__pyx_5);
    Py_XDECREF(__pyx_7);
    __Pyx_AddTraceback("lxml.objectify.DataElement");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_XDECREF(__pyx_v__attributes);
    Py_DECREF(__pyx_v_temp);
    Py_DECREF(__pyx_v_prefix);
    Py_DECREF(__pyx_v_name);
    Py_DECREF(__pyx_v_ns);
    Py_DECREF(__pyx_v_strval);
    Py_DECREF(__pyx_v_type_check);
    Py_DECREF(__pyx_v__value);
    Py_DECREF(__pyx_v_attrib);
    Py_DECREF(__pyx_v_nsmap);
    Py_DECREF(__pyx_v__pytype);
    Py_DECREF(__pyx_v__xsi);
    Py_XDECREF(__pyx_args);
    Py_XDECREF(__pyx_kwds);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":20
 *     cdef _ObjectPath*  _c_path
 *     cdef Py_ssize_t _path_len
 *     def __init__(self, path):             # <<<<<<<<<<<<<< 
 *         if python._isString(path):
 *             self._path = _parseObjectPathString(path)
 */

  static PyObject *__pyx_k205p;

  static char __pyx_k205[] = ".";

  static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    PyObject *__pyx_v_path = 0;
    int __pyx_r;
    int __pyx_1;
    PyObject *__pyx_2 = 0;
    PyObject *__pyx_3 = 0;
    PyObject *__pyx_4 = 0;
    __pyx_t_4lxml_9objectify__ObjectPath *__pyx_5;
    static char *__pyx_argnames[] = {"path",0};
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_path))) return -1;
    Py_INCREF(__pyx_v_self);
    Py_INCREF(__pyx_v_path);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":21
 *     cdef Py_ssize_t _path_len
 *     def __init__(self, path):
 *         if python._isString(path):             # <<<<<<<<<<<<<< 
 *             self._path = _parseObjectPathString(path)
 *             self._path_str = path
 */
    __pyx_1 = _isString(__pyx_v_path);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":22
 *     def __init__(self, path):
 *         if python._isString(path):
 *             self._path = _parseObjectPathString(path)             # <<<<<<<<<<<<<< 
 *             self._path_str = path
 *         else:
 */
      __pyx_2 = __pyx_f_4lxml_9objectify__parseObjectPathString(__pyx_v_path); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":22
 *     def __init__(self, path):
 *         if python._isString(path):
 *             self._path = _parseObjectPathString(path)             # <<<<<<<<<<<<<< 
 *             self._path_str = path
 *         else:
 */
      Py_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
      ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path = __pyx_2;
      __pyx_2 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":23
 *         if python._isString(path):
 *             self._path = _parseObjectPathString(path)
 *             self._path_str = path             # <<<<<<<<<<<<<< 
 *         else:
 *             self._path = _parseObjectPathList(path)
 */
      Py_INCREF(__pyx_v_path);
      Py_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
      ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str = __pyx_v_path;
      goto __pyx_L2;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":25
 *             self._path_str = path
 *         else:
 *             self._path = _parseObjectPathList(path)             # <<<<<<<<<<<<<< 
 *             self._path_str = '.'.join(path)
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 */
      __pyx_2 = __pyx_f_4lxml_9objectify__parseObjectPathList(__pyx_v_path); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":25
 *             self._path_str = path
 *         else:
 *             self._path = _parseObjectPathList(path)             # <<<<<<<<<<<<<< 
 *             self._path_str = '.'.join(path)
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 */
      Py_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
      ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path = __pyx_2;
      __pyx_2 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":26
 *         else:
 *             self._path = _parseObjectPathList(path)
 *             self._path_str = '.'.join(path)             # <<<<<<<<<<<<<< 
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 *         self._c_path = _buildObjectPathSegments(self._path)
 */
      __pyx_2 = PyObject_GetAttr(__pyx_k205p, __pyx_n_join); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":26
 *         else:
 *             self._path = _parseObjectPathList(path)
 *             self._path_str = '.'.join(path)             # <<<<<<<<<<<<<< 
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 *         self._c_path = _buildObjectPathSegments(self._path)
 */
      __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; goto __pyx_L1;}
      Py_INCREF(__pyx_v_path);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_path);
      __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":26
 *         else:
 *             self._path = _parseObjectPathList(path)
 *             self._path_str = '.'.join(path)             # <<<<<<<<<<<<<< 
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 *         self._c_path = _buildObjectPathSegments(self._path)
 */
      Py_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
      ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str = __pyx_4;
      __pyx_4 = 0;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":27
 *             self._path = _parseObjectPathList(path)
 *             self._path_str = '.'.join(path)
 *         self._path_len = python.PyList_GET_SIZE(self._path)             # <<<<<<<<<<<<<< 
 *         self._c_path = _buildObjectPathSegments(self._path)
 *         self.find = self.__call__
 */
    ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len = PyList_GET_SIZE(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":28
 *             self._path_str = '.'.join(path)
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 *         self._c_path = _buildObjectPathSegments(self._path)             # <<<<<<<<<<<<<< 
 *         self.find = self.__call__
 * 
 */
    __pyx_5 = __pyx_f_4lxml_9objectify__buildObjectPathSegments(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path); if (unlikely(__pyx_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":28
 *             self._path_str = '.'.join(path)
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 *         self._c_path = _buildObjectPathSegments(self._path)             # <<<<<<<<<<<<<< 
 *         self.find = self.__call__
 * 
 */
    ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path = __pyx_5;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":29
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 *         self._c_path = _buildObjectPathSegments(self._path)
 *         self.find = self.__call__             # <<<<<<<<<<<<<< 
 * 
 *     def __dealloc__(self):
 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n___call__); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":29
 *         self._path_len = python.PyList_GET_SIZE(self._path)
 *         self._c_path = _buildObjectPathSegments(self._path)
 *         self.find = self.__call__             # <<<<<<<<<<<<<< 
 * 
 *     def __dealloc__(self):
 */
    Py_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->find);
    ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->find = __pyx_2;
    __pyx_2 = 0;

    __pyx_r = 0;
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_3);
    Py_XDECREF(__pyx_4);
    __Pyx_AddTraceback("lxml.objectify.ObjectPath.__init__");
    __pyx_r = -1;
    __pyx_L0:;
    Py_DECREF(__pyx_v_self);
    Py_DECREF(__pyx_v_path);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":31
 *         self.find = self.__call__
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<< 
 *         if self._c_path is not NULL:
 *             python.PyMem_Free(self._c_path)
 */

  static void __pyx_pf_4lxml_9objectify_10ObjectPath___dealloc__(PyObject *__pyx_v_self); /*proto*/
  static void __pyx_pf_4lxml_9objectify_10ObjectPath___dealloc__(PyObject *__pyx_v_self) {
    int __pyx_1;
    Py_INCREF(__pyx_v_self);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":32
 * 
 *     def __dealloc__(self):
 *         if self._c_path is not NULL:             # <<<<<<<<<<<<<< 
 *             python.PyMem_Free(self._c_path)
 * 
 */
    __pyx_1 = (((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path != NULL);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":33
 *     def __dealloc__(self):
 *         if self._c_path is not NULL:
 *             python.PyMem_Free(self._c_path)             # <<<<<<<<<<<<<< 
 * 
 *     def __str__(self):
 */
      PyMem_Free(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path);
      goto __pyx_L2;
    }
    __pyx_L2:;

    Py_DECREF(__pyx_v_self);
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":35
 *             python.PyMem_Free(self._c_path)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<< 
 *         return self._path_str
 * 
 */

  static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___str__(PyObject *__pyx_v_self); /*proto*/
  static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___str__(PyObject *__pyx_v_self) {
    PyObject *__pyx_r;
    Py_INCREF(__pyx_v_self);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":36
 * 
 *     def __str__(self):
 *         return self._path_str             # <<<<<<<<<<<<<< 
 * 
 *     def __call__(self, _Element root not None, *default):
 */
    Py_INCREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
    __pyx_r = ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str;
    goto __pyx_L0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    __pyx_L0:;
    Py_DECREF(__pyx_v_self);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":38
 *         return self._path_str
 * 
 *     def __call__(self, _Element root not None, *default):             # <<<<<<<<<<<<<< 
 *         """Follow the attribute path in the object structure and return the
 *         target attribute value.
 */

  static PyObject *__pyx_k206p;

  static char __pyx_k206[] = "invalid number of arguments: needs one or two";

  static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_10ObjectPath___call__[] = "Follow the attribute path in the object structure and return the\n        target attribute value.\n\n        If it it not found, either returns a default value (if one was passed\n        as second argument) or raises AttributeError.\n        ";
  static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    struct LxmlElement *__pyx_v_root = 0;
    PyObject *__pyx_v_default = 0;
    Py_ssize_t __pyx_v_use_default;
    PyObject *__pyx_r;
    int __pyx_1;
    PyObject *__pyx_2 = 0;
    static char *__pyx_argnames[] = {"root",0};
    if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 1, &__pyx_v_default, 0, 0) < 0) return NULL;
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_root))) {
      Py_XDECREF(__pyx_args);
      Py_XDECREF(__pyx_kwds);
      Py_XDECREF(__pyx_v_default);
      return NULL;
    }
    Py_INCREF(__pyx_v_self);
    Py_INCREF(__pyx_v_root);
    if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_11etreepublic__Element, 0, "root"))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 38; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":46
 *         """
 *         cdef Py_ssize_t use_default
 *         use_default = python.PyTuple_GET_SIZE(default)             # <<<<<<<<<<<<<< 
 *         if use_default == 1:
 *             default = python.PyTuple_GET_ITEM(default, 0)
 */
    __pyx_v_use_default = PyTuple_GET_SIZE(__pyx_v_default);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":47
 *         cdef Py_ssize_t use_default
 *         use_default = python.PyTuple_GET_SIZE(default)
 *         if use_default == 1:             # <<<<<<<<<<<<<< 
 *             default = python.PyTuple_GET_ITEM(default, 0)
 *             python.Py_INCREF(default)
 */
    __pyx_1 = (__pyx_v_use_default == 1);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":48
 *         use_default = python.PyTuple_GET_SIZE(default)
 *         if use_default == 1:
 *             default = python.PyTuple_GET_ITEM(default, 0)             # <<<<<<<<<<<<<< 
 *             python.Py_INCREF(default)
 *             use_default = 1
 */
      __pyx_2 = PyTuple_GET_ITEM(__pyx_v_default,0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; goto __pyx_L1;}
      Py_DECREF(__pyx_v_default);
      __pyx_v_default = __pyx_2;
      __pyx_2 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":49
 *         if use_default == 1:
 *             default = python.PyTuple_GET_ITEM(default, 0)
 *             python.Py_INCREF(default)             # <<<<<<<<<<<<<< 
 *             use_default = 1
 *         elif use_default > 1:
 */
      Py_INCREF(__pyx_v_default);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":50
 *             default = python.PyTuple_GET_ITEM(default, 0)
 *             python.Py_INCREF(default)
 *             use_default = 1             # <<<<<<<<<<<<<< 
 *         elif use_default > 1:
 *             raise TypeError, "invalid number of arguments: needs one or two"
 */
      __pyx_v_use_default = 1;
      goto __pyx_L2;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":51
 *             python.Py_INCREF(default)
 *             use_default = 1
 *         elif use_default > 1:             # <<<<<<<<<<<<<< 
 *             raise TypeError, "invalid number of arguments: needs one or two"
 *         return _findObjectPath(root, self._c_path, self._path_len,
 */
    __pyx_1 = (__pyx_v_use_default > 1);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":52
 *             use_default = 1
 *         elif use_default > 1:
 *             raise TypeError, "invalid number of arguments: needs one or two"             # <<<<<<<<<<<<<< 
 *         return _findObjectPath(root, self._c_path, self._path_len,
 *                                default, use_default)
 */
      __Pyx_Raise(__pyx_builtin_TypeError, __pyx_k206p, 0);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 52; goto __pyx_L1;}
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":54
 *             raise TypeError, "invalid number of arguments: needs one or two"
 *         return _findObjectPath(root, self._c_path, self._path_len,
 *                                default, use_default)             # <<<<<<<<<<<<<< 
 * 
 *     def hasattr(self, _Element root not None):
 */
    __pyx_2 = __pyx_f_4lxml_9objectify__findObjectPath(__pyx_v_root,((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path,((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len,__pyx_v_default,__pyx_v_use_default); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; goto __pyx_L1;}
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_2);
    __Pyx_AddTraceback("lxml.objectify.ObjectPath.__call__");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_XDECREF(__pyx_v_default);
    Py_DECREF(__pyx_v_self);
    Py_DECREF(__pyx_v_root);
    Py_XDECREF(__pyx_args);
    Py_XDECREF(__pyx_kwds);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":56
 *                                default, use_default)
 * 
 *     def hasattr(self, _Element root not None):             # <<<<<<<<<<<<<< 
 *         try:
 *             _findObjectPath(root, self._c_path, self._path_len, None, 0)
 */

  static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root); /*proto*/
  static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root) {
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    int __pyx_2;
    PyObject *__pyx_3 = 0;
    PyObject *__pyx_4 = 0;
    Py_INCREF(__pyx_v_self);
    Py_INCREF(__pyx_v_root);
    if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_11etreepublic__Element, 0, "root"))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":57
 * 
 *     def hasattr(self, _Element root not None):
 *         try:             # <<<<<<<<<<<<<< 
 *             _findObjectPath(root, self._c_path, self._path_len, None, 0)
 *         except AttributeError:
 */
    /*try:*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":58
 *     def hasattr(self, _Element root not None):
 *         try:
 *             _findObjectPath(root, self._c_path, self._path_len, None, 0)             # <<<<<<<<<<<<<< 
 *         except AttributeError:
 *             return False
 */
      __pyx_1 = __pyx_f_4lxml_9objectify__findObjectPath(((struct LxmlElement *)__pyx_v_root),((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path,((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len,Py_None,0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 58; goto __pyx_L2;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
    }
    goto __pyx_L3;
    __pyx_L2:;
    Py_XDECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":59
 *         try:
 *             _findObjectPath(root, self._c_path, self._path_len, None, 0)
 *         except AttributeError:             # <<<<<<<<<<<<<< 
 *             return False
 *         return True
 */
    __pyx_2 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_2) {
      __Pyx_AddTraceback("lxml.objectify.hasattr");
      if (__Pyx_GetException(&__pyx_1, &__pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 59; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":60
 *             _findObjectPath(root, self._c_path, self._path_len, None, 0)
 *         except AttributeError:
 *             return False             # <<<<<<<<<<<<<< 
 *         return True
 * 
 */
      Py_INCREF(Py_False);
      __pyx_r = Py_False;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      goto __pyx_L0;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      goto __pyx_L3;
    }
    goto __pyx_L1;
    __pyx_L3:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":61
 *         except AttributeError:
 *             return False
 *         return True             # <<<<<<<<<<<<<< 
 * 
 *     def setattr(self, _Element root not None, value):
 */
    Py_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    Py_XDECREF(__pyx_3);
    Py_XDECREF(__pyx_4);
    __Pyx_AddTraceback("lxml.objectify.ObjectPath.hasattr");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_self);
    Py_DECREF(__pyx_v_root);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":63
 *         return True
 * 
 *     def setattr(self, _Element root not None, value):             # <<<<<<<<<<<<<< 
 *         """Set the value of the target element in a subtree.
 * 
 */

  static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_10ObjectPath_setattr[] = "Set the value of the target element in a subtree.\n\n        If any of the children on the path does not exist, it is created.\n        ";
  static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    struct LxmlElement *__pyx_v_root = 0;
    PyObject *__pyx_v_value = 0;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    static char *__pyx_argnames[] = {"root","value",0};
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_root, &__pyx_v_value))) return NULL;
    Py_INCREF(__pyx_v_self);
    Py_INCREF(__pyx_v_root);
    Py_INCREF(__pyx_v_value);
    if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_11etreepublic__Element, 0, "root"))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":68
 *         If any of the children on the path does not exist, it is created.
 *         """
 *         _createObjectPath(root, self._c_path, self._path_len, 1, value)             # <<<<<<<<<<<<<< 
 * 
 *     def addattr(self, _Element root not None, value):
 */
    __pyx_1 = __pyx_f_4lxml_9objectify__createObjectPath(__pyx_v_root,((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path,((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len,1,__pyx_v_value); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 68; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    __Pyx_AddTraceback("lxml.objectify.ObjectPath.setattr");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_self);
    Py_DECREF(__pyx_v_root);
    Py_DECREF(__pyx_v_value);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":70
 *         _createObjectPath(root, self._c_path, self._path_len, 1, value)
 * 
 *     def addattr(self, _Element root not None, value):             # <<<<<<<<<<<<<< 
 *         """Append a value to the target element in a subtree.
 * 
 */

  static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  static char __pyx_doc_4lxml_9objectify_10ObjectPath_addattr[] = "Append a value to the target element in a subtree.\n\n        If any of the children on the path does not exist, it is created.\n        ";
  static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    struct LxmlElement *__pyx_v_root = 0;
    PyObject *__pyx_v_value = 0;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    static char *__pyx_argnames[] = {"root","value",0};
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_root, &__pyx_v_value))) return NULL;
    Py_INCREF(__pyx_v_self);
    Py_INCREF(__pyx_v_root);
    Py_INCREF(__pyx_v_value);
    if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_11etreepublic__Element, 0, "root"))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":75
 *         If any of the children on the path does not exist, it is created.
 *         """
 *         _createObjectPath(root, self._c_path, self._path_len, 0, value)             # <<<<<<<<<<<<<< 
 * 
 * cdef object __MATCH_PATH_SEGMENT
 */
    __pyx_1 = __pyx_f_4lxml_9objectify__createObjectPath(__pyx_v_root,((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path,((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len,0,__pyx_v_value); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 75; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    __Pyx_AddTraceback("lxml.objectify.ObjectPath.addattr");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_self);
    Py_DECREF(__pyx_v_root);
    Py_DECREF(__pyx_v_value);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":85
 * _RELATIVE_PATH_SEGMENT = (None, None, 0)
 * 
 * cdef _parseObjectPathString(path):             # <<<<<<<<<<<<<< 
 *     """Parse object path string into a (ns, name, index) list.
 *     """
 */

  static PyObject *__pyx_n_groups;
  static PyObject *__pyx_n_end;

  static PyObject *__pyx_k207p;
  static PyObject *__pyx_k208p;
  static PyObject *__pyx_k209p;
  static PyObject *__pyx_k210p;

  static char __pyx_k207[] = ".";
  static char __pyx_k208[] = "index not allowed on root node";
  static char __pyx_k209[] = "invalid path";
  static char __pyx_k210[] = "invalid path";

  static  PyObject *__pyx_f_4lxml_9objectify__parseObjectPathString(PyObject *__pyx_v_path) {
    int __pyx_v_has_dot;
    PyObject *__pyx_v_new_path;
    PyObject *__pyx_v_path_pos;
    PyObject *__pyx_v_match;
    PyObject *__pyx_v_dot;
    PyObject *__pyx_v_ns;
    PyObject *__pyx_v_name;
    PyObject *__pyx_v_index;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    PyObject *__pyx_2 = 0;
    int __pyx_3;
    PyObject *__pyx_4 = 0;
    int __pyx_5;
    Py_INCREF(__pyx_v_path);
    __pyx_v_new_path = Py_None; Py_INCREF(Py_None);
    __pyx_v_path_pos = Py_None; Py_INCREF(Py_None);
    __pyx_v_match = Py_None; Py_INCREF(Py_None);
    __pyx_v_dot = Py_None; Py_INCREF(Py_None);
    __pyx_v_ns = Py_None; Py_INCREF(Py_None);
    __pyx_v_name = Py_None; Py_INCREF(Py_None);
    __pyx_v_index = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":89
 *     """
 *     cdef bint has_dot
 *     new_path = []             # <<<<<<<<<<<<<< 
 *     path = cetree.utf8(path.strip())
 *     if path == '.':
 */
    __pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; goto __pyx_L1;}
    Py_DECREF(__pyx_v_new_path);
    __pyx_v_new_path = __pyx_1;
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":90
 *     cdef bint has_dot
 *     new_path = []
 *     path = cetree.utf8(path.strip())             # <<<<<<<<<<<<<< 
 *     if path == '.':
 *         return [_RELATIVE_PATH_SEGMENT]
 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_path, __pyx_n_strip); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; goto __pyx_L1;}
    __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_1 = utf8(__pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_v_path);
    __pyx_v_path = __pyx_1;
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":91
 *     new_path = []
 *     path = cetree.utf8(path.strip())
 *     if path == '.':             # <<<<<<<<<<<<<< 
 *         return [_RELATIVE_PATH_SEGMENT]
 *     path_pos = 0
 */
    __pyx_2 = PyObject_RichCompare(__pyx_v_path, __pyx_k207p, Py_EQ); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; goto __pyx_L1;}
    __pyx_3 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__pyx_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":92
 *     path = cetree.utf8(path.strip())
 *     if path == '.':
 *         return [_RELATIVE_PATH_SEGMENT]             # <<<<<<<<<<<<<< 
 *     path_pos = 0
 *     while python.PyString_GET_SIZE(path) > 0:
 */
      __pyx_1 = PyList_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 92; goto __pyx_L1;}
      Py_INCREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
      PyList_SET_ITEM(__pyx_1, 0, __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
      __pyx_r = __pyx_1;
      __pyx_1 = 0;
      goto __pyx_L0;
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":93
 *     if path == '.':
 *         return [_RELATIVE_PATH_SEGMENT]
 *     path_pos = 0             # <<<<<<<<<<<<<< 
 *     while python.PyString_GET_SIZE(path) > 0:
 *         match = __MATCH_PATH_SEGMENT(path, path_pos)
 */
    Py_INCREF(__pyx_num_0);
    Py_DECREF(__pyx_v_path_pos);
    __pyx_v_path_pos = __pyx_num_0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":94
 *         return [_RELATIVE_PATH_SEGMENT]
 *     path_pos = 0
 *     while python.PyString_GET_SIZE(path) > 0:             # <<<<<<<<<<<<<< 
 *         match = __MATCH_PATH_SEGMENT(path, path_pos)
 *         if match is None:
 */
    while (1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":94
 *         return [_RELATIVE_PATH_SEGMENT]
 *     path_pos = 0
 *     while python.PyString_GET_SIZE(path) > 0:             # <<<<<<<<<<<<<< 
 *         match = __MATCH_PATH_SEGMENT(path, path_pos)
 *         if match is None:
 */
      __pyx_3 = (PyString_GET_SIZE(__pyx_v_path) > 0);
      if (!__pyx_3) break;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":95
 *     path_pos = 0
 *     while python.PyString_GET_SIZE(path) > 0:
 *         match = __MATCH_PATH_SEGMENT(path, path_pos)             # <<<<<<<<<<<<<< 
 *         if match is None:
 *             break
 */
      __pyx_2 = PyTuple_New(2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; goto __pyx_L1;}
      Py_INCREF(__pyx_v_path);
      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path);
      Py_INCREF(__pyx_v_path_pos);
      PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path_pos);
      __pyx_1 = PyObject_CallObject(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_v_match);
      __pyx_v_match = __pyx_1;
      __pyx_1 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":96
 *     while python.PyString_GET_SIZE(path) > 0:
 *         match = __MATCH_PATH_SEGMENT(path, path_pos)
 *         if match is None:             # <<<<<<<<<<<<<< 
 *             break
 * 
 */
      __pyx_3 = (__pyx_v_match == Py_None);
      if (__pyx_3) {
        goto __pyx_L4;
        goto __pyx_L5;
      }
      __pyx_L5:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":99
 *             break
 * 
 *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<< 
 *         if index is None or python.PyString_GET_SIZE(index) == 0:
 *             index = 0
 */
      __pyx_2 = PyObject_GetAttr(__pyx_v_match, __pyx_n_groups); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; goto __pyx_L1;}
      __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      if (PyTuple_CheckExact(__pyx_1) && PyTuple_GET_SIZE(__pyx_1) == 4) {
        __pyx_4 = PyTuple_GET_ITEM(__pyx_1, 0);
        Py_INCREF(__pyx_4);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":99
 *             break
 * 
 *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<< 
 *         if index is None or python.PyString_GET_SIZE(index) == 0:
 *             index = 0
 */
        Py_DECREF(__pyx_v_dot);
        __pyx_v_dot = __pyx_4;
        __pyx_4 = 0;
        __pyx_4 = PyTuple_GET_ITEM(__pyx_1, 1);
        Py_INCREF(__pyx_4);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":99
 *             break
 * 
 *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<< 
 *         if index is None or python.PyString_GET_SIZE(index) == 0:
 *             index = 0
 */
        Py_DECREF(__pyx_v_ns);
        __pyx_v_ns = __pyx_4;
        __pyx_4 = 0;
        __pyx_4 = PyTuple_GET_ITEM(__pyx_1, 2);
        Py_INCREF(__pyx_4);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":99
 *             break
 * 
 *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<< 
 *         if index is None or python.PyString_GET_SIZE(index) == 0:
 *             index = 0
 */
        Py_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_4;
        __pyx_4 = 0;
        __pyx_4 = PyTuple_GET_ITEM(__pyx_1, 3);
        Py_INCREF(__pyx_4);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":99
 *             break
 * 
 *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<< 
 *         if index is None or python.PyString_GET_SIZE(index) == 0:
 *             index = 0
 */
        Py_DECREF(__pyx_v_index);
        __pyx_v_index = __pyx_4;
        __pyx_4 = 0;
        Py_DECREF(__pyx_1); __pyx_1 = 0;
      }
      else {
        __pyx_2 = PyObject_GetIter(__pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        __pyx_4 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":99
 *             break
 * 
 *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<< 
 *         if index is None or python.PyString_GET_SIZE(index) == 0:
 *             index = 0
 */
        Py_DECREF(__pyx_v_dot);
        __pyx_v_dot = __pyx_4;
        __pyx_4 = 0;
        __pyx_4 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":99
 *             break
 * 
 *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<< 
 *         if index is None or python.PyString_GET_SIZE(index) == 0:
 *             index = 0
 */
        Py_DECREF(__pyx_v_ns);
        __pyx_v_ns = __pyx_4;
        __pyx_4 = 0;
        __pyx_4 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":99
 *             break
 * 
 *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<< 
 *         if index is None or python.PyString_GET_SIZE(index) == 0:
 *             index = 0
 */
        Py_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_4;
        __pyx_4 = 0;
        __pyx_4 = __Pyx_UnpackItem(__pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":99
 *             break
 * 
 *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<< 
 *         if index is None or python.PyString_GET_SIZE(index) == 0:
 *             index = 0
 */
        Py_DECREF(__pyx_v_index);
        __pyx_v_index = __pyx_4;
        __pyx_4 = 0;
        if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; goto __pyx_L1;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":100
 * 
 *         dot, ns, name, index = match.groups()
 *         if index is None or python.PyString_GET_SIZE(index) == 0:             # <<<<<<<<<<<<<< 
 *             index = 0
 *         else:
 */
      __pyx_3 = (__pyx_v_index == Py_None);
      if (!__pyx_3) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":100
 * 
 *         dot, ns, name, index = match.groups()
 *         if index is None or python.PyString_GET_SIZE(index) == 0:             # <<<<<<<<<<<<<< 
 *             index = 0
 *         else:
 */
        __pyx_3 = (PyString_GET_SIZE(__pyx_v_index) == 0);
      }
      if (__pyx_3) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":101
 *         dot, ns, name, index = match.groups()
 *         if index is None or python.PyString_GET_SIZE(index) == 0:
 *             index = 0             # <<<<<<<<<<<<<< 
 *         else:
 *             index = python.PyNumber_Int(index)
 */
        Py_INCREF(__pyx_num_0);
        Py_DECREF(__pyx_v_index);
        __pyx_v_index = __pyx_num_0;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":103
 *             index = 0
 *         else:
 *             index = python.PyNumber_Int(index)             # <<<<<<<<<<<<<< 
 *         has_dot = _cstr(dot)[0] == c'.'
 *         if python.PyList_GET_SIZE(new_path) == 0:
 */
        __pyx_4 = PyNumber_Int(__pyx_v_index); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; goto __pyx_L1;}
        Py_DECREF(__pyx_v_index);
        __pyx_v_index = __pyx_4;
        __pyx_4 = 0;
      }
      __pyx_L6:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":104
 *         else:
 *             index = python.PyNumber_Int(index)
 *         has_dot = _cstr(dot)[0] == c'.'             # <<<<<<<<<<<<<< 
 *         if python.PyList_GET_SIZE(new_path) == 0:
 *             if has_dot:
 */
      __pyx_v_has_dot = ((_cstr(__pyx_v_dot)[0]) == '.');

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":105
 *             index = python.PyNumber_Int(index)
 *         has_dot = _cstr(dot)[0] == c'.'
 *         if python.PyList_GET_SIZE(new_path) == 0:             # <<<<<<<<<<<<<< 
 *             if has_dot:
 *                 # path '.child' => ignore root
 */
      __pyx_3 = (PyList_GET_SIZE(__pyx_v_new_path) == 0);
      if (__pyx_3) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":106
 *         has_dot = _cstr(dot)[0] == c'.'
 *         if python.PyList_GET_SIZE(new_path) == 0:
 *             if has_dot:             # <<<<<<<<<<<<<< 
 *                 # path '.child' => ignore root
 *                 python.PyList_Append(new_path, _RELATIVE_PATH_SEGMENT)
 */
        __pyx_3 = __pyx_v_has_dot;
        if (__pyx_3) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":108
 *             if has_dot:
 *                 # path '.child' => ignore root
 *                 python.PyList_Append(new_path, _RELATIVE_PATH_SEGMENT)             # <<<<<<<<<<<<<< 
 *             elif index != 0:
 *                 raise ValueError, "index not allowed on root node"
 */
          __pyx_5 = PyList_Append(__pyx_v_new_path,__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT); if (unlikely(__pyx_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; goto __pyx_L1;}
          goto __pyx_L8;
        }

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":109
 *                 # path '.child' => ignore root
 *                 python.PyList_Append(new_path, _RELATIVE_PATH_SEGMENT)
 *             elif index != 0:             # <<<<<<<<<<<<<< 
 *                 raise ValueError, "index not allowed on root node"
 *         elif not has_dot:
 */
        __pyx_1 = PyObject_RichCompare(__pyx_v_index, __pyx_num_0, Py_NE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; goto __pyx_L1;}
        __pyx_3 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        if (__pyx_3) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":110
 *                 python.PyList_Append(new_path, _RELATIVE_PATH_SEGMENT)
 *             elif index != 0:
 *                 raise ValueError, "index not allowed on root node"             # <<<<<<<<<<<<<< 
 *         elif not has_dot:
 *             raise ValueError, "invalid path"
 */
          __Pyx_Raise(__pyx_builtin_ValueError, __pyx_k208p, 0);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 110; goto __pyx_L1;}
          goto __pyx_L8;
        }
        __pyx_L8:;
        goto __pyx_L7;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":111
 *             elif index != 0:
 *                 raise ValueError, "index not allowed on root node"
 *         elif not has_dot:             # <<<<<<<<<<<<<< 
 *             raise ValueError, "invalid path"
 *         python.PyList_Append(new_path, (ns, name, index))
 */
      __pyx_3 = (!__pyx_v_has_dot);
      if (__pyx_3) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":112
 *                 raise ValueError, "index not allowed on root node"
 *         elif not has_dot:
 *             raise ValueError, "invalid path"             # <<<<<<<<<<<<<< 
 *         python.PyList_Append(new_path, (ns, name, index))
 *         
 */
        __Pyx_Raise(__pyx_builtin_ValueError, __pyx_k209p, 0);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; goto __pyx_L1;}
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":113
 *         elif not has_dot:
 *             raise ValueError, "invalid path"
 *         python.PyList_Append(new_path, (ns, name, index))             # <<<<<<<<<<<<<< 
 *         
 *         path_pos = match.end()
 */
      __pyx_2 = PyTuple_New(3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; goto __pyx_L1;}
      Py_INCREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_ns);
      Py_INCREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_name);
      Py_INCREF(__pyx_v_index);
      PyTuple_SET_ITEM(__pyx_2, 2, __pyx_v_index);
      __pyx_5 = PyList_Append(__pyx_v_new_path,__pyx_2); if (unlikely(__pyx_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":115
 *         python.PyList_Append(new_path, (ns, name, index))
 *         
 *         path_pos = match.end()             # <<<<<<<<<<<<<< 
 *     if python.PyList_GET_SIZE(new_path) == 0 or \
 *            python.PyString_GET_SIZE(path) > path_pos:
 */
      __pyx_4 = PyObject_GetAttr(__pyx_v_match, __pyx_n_end); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; goto __pyx_L1;}
      __pyx_1 = PyObject_CallObject(__pyx_4, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_v_path_pos);
      __pyx_v_path_pos = __pyx_1;
      __pyx_1 = 0;
    }
    __pyx_L4:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":116
 *         
 *         path_pos = match.end()
 *     if python.PyList_GET_SIZE(new_path) == 0 or \             # <<<<<<<<<<<<<< 
 *            python.PyString_GET_SIZE(path) > path_pos:
 *         raise ValueError, "invalid path"
 */
    __pyx_2 = __Pyx_PyBool_FromLong((PyList_GET_SIZE(__pyx_v_new_path) == 0)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; goto __pyx_L1;}
    __pyx_3 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; goto __pyx_L1;}
    if (!__pyx_3) {
      Py_DECREF(__pyx_2); __pyx_2 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":117
 *         path_pos = match.end()
 *     if python.PyList_GET_SIZE(new_path) == 0 or \
 *            python.PyString_GET_SIZE(path) > path_pos:             # <<<<<<<<<<<<<< 
 *         raise ValueError, "invalid path"
 *     return new_path
 */
      __pyx_4 = PyInt_FromSsize_t(PyString_GET_SIZE(__pyx_v_path)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":117
 *         path_pos = match.end()
 *     if python.PyList_GET_SIZE(new_path) == 0 or \
 *            python.PyString_GET_SIZE(path) > path_pos:             # <<<<<<<<<<<<<< 
 *         raise ValueError, "invalid path"
 *     return new_path
 */
      __pyx_2 = PyObject_RichCompare(__pyx_4, __pyx_v_path_pos, Py_GT); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
    }
    __pyx_3 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__pyx_3) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":118
 *     if python.PyList_GET_SIZE(new_path) == 0 or \
 *            python.PyString_GET_SIZE(path) > path_pos:
 *         raise ValueError, "invalid path"             # <<<<<<<<<<<<<< 
 *     return new_path
 * 
 */
      __Pyx_Raise(__pyx_builtin_ValueError, __pyx_k210p, 0);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 118; goto __pyx_L1;}
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":119
 *            python.PyString_GET_SIZE(path) > path_pos:
 *         raise ValueError, "invalid path"
 *     return new_path             # <<<<<<<<<<<<<< 
 * 
 * cdef _parseObjectPathList(path):
 */
    Py_INCREF(__pyx_v_new_path);
    __pyx_r = __pyx_v_new_path;
    goto __pyx_L0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_4);
    __Pyx_AddTraceback("lxml.objectify._parseObjectPathString");
    __pyx_r = 0;
    __pyx_L0:;
    Py_DECREF(__pyx_v_new_path);
    Py_DECREF(__pyx_v_path_pos);
    Py_DECREF(__pyx_v_match);
    Py_DECREF(__pyx_v_dot);
    Py_DECREF(__pyx_v_ns);
    Py_DECREF(__pyx_v_name);
    Py_DECREF(__pyx_v_index);
    Py_DECREF(__pyx_v_path);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":121
 *     return new_path
 * 
 * cdef _parseObjectPathList(path):             # <<<<<<<<<<<<<< 
 *     """Parse object path sequence into a (ns, name, index) list.
 *     """
 */

  static PyObject *__pyx_k211p;
  static PyObject *__pyx_k212p;
  static PyObject *__pyx_k213p;
  static PyObject *__pyx_k214p;

  static char __pyx_k211[] = "";
  static char __pyx_k212[] = "index must be enclosed in []";
  static char __pyx_k213[] = "index not allowed on root node";
  static char __pyx_k214[] = "invalid path";

  static  PyObject *__pyx_f_4lxml_9objectify__parseObjectPathList(PyObject *__pyx_v_path) {
    char *__pyx_v_index_pos;
    char *__pyx_v_index_end;
    char *__pyx_v_c_name;
    PyObject *__pyx_v_new_path;
    PyObject *__pyx_v_item;
    PyObject *__pyx_v_ns;
    PyObject *__pyx_v_name;
    PyObject *__pyx_v_index;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    Py_ssize_t __pyx_2;
    PyObject *__pyx_3 = 0;
    PyObject *__pyx_4 = 0;
    int __pyx_5;
    PyObject *__pyx_6 = 0;
    int __pyx_7;
    Py_INCREF(__pyx_v_path);
    __pyx_v_new_path = Py_None; Py_INCREF(Py_None);
    __pyx_v_item = Py_None; Py_INCREF(Py_None);
    __pyx_v_ns = Py_None; Py_INCREF(Py_None);
    __pyx_v_name = Py_None; Py_INCREF(Py_None);
    __pyx_v_index = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":127
 *     cdef char* index_end
 *     cdef char* c_name
 *     new_path = []             # <<<<<<<<<<<<<< 
 *     for item in path:
 *         item = item.strip()
 */
    __pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 127; goto __pyx_L1;}
    Py_DECREF(__pyx_v_new_path);
    __pyx_v_new_path = __pyx_1;
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":128
 *     cdef char* c_name
 *     new_path = []
 *     for item in path:             # <<<<<<<<<<<<<< 
 *         item = item.strip()
 *         if python.PyList_GET_SIZE(new_path) == 0 and item == '':
 */
    if (PyList_CheckExact(__pyx_v_path)) { __pyx_2 = 0; __pyx_1 = __pyx_v_path; Py_INCREF(__pyx_1); }
    else { __pyx_1 = PyObject_GetIter(__pyx_v_path); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; goto __pyx_L1;} }
    for (;;) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":128
 *     cdef char* c_name
 *     new_path = []
 *     for item in path:             # <<<<<<<<<<<<<< 
 *         item = item.strip()
 *         if python.PyList_GET_SIZE(new_path) == 0 and item == '':
 */
      if (PyList_CheckExact(__pyx_1)) { if (__pyx_2 >= PyList_GET_SIZE(__pyx_1)) break; __pyx_3 = PyList_GET_ITEM(__pyx_1, __pyx_2++); Py_INCREF(__pyx_3); }
      else {
        __pyx_3 = PyIter_Next(__pyx_1);
        if (!__pyx_3) {
          break;
        }
      }
      Py_DECREF(__pyx_v_item);
      __pyx_v_item = __pyx_3;
      __pyx_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":129
 *     new_path = []
 *     for item in path:
 *         item = item.strip()             # <<<<<<<<<<<<<< 
 *         if python.PyList_GET_SIZE(new_path) == 0 and item == '':
 *             # path '.child' => ignore root
 */
      __pyx_3 = PyObject_GetAttr(__pyx_v_item, __pyx_n_strip); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 129; goto __pyx_L1;}
      __pyx_4 = PyObject_CallObject(__pyx_3, 0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 129; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_v_item);
      __pyx_v_item = __pyx_4;
      __pyx_4 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":130
 *     for item in path:
 *         item = item.strip()
 *         if python.PyList_GET_SIZE(new_path) == 0 and item == '':             # <<<<<<<<<<<<<< 
 *             # path '.child' => ignore root
 *             ns = name = None
 */
      __pyx_3 = __Pyx_PyBool_FromLong((PyList_GET_SIZE(__pyx_v_new_path) == 0)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; goto __pyx_L1;}
      __pyx_5 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; goto __pyx_L1;}
      if (__pyx_5) {
        Py_DECREF(__pyx_3); __pyx_3 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":130
 *     for item in path:
 *         item = item.strip()
 *         if python.PyList_GET_SIZE(new_path) == 0 and item == '':             # <<<<<<<<<<<<<< 
 *             # path '.child' => ignore root
 *             ns = name = None
 */
        __pyx_3 = PyObject_RichCompare(__pyx_v_item, __pyx_k211p, Py_EQ); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; goto __pyx_L1;}
      }
      __pyx_5 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      if (__pyx_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":132
 *         if python.PyList_GET_SIZE(new_path) == 0 and item == '':
 *             # path '.child' => ignore root
 *             ns = name = None             # <<<<<<<<<<<<<< 
 *             index = 0
 *         else:
 */
        Py_INCREF(Py_None);
        Py_DECREF(__pyx_v_ns);
        __pyx_v_ns = Py_None;
        Py_INCREF(Py_None);
        Py_DECREF(__pyx_v_name);
        __pyx_v_name = Py_None;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":133
 *             # path '.child' => ignore root
 *             ns = name = None
 *             index = 0             # <<<<<<<<<<<<<< 
 *         else:
 *             ns, name = cetree.getNsTag(item)
 */
        Py_INCREF(__pyx_num_0);
        Py_DECREF(__pyx_v_index);
        __pyx_v_index = __pyx_num_0;
        goto __pyx_L4;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":135
 *             index = 0
 *         else:
 *             ns, name = cetree.getNsTag(item)             # <<<<<<<<<<<<<< 
 *             c_name = _cstr(name)
 *             index_pos = cstd.strchr(c_name, c'[')
 */
        __pyx_4 = getNsTag(__pyx_v_item); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; goto __pyx_L1;}
        if (PyTuple_CheckExact(__pyx_4) && PyTuple_GET_SIZE(__pyx_4) == 2) {
          __pyx_6 = PyTuple_GET_ITEM(__pyx_4, 0);
          Py_INCREF(__pyx_6);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":135
 *             index = 0
 *         else:
 *             ns, name = cetree.getNsTag(item)             # <<<<<<<<<<<<<< 
 *             c_name = _cstr(name)
 *             index_pos = cstd.strchr(c_name, c'[')
 */
          Py_DECREF(__pyx_v_ns);
          __pyx_v_ns = __pyx_6;
          __pyx_6 = 0;
          __pyx_6 = PyTuple_GET_ITEM(__pyx_4, 1);
          Py_INCREF(__pyx_6);

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":135
 *             index = 0
 *         else:
 *             ns, name = cetree.getNsTag(item)             # <<<<<<<<<<<<<< 
 *             c_name = _cstr(name)
 *             index_pos = cstd.strchr(c_name, c'[')
 */
          Py_DECREF(__pyx_v_name);
          __pyx_v_name = __pyx_6;
          __pyx_6 = 0;
          Py_DECREF(__pyx_4); __pyx_4 = 0;
        }
        else {
          __pyx_3 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; goto __pyx_L1;}
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          __pyx_6 = __Pyx_UnpackItem(__pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; goto __pyx_L1;}

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":135
 *             index = 0
 *         else:
 *             ns, name = cetree.getNsTag(item)             # <<<<<<<<<<<<<< 
 *             c_name = _cstr(name)
 *             index_pos = cstd.strchr(c_name, c'[')
 */
          Py_DECREF(__pyx_v_ns);
          __pyx_v_ns = __pyx_6;
          __pyx_6 = 0;
          __pyx_6 = __Pyx_UnpackItem(__pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; goto __pyx_L1;}

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":135
 *             index = 0
 *         else:
 *             ns, name = cetree.getNsTag(item)             # <<<<<<<<<<<<<< 
 *             c_name = _cstr(name)
 *             index_pos = cstd.strchr(c_name, c'[')
 */
          Py_DECREF(__pyx_v_name);
          __pyx_v_name = __pyx_6;
          __pyx_6 = 0;
          if (__Pyx_EndUnpack(__pyx_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
        }

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":136
 *         else:
 *             ns, name = cetree.getNsTag(item)
 *             c_name = _cstr(name)             # <<<<<<<<<<<<<< 
 *             index_pos = cstd.strchr(c_name, c'[')
 *             if index_pos is NULL:
 */
        __pyx_v_c_name = _cstr(__pyx_v_name);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":137
 *             ns, name = cetree.getNsTag(item)
 *             c_name = _cstr(name)
 *             index_pos = cstd.strchr(c_name, c'[')             # <<<<<<<<<<<<<< 
 *             if index_pos is NULL:
 *                 index = 0
 */
        __pyx_v_index_pos = strchr(__pyx_v_c_name,'[');

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":138
 *             c_name = _cstr(name)
 *             index_pos = cstd.strchr(c_name, c'[')
 *             if index_pos is NULL:             # <<<<<<<<<<<<<< 
 *                 index = 0
 *             else:
 */
        __pyx_5 = (__pyx_v_index_pos == NULL);
        if (__pyx_5) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":139
 *             index_pos = cstd.strchr(c_name, c'[')
 *             if index_pos is NULL:
 *                 index = 0             # <<<<<<<<<<<<<< 
 *             else:
 *                 index_end = cstd.strchr(index_pos + 1, c']')
 */
          Py_INCREF(__pyx_num_0);
          Py_DECREF(__pyx_v_index);
          __pyx_v_index = __pyx_num_0;
          goto __pyx_L5;
        }
        /*else*/ {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":141
 *                 index = 0
 *             else:
 *                 index_end = cstd.strchr(index_pos + 1, c']')             # <<<<<<<<<<<<<< 
 *                 if index_end is NULL:
 *                     raise ValueError, "index must be enclosed in []"
 */
          __pyx_v_index_end = strchr((__pyx_v_index_pos + 1),']');

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":142
 *             else:
 *                 index_end = cstd.strchr(index_pos + 1, c']')
 *                 if index_end is NULL:             # <<<<<<<<<<<<<< 
 *                     raise ValueError, "index must be enclosed in []"
 *                 index = python.PyNumber_Int(
 */
          __pyx_5 = (__pyx_v_index_end == NULL);
          if (__pyx_5) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":143
 *                 index_end = cstd.strchr(index_pos + 1, c']')
 *                 if index_end is NULL:
 *                     raise ValueError, "index must be enclosed in []"             # <<<<<<<<<<<<<< 
 *                 index = python.PyNumber_Int(
 *                     python.PyString_FromStringAndSize(
 */
            __Pyx_Raise(__pyx_builtin_ValueError, __pyx_k212p, 0);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; goto __pyx_L1;}
            goto __pyx_L6;
          }
          __pyx_L6:;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":146
 *                 index = python.PyNumber_Int(
 *                     python.PyString_FromStringAndSize(
 *                         index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1)))             # <<<<<<<<<<<<<< 
 *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
 *                     raise ValueError, "index not allowed on root node"
 */
          __pyx_6 = PyString_FromStringAndSize((__pyx_v_index_pos + 1),((Py_ssize_t)((__pyx_v_index_end - __pyx_v_index_pos) - 1))); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 145; goto __pyx_L1;}
          __pyx_4 = PyNumber_Int(__pyx_6); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; goto __pyx_L1;}
          Py_DECREF(__pyx_6); __pyx_6 = 0;
          Py_DECREF(__pyx_v_index);
          __pyx_v_index = __pyx_4;
          __pyx_4 = 0;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":147
 *                     python.PyString_FromStringAndSize(
 *                         index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1)))
 *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:             # <<<<<<<<<<<<<< 
 *                     raise ValueError, "index not allowed on root node"
 *                 name = python.PyString_FromStringAndSize(
 */
          __pyx_3 = __Pyx_PyBool_FromLong((PyList_GET_SIZE(__pyx_v_new_path) == 0)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; goto __pyx_L1;}
          __pyx_5 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; goto __pyx_L1;}
          if (__pyx_5) {
            Py_DECREF(__pyx_3); __pyx_3 = 0;

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":147
 *                     python.PyString_FromStringAndSize(
 *                         index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1)))
 *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:             # <<<<<<<<<<<<<< 
 *                     raise ValueError, "index not allowed on root node"
 *                 name = python.PyString_FromStringAndSize(
 */
            __pyx_3 = PyObject_RichCompare(__pyx_v_index, __pyx_num_0, Py_NE); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; goto __pyx_L1;}
          }
          __pyx_5 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          if (__pyx_5) {

            /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":148
 *                         index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1)))
 *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
 *                     raise ValueError, "index not allowed on root node"             # <<<<<<<<<<<<<< 
 *                 name = python.PyString_FromStringAndSize(
 *                     c_name, <Py_ssize_t>(index_pos - c_name))
 */
            __Pyx_Raise(__pyx_builtin_ValueError, __pyx_k213p, 0);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; goto __pyx_L1;}
            goto __pyx_L7;
          }
          __pyx_L7:;

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":150
 *                     raise ValueError, "index not allowed on root node"
 *                 name = python.PyString_FromStringAndSize(
 *                     c_name, <Py_ssize_t>(index_pos - c_name))             # <<<<<<<<<<<<<< 
 *         python.PyList_Append(new_path, (ns, name, index))
 *     if python.PyList_GET_SIZE(new_path) == 0:
 */
          __pyx_6 = PyString_FromStringAndSize(__pyx_v_c_name,((Py_ssize_t)(__pyx_v_index_pos - __pyx_v_c_name))); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; goto __pyx_L1;}
          Py_DECREF(__pyx_v_name);
          __pyx_v_name = __pyx_6;
          __pyx_6 = 0;
        }
        __pyx_L5:;
      }
      __pyx_L4:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":151
 *                 name = python.PyString_FromStringAndSize(
 *                     c_name, <Py_ssize_t>(index_pos - c_name))
 *         python.PyList_Append(new_path, (ns, name, index))             # <<<<<<<<<<<<<< 
 *     if python.PyList_GET_SIZE(new_path) == 0:
 *         raise ValueError, "invalid path"
 */
      __pyx_4 = PyTuple_New(3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; goto __pyx_L1;}
      Py_INCREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_ns);
      Py_INCREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_name);
      Py_INCREF(__pyx_v_index);
      PyTuple_SET_ITEM(__pyx_4, 2, __pyx_v_index);
      __pyx_7 = PyList_Append(__pyx_v_new_path,__pyx_4); if (unlikely(__pyx_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
    }
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":152
 *                     c_name, <Py_ssize_t>(index_pos - c_name))
 *         python.PyList_Append(new_path, (ns, name, index))
 *     if python.PyList_GET_SIZE(new_path) == 0:             # <<<<<<<<<<<<<< 
 *         raise ValueError, "invalid path"
 *     return new_path
 */
    __pyx_5 = (PyList_GET_SIZE(__pyx_v_new_path) == 0);
    if (__pyx_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":153
 *         python.PyList_Append(new_path, (ns, name, index))
 *     if python.PyList_GET_SIZE(new_path) == 0:
 *         raise ValueError, "invalid path"             # <<<<<<<<<<<<<< 
 *     return new_path
 * 
 */
      __Pyx_Raise(__pyx_builtin_ValueError, __pyx_k214p, 0);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 153; goto __pyx_L1;}
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":154
 *     if python.PyList_GET_SIZE(new_path) == 0:
 *         raise ValueError, "invalid path"
 *     return new_path             # <<<<<<<<<<<<<< 
 * 
 * cdef _ObjectPath* _buildObjectPathSegments(path_list) except NULL:
 */
    Py_INCREF(__pyx_v_new_path);
    __pyx_r = __pyx_v_new_path;
    goto __pyx_L0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    Py_XDECREF(__pyx_3);
    Py_XDECREF(__pyx_4);
    Py_XDECREF(__pyx_6);
    __Pyx_AddTraceback("lxml.objectify._parseObjectPathList");
    __pyx_r = 0;
    __pyx_L0:;
    Py_DECREF(__pyx_v_new_path);
    Py_DECREF(__pyx_v_item);
    Py_DECREF(__pyx_v_ns);
    Py_DECREF(__pyx_v_name);
    Py_DECREF(__pyx_v_index);
    Py_DECREF(__pyx_v_path);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":156
 *     return new_path
 * 
 * cdef _ObjectPath* _buildObjectPathSegments(path_list) except NULL:             # <<<<<<<<<<<<<< 
 *     cdef _ObjectPath* c_path
 *     cdef _ObjectPath* c_path_segments
 */

  static  __pyx_t_4lxml_9objectify__ObjectPath *__pyx_f_4lxml_9objectify__buildObjectPathSegments(PyObject *__pyx_v_path_list) {
    __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path;
    __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path_segments;
    PyObject *__pyx_v_href;
    PyObject *__pyx_v_name;
    PyObject *__pyx_v_index;
    __pyx_t_4lxml_9objectify__ObjectPath *__pyx_r;
    int __pyx_1;
    PyObject *__pyx_2 = 0;
    Py_ssize_t __pyx_3;
    PyObject *__pyx_4 = 0;
    PyObject *__pyx_5 = 0;
    PyObject *__pyx_6 = 0;
    Py_ssize_t __pyx_7;
    Py_INCREF(__pyx_v_path_list);
    __pyx_v_href = Py_None; Py_INCREF(Py_None);
    __pyx_v_name = Py_None; Py_INCREF(Py_None);
    __pyx_v_index = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":160
 *     cdef _ObjectPath* c_path_segments
 *     c_path_segments = <_ObjectPath*>python.PyMem_Malloc(
 *         sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))             # <<<<<<<<<<<<<< 
 *     if c_path_segments is NULL:
 *         python.PyErr_NoMemory()
 */
    __pyx_v_c_path_segments = ((__pyx_t_4lxml_9objectify__ObjectPath *)PyMem_Malloc(((sizeof(__pyx_t_4lxml_9objectify__ObjectPath)) * PyList_GET_SIZE(__pyx_v_path_list))));

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":161
 *     c_path_segments = <_ObjectPath*>python.PyMem_Malloc(
 *         sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))
 *     if c_path_segments is NULL:             # <<<<<<<<<<<<<< 
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments
 */
    __pyx_1 = (__pyx_v_c_path_segments == NULL);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":162
 *         sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))
 *     if c_path_segments is NULL:
 *         python.PyErr_NoMemory()             # <<<<<<<<<<<<<< 
 *     c_path = c_path_segments
 *     for href, name, index in path_list:
 */
      __pyx_2 = PyErr_NoMemory(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":163
 *     if c_path_segments is NULL:
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments             # <<<<<<<<<<<<<< 
 *     for href, name, index in path_list:
 *         if href is None:
 */
    __pyx_v_c_path = __pyx_v_c_path_segments;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":164
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments
 *     for href, name, index in path_list:             # <<<<<<<<<<<<<< 
 *         if href is None:
 *             c_path[0].href = NULL
 */
    if (PyList_CheckExact(__pyx_v_path_list)) { __pyx_3 = 0; __pyx_2 = __pyx_v_path_list; Py_INCREF(__pyx_2); }
    else { __pyx_2 = PyObject_GetIter(__pyx_v_path_list); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; goto __pyx_L1;} }
    for (;;) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":164
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments
 *     for href, name, index in path_list:             # <<<<<<<<<<<<<< 
 *         if href is None:
 *             c_path[0].href = NULL
 */
      if (PyList_CheckExact(__pyx_2)) { if (__pyx_3 >= PyList_GET_SIZE(__pyx_2)) break; __pyx_4 = PyList_GET_ITEM(__pyx_2, __pyx_3++); Py_INCREF(__pyx_4); }
      else {
        __pyx_4 = PyIter_Next(__pyx_2);
        if (!__pyx_4) {
          break;
        }
      }
      if (PyTuple_CheckExact(__pyx_4) && PyTuple_GET_SIZE(__pyx_4) == 3) {
        __pyx_6 = PyTuple_GET_ITEM(__pyx_4, 0);
        Py_INCREF(__pyx_6);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":164
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments
 *     for href, name, index in path_list:             # <<<<<<<<<<<<<< 
 *         if href is None:
 *             c_path[0].href = NULL
 */
        Py_DECREF(__pyx_v_href);
        __pyx_v_href = __pyx_6;
        __pyx_6 = 0;
        __pyx_6 = PyTuple_GET_ITEM(__pyx_4, 1);
        Py_INCREF(__pyx_6);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":164
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments
 *     for href, name, index in path_list:             # <<<<<<<<<<<<<< 
 *         if href is None:
 *             c_path[0].href = NULL
 */
        Py_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_6;
        __pyx_6 = 0;
        __pyx_6 = PyTuple_GET_ITEM(__pyx_4, 2);
        Py_INCREF(__pyx_6);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":164
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments
 *     for href, name, index in path_list:             # <<<<<<<<<<<<<< 
 *         if href is None:
 *             c_path[0].href = NULL
 */
        Py_DECREF(__pyx_v_index);
        __pyx_v_index = __pyx_6;
        __pyx_6 = 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
      }
      else {
        __pyx_5 = PyObject_GetIter(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; goto __pyx_L1;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        __pyx_6 = __Pyx_UnpackItem(__pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":164
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments
 *     for href, name, index in path_list:             # <<<<<<<<<<<<<< 
 *         if href is None:
 *             c_path[0].href = NULL
 */
        Py_DECREF(__pyx_v_href);
        __pyx_v_href = __pyx_6;
        __pyx_6 = 0;
        __pyx_6 = __Pyx_UnpackItem(__pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":164
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments
 *     for href, name, index in path_list:             # <<<<<<<<<<<<<< 
 *         if href is None:
 *             c_path[0].href = NULL
 */
        Py_DECREF(__pyx_v_name);
        __pyx_v_name = __pyx_6;
        __pyx_6 = 0;
        __pyx_6 = __Pyx_UnpackItem(__pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":164
 *         python.PyErr_NoMemory()
 *     c_path = c_path_segments
 *     for href, name, index in path_list:             # <<<<<<<<<<<<<< 
 *         if href is None:
 *             c_path[0].href = NULL
 */
        Py_DECREF(__pyx_v_index);
        __pyx_v_index = __pyx_6;
        __pyx_6 = 0;
        if (__Pyx_EndUnpack(__pyx_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":165
 *     c_path = c_path_segments
 *     for href, name, index in path_list:
 *         if href is None:             # <<<<<<<<<<<<<< 
 *             c_path[0].href = NULL
 *         else:
 */
      __pyx_1 = (__pyx_v_href == Py_None);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":166
 *     for href, name, index in path_list:
 *         if href is None:
 *             c_path[0].href = NULL             # <<<<<<<<<<<<<< 
 *         else:
 *             c_path[0].href = _cstr(href)
 */
        (__pyx_v_c_path[0]).href = NULL;
        goto __pyx_L5;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":168
 *             c_path[0].href = NULL
 *         else:
 *             c_path[0].href = _cstr(href)             # <<<<<<<<<<<<<< 
 *         if name is None:
 *             c_path[0].name = NULL
 */
        (__pyx_v_c_path[0]).href = _cstr(__pyx_v_href);
      }
      __pyx_L5:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":169
 *         else:
 *             c_path[0].href = _cstr(href)
 *         if name is None:             # <<<<<<<<<<<<<< 
 *             c_path[0].name = NULL
 *         else:
 */
      __pyx_1 = (__pyx_v_name == Py_None);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":170
 *             c_path[0].href = _cstr(href)
 *         if name is None:
 *             c_path[0].name = NULL             # <<<<<<<<<<<<<< 
 *         else:
 *             c_path[0].name = _cstr(name)
 */
        (__pyx_v_c_path[0]).name = NULL;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":172
 *             c_path[0].name = NULL
 *         else:
 *             c_path[0].name = _cstr(name)             # <<<<<<<<<<<<<< 
 *         c_path[0].index = index
 *         c_path = c_path + 1
 */
        (__pyx_v_c_path[0]).name = _cstr(__pyx_v_name);
      }
      __pyx_L6:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":173
 *         else:
 *             c_path[0].name = _cstr(name)
 *         c_path[0].index = index             # <<<<<<<<<<<<<< 
 *         c_path = c_path + 1
 *     return c_path_segments
 */
      __pyx_7 = __pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_7 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 173; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":173
 *         else:
 *             c_path[0].name = _cstr(name)
 *         c_path[0].index = index             # <<<<<<<<<<<<<< 
 *         c_path = c_path + 1
 *     return c_path_segments
 */
      (__pyx_v_c_path[0]).index = __pyx_7;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":174
 *             c_path[0].name = _cstr(name)
 *         c_path[0].index = index
 *         c_path = c_path + 1             # <<<<<<<<<<<<<< 
 *     return c_path_segments
 * 
 */
      __pyx_v_c_path = (__pyx_v_c_path + 1);
    }
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":175
 *         c_path[0].index = index
 *         c_path = c_path + 1
 *     return c_path_segments             # <<<<<<<<<<<<<< 
 * 
 * cdef _findObjectPath(_Element root, _ObjectPath* c_path, Py_ssize_t c_path_len,
 */
    __pyx_r = __pyx_v_c_path_segments;
    goto __pyx_L0;

    __pyx_r = 0;
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_4);
    Py_XDECREF(__pyx_5);
    Py_XDECREF(__pyx_6);
    __Pyx_AddTraceback("lxml.objectify._buildObjectPathSegments");
    __pyx_r = NULL;
    __pyx_L0:;
    Py_DECREF(__pyx_v_href);
    Py_DECREF(__pyx_v_name);
    Py_DECREF(__pyx_v_index);
    Py_DECREF(__pyx_v_path_list);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":177
 *     return c_path_segments
 * 
 * cdef _findObjectPath(_Element root, _ObjectPath* c_path, Py_ssize_t c_path_len,             # <<<<<<<<<<<<<< 
 *                      default_value, int use_default):
 *     """Follow the path to find the target element.
 */

  static PyObject *__pyx_k215p;
  static PyObject *__pyx_k216p;

  static char __pyx_k215[] = "root element does not match: need %s, got %s";
  static char __pyx_k216[] = "no such child: ";

  static  PyObject *__pyx_f_4lxml_9objectify__findObjectPath(struct LxmlElement *__pyx_v_root,__pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path,Py_ssize_t __pyx_v_c_path_len,PyObject *__pyx_v_default_value,int __pyx_v_use_default) {
    xmlNode *__pyx_v_c_node;
    char *__pyx_v_c_href;
    char *__pyx_v_c_name;
    Py_ssize_t __pyx_v_c_index;
    PyObject *__pyx_v_tag;
    PyObject *__pyx_r;
    int __pyx_1;
    PyObject *__pyx_2 = 0;
    PyObject *__pyx_3 = 0;
    PyObject *__pyx_4 = 0;
    int __pyx_5;
    Py_INCREF(__pyx_v_root);
    Py_INCREF(__pyx_v_default_value);
    __pyx_v_tag = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":185
 *     cdef char* c_name
 *     cdef Py_ssize_t c_index
 *     c_node = root._c_node             # <<<<<<<<<<<<<< 
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href
 */
    __pyx_v_c_node = __pyx_v_root->_c_node;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":186
 *     cdef Py_ssize_t c_index
 *     c_node = root._c_node
 *     c_name = c_path[0].name             # <<<<<<<<<<<<<< 
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':
 */
    __pyx_v_c_name = (__pyx_v_c_path[0]).name;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":187
 *     c_node = root._c_node
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href             # <<<<<<<<<<<<<< 
 *     if c_href is NULL or c_href[0] == c'\0':
 *         c_href = tree._getNs(c_node)
 */
    __pyx_v_c_href = (__pyx_v_c_path[0]).href;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":188
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<< 
 *         c_href = tree._getNs(c_node)
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 */
    __pyx_1 = (__pyx_v_c_href == NULL);
    if (!__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":188
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<< 
 *         c_href = tree._getNs(c_node)
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 */
      __pyx_1 = ((__pyx_v_c_href[0]) == '\0');
    }
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":189
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':
 *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<< 
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 *         raise ValueError, "root element does not match: need %s, got %s" % \
 */
      __pyx_v_c_href = _getNs(__pyx_v_c_node);
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":190
 *     if c_href is NULL or c_href[0] == c'\0':
 *         c_href = tree._getNs(c_node)
 *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<< 
 *         raise ValueError, "root element does not match: need %s, got %s" % \
 *               (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
 */
    __pyx_1 = (!tagMatches(__pyx_v_c_node,__pyx_v_c_href,__pyx_v_c_name));
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":192
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 *         raise ValueError, "root element does not match: need %s, got %s" % \
 *               (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)             # <<<<<<<<<<<<<< 
 * 
 *     while c_node is not NULL:
 */
      __pyx_2 = namespacedNameFromNsName(__pyx_v_c_href,__pyx_v_c_name); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 192; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":192
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 *         raise ValueError, "root element does not match: need %s, got %s" % \
 *               (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)             # <<<<<<<<<<<<<< 
 * 
 *     while c_node is not NULL:
 */
      __pyx_3 = PyObject_GetAttr(((PyObject *)__pyx_v_root), __pyx_n_tag); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 192; goto __pyx_L1;}
      __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 192; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
      PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
      __pyx_2 = 0;
      __pyx_3 = 0;
      __pyx_2 = PyNumber_Remainder(__pyx_k215p, __pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 191; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __Pyx_Raise(__pyx_builtin_ValueError, __pyx_2, 0);
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 191; goto __pyx_L1;}
      goto __pyx_L3;
    }
    __pyx_L3:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":194
 *               (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
 * 
 *     while c_node is not NULL:             # <<<<<<<<<<<<<< 
 *         c_path_len = c_path_len - 1
 *         if c_path_len <= 0:
 */
    while (1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":194
 *               (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
 * 
 *     while c_node is not NULL:             # <<<<<<<<<<<<<< 
 *         c_path_len = c_path_len - 1
 *         if c_path_len <= 0:
 */
      __pyx_1 = (__pyx_v_c_node != NULL);
      if (!__pyx_1) break;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":195
 * 
 *     while c_node is not NULL:
 *         c_path_len = c_path_len - 1             # <<<<<<<<<<<<<< 
 *         if c_path_len <= 0:
 *             break
 */
      __pyx_v_c_path_len = (__pyx_v_c_path_len - 1);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":196
 *     while c_node is not NULL:
 *         c_path_len = c_path_len - 1
 *         if c_path_len <= 0:             # <<<<<<<<<<<<<< 
 *             break
 * 
 */
      __pyx_1 = (__pyx_v_c_path_len <= 0);
      if (__pyx_1) {
        goto __pyx_L5;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":199
 *             break
 * 
 *         c_path = c_path + 1             # <<<<<<<<<<<<<< 
 *         if c_path[0].href is not NULL:
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 */
      __pyx_v_c_path = (__pyx_v_c_path + 1);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":200
 * 
 *         c_path = c_path + 1
 *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<< 
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 *         c_name = c_path[0].name
 */
      __pyx_1 = ((__pyx_v_c_path[0]).href != NULL);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":201
 *         c_path = c_path + 1
 *         if c_path[0].href is not NULL:
 *             c_href = c_path[0].href # otherwise: keep parent namespace             # <<<<<<<<<<<<<< 
 *         c_name = c_path[0].name
 *         c_index = c_path[0].index
 */
        __pyx_v_c_href = (__pyx_v_c_path[0]).href;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":202
 *         if c_path[0].href is not NULL:
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 *         c_name = c_path[0].name             # <<<<<<<<<<<<<< 
 *         c_index = c_path[0].index
 * 
 */
      __pyx_v_c_name = (__pyx_v_c_path[0]).name;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":203
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 *         c_name = c_path[0].name
 *         c_index = c_path[0].index             # <<<<<<<<<<<<<< 
 * 
 *         if c_index < 0:
 */
      __pyx_v_c_index = (__pyx_v_c_path[0]).index;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":205
 *         c_index = c_path[0].index
 * 
 *         if c_index < 0:             # <<<<<<<<<<<<<< 
 *             c_node = c_node.last
 *         else:
 */
      __pyx_1 = (__pyx_v_c_index < 0);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":206
 * 
 *         if c_index < 0:
 *             c_node = c_node.last             # <<<<<<<<<<<<<< 
 *         else:
 *             c_node = c_node.children
 */
        __pyx_v_c_node = __pyx_v_c_node->last;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":208
 *             c_node = c_node.last
 *         else:
 *             c_node = c_node.children             # <<<<<<<<<<<<<< 
 *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
 * 
 */
        __pyx_v_c_node = __pyx_v_c_node->children;
      }
      __pyx_L8:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":209
 *         else:
 *             c_node = c_node.children
 *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)             # <<<<<<<<<<<<<< 
 * 
 *     if c_node is not NULL:
 */
      __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node,__pyx_v_c_href,__pyx_v_c_name,__pyx_v_c_index);
    }
    __pyx_L5:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":211
 *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
 * 
 *     if c_node is not NULL:             # <<<<<<<<<<<<<< 
 *         return cetree.elementFactory(root._doc, c_node)
 *     elif use_default:
 */
    __pyx_1 = (__pyx_v_c_node != NULL);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":212
 * 
 *     if c_node is not NULL:
 *         return cetree.elementFactory(root._doc, c_node)             # <<<<<<<<<<<<<< 
 *     elif use_default:
 *         return default_value
 */
      __pyx_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc,__pyx_v_c_node)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 212; goto __pyx_L1;}
      __pyx_r = __pyx_3;
      __pyx_3 = 0;
      goto __pyx_L0;
      goto __pyx_L9;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":213
 *     if c_node is not NULL:
 *         return cetree.elementFactory(root._doc, c_node)
 *     elif use_default:             # <<<<<<<<<<<<<< 
 *         return default_value
 *     else:
 */
    __pyx_5 = __pyx_v_use_default;
    if (__pyx_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":214
 *         return cetree.elementFactory(root._doc, c_node)
 *     elif use_default:
 *         return default_value             # <<<<<<<<<<<<<< 
 *     else:
 *         tag = cetree.namespacedNameFromNsName(c_href, c_name)
 */
      Py_INCREF(__pyx_v_default_value);
      __pyx_r = __pyx_v_default_value;
      goto __pyx_L0;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":216
 *         return default_value
 *     else:
 *         tag = cetree.namespacedNameFromNsName(c_href, c_name)             # <<<<<<<<<<<<<< 
 *         raise AttributeError, "no such child: " + tag
 * 
 */
      __pyx_4 = namespacedNameFromNsName(__pyx_v_c_href,__pyx_v_c_name); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; goto __pyx_L1;}
      Py_DECREF(__pyx_v_tag);
      __pyx_v_tag = __pyx_4;
      __pyx_4 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":217
 *     else:
 *         tag = cetree.namespacedNameFromNsName(c_href, c_name)
 *         raise AttributeError, "no such child: " + tag             # <<<<<<<<<<<<<< 
 * 
 * cdef _createObjectPath(_Element root, _ObjectPath* c_path,
 */
      __pyx_2 = PyNumber_Add(__pyx_k216p, __pyx_v_tag); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; goto __pyx_L1;}
      __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_2, 0);
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; goto __pyx_L1;}
    }
    __pyx_L9:;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_3);
    Py_XDECREF(__pyx_4);
    __Pyx_AddTraceback("lxml.objectify._findObjectPath");
    __pyx_r = 0;
    __pyx_L0:;
    Py_DECREF(__pyx_v_tag);
    Py_DECREF(__pyx_v_root);
    Py_DECREF(__pyx_v_default_value);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":219
 *         raise AttributeError, "no such child: " + tag
 * 
 * cdef _createObjectPath(_Element root, _ObjectPath* c_path,             # <<<<<<<<<<<<<< 
 *                        Py_ssize_t c_path_len, int replace, value):
 *     """Follow the path to find the target element, build the missing children
 */

  static PyObject *__pyx_k217p;
  static PyObject *__pyx_k218p;
  static PyObject *__pyx_k219p;

  static char __pyx_k217[] = "cannot update root node";
  static char __pyx_k218[] = "root element does not match: need %s, got %s";
  static char __pyx_k219[] = "creating indexed path attributes is not supported";

  static  PyObject *__pyx_f_4lxml_9objectify__createObjectPath(struct LxmlElement *__pyx_v_root,__pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path,Py_ssize_t __pyx_v_c_path_len,int __pyx_v_replace,PyObject *__pyx_v_value) {
    struct LxmlElement *__pyx_v_child;
    xmlNode *__pyx_v_c_node;
    xmlNode *__pyx_v_c_child;
    char *__pyx_v_c_href;
    char *__pyx_v_c_name;
    Py_ssize_t __pyx_v_c_index;
    PyObject *__pyx_v_element;
    PyObject *__pyx_r;
    int __pyx_1;
    PyObject *__pyx_2 = 0;
    PyObject *__pyx_3 = 0;
    PyObject *__pyx_4 = 0;
    int __pyx_5;
    Py_INCREF(__pyx_v_root);
    Py_INCREF(__pyx_v_value);
    __pyx_v_child = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
    __pyx_v_element = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":231
 *     cdef char* c_name
 *     cdef Py_ssize_t c_index
 *     if c_path_len == 1:             # <<<<<<<<<<<<<< 
 *         raise TypeError, "cannot update root node"
 * 
 */
    __pyx_1 = (__pyx_v_c_path_len == 1);
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":232
 *     cdef Py_ssize_t c_index
 *     if c_path_len == 1:
 *         raise TypeError, "cannot update root node"             # <<<<<<<<<<<<<< 
 * 
 *     c_node = root._c_node
 */
      __Pyx_Raise(__pyx_builtin_TypeError, __pyx_k217p, 0);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 232; goto __pyx_L1;}
      goto __pyx_L2;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":234
 *         raise TypeError, "cannot update root node"
 * 
 *     c_node = root._c_node             # <<<<<<<<<<<<<< 
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href
 */
    __pyx_v_c_node = __pyx_v_root->_c_node;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":235
 * 
 *     c_node = root._c_node
 *     c_name = c_path[0].name             # <<<<<<<<<<<<<< 
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':
 */
    __pyx_v_c_name = (__pyx_v_c_path[0]).name;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":236
 *     c_node = root._c_node
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href             # <<<<<<<<<<<<<< 
 *     if c_href is NULL or c_href[0] == c'\0':
 *         c_href = tree._getNs(c_node)
 */
    __pyx_v_c_href = (__pyx_v_c_path[0]).href;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":237
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<< 
 *         c_href = tree._getNs(c_node)
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 */
    __pyx_1 = (__pyx_v_c_href == NULL);
    if (!__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":237
 *     c_name = c_path[0].name
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<< 
 *         c_href = tree._getNs(c_node)
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 */
      __pyx_1 = ((__pyx_v_c_href[0]) == '\0');
    }
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":238
 *     c_href = c_path[0].href
 *     if c_href is NULL or c_href[0] == c'\0':
 *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<< 
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 *         raise ValueError, "root element does not match: need %s, got %s" % \
 */
      __pyx_v_c_href = _getNs(__pyx_v_c_node);
      goto __pyx_L3;
    }
    __pyx_L3:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":239
 *     if c_href is NULL or c_href[0] == c'\0':
 *         c_href = tree._getNs(c_node)
 *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<< 
 *         raise ValueError, "root element does not match: need %s, got %s" % \
 *               (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
 */
    __pyx_1 = (!tagMatches(__pyx_v_c_node,__pyx_v_c_href,__pyx_v_c_name));
    if (__pyx_1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":241
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 *         raise ValueError, "root element does not match: need %s, got %s" % \
 *               (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)             # <<<<<<<<<<<<<< 
 * 
 *     while c_path_len > 1:
 */
      __pyx_2 = namespacedNameFromNsName(__pyx_v_c_href,__pyx_v_c_name); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 241; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":241
 *     if not cetree.tagMatches(c_node, c_href, c_name):
 *         raise ValueError, "root element does not match: need %s, got %s" % \
 *               (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)             # <<<<<<<<<<<<<< 
 * 
 *     while c_path_len > 1:
 */
      __pyx_3 = PyObject_GetAttr(((PyObject *)__pyx_v_root), __pyx_n_tag); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 241; goto __pyx_L1;}
      __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 241; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
      PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
      __pyx_2 = 0;
      __pyx_3 = 0;
      __pyx_2 = PyNumber_Remainder(__pyx_k218p, __pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 240; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __Pyx_Raise(__pyx_builtin_ValueError, __pyx_2, 0);
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 240; goto __pyx_L1;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":243
 *               (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
 * 
 *     while c_path_len > 1:             # <<<<<<<<<<<<<< 
 *         c_path_len = c_path_len - 1
 *         c_path = c_path + 1
 */
    while (1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":243
 *               (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
 * 
 *     while c_path_len > 1:             # <<<<<<<<<<<<<< 
 *         c_path_len = c_path_len - 1
 *         c_path = c_path + 1
 */
      __pyx_1 = (__pyx_v_c_path_len > 1);
      if (!__pyx_1) break;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":244
 * 
 *     while c_path_len > 1:
 *         c_path_len = c_path_len - 1             # <<<<<<<<<<<<<< 
 *         c_path = c_path + 1
 *         if c_path[0].href is not NULL:
 */
      __pyx_v_c_path_len = (__pyx_v_c_path_len - 1);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":245
 *     while c_path_len > 1:
 *         c_path_len = c_path_len - 1
 *         c_path = c_path + 1             # <<<<<<<<<<<<<< 
 *         if c_path[0].href is not NULL:
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 */
      __pyx_v_c_path = (__pyx_v_c_path + 1);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":246
 *         c_path_len = c_path_len - 1
 *         c_path = c_path + 1
 *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<< 
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 *         c_name = c_path[0].name
 */
      __pyx_1 = ((__pyx_v_c_path[0]).href != NULL);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":247
 *         c_path = c_path + 1
 *         if c_path[0].href is not NULL:
 *             c_href = c_path[0].href # otherwise: keep parent namespace             # <<<<<<<<<<<<<< 
 *         c_name = c_path[0].name
 *         c_index = c_path[0].index
 */
        __pyx_v_c_href = (__pyx_v_c_path[0]).href;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":248
 *         if c_path[0].href is not NULL:
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 *         c_name = c_path[0].name             # <<<<<<<<<<<<<< 
 *         c_index = c_path[0].index
 * 
 */
      __pyx_v_c_name = (__pyx_v_c_path[0]).name;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":249
 *             c_href = c_path[0].href # otherwise: keep parent namespace
 *         c_name = c_path[0].name
 *         c_index = c_path[0].index             # <<<<<<<<<<<<<< 
 * 
 *         if c_index < 0:
 */
      __pyx_v_c_index = (__pyx_v_c_path[0]).index;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":251
 *         c_index = c_path[0].index
 * 
 *         if c_index < 0:             # <<<<<<<<<<<<<< 
 *             c_child = c_node.last
 *         else:
 */
      __pyx_1 = (__pyx_v_c_index < 0);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":252
 * 
 *         if c_index < 0:
 *             c_child = c_node.last             # <<<<<<<<<<<<<< 
 *         else:
 *             c_child = c_node.children
 */
        __pyx_v_c_child = __pyx_v_c_node->last;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":254
 *             c_child = c_node.last
 *         else:
 *             c_child = c_node.children             # <<<<<<<<<<<<<< 
 *         c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
 * 
 */
        __pyx_v_c_child = __pyx_v_c_node->children;
      }
      __pyx_L8:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":255
 *         else:
 *             c_child = c_node.children
 *         c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)             # <<<<<<<<<<<<<< 
 * 
 *         if c_child is not NULL:
 */
      __pyx_v_c_child = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_child,__pyx_v_c_href,__pyx_v_c_name,__pyx_v_c_index);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":257
 *         c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
 * 
 *         if c_child is not NULL:             # <<<<<<<<<<<<<< 
 *             c_node = c_child
 *         elif c_index != 0:
 */
      __pyx_1 = (__pyx_v_c_child != NULL);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":258
 * 
 *         if c_child is not NULL:
 *             c_node = c_child             # <<<<<<<<<<<<<< 
 *         elif c_index != 0:
 *             raise TypeError, \
 */
        __pyx_v_c_node = __pyx_v_c_child;
        goto __pyx_L9;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":259
 *         if c_child is not NULL:
 *             c_node = c_child
 *         elif c_index != 0:             # <<<<<<<<<<<<<< 
 *             raise TypeError, \
 *                   "creating indexed path attributes is not supported"
 */
      __pyx_1 = (__pyx_v_c_index != 0);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":261
 *         elif c_index != 0:
 *             raise TypeError, \
 *                   "creating indexed path attributes is not supported"             # <<<<<<<<<<<<<< 
 *         elif c_path_len == 1:
 *             _appendValue(cetree.elementFactory(root._doc, c_node),
 */
        __Pyx_Raise(__pyx_builtin_TypeError, __pyx_k219p, 0);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; goto __pyx_L1;}
        goto __pyx_L9;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":262
 *             raise TypeError, \
 *                   "creating indexed path attributes is not supported"
 *         elif c_path_len == 1:             # <<<<<<<<<<<<<< 
 *             _appendValue(cetree.elementFactory(root._doc, c_node),
 *                          cetree.namespacedNameFromNsName(c_href, c_name),
 */
      __pyx_1 = (__pyx_v_c_path_len == 1);
      if (__pyx_1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":263
 *                   "creating indexed path attributes is not supported"
 *         elif c_path_len == 1:
 *             _appendValue(cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<< 
 *                          cetree.namespacedNameFromNsName(c_href, c_name),
 *                          value)
 */
        __pyx_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc,__pyx_v_c_node)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 263; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":264
 *         elif c_path_len == 1:
 *             _appendValue(cetree.elementFactory(root._doc, c_node),
 *                          cetree.namespacedNameFromNsName(c_href, c_name),             # <<<<<<<<<<<<<< 
 *                          value)
 *             return
 */
        __pyx_4 = namespacedNameFromNsName(__pyx_v_c_href,__pyx_v_c_name); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 264; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":265
 *             _appendValue(cetree.elementFactory(root._doc, c_node),
 *                          cetree.namespacedNameFromNsName(c_href, c_name),
 *                          value)             # <<<<<<<<<<<<<< 
 *             return
 *         else:
 */
        __pyx_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_3),__pyx_4,__pyx_v_value); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 263; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        Py_DECREF(__pyx_2); __pyx_2 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":266
 *                          cetree.namespacedNameFromNsName(c_href, c_name),
 *                          value)
 *             return             # <<<<<<<<<<<<<< 
 *         else:
 *             child = cetree.makeSubElement(
 */
        __pyx_r = Py_None; Py_INCREF(Py_None);
        goto __pyx_L0;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":269
 *         else:
 *             child = cetree.makeSubElement(
 *                 cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<< 
 *                 cetree.namespacedNameFromNsName(c_href, c_name),
 *                 None, None, None, None)
 */
        __pyx_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc,__pyx_v_c_node)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 269; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":270
 *             child = cetree.makeSubElement(
 *                 cetree.elementFactory(root._doc, c_node),
 *                 cetree.namespacedNameFromNsName(c_href, c_name),             # <<<<<<<<<<<<<< 
 *                 None, None, None, None)
 *             c_node = child._c_node
 */
        __pyx_4 = namespacedNameFromNsName(__pyx_v_c_href,__pyx_v_c_name); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; goto __pyx_L1;}

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":271
 *                 cetree.elementFactory(root._doc, c_node),
 *                 cetree.namespacedNameFromNsName(c_href, c_name),
 *                 None, None, None, None)             # <<<<<<<<<<<<<< 
 *             c_node = child._c_node
 * 
 */
        __pyx_2 = ((PyObject *)makeSubElement(((struct LxmlElement *)__pyx_3),__pyx_4,Py_None,Py_None,Py_None,Py_None)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 268; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        Py_DECREF(((PyObject *)__pyx_v_child));
        __pyx_v_child = ((struct LxmlElement *)__pyx_2);
        __pyx_2 = 0;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":272
 *                 cetree.namespacedNameFromNsName(c_href, c_name),
 *                 None, None, None, None)
 *             c_node = child._c_node             # <<<<<<<<<<<<<< 
 * 
 *     # if we get here, the entire path was already there
 */
        __pyx_v_c_node = __pyx_v_child->_c_node;
      }
      __pyx_L9:;
    }

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":275
 * 
 *     # if we get here, the entire path was already there
 *     if replace:             # <<<<<<<<<<<<<< 
 *         element = cetree.elementFactory(root._doc, c_node)
 *         _replaceElement(element, value)
 */
    __pyx_5 = __pyx_v_replace;
    if (__pyx_5) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":276
 *     # if we get here, the entire path was already there
 *     if replace:
 *         element = cetree.elementFactory(root._doc, c_node)             # <<<<<<<<<<<<<< 
 *         _replaceElement(element, value)
 *     else:
 */
      __pyx_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc,__pyx_v_c_node)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; goto __pyx_L1;}
      Py_DECREF(__pyx_v_element);
      __pyx_v_element = __pyx_3;
      __pyx_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":277
 *     if replace:
 *         element = cetree.elementFactory(root._doc, c_node)
 *         _replaceElement(element, value)             # <<<<<<<<<<<<<< 
 *     else:
 *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
 */
      if (!__Pyx_TypeTest(__pyx_v_element, __pyx_ptype_11etreepublic__Element)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":277
 *     if replace:
 *         element = cetree.elementFactory(root._doc, c_node)
 *         _replaceElement(element, value)             # <<<<<<<<<<<<<< 
 *     else:
 *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
 */
      __pyx_4 = __pyx_f_4lxml_9objectify__replaceElement(((struct LxmlElement *)__pyx_v_element),__pyx_v_value); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":279
 *         _replaceElement(element, value)
 *     else:
 *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),             # <<<<<<<<<<<<<< 
 *                      cetree.namespacedName(c_node), value)
 * 
 */
      __pyx_2 = ((PyObject *)elementFactory(__pyx_v_root->_doc,__pyx_v_c_node->parent)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":280
 *     else:
 *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
 *                      cetree.namespacedName(c_node), value)             # <<<<<<<<<<<<<< 
 * 
 * cdef _buildDescendantPaths(tree.xmlNode* c_node, prefix_string):
 */
      __pyx_3 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 280; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":280
 *     else:
 *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
 *                      cetree.namespacedName(c_node), value)             # <<<<<<<<<<<<<< 
 * 
 * cdef _buildDescendantPaths(tree.xmlNode* c_node, prefix_string):
 */
      __pyx_4 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_2),__pyx_3,__pyx_v_value); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
    }
    __pyx_L10:;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_3);
    Py_XDECREF(__pyx_4);
    __Pyx_AddTraceback("lxml.objectify._createObjectPath");
    __pyx_r = 0;
    __pyx_L0:;
    Py_DECREF(__pyx_v_child);
    Py_DECREF(__pyx_v_element);
    Py_DECREF(__pyx_v_root);
    Py_DECREF(__pyx_v_value);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":282
 *                      cetree.namespacedName(c_node), value)
 * 
 * cdef _buildDescendantPaths(tree.xmlNode* c_node, prefix_string):             # <<<<<<<<<<<<<< 
 *     """Returns a list of all descendant paths.
 *     """
 */

  static PyObject *__pyx_k220p;
  static PyObject *__pyx_k221p;

  static char __pyx_k220[] = ".";
  static char __pyx_k221[] = ".";

  static  PyObject *__pyx_f_4lxml_9objectify__buildDescendantPaths(xmlNode *__pyx_v_c_node,PyObject *__pyx_v_prefix_string) {
    PyObject *__pyx_v_tag;
    PyObject *__pyx_v_path;
    PyObject *__pyx_v_path_list;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    int __pyx_2;
    PyObject *__pyx_3 = 0;
    Py_INCREF(__pyx_v_prefix_string);
    __pyx_v_tag = Py_None; Py_INCREF(Py_None);
    __pyx_v_path = Py_None; Py_INCREF(Py_None);
    __pyx_v_path_list = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":285
 *     """Returns a list of all descendant paths.
 *     """
 *     tag = cetree.namespacedName(c_node)             # <<<<<<<<<<<<<< 
 *     if prefix_string:
 *         if prefix_string[-1] != '.':
 */
    __pyx_1 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; goto __pyx_L1;}
    Py_DECREF(__pyx_v_tag);
    __pyx_v_tag = __pyx_1;
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":286
 *     """
 *     tag = cetree.namespacedName(c_node)
 *     if prefix_string:             # <<<<<<<<<<<<<< 
 *         if prefix_string[-1] != '.':
 *             prefix_string = prefix_string + '.'
 */
    __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_v_prefix_string); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; goto __pyx_L1;}
    if (__pyx_2) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":287
 *     tag = cetree.namespacedName(c_node)
 *     if prefix_string:
 *         if prefix_string[-1] != '.':             # <<<<<<<<<<<<<< 
 *             prefix_string = prefix_string + '.'
 *         prefix_string = prefix_string + tag
 */
      if (PyList_CheckExact(__pyx_v_prefix_string) && 0 <= -1 && -1 < PyList_GET_SIZE(__pyx_v_prefix_string)) {
        __pyx_3 = PyList_GET_ITEM(__pyx_v_prefix_string, -1); Py_INCREF(__pyx_3);
        } else if (PyTuple_CheckExact(__pyx_v_prefix_string) && 0 <= -1 && -1 < PyTuple_GET_SIZE(__pyx_v_prefix_string)) {
        __pyx_3 = PyTuple_GET_ITEM(__pyx_v_prefix_string, -1); Py_INCREF(__pyx_3);
        } else {
        __pyx_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; goto __pyx_L1;}
        __pyx_3 = PyObject_GetItem(__pyx_v_prefix_string, __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":287
 *     tag = cetree.namespacedName(c_node)
 *     if prefix_string:
 *         if prefix_string[-1] != '.':             # <<<<<<<<<<<<<< 
 *             prefix_string = prefix_string + '.'
 *         prefix_string = prefix_string + tag
 */
      __pyx_1 = PyObject_RichCompare(__pyx_3, __pyx_k220p, Py_NE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      if (__pyx_2) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":288
 *     if prefix_string:
 *         if prefix_string[-1] != '.':
 *             prefix_string = prefix_string + '.'             # <<<<<<<<<<<<<< 
 *         prefix_string = prefix_string + tag
 *     else:
 */
        __pyx_3 = PyNumber_Add(__pyx_v_prefix_string, __pyx_k221p); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 288; goto __pyx_L1;}
        Py_DECREF(__pyx_v_prefix_string);
        __pyx_v_prefix_string = __pyx_3;
        __pyx_3 = 0;
        goto __pyx_L3;
      }
      __pyx_L3:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":289
 *         if prefix_string[-1] != '.':
 *             prefix_string = prefix_string + '.'
 *         prefix_string = prefix_string + tag             # <<<<<<<<<<<<<< 
 *     else:
 *         prefix_string = tag
 */
      __pyx_1 = PyNumber_Add(__pyx_v_prefix_string, __pyx_v_tag); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; goto __pyx_L1;}
      Py_DECREF(__pyx_v_prefix_string);
      __pyx_v_prefix_string = __pyx_1;
      __pyx_1 = 0;
      goto __pyx_L2;
    }
    /*else*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":291
 *         prefix_string = prefix_string + tag
 *     else:
 *         prefix_string = tag             # <<<<<<<<<<<<<< 
 *     path = [prefix_string]
 *     path_list = []
 */
      Py_INCREF(__pyx_v_tag);
      Py_DECREF(__pyx_v_prefix_string);
      __pyx_v_prefix_string = __pyx_v_tag;
    }
    __pyx_L2:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":292
 *     else:
 *         prefix_string = tag
 *     path = [prefix_string]             # <<<<<<<<<<<<<< 
 *     path_list = []
 *     _recursiveBuildDescendantPaths(c_node, path, path_list)
 */
    __pyx_3 = PyList_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; goto __pyx_L1;}
    Py_INCREF(__pyx_v_prefix_string);
    PyList_SET_ITEM(__pyx_3, 0, __pyx_v_prefix_string);
    Py_DECREF(__pyx_v_path);
    __pyx_v_path = __pyx_3;
    __pyx_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":293
 *         prefix_string = tag
 *     path = [prefix_string]
 *     path_list = []             # <<<<<<<<<<<<<< 
 *     _recursiveBuildDescendantPaths(c_node, path, path_list)
 *     return path_list
 */
    __pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 293; goto __pyx_L1;}
    Py_DECREF(__pyx_v_path_list);
    __pyx_v_path_list = __pyx_1;
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":294
 *     path = [prefix_string]
 *     path_list = []
 *     _recursiveBuildDescendantPaths(c_node, path, path_list)             # <<<<<<<<<<<<<< 
 *     return path_list
 * 
 */
    __pyx_3 = __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(__pyx_v_c_node,__pyx_v_path,__pyx_v_path_list); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 294; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":295
 *     path_list = []
 *     _recursiveBuildDescendantPaths(c_node, path, path_list)
 *     return path_list             # <<<<<<<<<<<<<< 
 * 
 * cdef _recursiveBuildDescendantPaths(tree.xmlNode* c_node, path, path_list):
 */
    Py_INCREF(__pyx_v_path_list);
    __pyx_r = __pyx_v_path_list;
    goto __pyx_L0;

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    Py_XDECREF(__pyx_3);
    __Pyx_AddTraceback("lxml.objectify._buildDescendantPaths");
    __pyx_r = 0;
    __pyx_L0:;
    Py_DECREF(__pyx_v_tag);
    Py_DECREF(__pyx_v_path);
    Py_DECREF(__pyx_v_path_list);
    Py_DECREF(__pyx_v_prefix_string);
    return __pyx_r;
  }

  /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":297
 *     return path_list
 * 
 * cdef _recursiveBuildDescendantPaths(tree.xmlNode* c_node, path, path_list):             # <<<<<<<<<<<<<< 
 *     """Fills the list 'path_list' with all descendant paths, initial prefix
 *     being in the list 'path'.
 */

  static PyObject *__pyx_k222p;
  static PyObject *__pyx_k223p;
  static PyObject *__pyx_k224p;

  static char __pyx_k222[] = ".";
  static char __pyx_k223[] = "{}";
  static char __pyx_k224[] = "[%d]";

  static  PyObject *__pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(xmlNode *__pyx_v_c_node,PyObject *__pyx_v_path,PyObject *__pyx_v_path_list) {
    PyObject *__pyx_v_dict_result;
    xmlNode *__pyx_v_c_child;
    char *__pyx_v_c_href;
    PyObject *__pyx_v_tags;
    PyObject *__pyx_v_tag;
    PyObject *__pyx_v_count;
    PyObject *__pyx_r;
    PyObject *__pyx_1 = 0;
    PyObject *__pyx_2 = 0;
    PyObject *__pyx_3 = 0;
    int __pyx_4;
    int __pyx_5;
    Py_INCREF(__pyx_v_path);
    Py_INCREF(__pyx_v_path_list);
    __pyx_v_tags = Py_None; Py_INCREF(Py_None);
    __pyx_v_tag = Py_None; Py_INCREF(Py_None);
    __pyx_v_count = Py_None; Py_INCREF(Py_None);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":304
 *     cdef tree.xmlNode* c_child
 *     cdef char* c_href
 *     python.PyList_Append(path_list, '.'.join(path))             # <<<<<<<<<<<<<< 
 *     tags = {}
 *     c_href = tree._getNs(c_node)
 */
    __pyx_1 = PyObject_GetAttr(__pyx_k222p, __pyx_n_join); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":304
 *     cdef tree.xmlNode* c_child
 *     cdef char* c_href
 *     python.PyList_Append(path_list, '.'.join(path))             # <<<<<<<<<<<<<< 
 *     tags = {}
 *     c_href = tree._getNs(c_node)
 */
    __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; goto __pyx_L1;}
    Py_INCREF(__pyx_v_path);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path);
    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_4 = PyList_Append(__pyx_v_path_list,__pyx_3); if (unlikely(__pyx_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":305
 *     cdef char* c_href
 *     python.PyList_Append(path_list, '.'.join(path))
 *     tags = {}             # <<<<<<<<<<<<<< 
 *     c_href = tree._getNs(c_node)
 *     c_child = c_node.children
 */
    __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; goto __pyx_L1;}
    Py_DECREF(__pyx_v_tags);
    __pyx_v_tags = __pyx_1;
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":306
 *     python.PyList_Append(path_list, '.'.join(path))
 *     tags = {}
 *     c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<< 
 *     c_child = c_node.children
 *     while c_child is not NULL:
 */
    __pyx_v_c_href = _getNs(__pyx_v_c_node);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":307
 *     tags = {}
 *     c_href = tree._getNs(c_node)
 *     c_child = c_node.children             # <<<<<<<<<<<<<< 
 *     while c_child is not NULL:
 *         while c_child.type != tree.XML_ELEMENT_NODE:
 */
    __pyx_v_c_child = __pyx_v_c_node->children;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":308
 *     c_href = tree._getNs(c_node)
 *     c_child = c_node.children
 *     while c_child is not NULL:             # <<<<<<<<<<<<<< 
 *         while c_child.type != tree.XML_ELEMENT_NODE:
 *             c_child = c_child.next
 */
    while (1) {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":308
 *     c_href = tree._getNs(c_node)
 *     c_child = c_node.children
 *     while c_child is not NULL:             # <<<<<<<<<<<<<< 
 *         while c_child.type != tree.XML_ELEMENT_NODE:
 *             c_child = c_child.next
 */
      __pyx_5 = (__pyx_v_c_child != NULL);
      if (!__pyx_5) break;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":309
 *     c_child = c_node.children
 *     while c_child is not NULL:
 *         while c_child.type != tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<< 
 *             c_child = c_child.next
 *             if c_child is NULL:
 */
      while (1) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":309
 *     c_child = c_node.children
 *     while c_child is not NULL:
 *         while c_child.type != tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<< 
 *             c_child = c_child.next
 *             if c_child is NULL:
 */
        __pyx_5 = (__pyx_v_c_child->type != XML_ELEMENT_NODE);
        if (!__pyx_5) break;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":310
 *     while c_child is not NULL:
 *         while c_child.type != tree.XML_ELEMENT_NODE:
 *             c_child = c_child.next             # <<<<<<<<<<<<<< 
 *             if c_child is NULL:
 *                 return
 */
        __pyx_v_c_child = __pyx_v_c_child->next;

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":311
 *         while c_child.type != tree.XML_ELEMENT_NODE:
 *             c_child = c_child.next
 *             if c_child is NULL:             # <<<<<<<<<<<<<< 
 *                 return
 *         if c_href is tree._getNs(c_child):
 */
        __pyx_5 = (__pyx_v_c_child == NULL);
        if (__pyx_5) {

          /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":312
 *             c_child = c_child.next
 *             if c_child is NULL:
 *                 return             # <<<<<<<<<<<<<< 
 *         if c_href is tree._getNs(c_child):
 *             tag = c_child.name
 */
          __pyx_r = Py_None; Py_INCREF(Py_None);
          goto __pyx_L0;
          goto __pyx_L6;
        }
        __pyx_L6:;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":313
 *             if c_child is NULL:
 *                 return
 *         if c_href is tree._getNs(c_child):             # <<<<<<<<<<<<<< 
 *             tag = c_child.name
 *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
 */
      __pyx_5 = (__pyx_v_c_href == _getNs(__pyx_v_c_child));
      if (__pyx_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":314
 *                 return
 *         if c_href is tree._getNs(c_child):
 *             tag = c_child.name             # <<<<<<<<<<<<<< 
 *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
 *             # special case: parent has namespace, child does not
 */
        __pyx_2 = PyString_FromString(__pyx_v_c_child->name); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; goto __pyx_L1;}
        Py_DECREF(__pyx_v_tag);
        __pyx_v_tag = __pyx_2;
        __pyx_2 = 0;
        goto __pyx_L7;
      }

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":315
 *         if c_href is tree._getNs(c_child):
 *             tag = c_child.name
 *         elif c_href is not NULL and tree._getNs(c_child) is NULL:             # <<<<<<<<<<<<<< 
 *             # special case: parent has namespace, child does not
 *             tag = '{}' + c_child.name
 */
      __pyx_5 = (__pyx_v_c_href != NULL);
      if (__pyx_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":315
 *         if c_href is tree._getNs(c_child):
 *             tag = c_child.name
 *         elif c_href is not NULL and tree._getNs(c_child) is NULL:             # <<<<<<<<<<<<<< 
 *             # special case: parent has namespace, child does not
 *             tag = '{}' + c_child.name
 */
        __pyx_5 = (_getNs(__pyx_v_c_child) == NULL);
      }
      if (__pyx_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":317
 *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
 *             # special case: parent has namespace, child does not
 *             tag = '{}' + c_child.name             # <<<<<<<<<<<<<< 
 *         else:
 *             tag = cetree.namespacedName(c_child)
 */
        __pyx_3 = PyString_FromString(__pyx_v_c_child->name); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; goto __pyx_L1;}
        __pyx_1 = PyNumber_Add(__pyx_k223p, __pyx_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_v_tag);
        __pyx_v_tag = __pyx_1;
        __pyx_1 = 0;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":319
 *             tag = '{}' + c_child.name
 *         else:
 *             tag = cetree.namespacedName(c_child)             # <<<<<<<<<<<<<< 
 *         dict_result = python.PyDict_GetItem(tags, tag)
 *         if dict_result is NULL:
 */
        __pyx_2 = namespacedName(__pyx_v_c_child); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; goto __pyx_L1;}
        Py_DECREF(__pyx_v_tag);
        __pyx_v_tag = __pyx_2;
        __pyx_2 = 0;
      }
      __pyx_L7:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":320
 *         else:
 *             tag = cetree.namespacedName(c_child)
 *         dict_result = python.PyDict_GetItem(tags, tag)             # <<<<<<<<<<<<<< 
 *         if dict_result is NULL:
 *             count = 0
 */
      __pyx_v_dict_result = PyDict_GetItem(__pyx_v_tags,__pyx_v_tag);

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":321
 *             tag = cetree.namespacedName(c_child)
 *         dict_result = python.PyDict_GetItem(tags, tag)
 *         if dict_result is NULL:             # <<<<<<<<<<<<<< 
 *             count = 0
 *         else:
 */
      __pyx_5 = (__pyx_v_dict_result == NULL);
      if (__pyx_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":322
 *         dict_result = python.PyDict_GetItem(tags, tag)
 *         if dict_result is NULL:
 *             count = 0             # <<<<<<<<<<<<<< 
 *         else:
 *             count = (<object>dict_result) + 1
 */
        Py_INCREF(__pyx_num_0);
        Py_DECREF(__pyx_v_count);
        __pyx_v_count = __pyx_num_0;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":324
 *             count = 0
 *         else:
 *             count = (<object>dict_result) + 1             # <<<<<<<<<<<<<< 
 *         python.PyDict_SetItem(tags, tag, count)
 *         if count > 0:
 */
        __pyx_3 = (PyObject *)__pyx_v_dict_result;
        Py_INCREF(__pyx_3);

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":324
 *             count = 0
 *         else:
 *             count = (<object>dict_result) + 1             # <<<<<<<<<<<<<< 
 *         python.PyDict_SetItem(tags, tag, count)
 *         if count > 0:
 */
        __pyx_1 = PyNumber_Add(__pyx_3, __pyx_num_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_v_count);
        __pyx_v_count = __pyx_1;
        __pyx_1 = 0;
      }
      __pyx_L8:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":325
 *         else:
 *             count = (<object>dict_result) + 1
 *         python.PyDict_SetItem(tags, tag, count)             # <<<<<<<<<<<<<< 
 *         if count > 0:
 *             tag = tag + '[%d]' % count
 */
      __pyx_4 = PyDict_SetItem(__pyx_v_tags,__pyx_v_tag,__pyx_v_count); if (unlikely(__pyx_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":326
 *             count = (<object>dict_result) + 1
 *         python.PyDict_SetItem(tags, tag, count)
 *         if count > 0:             # <<<<<<<<<<<<<< 
 *             tag = tag + '[%d]' % count
 *         python.PyList_Append(path, tag)
 */
      __pyx_2 = PyObject_RichCompare(__pyx_v_count, __pyx_num_0, Py_GT); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; goto __pyx_L1;}
      __pyx_5 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      if (__pyx_5) {

        /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":327
 *         python.PyDict_SetItem(tags, tag, count)
 *         if count > 0:
 *             tag = tag + '[%d]' % count             # <<<<<<<<<<<<<< 
 *         python.PyList_Append(path, tag)
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)
 */
        __pyx_3 = PyNumber_Remainder(__pyx_k224p, __pyx_v_count); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; goto __pyx_L1;}
        __pyx_1 = PyNumber_Add(__pyx_v_tag, __pyx_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_v_tag);
        __pyx_v_tag = __pyx_1;
        __pyx_1 = 0;
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":328
 *         if count > 0:
 *             tag = tag + '[%d]' % count
 *         python.PyList_Append(path, tag)             # <<<<<<<<<<<<<< 
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)
 *         del path[-1]
 */
      __pyx_4 = PyList_Append(__pyx_v_path,__pyx_v_tag); if (unlikely(__pyx_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":329
 *             tag = tag + '[%d]' % count
 *         python.PyList_Append(path, tag)
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)             # <<<<<<<<<<<<<< 
 *         del path[-1]
 *         c_child = c_child.next
 */
      __pyx_2 = __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(__pyx_v_c_child,__pyx_v_path,__pyx_v_path_list); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":330
 *         python.PyList_Append(path, tag)
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)
 *         del path[-1]             # <<<<<<<<<<<<<< 
 *         c_child = c_child.next
 */
      __pyx_3 = PyInt_FromLong(-1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; goto __pyx_L1;}
      if (PyObject_DelItem(__pyx_v_path, __pyx_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":331
 *         _recursiveBuildDescendantPaths(c_child, path, path_list)
 *         del path[-1]
 *         c_child = c_child.next             # <<<<<<<<<<<<<< 
 */
      __pyx_v_c_child = __pyx_v_c_child->next;
    }

    __pyx_r = Py_None; Py_INCREF(Py_None);
    goto __pyx_L0;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_3);
    __Pyx_AddTraceback("lxml.objectify._recursiveBuildDescendantPaths");
    __pyx_r = 0;
    __pyx_L0:;
    Py_DECREF(__pyx_v_tags);
    Py_DECREF(__pyx_v_tag);
    Py_DECREF(__pyx_v_count);
    Py_DECREF(__pyx_v_path);
    Py_DECREF(__pyx_v_path_list);
    return __pyx_r;
  }

  static __Pyx_InternTabEntry __pyx_intern_tab[] = {
    {&__pyx_n_AttributeError, "AttributeError"},
    {&__pyx_n_E, "E"},
    {&__pyx_n_ENTITY, "ENTITY"},
    {&__pyx_n_ETXPath, "ETXPath"},
    {&__pyx_n_ElementChildIterator, "ElementChildIterator"},
    {&__pyx_n_False, "False"},
    {&__pyx_n_ID, "ID"},
    {&__pyx_n_IDREF, "IDREF"},
    {&__pyx_n_IndexError, "IndexError"},
    {&__pyx_n_NCName, "NCName"},
    {&__pyx_n_NMTOKEN, "NMTOKEN"},
    {&__pyx_n_Name, "Name"},
    {&__pyx_n_None, "None"},
    {&__pyx_n_NoneType, "NoneType"},
    {&__pyx_n_PYTYPE_ATTRIBUTE, "PYTYPE_ATTRIBUTE"},
    {&__pyx_n_Set, "Set"},
    {&__pyx_n_StopIteration, "StopIteration"},
    {&__pyx_n_TREE, "TREE"},
    {&__pyx_n_True, "True"},
    {&__pyx_n_TypeError, "TypeError"},
    {&__pyx_n_U, "U"},
    {&__pyx_n_ValueError, "ValueError"},
    {&__pyx_n_XML, "XML"},
    {&__pyx_n_XMLParser, "XMLParser"},
    {&__pyx_n___abs__, "__abs__"},
    {&__pyx_n___add__, "__add__"},
    {&__pyx_n___and__, "__and__"},
    {&__pyx_n___builtin__, "__builtin__"},
    {&__pyx_n___call__, "__call__"},
    {&__pyx_n___checkBool, "__checkBool"},
    {&__pyx_n___copy__, "__copy__"},
    {&__pyx_n___dealloc__, "__dealloc__"},
    {&__pyx_n___delattr__, "__delattr__"},
    {&__pyx_n___delitem__, "__delitem__"},
    {&__pyx_n___div__, "__div__"},
    {&__pyx_n___float__, "__float__"},
    {&__pyx_n___getattr__, "__getattr__"},
    {&__pyx_n___getitem__, "__getitem__"},
    {&__pyx_n___init__, "__init__"},
    {&__pyx_n___int__, "__int__"},
    {&__pyx_n___invert__, "__invert__"},
    {&__pyx_n___iter__, "__iter__"},
    {&__pyx_n___len__, "__len__"},
    {&__pyx_n___long__, "__long__"},
    {&__pyx_n___lower_bool, "__lower_bool"},
    {&__pyx_n___lshift__, "__lshift__"},
    {&__pyx_n___mod__, "__mod__"},
    {&__pyx_n___mul__, "__mul__"},
    {&__pyx_n___name__, "__name__"},
    {&__pyx_n___neg__, "__neg__"},
    {&__pyx_n___nonzero__, "__nonzero__"},
    {&__pyx_n___or__, "__or__"},
    {&__pyx_n___pos__, "__pos__"},
    {&__pyx_n___pow__, "__pow__"},
    {&__pyx_n___repr__, "__repr__"},
    {&__pyx_n___richcmp__, "__richcmp__"},
    {&__pyx_n___rshift__, "__rshift__"},
    {&__pyx_n___set__, "__set__"},
    {&__pyx_n___setattr__, "__setattr__"},
    {&__pyx_n___setitem__, "__setitem__"},
    {&__pyx_n___str__, "__str__"},
    {&__pyx_n___sub__, "__sub__"},
    {&__pyx_n___truediv__, "__truediv__"},
    {&__pyx_n___version__, "__version__"},
    {&__pyx_n___xor__, "__xor__"},
    {&__pyx_n__init, "_init"},
    {&__pyx_n__setText, "_setText"},
    {&__pyx_n__setValueParser, "_setValueParser"},
    {&__pyx_n_add, "add"},
    {&__pyx_n_addattr, "addattr"},
    {&__pyx_n_append, "append"},
    {&__pyx_n_attrib, "attrib"},
    {&__pyx_n_bool, "bool"},
    {&__pyx_n_boolean, "boolean"},
    {&__pyx_n_byte, "byte"},
    {&__pyx_n_compile, "compile"},
    {&__pyx_n_constructor, "constructor"},
    {&__pyx_n_copy_reg, "copy_reg"},
    {&__pyx_n_countchildren, "countchildren"},
    {&__pyx_n_descendantpaths, "descendantpaths"},
    {&__pyx_n_double, "double"},
    {&__pyx_n_end, "end"},
    {&__pyx_n_enumerate, "enumerate"},
    {&__pyx_n_etree, "etree"},
    {&__pyx_n_false, "false"},
    {&__pyx_n_find, "find"},
    {&__pyx_n_findall, "findall"},
    {&__pyx_n_findtext, "findtext"},
    {&__pyx_n_float, "float"},
    {&__pyx_n_fromstring, "fromstring"},
    {&__pyx_n_get, "get"},
    {&__pyx_n_getchildren, "getchildren"},
    {&__pyx_n_getparent, "getparent"},
    {&__pyx_n_groups, "groups"},
    {&__pyx_n_hasattr, "hasattr"},
    {&__pyx_n_insert, "insert"},
    {&__pyx_n_int, "int"},
    {&__pyx_n_integer, "integer"},
    {&__pyx_n_islice, "islice"},
    {&__pyx_n_items, "items"},
    {&__pyx_n_iterchildren, "iterchildren"},
    {&__pyx_n_iterfind, "iterfind"},
    {&__pyx_n_itertools, "itertools"},
    {&__pyx_n_itervalues, "itervalues"},
    {&__pyx_n_join, "join"},
    {&__pyx_n_language, "language"},
    {&__pyx_n_long, "long"},
    {&__pyx_n_lower, "lower"},
    {&__pyx_n_lxml, "lxml"},
    {&__pyx_n_makeelement, "makeelement"},
    {&__pyx_n_match, "match"},
    {&__pyx_n_name, "name"},
    {&__pyx_n_negativeInteger, "negativeInteger"},
    {&__pyx_n_next, "next"},
    {&__pyx_n_nonNegativeInteger, "nonNegativeInteger"},
    {&__pyx_n_nonPositiveInteger, "nonPositiveInteger"},
    {&__pyx_n_none, "none"},
    {&__pyx_n_normalizedString, "normalizedString"},
    {&__pyx_n_nsmap, "nsmap"},
    {&__pyx_n_parse, "parse"},
    {&__pyx_n_pickle, "pickle"},
    {&__pyx_n_pickleReduce, "pickleReduce"},
    {&__pyx_n_positiveInteger, "positiveInteger"},
    {&__pyx_n_py, "py"},
    {&__pyx_n_pytype, "pytype"},
    {&__pyx_n_pyval, "pyval"},
    {&__pyx_n_re, "re"},
    {&__pyx_n_register, "register"},
    {&__pyx_n_remove, "remove"},
    {&__pyx_n_remove_blank_text, "remove_blank_text"},
    {&__pyx_n_replace, "replace"},
    {&__pyx_n_set, "set"},
    {&__pyx_n_setElementClassLookup, "setElementClassLookup"},
    {&__pyx_n_setPytypeAttributeTag, "setPytypeAttributeTag"},
    {&__pyx_n_set_default_parser, "set_default_parser"},
    {&__pyx_n_setattr, "setattr"},
    {&__pyx_n_sets, "sets"},
    {&__pyx_n_short, "short"},
    {&__pyx_n_split, "split"},
    {&__pyx_n_str, "str"},
    {&__pyx_n_string, "string"},
    {&__pyx_n_strip, "strip"},
    {&__pyx_n_strlen, "strlen"},
    {&__pyx_n_tag, "tag"},
    {&__pyx_n_tail, "tail"},
    {&__pyx_n_text, "text"},
    {&__pyx_n_token, "token"},
    {&__pyx_n_tostring, "tostring"},
    {&__pyx_n_true, "true"},
    {&__pyx_n_unregister, "unregister"},
    {&__pyx_n_unsignedByte, "unsignedByte"},
    {&__pyx_n_unsignedInt, "unsignedInt"},
    {&__pyx_n_unsignedLong, "unsignedLong"},
    {&__pyx_n_unsignedShort, "unsignedShort"},
    {&__pyx_n_update, "update"},
    {&__pyx_n_value, "value"},
    {&__pyx_n_xmlSchemaTypes, "xmlSchemaTypes"},
    {&__pyx_n_xsd, "xsd"},
    {&__pyx_n_xsi, "xsi"},
    {0, 0}
  };

  static __Pyx_StringTabEntry __pyx_string_tab[] = {
    {&__pyx_k13p, __pyx_k13, sizeof(__pyx_k13), 0},
    {&__pyx_k14p, __pyx_k14, sizeof(__pyx_k14), 0},
    {&__pyx_k15p, __pyx_k15, sizeof(__pyx_k15), 0},
    {&__pyx_k16p, __pyx_k16, sizeof(__pyx_k16), 0},
    {&__pyx_k58p, __pyx_k58, sizeof(__pyx_k58), 0},
    {&__pyx_k59p, __pyx_k59, sizeof(__pyx_k59), 0},
    {&__pyx_k62p, __pyx_k62, sizeof(__pyx_k62), 0},
    {&__pyx_k63p, __pyx_k63, sizeof(__pyx_k63), 0},
    {&__pyx_k67p, __pyx_k67, sizeof(__pyx_k67), 0},
    {&__pyx_k70p, __pyx_k70, sizeof(__pyx_k70), 0},
    {&__pyx_k71p, __pyx_k71, sizeof(__pyx_k71), 0},
    {&__pyx_k72p, __pyx_k72, sizeof(__pyx_k72), 0},
    {&__pyx_k73p, __pyx_k73, sizeof(__pyx_k73), 0},
    {&__pyx_k74p, __pyx_k74, sizeof(__pyx_k74), 0},
    {&__pyx_k75p, __pyx_k75, sizeof(__pyx_k75), 0},
    {&__pyx_k79p, __pyx_k79, sizeof(__pyx_k79), 0},
    {&__pyx_k80p, __pyx_k80, sizeof(__pyx_k80), 0},
    {&__pyx_k82p, __pyx_k82, sizeof(__pyx_k82), 0},
    {&__pyx_k83p, __pyx_k83, sizeof(__pyx_k83), 0},
    {&__pyx_k85p, __pyx_k85, sizeof(__pyx_k85), 0},
    {&__pyx_k92p, __pyx_k92, sizeof(__pyx_k92), 0},
    {&__pyx_k101p, __pyx_k101, sizeof(__pyx_k101), 0},
    {&__pyx_k102p, __pyx_k102, sizeof(__pyx_k102), 0},
    {&__pyx_k103p, __pyx_k103, sizeof(__pyx_k103), 0},
    {&__pyx_k104p, __pyx_k104, sizeof(__pyx_k104), 0},
    {&__pyx_k106p, __pyx_k106, sizeof(__pyx_k106), 0},
    {&__pyx_k107p, __pyx_k107, sizeof(__pyx_k107), 0},
    {&__pyx_k108p, __pyx_k108, sizeof(__pyx_k108), 0},
    {&__pyx_k109p, __pyx_k109, sizeof(__pyx_k109), 0},
    {&__pyx_k110p, __pyx_k110, sizeof(__pyx_k110), 0},
    {&__pyx_k111p, __pyx_k111, sizeof(__pyx_k111), 0},
    {&__pyx_k148p, __pyx_k148, sizeof(__pyx_k148), 0},
    {&__pyx_k149p, __pyx_k149, sizeof(__pyx_k149), 0},
    {&__pyx_k150p, __pyx_k150, sizeof(__pyx_k150), 0},
    {&__pyx_k153p, __pyx_k153, sizeof(__pyx_k153), 0},
    {&__pyx_k154p, __pyx_k154, sizeof(__pyx_k154), 0},
    {&__pyx_k155p, __pyx_k155, sizeof(__pyx_k155), 0},
    {&__pyx_k156p, __pyx_k156, sizeof(__pyx_k156), 0},
    {&__pyx_k157p, __pyx_k157, sizeof(__pyx_k157), 0},
    {&__pyx_k158p, __pyx_k158, sizeof(__pyx_k158), 0},
    {&__pyx_k159p, __pyx_k159, sizeof(__pyx_k159), 0},
    {&__pyx_k160p, __pyx_k160, sizeof(__pyx_k160), 0},
    {&__pyx_k165p, __pyx_k165, sizeof(__pyx_k165), 0},
    {&__pyx_k166p, __pyx_k166, sizeof(__pyx_k166), 0},
    {&__pyx_k172p, __pyx_k172, sizeof(__pyx_k172), 0},
    {&__pyx_k173p, __pyx_k173, sizeof(__pyx_k173), 0},
    {&__pyx_k178p, __pyx_k178, sizeof(__pyx_k178), 0},
    {&__pyx_k179p, __pyx_k179, sizeof(__pyx_k179), 0},
    {&__pyx_k180p, __pyx_k180, sizeof(__pyx_k180), 0},
    {&__pyx_k181p, __pyx_k181, sizeof(__pyx_k181), 0},
    {&__pyx_k190p, __pyx_k190, sizeof(__pyx_k190), 0},
    {&__pyx_k191p, __pyx_k191, sizeof(__pyx_k191), 0},
    {&__pyx_k192p, __pyx_k192, sizeof(__pyx_k192), 0},
    {&__pyx_k193p, __pyx_k193, sizeof(__pyx_k193), 0},
    {&__pyx_k194p, __pyx_k194, sizeof(__pyx_k194), 0},
    {&__pyx_k195p, __pyx_k195, sizeof(__pyx_k195), 0},
    {&__pyx_k196p, __pyx_k196, sizeof(__pyx_k196), 0},
    {&__pyx_k205p, __pyx_k205, sizeof(__pyx_k205), 0},
    {&__pyx_k206p, __pyx_k206, sizeof(__pyx_k206), 0},
    {&__pyx_k207p, __pyx_k207, sizeof(__pyx_k207), 0},
    {&__pyx_k208p, __pyx_k208, sizeof(__pyx_k208), 0},
    {&__pyx_k209p, __pyx_k209, sizeof(__pyx_k209), 0},
    {&__pyx_k210p, __pyx_k210, sizeof(__pyx_k210), 0},
    {&__pyx_k211p, __pyx_k211, sizeof(__pyx_k211), 0},
    {&__pyx_k212p, __pyx_k212, sizeof(__pyx_k212), 0},
    {&__pyx_k213p, __pyx_k213, sizeof(__pyx_k213), 0},
    {&__pyx_k214p, __pyx_k214, sizeof(__pyx_k214), 0},
    {&__pyx_k215p, __pyx_k215, sizeof(__pyx_k215), 0},
    {&__pyx_k216p, __pyx_k216, sizeof(__pyx_k216), 0},
    {&__pyx_k217p, __pyx_k217, sizeof(__pyx_k217), 0},
    {&__pyx_k218p, __pyx_k218, sizeof(__pyx_k218), 0},
    {&__pyx_k219p, __pyx_k219, sizeof(__pyx_k219), 0},
    {&__pyx_k220p, __pyx_k220, sizeof(__pyx_k220), 0},
    {&__pyx_k221p, __pyx_k221, sizeof(__pyx_k221), 0},
    {&__pyx_k222p, __pyx_k222, sizeof(__pyx_k222), 0},
    {&__pyx_k223p, __pyx_k223, sizeof(__pyx_k223), 0},
    {&__pyx_k224p, __pyx_k224, sizeof(__pyx_k224), 0},
    {0, 0, 0, 0}
  };

  static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedElement(PyTypeObject *t, PyObject *a, PyObject *k) {
    PyObject *o = __pyx_ptype_11etreepublic_ElementBase->tp_new(t, a, k);
    if (!o) return 0;
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement(PyObject *o) {
    __pyx_ptype_11etreepublic_ElementBase->tp_dealloc(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement(PyObject *o, visitproc v, void *a) {
    int e;
    e = __pyx_ptype_11etreepublic_ElementBase->tp_traverse(o, v, a); if (e) return e;
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement(PyObject *o) {
    __pyx_ptype_11etreepublic_ElementBase->tp_clear(o);
    return 0;
  }
  static PyObject *__pyx_sq_item_4lxml_9objectify_ObjectifiedElement(PyObject *o, Py_ssize_t i) {
    PyObject *r;
    PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
    r = o->ob_type->tp_as_mapping->mp_subscript(o, x);
    Py_DECREF(x);
    return r;
  }

  static int __pyx_mp_ass_subscript_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *i, PyObject *v) {
    if (v) {
      return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setitem__(o, i, v);
    }
    else {
      return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delitem__(o, i);
    }
  }

  static PyObject *__pyx_tp_getattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n) {
    PyObject *v = PyObject_GenericGetAttr(o, n);
    if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
      PyErr_Clear();
      v = __pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__(o, n);
    }
    return v;
  }

  static int __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n, PyObject *v) {
    if (v) {
      return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setattr__(o, n, v);
    }
    else {
      return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delattr__(o, n);
    }
  }

  static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text(PyObject *o, void *x) {
    return __pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(o);
  }

  static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement___dict__(PyObject *o, void *x) {
    return __pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(o);
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedElement[] = {
    {"__iter__", (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__, METH_NOARGS|METH_COEXIST, __pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__},
    {"__str__", (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__, METH_NOARGS|METH_COEXIST, 0},
    {"countchildren", (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_countchildren, METH_NOARGS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_countchildren},
    {"getchildren", (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_getchildren, METH_NOARGS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_getchildren},
    {"__getattr__", (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__, METH_O|METH_COEXIST, __pyx_doc_4lxml_9objectify_18ObjectifiedElement___getattr__},
    {"addattr", (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_addattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_addattr},
    {"__getitem__", (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__, METH_O|METH_COEXIST, __pyx_doc_4lxml_9objectify_18ObjectifiedElement___getitem__},
    {"iterfind", (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_iterfind, METH_O, 0},
    {"findall", (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findall, METH_O, 0},
    {"find", (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_find, METH_O, 0},
    {"findtext", (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findtext, METH_VARARGS|METH_KEYWORDS, 0},
    {"descendantpaths", (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_descendantpaths, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_descendantpaths},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectifiedElement[] = {
    {"text", __pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text, 0, 0, 0},
    {"__dict__", __pyx_getprop_4lxml_9objectify_18ObjectifiedElement___dict__, 0, __pyx_k1, 0},
    {0, 0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_ObjectifiedElement = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    0, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_ObjectifiedElement = {
    __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    __pyx_sq_item_4lxml_9objectify_ObjectifiedElement, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_ObjectifiedElement = {
    __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__, /*mp_length*/
    __pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__, /*mp_subscript*/
    __pyx_mp_ass_subscript_4lxml_9objectify_ObjectifiedElement, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_ObjectifiedElement = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_ObjectifiedElement = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.ObjectifiedElement", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    0, /*tp_repr*/
    &__pyx_tp_as_number_ObjectifiedElement, /*tp_as_number*/
    &__pyx_tp_as_sequence_ObjectifiedElement, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_ObjectifiedElement, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    __pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__, /*tp_str*/
    __pyx_tp_getattro_4lxml_9objectify_ObjectifiedElement, /*tp_getattro*/
    __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement, /*tp_setattro*/
    &__pyx_tp_as_buffer_ObjectifiedElement, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    "Main XML Element class.\n\n    Element children are accessed as object attributes.  Multiple children\n    with the same name are available through a list index.  Example:\n\n       >>> root = etree.XML(\"<root><c1><c2>0</c2><c2>1</c2></c1></root>\")\n       >>> second_c2 = root.c1.c2[1]\n    ", /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    __pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_ObjectifiedElement, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_4lxml_9objectify_ObjectifiedElement, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    0, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_ObjectifiedElement, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };

  static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(PyTypeObject *t, PyObject *a, PyObject *k) {
    PyObject *o = __pyx_ptype_4lxml_9objectify_ObjectifiedElement->tp_new(t, a, k);
    if (!o) return 0;
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedDataElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_ObjectifiedElement->tp_dealloc(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_ObjectifiedDataElement(PyObject *o, visitproc v, void *a) {
    int e;
    e = __pyx_ptype_4lxml_9objectify_ObjectifiedElement->tp_traverse(o, v, a); if (e) return e;
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_ObjectifiedDataElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_ObjectifiedElement->tp_clear(o);
    return 0;
  }

  static PyObject *__pyx_getprop_4lxml_9objectify_22ObjectifiedDataElement_pyval(PyObject *o, void *x) {
    return __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(o);
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedDataElement[] = {
    {"__str__", (PyCFunction)__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__, METH_NOARGS|METH_COEXIST, 0},
    {"__repr__", (PyCFunction)__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__, METH_NOARGS|METH_COEXIST, 0},
    {"_setText", (PyCFunction)__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement__setText, METH_O, __pyx_doc_4lxml_9objectify_22ObjectifiedDataElement__setText},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectifiedDataElement[] = {
    {"pyval", __pyx_getprop_4lxml_9objectify_22ObjectifiedDataElement_pyval, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_ObjectifiedDataElement = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    0, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_ObjectifiedDataElement = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_ObjectifiedDataElement = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_ObjectifiedDataElement = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_ObjectifiedDataElement = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.ObjectifiedDataElement", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedDataElement, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__, /*tp_repr*/
    &__pyx_tp_as_number_ObjectifiedDataElement, /*tp_as_number*/
    &__pyx_tp_as_sequence_ObjectifiedDataElement, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_ObjectifiedDataElement, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_ObjectifiedDataElement, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    "This is the base class for all data type Elements.  Subclasses should\n    override the \'pyval\' property and possibly the __str__ method.\n    ", /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_ObjectifiedDataElement, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_ObjectifiedDataElement, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_ObjectifiedDataElement, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_4lxml_9objectify_ObjectifiedDataElement, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    0, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };
  static struct __pyx_vtabstruct_4lxml_9objectify_NumberElement __pyx_vtable_4lxml_9objectify_NumberElement;

  static PyObject *__pyx_tp_new_4lxml_9objectify_NumberElement(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_4lxml_9objectify_NumberElement *p;
    PyObject *o = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_new(t, a, k);
    if (!o) return 0;
    p = ((struct __pyx_obj_4lxml_9objectify_NumberElement *)o);
    *(struct __pyx_vtabstruct_4lxml_9objectify_NumberElement **)&p->__pyx_vtab = __pyx_vtabptr_4lxml_9objectify_NumberElement;
    p->_type = Py_None; Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_NumberElement(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
    Py_XDECREF(p->_type);
    __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_dealloc(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_NumberElement(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
    e = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_traverse(o, v, a); if (e) return e;
    if (p->_type) {
      e = (*v)(p->_type, a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_NumberElement(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
    __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_clear(o);
    Py_XDECREF(p->_type);
    p->_type = Py_None; Py_INCREF(Py_None);
    return 0;
  }

  static PyObject *__pyx_getprop_4lxml_9objectify_13NumberElement_pyval(PyObject *o, void *x) {
    return __pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(o);
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_NumberElement[] = {
    {"_setValueParser", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser, METH_O, __pyx_doc_4lxml_9objectify_13NumberElement__setValueParser},
    {"__int__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___int__, METH_NOARGS|METH_COEXIST, 0},
    {"__long__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___long__, METH_NOARGS|METH_COEXIST, 0},
    {"__float__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___float__, METH_NOARGS|METH_COEXIST, 0},
    {"__str__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___str__, METH_NOARGS|METH_COEXIST, 0},
    {"__repr__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___repr__, METH_NOARGS|METH_COEXIST, 0},
    {"__add__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___add__, METH_O|METH_COEXIST, 0},
    {"__sub__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___sub__, METH_O|METH_COEXIST, 0},
    {"__mul__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___mul__, METH_O|METH_COEXIST, 0},
    {"__div__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___div__, METH_O|METH_COEXIST, 0},
    {"__truediv__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___truediv__, METH_O|METH_COEXIST, 0},
    {"__mod__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___mod__, METH_O|METH_COEXIST, 0},
    {"__neg__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___neg__, METH_NOARGS|METH_COEXIST, 0},
    {"__pos__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___pos__, METH_NOARGS|METH_COEXIST, 0},
    {"__abs__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___abs__, METH_NOARGS|METH_COEXIST, 0},
    {"__invert__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___invert__, METH_NOARGS|METH_COEXIST, 0},
    {"__lshift__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___lshift__, METH_O|METH_COEXIST, 0},
    {"__rshift__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___rshift__, METH_O|METH_COEXIST, 0},
    {"__and__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___and__, METH_O|METH_COEXIST, 0},
    {"__or__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___or__, METH_O|METH_COEXIST, 0},
    {"__xor__", (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___xor__, METH_O|METH_COEXIST, 0},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_NumberElement[] = {
    {"pyval", __pyx_getprop_4lxml_9objectify_13NumberElement_pyval, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_NumberElement = {
    __pyx_pf_4lxml_9objectify_13NumberElement___add__, /*nb_add*/
    __pyx_pf_4lxml_9objectify_13NumberElement___sub__, /*nb_subtract*/
    __pyx_pf_4lxml_9objectify_13NumberElement___mul__, /*nb_multiply*/
    __pyx_pf_4lxml_9objectify_13NumberElement___div__, /*nb_divide*/
    __pyx_pf_4lxml_9objectify_13NumberElement___mod__, /*nb_remainder*/
    0, /*nb_divmod*/
    __pyx_pf_4lxml_9objectify_13NumberElement___pow__, /*nb_power*/
    __pyx_pf_4lxml_9objectify_13NumberElement___neg__, /*nb_negative*/
    __pyx_pf_4lxml_9objectify_13NumberElement___pos__, /*nb_positive*/
    __pyx_pf_4lxml_9objectify_13NumberElement___abs__, /*nb_absolute*/
    __pyx_pf_4lxml_9objectify_13NumberElement___nonzero__, /*nb_nonzero*/
    __pyx_pf_4lxml_9objectify_13NumberElement___invert__, /*nb_invert*/
    __pyx_pf_4lxml_9objectify_13NumberElement___lshift__, /*nb_lshift*/
    __pyx_pf_4lxml_9objectify_13NumberElement___rshift__, /*nb_rshift*/
    __pyx_pf_4lxml_9objectify_13NumberElement___and__, /*nb_and*/
    __pyx_pf_4lxml_9objectify_13NumberElement___xor__, /*nb_xor*/
    __pyx_pf_4lxml_9objectify_13NumberElement___or__, /*nb_or*/
    0, /*nb_coerce*/
    __pyx_pf_4lxml_9objectify_13NumberElement___int__, /*nb_int*/
    __pyx_pf_4lxml_9objectify_13NumberElement___long__, /*nb_long*/
    __pyx_pf_4lxml_9objectify_13NumberElement___float__, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    __pyx_pf_4lxml_9objectify_13NumberElement___truediv__, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_NumberElement = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_NumberElement = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_NumberElement = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_NumberElement = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.NumberElement", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_NumberElement), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    __pyx_pf_4lxml_9objectify_13NumberElement___repr__, /*tp_repr*/
    &__pyx_tp_as_number_NumberElement, /*tp_as_number*/
    &__pyx_tp_as_sequence_NumberElement, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_NumberElement, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    __pyx_pf_4lxml_9objectify_13NumberElement___str__, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_NumberElement, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    0, /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
    __pyx_pf_4lxml_9objectify_13NumberElement___richcmp__, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_NumberElement, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_4lxml_9objectify_NumberElement, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    0, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_NumberElement, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };
  static struct __pyx_vtabstruct_4lxml_9objectify_IntElement __pyx_vtable_4lxml_9objectify_IntElement;

  static PyObject *__pyx_tp_new_4lxml_9objectify_IntElement(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_4lxml_9objectify_IntElement *p;
    PyObject *o = __pyx_ptype_4lxml_9objectify_NumberElement->tp_new(t, a, k);
    if (!o) return 0;
    p = ((struct __pyx_obj_4lxml_9objectify_IntElement *)o);
    *(struct __pyx_vtabstruct_4lxml_9objectify_IntElement **)&p->__pyx_base.__pyx_vtab = __pyx_vtabptr_4lxml_9objectify_IntElement;
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_IntElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_NumberElement->tp_dealloc(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_IntElement(PyObject *o, visitproc v, void *a) {
    int e;
    e = __pyx_ptype_4lxml_9objectify_NumberElement->tp_traverse(o, v, a); if (e) return e;
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_IntElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_NumberElement->tp_clear(o);
    return 0;
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_IntElement[] = {
    {"_init", (PyCFunction)__pyx_pf_4lxml_9objectify_10IntElement__init, METH_NOARGS, 0},
    {0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_IntElement = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    0, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_IntElement = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_IntElement = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_IntElement = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_IntElement = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.IntElement", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_IntElement), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_IntElement, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    0, /*tp_repr*/
    &__pyx_tp_as_number_IntElement, /*tp_as_number*/
    &__pyx_tp_as_sequence_IntElement, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_IntElement, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_IntElement, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    0, /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_IntElement, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_IntElement, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_IntElement, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    0, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_IntElement, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };
  static struct __pyx_vtabstruct_4lxml_9objectify_LongElement __pyx_vtable_4lxml_9objectify_LongElement;

  static PyObject *__pyx_tp_new_4lxml_9objectify_LongElement(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_4lxml_9objectify_LongElement *p;
    PyObject *o = __pyx_ptype_4lxml_9objectify_NumberElement->tp_new(t, a, k);
    if (!o) return 0;
    p = ((struct __pyx_obj_4lxml_9objectify_LongElement *)o);
    *(struct __pyx_vtabstruct_4lxml_9objectify_LongElement **)&p->__pyx_base.__pyx_vtab = __pyx_vtabptr_4lxml_9objectify_LongElement;
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_LongElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_NumberElement->tp_dealloc(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_LongElement(PyObject *o, visitproc v, void *a) {
    int e;
    e = __pyx_ptype_4lxml_9objectify_NumberElement->tp_traverse(o, v, a); if (e) return e;
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_LongElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_NumberElement->tp_clear(o);
    return 0;
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_LongElement[] = {
    {"_init", (PyCFunction)__pyx_pf_4lxml_9objectify_11LongElement__init, METH_NOARGS, 0},
    {0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_LongElement = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    0, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_LongElement = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_LongElement = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_LongElement = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_LongElement = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.LongElement", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_LongElement), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_LongElement, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    0, /*tp_repr*/
    &__pyx_tp_as_number_LongElement, /*tp_as_number*/
    &__pyx_tp_as_sequence_LongElement, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_LongElement, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_LongElement, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    0, /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_LongElement, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_LongElement, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_LongElement, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    0, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_LongElement, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };
  static struct __pyx_vtabstruct_4lxml_9objectify_FloatElement __pyx_vtable_4lxml_9objectify_FloatElement;

  static PyObject *__pyx_tp_new_4lxml_9objectify_FloatElement(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_4lxml_9objectify_FloatElement *p;
    PyObject *o = __pyx_ptype_4lxml_9objectify_NumberElement->tp_new(t, a, k);
    if (!o) return 0;
    p = ((struct __pyx_obj_4lxml_9objectify_FloatElement *)o);
    *(struct __pyx_vtabstruct_4lxml_9objectify_FloatElement **)&p->__pyx_base.__pyx_vtab = __pyx_vtabptr_4lxml_9objectify_FloatElement;
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_FloatElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_NumberElement->tp_dealloc(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_FloatElement(PyObject *o, visitproc v, void *a) {
    int e;
    e = __pyx_ptype_4lxml_9objectify_NumberElement->tp_traverse(o, v, a); if (e) return e;
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_FloatElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_NumberElement->tp_clear(o);
    return 0;
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_FloatElement[] = {
    {"_init", (PyCFunction)__pyx_pf_4lxml_9objectify_12FloatElement__init, METH_NOARGS, 0},
    {0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_FloatElement = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    0, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_FloatElement = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_FloatElement = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_FloatElement = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_FloatElement = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.FloatElement", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_FloatElement), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_FloatElement, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    0, /*tp_repr*/
    &__pyx_tp_as_number_FloatElement, /*tp_as_number*/
    &__pyx_tp_as_sequence_FloatElement, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_FloatElement, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_FloatElement, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    0, /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_FloatElement, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_FloatElement, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_FloatElement, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    0, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_FloatElement, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };

  static PyObject *__pyx_tp_new_4lxml_9objectify_StringElement(PyTypeObject *t, PyObject *a, PyObject *k) {
    PyObject *o = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_new(t, a, k);
    if (!o) return 0;
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_StringElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_dealloc(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_StringElement(PyObject *o, visitproc v, void *a) {
    int e;
    e = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_traverse(o, v, a); if (e) return e;
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_StringElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_clear(o);
    return 0;
  }

  static PyObject *__pyx_getprop_4lxml_9objectify_13StringElement_pyval(PyObject *o, void *x) {
    return __pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(o);
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_StringElement[] = {
    {"__repr__", (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___repr__, METH_NOARGS|METH_COEXIST, 0},
    {"strlen", (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement_strlen, METH_NOARGS, 0},
    {"__add__", (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___add__, METH_O|METH_COEXIST, 0},
    {"__mul__", (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___mul__, METH_O|METH_COEXIST, 0},
    {"__mod__", (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___mod__, METH_O|METH_COEXIST, 0},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_StringElement[] = {
    {"pyval", __pyx_getprop_4lxml_9objectify_13StringElement_pyval, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_StringElement = {
    __pyx_pf_4lxml_9objectify_13StringElement___add__, /*nb_add*/
    0, /*nb_subtract*/
    __pyx_pf_4lxml_9objectify_13StringElement___mul__, /*nb_multiply*/
    0, /*nb_divide*/
    __pyx_pf_4lxml_9objectify_13StringElement___mod__, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    __pyx_pf_4lxml_9objectify_13StringElement___nonzero__, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_StringElement = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_StringElement = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_StringElement = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_StringElement = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.StringElement", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_StringElement), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_StringElement, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    __pyx_pf_4lxml_9objectify_13StringElement___repr__, /*tp_repr*/
    &__pyx_tp_as_number_StringElement, /*tp_as_number*/
    &__pyx_tp_as_sequence_StringElement, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_StringElement, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_StringElement, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    "String data class.\n\n    Note that this class does *not* support the sequence protocol of strings:\n    len(), iter(), str_attr[0], str_attr[0:1], etc. are *not* supported.\n    Instead, use the .text attribute to get a \'real\' string.\n    ", /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_StringElement, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_StringElement, /*tp_clear*/
    __pyx_pf_4lxml_9objectify_13StringElement___richcmp__, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_StringElement, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_4lxml_9objectify_StringElement, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    0, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_StringElement, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };

  static PyObject *__pyx_tp_new_4lxml_9objectify_NoneElement(PyTypeObject *t, PyObject *a, PyObject *k) {
    PyObject *o = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_new(t, a, k);
    if (!o) return 0;
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_NoneElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_dealloc(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_NoneElement(PyObject *o, visitproc v, void *a) {
    int e;
    e = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_traverse(o, v, a); if (e) return e;
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_NoneElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_clear(o);
    return 0;
  }

  static PyObject *__pyx_getprop_4lxml_9objectify_11NoneElement_pyval(PyObject *o, void *x) {
    return __pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(o);
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_NoneElement[] = {
    {"__str__", (PyCFunction)__pyx_pf_4lxml_9objectify_11NoneElement___str__, METH_NOARGS|METH_COEXIST, 0},
    {"__repr__", (PyCFunction)__pyx_pf_4lxml_9objectify_11NoneElement___repr__, METH_NOARGS|METH_COEXIST, 0},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_NoneElement[] = {
    {"pyval", __pyx_getprop_4lxml_9objectify_11NoneElement_pyval, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_NoneElement = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    __pyx_pf_4lxml_9objectify_11NoneElement___nonzero__, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_NoneElement = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_NoneElement = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_NoneElement = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_NoneElement = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.NoneElement", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_NoneElement), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_NoneElement, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    __pyx_pf_4lxml_9objectify_11NoneElement___repr__, /*tp_repr*/
    &__pyx_tp_as_number_NoneElement, /*tp_as_number*/
    &__pyx_tp_as_sequence_NoneElement, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_NoneElement, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    __pyx_pf_4lxml_9objectify_11NoneElement___str__, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_NoneElement, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    0, /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_NoneElement, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_NoneElement, /*tp_clear*/
    __pyx_pf_4lxml_9objectify_11NoneElement___richcmp__, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_NoneElement, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_4lxml_9objectify_NoneElement, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    0, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_NoneElement, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };
  static struct __pyx_vtabstruct_4lxml_9objectify_BoolElement __pyx_vtable_4lxml_9objectify_BoolElement;

  static PyObject *__pyx_tp_new_4lxml_9objectify_BoolElement(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_4lxml_9objectify_BoolElement *p;
    PyObject *o = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_new(t, a, k);
    if (!o) return 0;
    p = ((struct __pyx_obj_4lxml_9objectify_BoolElement *)o);
    *(struct __pyx_vtabstruct_4lxml_9objectify_BoolElement **)&p->__pyx_vtab = __pyx_vtabptr_4lxml_9objectify_BoolElement;
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_BoolElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_dealloc(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_BoolElement(PyObject *o, visitproc v, void *a) {
    int e;
    e = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_traverse(o, v, a); if (e) return e;
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_BoolElement(PyObject *o) {
    __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_clear(o);
    return 0;
  }

  static PyObject *__pyx_getprop_4lxml_9objectify_11BoolElement_pyval(PyObject *o, void *x) {
    return __pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(o);
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_BoolElement[] = {
    {"__str__", (PyCFunction)__pyx_pf_4lxml_9objectify_11BoolElement___str__, METH_NOARGS|METH_COEXIST, 0},
    {"__repr__", (PyCFunction)__pyx_pf_4lxml_9objectify_11BoolElement___repr__, METH_NOARGS|METH_COEXIST, 0},
    {0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_BoolElement[] = {
    {"pyval", __pyx_getprop_4lxml_9objectify_11BoolElement_pyval, 0, 0, 0},
    {0, 0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_BoolElement = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    __pyx_pf_4lxml_9objectify_11BoolElement___nonzero__, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_BoolElement = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_BoolElement = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_BoolElement = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_BoolElement = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.BoolElement", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_BoolElement), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_BoolElement, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    __pyx_pf_4lxml_9objectify_11BoolElement___repr__, /*tp_repr*/
    &__pyx_tp_as_number_BoolElement, /*tp_as_number*/
    &__pyx_tp_as_sequence_BoolElement, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_BoolElement, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    __pyx_pf_4lxml_9objectify_11BoolElement___str__, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_BoolElement, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    "Boolean type base on string values: \'true\' or \'false\'.\n    ", /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_BoolElement, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_BoolElement, /*tp_clear*/
    __pyx_pf_4lxml_9objectify_11BoolElement___richcmp__, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_BoolElement, /*tp_methods*/
    0, /*tp_members*/
    __pyx_getsets_4lxml_9objectify_BoolElement, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    0, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_BoolElement, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };

  static PyObject *__pyx_tp_new_4lxml_9objectify_PyType(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_4lxml_9objectify_PyType *p;
    PyObject *o = (*t->tp_alloc)(t, 0);
    if (!o) return 0;
    p = ((struct __pyx_obj_4lxml_9objectify_PyType *)o);
    p->name = Py_None; Py_INCREF(Py_None);
    p->type_check = Py_None; Py_INCREF(Py_None);
    p->_add_text = Py_None; Py_INCREF(Py_None);
    p->_type = Py_None; Py_INCREF(Py_None);
    p->_schema_types = Py_None; Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_PyType(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
    Py_XDECREF(p->name);
    Py_XDECREF(p->type_check);
    Py_XDECREF(p->_add_text);
    Py_XDECREF(p->_type);
    Py_XDECREF(p->_schema_types);
    (*o->ob_type->tp_free)(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_PyType(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
    if (p->name) {
      e = (*v)(p->name, a); if (e) return e;
    }
    if (p->type_check) {
      e = (*v)(p->type_check, a); if (e) return e;
    }
    if (p->_add_text) {
      e = (*v)(p->_add_text, a); if (e) return e;
    }
    if (p->_type) {
      e = (*v)(p->_type, a); if (e) return e;
    }
    if (p->_schema_types) {
      e = (*v)(p->_schema_types, a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_PyType(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
    Py_XDECREF(p->name);
    p->name = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(p->type_check);
    p->type_check = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(p->_add_text);
    p->_add_text = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(p->_type);
    p->_type = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(p->_schema_types);
    p->_schema_types = Py_None; Py_INCREF(Py_None);
    return 0;
  }

  static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, void *x) {
    return __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(o);
  }

  static int __pyx_setprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, PyObject *v, void *x) {
    if (v) {
      return __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___set__(o, v);
    }
    else {
      PyErr_SetString(PyExc_NotImplementedError, "__del__");
      return -1;
    }
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_PyType[] = {
    {"__repr__", (PyCFunction)__pyx_pf_4lxml_9objectify_6PyType___repr__, METH_NOARGS|METH_COEXIST, 0},
    {"register", (PyCFunction)__pyx_pf_4lxml_9objectify_6PyType_register, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_6PyType_register},
    {"unregister", (PyCFunction)__pyx_pf_4lxml_9objectify_6PyType_unregister, METH_NOARGS, 0},
    {0, 0, 0, 0}
  };

  static struct PyMemberDef __pyx_members_4lxml_9objectify_PyType[] = {
    {"name", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_PyType, name), READONLY, 0},
    {"type_check", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_PyType, type_check), READONLY, 0},
    {0, 0, 0, 0, 0}
  };

  static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_PyType[] = {
    {"xmlSchemaTypes", __pyx_getprop_4lxml_9objectify_6PyType_xmlSchemaTypes, __pyx_setprop_4lxml_9objectify_6PyType_xmlSchemaTypes, __pyx_k2, 0},
    {0, 0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_PyType = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    0, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_PyType = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_PyType = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_PyType = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_PyType = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.PyType", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_PyType), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_PyType, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    __pyx_pf_4lxml_9objectify_6PyType___repr__, /*tp_repr*/
    &__pyx_tp_as_number_PyType, /*tp_as_number*/
    &__pyx_tp_as_sequence_PyType, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_PyType, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_PyType, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    "User defined type.\n\n    Named type that contains a type check function and a type class that\n    inherits from ObjectifiedDataElement.  The type check must take a string\n    as argument and raise ValueError or TypeError if it cannot handle the\n    string value.  It may be None in which case it is not considered for type\n    guessing.\n\n    Example::\n        PyType(\'int\', int, MyIntClass).register()\n\n    Note that the order in which types are registered matters.  The first\n    matching type will be used.\n    ", /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_PyType, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_PyType, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_PyType, /*tp_methods*/
    __pyx_members_4lxml_9objectify_PyType, /*tp_members*/
    __pyx_getsets_4lxml_9objectify_PyType, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    __pyx_pf_4lxml_9objectify_6PyType___init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_PyType, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };

  static PyObject *__pyx_tp_new_4lxml_9objectify__StringValueSetter(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_4lxml_9objectify__StringValueSetter *p;
    PyObject *o = (*t->tp_alloc)(t, 0);
    if (!o) return 0;
    p = ((struct __pyx_obj_4lxml_9objectify__StringValueSetter *)o);
    p->_stringify = Py_None; Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify__StringValueSetter(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify__StringValueSetter *p = (struct __pyx_obj_4lxml_9objectify__StringValueSetter *)o;
    Py_XDECREF(p->_stringify);
    (*o->ob_type->tp_free)(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify__StringValueSetter(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_4lxml_9objectify__StringValueSetter *p = (struct __pyx_obj_4lxml_9objectify__StringValueSetter *)o;
    if (p->_stringify) {
      e = (*v)(p->_stringify, a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify__StringValueSetter(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify__StringValueSetter *p = (struct __pyx_obj_4lxml_9objectify__StringValueSetter *)o;
    Py_XDECREF(p->_stringify);
    p->_stringify = Py_None; Py_INCREF(Py_None);
    return 0;
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify__StringValueSetter[] = {
    {"__call__", (PyCFunction)__pyx_pf_4lxml_9objectify_18_StringValueSetter___call__, METH_VARARGS|METH_KEYWORDS|METH_COEXIST, 0},
    {0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number__StringValueSetter = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    0, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence__StringValueSetter = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping__StringValueSetter = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer__StringValueSetter = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify__StringValueSetter = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify._StringValueSetter", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify__StringValueSetter), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify__StringValueSetter, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    0, /*tp_repr*/
    &__pyx_tp_as_number__StringValueSetter, /*tp_as_number*/
    &__pyx_tp_as_sequence__StringValueSetter, /*tp_as_sequence*/
    &__pyx_tp_as_mapping__StringValueSetter, /*tp_as_mapping*/
    0, /*tp_hash*/
    __pyx_pf_4lxml_9objectify_18_StringValueSetter___call__, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer__StringValueSetter, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    0, /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify__StringValueSetter, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify__StringValueSetter, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify__StringValueSetter, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    __pyx_pf_4lxml_9objectify_18_StringValueSetter___init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify__StringValueSetter, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };

  static PyObject *__pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p;
    PyObject *o = (*t->tp_alloc)(t, 0);
    if (!o) return 0;
    p = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o);
    p->_tag = Py_None; Py_INCREF(Py_None);
    p->_nsmap = Py_None; Py_INCREF(Py_None);
    p->_element_factory = Py_None; Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
    Py_XDECREF(p->_tag);
    Py_XDECREF(p->_nsmap);
    Py_XDECREF(p->_element_factory);
    (*o->ob_type->tp_free)(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
    if (p->_tag) {
      e = (*v)(p->_tag, a); if (e) return e;
    }
    if (p->_nsmap) {
      e = (*v)(p->_nsmap, a); if (e) return e;
    }
    if (p->_element_factory) {
      e = (*v)(p->_element_factory, a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
    Py_XDECREF(p->_tag);
    p->_tag = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(p->_nsmap);
    p->_nsmap = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(p->_element_factory);
    p->_element_factory = Py_None; Py_INCREF(Py_None);
    return 0;
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller[] = {
    {"__call__", (PyCFunction)__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__, METH_VARARGS|METH_KEYWORDS|METH_COEXIST, 0},
    {0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number__ObjectifyElementMakerCaller = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    0, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence__ObjectifyElementMakerCaller = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping__ObjectifyElementMakerCaller = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer__ObjectifyElementMakerCaller = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify._ObjectifyElementMakerCaller", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    0, /*tp_repr*/
    &__pyx_tp_as_number__ObjectifyElementMakerCaller, /*tp_as_number*/
    &__pyx_tp_as_sequence__ObjectifyElementMakerCaller, /*tp_as_sequence*/
    &__pyx_tp_as_mapping__ObjectifyElementMakerCaller, /*tp_as_mapping*/
    0, /*tp_hash*/
    __pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer__ObjectifyElementMakerCaller, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    0, /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    0, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };

  static PyObject *__pyx_tp_new_4lxml_9objectify_ElementMaker(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_4lxml_9objectify_ElementMaker *p;
    PyObject *o = (*t->tp_alloc)(t, 0);
    if (!o) return 0;
    p = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)o);
    p->_makeelement = Py_None; Py_INCREF(Py_None);
    p->_namespace = Py_None; Py_INCREF(Py_None);
    p->_nsmap = Py_None; Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_ElementMaker(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
    Py_XDECREF(p->_makeelement);
    Py_XDECREF(p->_namespace);
    Py_XDECREF(p->_nsmap);
    (*o->ob_type->tp_free)(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_ElementMaker(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
    if (p->_makeelement) {
      e = (*v)(p->_makeelement, a); if (e) return e;
    }
    if (p->_namespace) {
      e = (*v)(p->_namespace, a); if (e) return e;
    }
    if (p->_nsmap) {
      e = (*v)(p->_nsmap, a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_ElementMaker(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
    Py_XDECREF(p->_makeelement);
    p->_makeelement = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(p->_namespace);
    p->_namespace = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(p->_nsmap);
    p->_nsmap = Py_None; Py_INCREF(Py_None);
    return 0;
  }

  static PyObject *__pyx_tp_getattro_4lxml_9objectify_ElementMaker(PyObject *o, PyObject *n) {
    PyObject *v = PyObject_GenericGetAttr(o, n);
    if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
      PyErr_Clear();
      v = __pyx_pf_4lxml_9objectify_12ElementMaker___getattr__(o, n);
    }
    return v;
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_ElementMaker[] = {
    {"__getattr__", (PyCFunction)__pyx_pf_4lxml_9objectify_12ElementMaker___getattr__, METH_O|METH_COEXIST, 0},
    {0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_ElementMaker = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    0, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_ElementMaker = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_ElementMaker = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_ElementMaker = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_ElementMaker = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.ElementMaker", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_ElementMaker), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_ElementMaker, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    0, /*tp_repr*/
    &__pyx_tp_as_number_ElementMaker, /*tp_as_number*/
    &__pyx_tp_as_sequence_ElementMaker, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_ElementMaker, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    __pyx_tp_getattro_4lxml_9objectify_ElementMaker, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_ElementMaker, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    0, /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_ElementMaker, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_ElementMaker, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_ElementMaker, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    __pyx_pf_4lxml_9objectify_12ElementMaker___init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_ElementMaker, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };

  static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p;
    PyObject *o = __pyx_ptype_11etreepublic_ElementClassLookup->tp_new(t, a, k);
    if (!o) return 0;
    p = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o);
    p->empty_data_class = Py_None; Py_INCREF(Py_None);
    p->tree_class = Py_None; Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
    Py_XDECREF(p->empty_data_class);
    Py_XDECREF(p->tree_class);
    __pyx_ptype_11etreepublic_ElementClassLookup->tp_dealloc(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
    e = __pyx_ptype_11etreepublic_ElementClassLookup->tp_traverse(o, v, a); if (e) return e;
    if (p->empty_data_class) {
      e = (*v)(p->empty_data_class, a); if (e) return e;
    }
    if (p->tree_class) {
      e = (*v)(p->tree_class, a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
    __pyx_ptype_11etreepublic_ElementClassLookup->tp_clear(o);
    Py_XDECREF(p->empty_data_class);
    p->empty_data_class = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(p->tree_class);
    p->tree_class = Py_None; Py_INCREF(Py_None);
    return 0;
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifyElementClassLookup[] = {
    {0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_ObjectifyElementClassLookup = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    0, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_ObjectifyElementClassLookup = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_ObjectifyElementClassLookup = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_ObjectifyElementClassLookup = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.ObjectifyElementClassLookup", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    0, /*tp_repr*/
    &__pyx_tp_as_number_ObjectifyElementClassLookup, /*tp_as_number*/
    &__pyx_tp_as_sequence_ObjectifyElementClassLookup, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_ObjectifyElementClassLookup, /*tp_as_mapping*/
    0, /*tp_hash*/
    0, /*tp_call*/
    0, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_ObjectifyElementClassLookup, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    "Element class lookup method that uses the objectify classes.\n    ", /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_methods*/
    0, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };

  static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectPath(PyTypeObject *t, PyObject *a, PyObject *k) {
    struct __pyx_obj_4lxml_9objectify_ObjectPath *p;
    PyObject *o = (*t->tp_alloc)(t, 0);
    if (!o) return 0;
    p = ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)o);
    p->find = Py_None; Py_INCREF(Py_None);
    p->_path = Py_None; Py_INCREF(Py_None);
    p->_path_str = Py_None; Py_INCREF(Py_None);
    return o;
  }

  static void __pyx_tp_dealloc_4lxml_9objectify_ObjectPath(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
    {
      PyObject *etype, *eval, *etb;
      PyErr_Fetch(&etype, &eval, &etb);
      ++o->ob_refcnt;
      __pyx_pf_4lxml_9objectify_10ObjectPath___dealloc__(o);
      if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
      --o->ob_refcnt;
      PyErr_Restore(etype, eval, etb);
    }
    Py_XDECREF(p->find);
    Py_XDECREF(p->_path);
    Py_XDECREF(p->_path_str);
    (*o->ob_type->tp_free)(o);
  }

  static int __pyx_tp_traverse_4lxml_9objectify_ObjectPath(PyObject *o, visitproc v, void *a) {
    int e;
    struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
    if (p->find) {
      e = (*v)(p->find, a); if (e) return e;
    }
    if (p->_path) {
      e = (*v)(p->_path, a); if (e) return e;
    }
    if (p->_path_str) {
      e = (*v)(p->_path_str, a); if (e) return e;
    }
    return 0;
  }

  static int __pyx_tp_clear_4lxml_9objectify_ObjectPath(PyObject *o) {
    struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
    Py_XDECREF(p->find);
    p->find = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(p->_path);
    p->_path = Py_None; Py_INCREF(Py_None);
    Py_XDECREF(p->_path_str);
    p->_path_str = Py_None; Py_INCREF(Py_None);
    return 0;
  }

  static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectPath[] = {
    {"__str__", (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath___str__, METH_NOARGS|METH_COEXIST, 0},
    {"__call__", (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath___call__, METH_VARARGS|METH_KEYWORDS|METH_COEXIST, __pyx_doc_4lxml_9objectify_10ObjectPath___call__},
    {"hasattr", (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath_hasattr, METH_O, 0},
    {"setattr", (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath_setattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_10ObjectPath_setattr},
    {"addattr", (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath_addattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_10ObjectPath_addattr},
    {0, 0, 0, 0}
  };

  static struct PyMemberDef __pyx_members_4lxml_9objectify_ObjectPath[] = {
    {"find", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_ObjectPath, find), READONLY, 0},
    {0, 0, 0, 0, 0}
  };

  static PyNumberMethods __pyx_tp_as_number_ObjectPath = {
    0, /*nb_add*/
    0, /*nb_subtract*/
    0, /*nb_multiply*/
    0, /*nb_divide*/
    0, /*nb_remainder*/
    0, /*nb_divmod*/
    0, /*nb_power*/
    0, /*nb_negative*/
    0, /*nb_positive*/
    0, /*nb_absolute*/
    0, /*nb_nonzero*/
    0, /*nb_invert*/
    0, /*nb_lshift*/
    0, /*nb_rshift*/
    0, /*nb_and*/
    0, /*nb_xor*/
    0, /*nb_or*/
    0, /*nb_coerce*/
    0, /*nb_int*/
    0, /*nb_long*/
    0, /*nb_float*/
    0, /*nb_oct*/
    0, /*nb_hex*/
    0, /*nb_inplace_add*/
    0, /*nb_inplace_subtract*/
    0, /*nb_inplace_multiply*/
    0, /*nb_inplace_divide*/
    0, /*nb_inplace_remainder*/
    0, /*nb_inplace_power*/
    0, /*nb_inplace_lshift*/
    0, /*nb_inplace_rshift*/
    0, /*nb_inplace_and*/
    0, /*nb_inplace_xor*/
    0, /*nb_inplace_or*/
    0, /*nb_floor_divide*/
    0, /*nb_true_divide*/
    0, /*nb_inplace_floor_divide*/
    0, /*nb_inplace_true_divide*/
    #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
    0, /*nb_index*/
    #endif
  };

  static PySequenceMethods __pyx_tp_as_sequence_ObjectPath = {
    0, /*sq_length*/
    0, /*sq_concat*/
    0, /*sq_repeat*/
    0, /*sq_item*/
    0, /*sq_slice*/
    0, /*sq_ass_item*/
    0, /*sq_ass_slice*/
    0, /*sq_contains*/
    0, /*sq_inplace_concat*/
    0, /*sq_inplace_repeat*/
  };

  static PyMappingMethods __pyx_tp_as_mapping_ObjectPath = {
    0, /*mp_length*/
    0, /*mp_subscript*/
    0, /*mp_ass_subscript*/
  };

  static PyBufferProcs __pyx_tp_as_buffer_ObjectPath = {
    0, /*bf_getreadbuffer*/
    0, /*bf_getwritebuffer*/
    0, /*bf_getsegcount*/
    0, /*bf_getcharbuffer*/
  };

  PyTypeObject __pyx_type_4lxml_9objectify_ObjectPath = {
    PyObject_HEAD_INIT(0)
    0, /*ob_size*/
    "lxml.objectify.ObjectPath", /*tp_name*/
    sizeof(struct __pyx_obj_4lxml_9objectify_ObjectPath), /*tp_basicsize*/
    0, /*tp_itemsize*/
    __pyx_tp_dealloc_4lxml_9objectify_ObjectPath, /*tp_dealloc*/
    0, /*tp_print*/
    0, /*tp_getattr*/
    0, /*tp_setattr*/
    0, /*tp_compare*/
    0, /*tp_repr*/
    &__pyx_tp_as_number_ObjectPath, /*tp_as_number*/
    &__pyx_tp_as_sequence_ObjectPath, /*tp_as_sequence*/
    &__pyx_tp_as_mapping_ObjectPath, /*tp_as_mapping*/
    0, /*tp_hash*/
    __pyx_pf_4lxml_9objectify_10ObjectPath___call__, /*tp_call*/
    __pyx_pf_4lxml_9objectify_10ObjectPath___str__, /*tp_str*/
    0, /*tp_getattro*/
    0, /*tp_setattro*/
    &__pyx_tp_as_buffer_ObjectPath, /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
    "Immutable object that represents a compiled object path.\n\n    Example for a path: \'root.child[1].{other}child[25]\'\n    ", /*tp_doc*/
    __pyx_tp_traverse_4lxml_9objectify_ObjectPath, /*tp_traverse*/
    __pyx_tp_clear_4lxml_9objectify_ObjectPath, /*tp_clear*/
    0, /*tp_richcompare*/
    0, /*tp_weaklistoffset*/
    0, /*tp_iter*/
    0, /*tp_iternext*/
    __pyx_methods_4lxml_9objectify_ObjectPath, /*tp_methods*/
    __pyx_members_4lxml_9objectify_ObjectPath, /*tp_members*/
    0, /*tp_getset*/
    0, /*tp_base*/
    0, /*tp_dict*/
    0, /*tp_descr_get*/
    0, /*tp_descr_set*/
    0, /*tp_dictoffset*/
    __pyx_pf_4lxml_9objectify_10ObjectPath___init__, /*tp_init*/
    0, /*tp_alloc*/
    __pyx_tp_new_4lxml_9objectify_ObjectPath, /*tp_new*/
    0, /*tp_free*/
    0, /*tp_is_gc*/
    0, /*tp_bases*/
    0, /*tp_mro*/
    0, /*tp_cache*/
    0, /*tp_subclasses*/
    0, /*tp_weaklist*/
  };

  static struct PyMethodDef __pyx_methods[] = {
    {"setPytypeAttributeTag", (PyCFunction)__pyx_pf_4lxml_9objectify_setPytypeAttributeTag, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_setPytypeAttributeTag},
    {"__checkBool", (PyCFunction)__pyx_pf_4lxml_9objectify___checkBool, METH_O, 0},
    {"__lower_bool", (PyCFunction)__pyx_pf_4lxml_9objectify___lower_bool, METH_O, 0},
    {"pytypename", (PyCFunction)__pyx_pf_4lxml_9objectify_pytypename, METH_O, __pyx_doc_4lxml_9objectify_pytypename},
    {"getRegisteredTypes", (PyCFunction)__pyx_pf_4lxml_9objectify_getRegisteredTypes, METH_NOARGS, __pyx_doc_4lxml_9objectify_getRegisteredTypes},
    {"enableRecursiveStr", (PyCFunction)__pyx_pf_4lxml_9objectify_enableRecursiveStr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_enableRecursiveStr},
    {"dump", (PyCFunction)__pyx_pf_4lxml_9objectify_dump, METH_O, __pyx_doc_4lxml_9objectify_dump},
    {"pickleReduce", (PyCFunction)__pyx_pf_4lxml_9objectify_pickleReduce, METH_O, 0},
    {"pyannotate", (PyCFunction)__pyx_pf_4lxml_9objectify_pyannotate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_pyannotate},
    {"xsiannotate", (PyCFunction)__pyx_pf_4lxml_9objectify_xsiannotate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_xsiannotate},
    {"annotate", (PyCFunction)__pyx_pf_4lxml_9objectify_annotate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_annotate},
    {"deannotate", (PyCFunction)__pyx_pf_4lxml_9objectify_deannotate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_deannotate},
    {"setDefaultParser", (PyCFunction)__pyx_pf_4lxml_9objectify_setDefaultParser, METH_VARARGS|METH_KEYWORDS, 0},
    {"set_default_parser", (PyCFunction)__pyx_pf_4lxml_9objectify_set_default_parser, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_set_default_parser},
    {"fromstring", (PyCFunction)__pyx_pf_4lxml_9objectify_fromstring, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_fromstring},
    {"parse", (PyCFunction)__pyx_pf_4lxml_9objectify_parse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_parse},
    {"Element", (PyCFunction)__pyx_pf_4lxml_9objectify_Element, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_Element},
    {"DataElement", (PyCFunction)__pyx_pf_4lxml_9objectify_DataElement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_DataElement},
    {0, 0, 0, 0}
  };

  static void __pyx_init_filenames(void); /*proto*/

  PyMODINIT_FUNC initobjectify(void); /*proto*/
  PyMODINIT_FUNC initobjectify(void) {
    PyObject *__pyx_1 = 0;
    PyObject *__pyx_2 = 0;
    int __pyx_3;
    PyObject *__pyx_4 = 0;
    PyObject *__pyx_5 = 0;
    PyObject *__pyx_6 = 0;
    /*--- Libary function declarations ---*/
    __pyx_init_filenames();
    /*--- Module creation code ---*/
    __pyx_m = Py_InitModule4("objectify", __pyx_methods, 0, 0, PYTHON_API_VERSION);
    if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
    __pyx_b = PyImport_AddModule("__builtin__");
    if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
    if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
    /*--- Intern code ---*/
    __pyx_num_0 = PyInt_FromLong(0); if (unlikely(!__pyx_num_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
    __pyx_num_1 = PyInt_FromLong(1); if (unlikely(!__pyx_num_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
    __pyx_num_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_num_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
    if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
    /*--- String init code ---*/
    if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
    /*--- Builtin init code ---*/
    __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
    __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
    __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
    __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
    __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L1;}
    __pyx_builtin_bool = __Pyx_GetName(__pyx_b, __pyx_n_bool); if (!__pyx_builtin_bool) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;}
    __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}
    /*--- Global init code ---*/
    __pyx_v_4lxml_9objectify_etree = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_re = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify___builtin__ = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_set = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_islice = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify__PYTYPE_DICT = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify__TYPE_CHECKS = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_TREE_PYTYPE = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify___DEFAULT_PARSER = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify_objectify_parser = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify__fromstring = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify__parse = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = Py_None; Py_INCREF(Py_None);
    __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = Py_None; Py_INCREF(Py_None);
    /*--- Function export code ---*/
    /*--- Function import code ---*/
    /*--- Type init code ---*/
    __pyx_ptype_11etreepublic_ElementBase = __Pyx_ImportType("lxml.etree", "ElementBase", sizeof(struct LxmlElementBase)); if (unlikely(!__pyx_ptype_11etreepublic_ElementBase)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}
    __pyx_type_4lxml_9objectify_ObjectifiedElement.tp_base = __pyx_ptype_11etreepublic_ElementBase;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "ObjectifiedElement", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_ObjectifiedElement = &__pyx_type_4lxml_9objectify_ObjectifiedElement;
    __pyx_type_4lxml_9objectify_ObjectifiedDataElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedElement;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedDataElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "ObjectifiedDataElement", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedDataElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement = &__pyx_type_4lxml_9objectify_ObjectifiedDataElement;
    __pyx_vtabptr_4lxml_9objectify_NumberElement = &__pyx_vtable_4lxml_9objectify_NumberElement;
    *(void(**)(void))&__pyx_vtable_4lxml_9objectify_NumberElement._value = (void(*)(void))__pyx_f_4lxml_9objectify_13NumberElement__value;
    __pyx_type_4lxml_9objectify_NumberElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
    __pyx_type_4lxml_9objectify_NumberElement.tp_free = _PyObject_GC_Del;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_NumberElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; goto __pyx_L1;}
    if (__Pyx_SetVtable(__pyx_type_4lxml_9objectify_NumberElement.tp_dict, __pyx_vtabptr_4lxml_9objectify_NumberElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "NumberElement", (PyObject *)&__pyx_type_4lxml_9objectify_NumberElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_NumberElement = &__pyx_type_4lxml_9objectify_NumberElement;
    __pyx_vtabptr_4lxml_9objectify_IntElement = &__pyx_vtable_4lxml_9objectify_IntElement;
    __pyx_vtable_4lxml_9objectify_IntElement.__pyx_base = *__pyx_vtabptr_4lxml_9objectify_NumberElement;
    __pyx_type_4lxml_9objectify_IntElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_IntElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; goto __pyx_L1;}
    if (__Pyx_SetVtable(__pyx_type_4lxml_9objectify_IntElement.tp_dict, __pyx_vtabptr_4lxml_9objectify_IntElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "IntElement", (PyObject *)&__pyx_type_4lxml_9objectify_IntElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_IntElement = &__pyx_type_4lxml_9objectify_IntElement;
    __pyx_vtabptr_4lxml_9objectify_LongElement = &__pyx_vtable_4lxml_9objectify_LongElement;
    __pyx_vtable_4lxml_9objectify_LongElement.__pyx_base = *__pyx_vtabptr_4lxml_9objectify_NumberElement;
    __pyx_type_4lxml_9objectify_LongElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_LongElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; goto __pyx_L1;}
    if (__Pyx_SetVtable(__pyx_type_4lxml_9objectify_LongElement.tp_dict, __pyx_vtabptr_4lxml_9objectify_LongElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "LongElement", (PyObject *)&__pyx_type_4lxml_9objectify_LongElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_LongElement = &__pyx_type_4lxml_9objectify_LongElement;
    __pyx_vtabptr_4lxml_9objectify_FloatElement = &__pyx_vtable_4lxml_9objectify_FloatElement;
    __pyx_vtable_4lxml_9objectify_FloatElement.__pyx_base = *__pyx_vtabptr_4lxml_9objectify_NumberElement;
    __pyx_type_4lxml_9objectify_FloatElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_FloatElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; goto __pyx_L1;}
    if (__Pyx_SetVtable(__pyx_type_4lxml_9objectify_FloatElement.tp_dict, __pyx_vtabptr_4lxml_9objectify_FloatElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "FloatElement", (PyObject *)&__pyx_type_4lxml_9objectify_FloatElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_FloatElement = &__pyx_type_4lxml_9objectify_FloatElement;
    __pyx_type_4lxml_9objectify_StringElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_StringElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "StringElement", (PyObject *)&__pyx_type_4lxml_9objectify_StringElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_StringElement = &__pyx_type_4lxml_9objectify_StringElement;
    __pyx_type_4lxml_9objectify_NoneElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_NoneElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "NoneElement", (PyObject *)&__pyx_type_4lxml_9objectify_NoneElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_NoneElement = &__pyx_type_4lxml_9objectify_NoneElement;
    __pyx_vtabptr_4lxml_9objectify_BoolElement = &__pyx_vtable_4lxml_9objectify_BoolElement;
    *(void(**)(void))&__pyx_vtable_4lxml_9objectify_BoolElement._boolval = (void(*)(void))__pyx_f_4lxml_9objectify_11BoolElement__boolval;
    __pyx_type_4lxml_9objectify_BoolElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_BoolElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;}
    if (__Pyx_SetVtable(__pyx_type_4lxml_9objectify_BoolElement.tp_dict, __pyx_vtabptr_4lxml_9objectify_BoolElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "BoolElement", (PyObject *)&__pyx_type_4lxml_9objectify_BoolElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_BoolElement = &__pyx_type_4lxml_9objectify_BoolElement;
    __pyx_type_4lxml_9objectify_PyType.tp_free = _PyObject_GC_Del;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_PyType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "PyType", (PyObject *)&__pyx_type_4lxml_9objectify_PyType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_PyType = &__pyx_type_4lxml_9objectify_PyType;
    __pyx_type_4lxml_9objectify__StringValueSetter.tp_free = _PyObject_GC_Del;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify__StringValueSetter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "_StringValueSetter", (PyObject *)&__pyx_type_4lxml_9objectify__StringValueSetter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify__StringValueSetter = &__pyx_type_4lxml_9objectify__StringValueSetter;
    __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller.tp_free = _PyObject_GC_Del;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "_ObjectifyElementMakerCaller", (PyObject *)&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = &__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller;
    __pyx_type_4lxml_9objectify_ElementMaker.tp_free = _PyObject_GC_Del;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_ElementMaker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "ElementMaker", (PyObject *)&__pyx_type_4lxml_9objectify_ElementMaker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_ElementMaker = &__pyx_type_4lxml_9objectify_ElementMaker;
    __pyx_ptype_11etreepublic_ElementClassLookup = __Pyx_ImportType("lxml.etree", "ElementClassLookup", sizeof(struct LxmlElementClassLookup)); if (unlikely(!__pyx_ptype_11etreepublic_ElementClassLookup)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}
    __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_base = __pyx_ptype_11etreepublic_ElementClassLookup;
    __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_free = _PyObject_GC_Del;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "ObjectifyElementClassLookup", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = &__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup;
    __pyx_type_4lxml_9objectify_ObjectPath.tp_free = _PyObject_GC_Del;
    if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectPath) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; goto __pyx_L1;}
    if (PyObject_SetAttrString(__pyx_m, "ObjectPath", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectPath) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; goto __pyx_L1;}
    __pyx_ptype_4lxml_9objectify_ObjectPath = &__pyx_type_4lxml_9objectify_ObjectPath;
    /*--- Type import code ---*/
    __pyx_ptype_6python_slice = __Pyx_ImportType("__builtin__", "slice", sizeof(PySliceObject)); if (unlikely(!__pyx_ptype_6python_slice)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 14; goto __pyx_L1;}
    __pyx_ptype_11etreepublic__Document = __Pyx_ImportType("lxml.etree", "_Document", sizeof(struct LxmlDocument)); if (unlikely(!__pyx_ptype_11etreepublic__Document)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; goto __pyx_L1;}
    __pyx_ptype_11etreepublic__Element = __Pyx_ImportType("lxml.etree", "_Element", sizeof(struct LxmlElement)); if (unlikely(!__pyx_ptype_11etreepublic__Element)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; goto __pyx_L1;}
    __pyx_ptype_11etreepublic__ElementTree = __Pyx_ImportType("lxml.etree", "_ElementTree", sizeof(struct LxmlElementTree)); if (unlikely(!__pyx_ptype_11etreepublic__ElementTree)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 37; goto __pyx_L1;}
    __pyx_ptype_11etreepublic_FallbackElementClassLookup = __Pyx_ImportType("lxml.etree", "FallbackElementClassLookup", sizeof(struct LxmlFallbackElementClassLookup)); if (unlikely(!__pyx_ptype_11etreepublic_FallbackElementClassLookup)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 44; goto __pyx_L1;}
    __pyx_ptype_11etreepublic__ElementTagMatcher = __Pyx_ImportType("lxml.etree", "_ElementTagMatcher", sizeof(struct LxmlElementTagMatcher)); if (unlikely(!__pyx_ptype_11etreepublic__ElementTagMatcher)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; goto __pyx_L1;}
    __pyx_ptype_11etreepublic__ElementIterator = __Pyx_ImportType("lxml.etree", "_ElementIterator", sizeof(struct LxmlElementIterator)); if (unlikely(!__pyx_ptype_11etreepublic__ElementIterator)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; goto __pyx_L1;}
    /*--- Execution code ---*/

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":11
 * 
 * cdef object etree
 * from lxml import etree             # <<<<<<<<<<<<<< 
 * # initialize C-API of lxml.etree
 * import_lxml__etree()
 */
    __pyx_1 = PyList_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; goto __pyx_L1;}
    Py_INCREF(__pyx_n_etree);
    PyList_SET_ITEM(__pyx_1, 0, __pyx_n_etree);
    __pyx_2 = __Pyx_Import(__pyx_n_lxml, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_etree); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; goto __pyx_L1;}
    Py_DECREF(__pyx_v_4lxml_9objectify_etree);
    __pyx_v_4lxml_9objectify_etree = __pyx_1;
    __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":13
 * from lxml import etree
 * # initialize C-API of lxml.etree
 * import_lxml__etree()             # <<<<<<<<<<<<<< 
 * 
 * __version__ = etree.__version__
 */
    __pyx_3 = import_lxml__etree(); if (unlikely(__pyx_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":15
 * import_lxml__etree()
 * 
 * __version__ = etree.__version__             # <<<<<<<<<<<<<< 
 * 
 * cdef object re
 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n___version__); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; goto __pyx_L1;}
    if (PyObject_SetAttr(__pyx_m, __pyx_n___version__, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":18
 * 
 * cdef object re
 * import re             # <<<<<<<<<<<<<< 
 * 
 * cdef object __builtin__
 */
    __pyx_1 = __Pyx_Import(__pyx_n_re, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
    Py_DECREF(__pyx_v_4lxml_9objectify_re);
    __pyx_v_4lxml_9objectify_re = __pyx_1;
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":21
 * 
 * cdef object __builtin__
 * import __builtin__             # <<<<<<<<<<<<<< 
 * 
 * cdef object set
 */
    __pyx_2 = __Pyx_Import(__pyx_n___builtin__, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;}
    Py_DECREF(__pyx_v_4lxml_9objectify___builtin__);
    __pyx_v_4lxml_9objectify___builtin__ = __pyx_2;
    __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":24
 * 
 * cdef object set
 * try:             # <<<<<<<<<<<<<< 
 *     set = __builtin__.set
 * except AttributeError:
 */
    /*try:*/ {

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":25
 * cdef object set
 * try:
 *     set = __builtin__.set             # <<<<<<<<<<<<<< 
 * except AttributeError:
 *     from sets import Set as set
 */
      __pyx_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify___builtin__, __pyx_n_set); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L10;}
      Py_DECREF(__pyx_v_4lxml_9objectify_set);
      __pyx_v_4lxml_9objectify_set = __pyx_1;
      __pyx_1 = 0;
    }
    goto __pyx_L11;
    __pyx_L10:;
    Py_XDECREF(__pyx_2); __pyx_2 = 0;
    Py_XDECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":26
 * try:
 *     set = __builtin__.set
 * except AttributeError:             # <<<<<<<<<<<<<< 
 *     from sets import Set as set
 * 
 */
    __pyx_3 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_3) {
      __Pyx_AddTraceback("lxml.objectify");
      if (__Pyx_GetException(&__pyx_2, &__pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}

      /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":27
 *     set = __builtin__.set
 * except AttributeError:
 *     from sets import Set as set             # <<<<<<<<<<<<<< 
 * 
 * cdef object IGNORABLE_ERRORS
 */
      __pyx_5 = PyList_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;}
      Py_INCREF(__pyx_n_Set);
      PyList_SET_ITEM(__pyx_5, 0, __pyx_n_Set);
      __pyx_6 = __Pyx_Import(__pyx_n_sets, __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_5 = PyObject_GetAttr(__pyx_6, __pyx_n_Set); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;}
      Py_DECREF(__pyx_v_4lxml_9objectify_set);
      __pyx_v_4lxml_9objectify_set = __pyx_5;
      __pyx_5 = 0;
      Py_DECREF(__pyx_6); __pyx_6 = 0;
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      goto __pyx_L11;
    }
    goto __pyx_L1;
    __pyx_L11:;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":30
 * 
 * cdef object IGNORABLE_ERRORS
 * IGNORABLE_ERRORS = (ValueError, TypeError)             # <<<<<<<<<<<<<< 
 * 
 * cdef object islice
 */
    __pyx_6 = PyTuple_New(2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
    Py_INCREF(__pyx_builtin_ValueError);
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_builtin_ValueError);
    Py_INCREF(__pyx_builtin_TypeError);
    PyTuple_SET_ITEM(__pyx_6, 1, __pyx_builtin_TypeError);
    Py_DECREF(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
    __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = __pyx_6;
    __pyx_6 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":33
 * 
 * cdef object islice
 * from itertools import islice             # <<<<<<<<<<<<<< 
 * 
 * cdef object _typename(object t):
 */
    __pyx_5 = PyList_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
    Py_INCREF(__pyx_n_islice);
    PyList_SET_ITEM(__pyx_5, 0, __pyx_n_islice);
    __pyx_2 = __Pyx_Import(__pyx_n_itertools, __pyx_5); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_islice); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
    Py_DECREF(__pyx_v_4lxml_9objectify_islice);
    __pyx_v_4lxml_9objectify_islice = __pyx_1;
    __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":52
 * cdef char* _PYTYPE_ATTRIBUTE_NAME
 * 
 * PYTYPE_ATTRIBUTE = None             # <<<<<<<<<<<<<< 
 * 
 * cdef object TREE_PYTYPE_NAME
 */
    if (PyObject_SetAttr(__pyx_m, __pyx_n_PYTYPE_ATTRIBUTE, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":55
 * 
 * cdef object TREE_PYTYPE_NAME
 * TREE_PYTYPE_NAME = "TREE"             # <<<<<<<<<<<<<< 
 * 
 * def setPytypeAttributeTag(attribute_tag=None):
 */
    Py_INCREF(__pyx_n_TREE);
    Py_DECREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
    __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = __pyx_n_TREE;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":57
 * TREE_PYTYPE_NAME = "TREE"
 * 
 * def setPytypeAttributeTag(attribute_tag=None):             # <<<<<<<<<<<<<< 
 *     """Changes name and namespace of the XML attribute that holds Python type
 *     information.
 */
    Py_INCREF(Py_None);
    __pyx_k12 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":77
 *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
 * 
 * setPytypeAttributeTag()             # <<<<<<<<<<<<<< 
 * 
 * 
 */
    __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_setPytypeAttributeTag); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; goto __pyx_L1;}
    __pyx_6 = PyObject_CallObject(__pyx_4, 0); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":82
 * # namespaces for XML Schema
 * cdef object XML_SCHEMA_NS
 * XML_SCHEMA_NS = "http://www.w3.org/2001/XMLSchema"             # <<<<<<<<<<<<<< 
 * cdef char* _XML_SCHEMA_NS
 * _XML_SCHEMA_NS = _cstr(XML_SCHEMA_NS)
 */
    Py_INCREF(__pyx_k13p);
    Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = __pyx_k13p;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":84
 * XML_SCHEMA_NS = "http://www.w3.org/2001/XMLSchema"
 * cdef char* _XML_SCHEMA_NS
 * _XML_SCHEMA_NS = _cstr(XML_SCHEMA_NS)             # <<<<<<<<<<<<<< 
 * 
 * cdef object XML_SCHEMA_INSTANCE_NS
 */
    __pyx_v_4lxml_9objectify__XML_SCHEMA_NS = _cstr(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":87
 * 
 * cdef object XML_SCHEMA_INSTANCE_NS
 * XML_SCHEMA_INSTANCE_NS = "http://www.w3.org/2001/XMLSchema-instance"             # <<<<<<<<<<<<<< 
 * cdef char* _XML_SCHEMA_INSTANCE_NS
 * _XML_SCHEMA_INSTANCE_NS = _cstr(XML_SCHEMA_INSTANCE_NS)
 */
    Py_INCREF(__pyx_k14p);
    Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = __pyx_k14p;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":89
 * XML_SCHEMA_INSTANCE_NS = "http://www.w3.org/2001/XMLSchema-instance"
 * cdef char* _XML_SCHEMA_INSTANCE_NS
 * _XML_SCHEMA_INSTANCE_NS = _cstr(XML_SCHEMA_INSTANCE_NS)             # <<<<<<<<<<<<<< 
 * 
 * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR
 */
    __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS = _cstr(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":92
 * 
 * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR
 * XML_SCHEMA_INSTANCE_NIL_ATTR = "{%s}nil" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<< 
 * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR
 * XML_SCHEMA_INSTANCE_TYPE_ATTR = "{%s}type" % XML_SCHEMA_INSTANCE_NS
 */
    __pyx_5 = PyNumber_Remainder(__pyx_k15p, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
    Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = __pyx_5;
    __pyx_5 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":94
 * XML_SCHEMA_INSTANCE_NIL_ATTR = "{%s}nil" % XML_SCHEMA_INSTANCE_NS
 * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR
 * XML_SCHEMA_INSTANCE_TYPE_ATTR = "{%s}type" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<< 
 * 
 * 
 */
    __pyx_2 = PyNumber_Remainder(__pyx_k16p, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; goto __pyx_L1;}
    Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
    __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = __pyx_2;
    __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":393
 *             return None
 * 
 *     def findtext(self, path, default=None):             # <<<<<<<<<<<<<< 
 *         # Reimplementation of Element.findtext() to make it work without child
 *         # iteration.
 */
    Py_INCREF(Py_None);
    __pyx_k17 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":402
 *             return default
 * 
 *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<< 
 *         """Returns a list of object path expressions for all descendants.
 *         """
 */
    Py_INCREF(Py_None);
    __pyx_k18 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":837
 *     cdef object _type
 *     cdef object _schema_types
 *     def __init__(self, name, type_check, type_class, stringify=None):             # <<<<<<<<<<<<<< 
 *         if not python._isString(name):
 *             raise TypeError, "Type name must be a string"
 */
    Py_INCREF(Py_None);
    __pyx_k19 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":858
 *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
 * 
 *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<< 
 *         """Register the type.
 * 
 */
    Py_INCREF(Py_None);
    __pyx_k20 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":858
 *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
 * 
 *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<< 
 *         """Register the type.
 * 
 */
    Py_INCREF(Py_None);
    __pyx_k21 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":930
 * 
 * cdef object _PYTYPE_DICT
 * _PYTYPE_DICT = {}             # <<<<<<<<<<<<<< 
 * 
 * cdef object _SCHEMA_TYPE_DICT
 */
    __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;}
    Py_DECREF(__pyx_v_4lxml_9objectify__PYTYPE_DICT);
    __pyx_v_4lxml_9objectify__PYTYPE_DICT = __pyx_1;
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":933
 * 
 * cdef object _SCHEMA_TYPE_DICT
 * _SCHEMA_TYPE_DICT = {}             # <<<<<<<<<<<<<< 
 * 
 * cdef object _TYPE_CHECKS
 */
    __pyx_4 = PyDict_New(); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; goto __pyx_L1;}
    Py_DECREF(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT);
    __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = __pyx_4;
    __pyx_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":936
 * 
 * cdef object _TYPE_CHECKS
 * _TYPE_CHECKS = []             # <<<<<<<<<<<<<< 
 * 
 * cdef _lower_bool(b):
 */
    __pyx_6 = PyList_New(0); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; goto __pyx_L1;}
    Py_DECREF(__pyx_v_4lxml_9objectify__TYPE_CHECKS);
    __pyx_v_4lxml_9objectify__TYPE_CHECKS = __pyx_6;
    __pyx_6 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":995
 * # non-registered PyType for inner tree elements
 * cdef object TREE_PYTYPE
 * TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)             # <<<<<<<<<<<<<< 
 * 
 * _registerPyTypes()
 */
    __pyx_5 = PyTuple_New(3); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;}
    Py_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
    Py_INCREF(Py_None);
    PyTuple_SET_ITEM(__pyx_5, 1, Py_None);
    Py_INCREF(((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
    PyTuple_SET_ITEM(__pyx_5, 2, ((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
    __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_4lxml_9objectify_PyType), __pyx_5); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE);
    __pyx_v_4lxml_9objectify_TREE_PYTYPE = __pyx_2;
    __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":997
 * TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)
 * 
 * _registerPyTypes()             # <<<<<<<<<<<<<< 
 * 
 * def getRegisteredTypes():
 */
    __pyx_1 = __pyx_f_4lxml_9objectify__registerPyTypes(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1068
 *     cdef object _nsmap
 *     cdef bint _annotate
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<< 
 *                  makeelement=None):
 *         if nsmap is None:
 */
    Py_INCREF(Py_None);
    __pyx_k22 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1068
 *     cdef object _nsmap
 *     cdef bint _annotate
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<< 
 *                  makeelement=None):
 *         if nsmap is None:
 */
    Py_INCREF(Py_None);
    __pyx_k23 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1068
 *     cdef object _nsmap
 *     cdef bint _annotate
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<< 
 *                  makeelement=None):
 *         if nsmap is None:
 */
    Py_INCREF(Py_True);
    __pyx_k24 = Py_True;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1069
 *     cdef bint _annotate
 *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
 *                  makeelement=None):             # <<<<<<<<<<<<<< 
 *         if nsmap is None:
 *             nsmap = _DEFAULT_NSMAP
 */
    Py_INCREF(Py_None);
    __pyx_k25 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1176
 * 
 * cdef bint __RECURSIVE_STR
 * __RECURSIVE_STR = 0 # default: off             # <<<<<<<<<<<<<< 
 * 
 * def enableRecursiveStr(on=True):
 */
    __pyx_v_4lxml_9objectify___RECURSIVE_STR = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1178
 * __RECURSIVE_STR = 0 # default: off
 * 
 * def enableRecursiveStr(on=True):             # <<<<<<<<<<<<<< 
 *     """Enable a recursively generated tree representation for str(element),
 *     based on objectify.dump(element).
 */
    Py_INCREF(Py_True);
    __pyx_k26 = Py_True;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1235
 *     return (fromstring, (etree.tostring(obj),))
 * 
 * _setupPickle(pickleReduce)             # <<<<<<<<<<<<<< 
 * del pickleReduce
 * 
 */
    __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_pickleReduce); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1235; goto __pyx_L1;}
    __pyx_6 = __pyx_f_4lxml_9objectify__setupPickle(__pyx_4); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1235; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1236
 * 
 * _setupPickle(pickleReduce)
 * del pickleReduce             # <<<<<<<<<<<<<< 
 * 
 * ################################################################################
 */
    if (PyObject_DelAttrString(__pyx_m, "pickleReduce") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1246
 *     cdef object empty_data_class
 *     cdef object tree_class
 *     def __init__(self, tree_class=None, empty_data_class=None):             # <<<<<<<<<<<<<< 
 *         """Lookup mechanism for objectify.
 * 
 */
    Py_INCREF(Py_None);
    __pyx_k27 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1246
 *     cdef object empty_data_class
 *     cdef object tree_class
 *     def __init__(self, tree_class=None, empty_data_class=None):             # <<<<<<<<<<<<<< 
 *         """Lookup mechanism for objectify.
 * 
 */
    Py_INCREF(Py_None);
    __pyx_k28 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1326
 *     return None
 * 
 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<< 
 *              empty_pytype=None):
 *     """Recursively annotates the elements of an XML tree with 'pytype'
 */
    Py_INCREF(Py_False);
    __pyx_k29 = Py_False;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1326
 *     return None
 * 
 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<< 
 *              empty_pytype=None):
 *     """Recursively annotates the elements of an XML tree with 'pytype'
 */
    Py_INCREF(Py_False);
    __pyx_k30 = Py_False;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1327
 * 
 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,
 *              empty_pytype=None):             # <<<<<<<<<<<<<< 
 *     """Recursively annotates the elements of an XML tree with 'pytype'
 *     attributes.
 */
    Py_INCREF(Py_None);
    __pyx_k31 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1347
 *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
 * 
 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<< 
 *                 empty_type=None):
 *     """Recursively annotates the elements of an XML tree with 'xsi:type'
 */
    Py_INCREF(Py_False);
    __pyx_k32 = Py_False;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1347
 *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
 * 
 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<< 
 *                 empty_type=None):
 *     """Recursively annotates the elements of an XML tree with 'xsi:type'
 */
    Py_INCREF(Py_False);
    __pyx_k33 = Py_False;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1348
 * 
 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
 *                 empty_type=None):             # <<<<<<<<<<<<<< 
 *     """Recursively annotates the elements of an XML tree with 'xsi:type'
 *     attributes.
 */
    Py_INCREF(Py_None);
    __pyx_k34 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1373
 *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<< 
 *              empty_pytype=None, empty_type=None, annotate_xsi=0,
 *              annotate_pytype=1):
 */
    Py_INCREF(Py_True);
    __pyx_k35 = Py_True;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1373
 *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<< 
 *              empty_pytype=None, empty_type=None, annotate_xsi=0,
 *              annotate_pytype=1):
 */
    Py_INCREF(Py_False);
    __pyx_k36 = Py_False;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1374
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
 *              empty_pytype=None, empty_type=None, annotate_xsi=0,             # <<<<<<<<<<<<<< 
 *              annotate_pytype=1):
 *     """Recursively annotates the elements of an XML tree with 'xsi:type'
 */
    Py_INCREF(Py_None);
    __pyx_k37 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1374
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
 *              empty_pytype=None, empty_type=None, annotate_xsi=0,             # <<<<<<<<<<<<<< 
 *              annotate_pytype=1):
 *     """Recursively annotates the elements of an XML tree with 'xsi:type'
 */
    Py_INCREF(Py_None);
    __pyx_k38 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1374
 * 
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
 *              empty_pytype=None, empty_type=None, annotate_xsi=0,             # <<<<<<<<<<<<<< 
 *              annotate_pytype=1):
 *     """Recursively annotates the elements of an XML tree with 'xsi:type'
 */
    Py_INCREF(__pyx_num_0);
    __pyx_k39 = __pyx_num_0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1375
 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
 *              empty_pytype=None, empty_type=None, annotate_xsi=0,
 *              annotate_pytype=1):             # <<<<<<<<<<<<<< 
 *     """Recursively annotates the elements of an XML tree with 'xsi:type'
 *     and/or 'py:pytype' attributes.
 */
    Py_INCREF(__pyx_num_1);
    __pyx_k40 = __pyx_num_1;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1561
 *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 * 
 * def deannotate(element_or_tree, *, pytype=True, xsi=True):             # <<<<<<<<<<<<<< 
 *     """Recursively de-annotate the elements of an XML tree by removing 'pytype'
 *     and/or 'type' attributes.
 */
    Py_INCREF(Py_True);
    __pyx_k41 = Py_True;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1561
 *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
 * 
 * def deannotate(element_or_tree, *, pytype=True, xsi=True):             # <<<<<<<<<<<<<< 
 *     """Recursively de-annotate the elements of an XML tree by removing 'pytype'
 *     and/or 'type' attributes.
 */
    Py_INCREF(Py_True);
    __pyx_k42 = Py_True;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1600
 * 
 * cdef object __DEFAULT_PARSER
 * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)             # <<<<<<<<<<<<<< 
 * __DEFAULT_PARSER.setElementClassLookup( ObjectifyElementClassLookup() )
 * 
 */
    __pyx_5 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_XMLParser); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1600
 * 
 * cdef object __DEFAULT_PARSER
 * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)             # <<<<<<<<<<<<<< 
 * __DEFAULT_PARSER.setElementClassLookup( ObjectifyElementClassLookup() )
 * 
 */
    __pyx_2 = PyTuple_New(0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;}
    __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1600
 * 
 * cdef object __DEFAULT_PARSER
 * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)             # <<<<<<<<<<<<<< 
 * __DEFAULT_PARSER.setElementClassLookup( ObjectifyElementClassLookup() )
 * 
 */
    if (PyDict_SetItem(__pyx_1, __pyx_n_remove_blank_text, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;}
    __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_5, __pyx_2, __pyx_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
    __pyx_v_4lxml_9objectify___DEFAULT_PARSER = __pyx_4;
    __pyx_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1601
 * cdef object __DEFAULT_PARSER
 * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)
 * __DEFAULT_PARSER.setElementClassLookup( ObjectifyElementClassLookup() )             # <<<<<<<<<<<<<< 
 * 
 * cdef object objectify_parser
 */
    __pyx_6 = PyObject_GetAttr(__pyx_v_4lxml_9objectify___DEFAULT_PARSER, __pyx_n_setElementClassLookup); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1601
 * cdef object __DEFAULT_PARSER
 * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)
 * __DEFAULT_PARSER.setElementClassLookup( ObjectifyElementClassLookup() )             # <<<<<<<<<<<<<< 
 * 
 * cdef object objectify_parser
 */
    __pyx_5 = PyObject_CallObject(((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup), 0); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; goto __pyx_L1;}
    __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5);
    __pyx_5 = 0;
    __pyx_1 = PyObject_CallObject(__pyx_6, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; goto __pyx_L1;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1604
 * 
 * cdef object objectify_parser
 * objectify_parser = __DEFAULT_PARSER             # <<<<<<<<<<<<<< 
 * 
 * def setDefaultParser(new_parser = None):
 */
    Py_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
    Py_DECREF(__pyx_v_4lxml_9objectify_objectify_parser);
    __pyx_v_4lxml_9objectify_objectify_parser = __pyx_v_4lxml_9objectify___DEFAULT_PARSER;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1606
 * objectify_parser = __DEFAULT_PARSER
 * 
 * def setDefaultParser(new_parser = None):             # <<<<<<<<<<<<<< 
 *     set_default_parser(new_parser)
 * 
 */
    Py_INCREF(Py_None);
    __pyx_k44 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1609
 *     set_default_parser(new_parser)
 * 
 * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<< 
 *     """Replace the default parser used by objectify's Element() and
 *     fromstring() functions.
 */
    Py_INCREF(Py_None);
    __pyx_k45 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1632
 * 
 * cdef object _fromstring
 * _fromstring = etree.fromstring             # <<<<<<<<<<<<<< 
 * 
 * def fromstring(xml, parser=None):
 */
    __pyx_4 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_fromstring); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1632; goto __pyx_L1;}
    Py_DECREF(__pyx_v_4lxml_9objectify__fromstring);
    __pyx_v_4lxml_9objectify__fromstring = __pyx_4;
    __pyx_4 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1634
 * _fromstring = etree.fromstring
 * 
 * def fromstring(xml, parser=None):             # <<<<<<<<<<<<<< 
 *     """Objectify specific version of the lxml.etree fromstring() function
 *     that uses the objectify parser.
 */
    Py_INCREF(Py_None);
    __pyx_k46 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1644
 *     return _fromstring(xml, parser)
 * 
 * XML = fromstring             # <<<<<<<<<<<<<< 
 * 
 * cdef object _parse
 */
    __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_fromstring); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; goto __pyx_L1;}
    if (PyObject_SetAttr(__pyx_m, __pyx_n_XML, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1647
 * 
 * cdef object _parse
 * _parse = etree.parse             # <<<<<<<<<<<<<< 
 * 
 * def parse(f, parser=None):
 */
    __pyx_6 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_parse); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; goto __pyx_L1;}
    Py_DECREF(__pyx_v_4lxml_9objectify__parse);
    __pyx_v_4lxml_9objectify__parse = __pyx_6;
    __pyx_6 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1649
 * _parse = etree.parse
 * 
 * def parse(f, parser=None):             # <<<<<<<<<<<<<< 
 *     """Parse a file or file-like object with the objectify parser.
 * 
 */
    Py_INCREF(Py_None);
    __pyx_k47 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1659
 * 
 * cdef object _DEFAULT_NSMAP
 * _DEFAULT_NSMAP = { "py"  : PYTYPE_NAMESPACE,             # <<<<<<<<<<<<<< 
 *                    "xsi" : XML_SCHEMA_INSTANCE_NS,
 *                    "xsd" : XML_SCHEMA_NS}
 */
    __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1659
 * 
 * cdef object _DEFAULT_NSMAP
 * _DEFAULT_NSMAP = { "py"  : PYTYPE_NAMESPACE,             # <<<<<<<<<<<<<< 
 *                    "xsi" : XML_SCHEMA_INSTANCE_NS,
 *                    "xsd" : XML_SCHEMA_NS}
 */
    if (PyDict_SetItem(__pyx_2, __pyx_n_py, __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1660
 * cdef object _DEFAULT_NSMAP
 * _DEFAULT_NSMAP = { "py"  : PYTYPE_NAMESPACE,
 *                    "xsi" : XML_SCHEMA_INSTANCE_NS,             # <<<<<<<<<<<<<< 
 *                    "xsd" : XML_SCHEMA_NS}
 * 
 */
    if (PyDict_SetItem(__pyx_2, __pyx_n_xsi, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1661
 * _DEFAULT_NSMAP = { "py"  : PYTYPE_NAMESPACE,
 *                    "xsi" : XML_SCHEMA_INSTANCE_NS,
 *                    "xsd" : XML_SCHEMA_NS}             # <<<<<<<<<<<<<< 
 * 
 * E = ElementMaker()
 */
    if (PyDict_SetItem(__pyx_2, __pyx_n_xsd, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; goto __pyx_L1;}
    Py_DECREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
    __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = __pyx_2;
    __pyx_2 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1663
 *                    "xsd" : XML_SCHEMA_NS}
 * 
 * E = ElementMaker()             # <<<<<<<<<<<<<< 
 * 
 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):
 */
    __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_4lxml_9objectify_ElementMaker), 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;}
    if (PyObject_SetAttr(__pyx_m, __pyx_n_E, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1665
 * E = ElementMaker()
 * 
 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<< 
 *     """Objectify specific version of the lxml.etree Element() factory that
 *     always creates a structural (tree) element.
 */
    Py_INCREF(Py_None);
    __pyx_k51 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1665
 * E = ElementMaker()
 * 
 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<< 
 *     """Objectify specific version of the lxml.etree Element() factory that
 *     always creates a structural (tree) element.
 */
    Py_INCREF(Py_None);
    __pyx_k52 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1665
 * E = ElementMaker()
 * 
 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<< 
 *     """Objectify specific version of the lxml.etree Element() factory that
 *     always creates a structural (tree) element.
 */
    Py_INCREF(Py_None);
    __pyx_k53 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1682
 *     return _makeElement(_tag, None, _attributes, nsmap)
 * 
 * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<< 
 *                 **_attributes):
 *     """Create a new element from a Python value and XML attributes taken from
 */
    Py_INCREF(Py_None);
    __pyx_k54 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1682
 *     return _makeElement(_tag, None, _attributes, nsmap)
 * 
 * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<< 
 *                 **_attributes):
 *     """Create a new element from a Python value and XML attributes taken from
 */
    Py_INCREF(Py_None);
    __pyx_k55 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1682
 *     return _makeElement(_tag, None, _attributes, nsmap)
 * 
 * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<< 
 *                 **_attributes):
 *     """Create a new element from a Python value and XML attributes taken from
 */
    Py_INCREF(Py_None);
    __pyx_k56 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/lxml.objectify.pyx":1682
 *     return _makeElement(_tag, None, _attributes, nsmap)
 * 
 * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<< 
 *                 **_attributes):
 *     """Create a new element from a Python value and XML attributes taken from
 */
    Py_INCREF(Py_None);
    __pyx_k57 = Py_None;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":78
 * 
 * cdef object __MATCH_PATH_SEGMENT
 * __MATCH_PATH_SEGMENT = re.compile(             # <<<<<<<<<<<<<< 
 *     r"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
 *     re.U).match
 */
    __pyx_4 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_re, __pyx_n_compile); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; goto __pyx_L1;}

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":80
 * __MATCH_PATH_SEGMENT = re.compile(
 *     r"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
 *     re.U).match             # <<<<<<<<<<<<<< 
 * 
 * cdef object _RELATIVE_PATH_SEGMENT
 */
    __pyx_5 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_re, __pyx_n_U); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; goto __pyx_L1;}
    __pyx_6 = PyTuple_New(2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; goto __pyx_L1;}
    Py_INCREF(__pyx_k58p);
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_k58p);
    PyTuple_SET_ITEM(__pyx_6, 1, __pyx_5);
    __pyx_5 = 0;
    __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_6); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 78; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_match); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 80; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
    __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = __pyx_1;
    __pyx_1 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":83
 * 
 * cdef object _RELATIVE_PATH_SEGMENT
 * _RELATIVE_PATH_SEGMENT = (None, None, 0)             # <<<<<<<<<<<<<< 
 * 
 * cdef _parseObjectPathString(path):
 */
    __pyx_5 = PyTuple_New(3); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; goto __pyx_L1;}
    Py_INCREF(Py_None);
    PyTuple_SET_ITEM(__pyx_5, 0, Py_None);
    Py_INCREF(Py_None);
    PyTuple_SET_ITEM(__pyx_5, 1, Py_None);
    Py_INCREF(__pyx_num_0);
    PyTuple_SET_ITEM(__pyx_5, 2, __pyx_num_0);
    Py_DECREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
    __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = __pyx_5;
    __pyx_5 = 0;

    /* "/home/sbehnel/source/Python/lxml/lxml-HEAD/RELEASE-DIR/lxml-2.0alpha6/src/lxml/objectpath.pxi":297
 *     return path_list
 * 
 * cdef _recursiveBuildDescendantPaths(tree.xmlNode* c_node, path, path_list):             # <<<<<<<<<<<<<< 
 *     """Fills the list 'path_list' with all descendant paths, initial prefix
 *     being in the list 'path'.
 */
    if (__Pyx_RegisterCleanup()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
    return;
    __pyx_L1:;
    Py_XDECREF(__pyx_1);
    Py_XDECREF(__pyx_2);
    Py_XDECREF(__pyx_4);
    Py_XDECREF(__pyx_5);
    Py_XDECREF(__pyx_6);
    __Pyx_AddTraceback("lxml.objectify");
  }

  static PyObject* cleanup(PyObject *self, PyObject *unused) {
    /*--- Global cleanup code ---*/
    Py_DECREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT); __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT); __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP); __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify__parse); __pyx_v_4lxml_9objectify__parse = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify__fromstring); __pyx_v_4lxml_9objectify__fromstring = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_objectify_parser); __pyx_v_4lxml_9objectify_objectify_parser = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER); __pyx_v_4lxml_9objectify___DEFAULT_PARSER = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE); __pyx_v_4lxml_9objectify_TREE_PYTYPE = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify__TYPE_CHECKS); __pyx_v_4lxml_9objectify__TYPE_CHECKS = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT); __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify__PYTYPE_DICT); __pyx_v_4lxml_9objectify__PYTYPE_DICT = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR); __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR); __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS); __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME); __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME); __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE); __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_islice); __pyx_v_4lxml_9objectify_islice = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS); __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_set); __pyx_v_4lxml_9objectify_set = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify___builtin__); __pyx_v_4lxml_9objectify___builtin__ = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_re); __pyx_v_4lxml_9objectify_re = 0;
    Py_DECREF(__pyx_v_4lxml_9objectify_etree); __pyx_v_4lxml_9objectify_etree = 0;
    /*--- Type import cleanup code ---*/
    Py_DECREF(((PyObject*)__pyx_ptype_11etreepublic_ElementClassLookup));
    Py_DECREF(((PyObject*)__pyx_ptype_6python_slice));
    Py_DECREF(((PyObject*)__pyx_ptype_11etreepublic__ElementTree));
    Py_DECREF(((PyObject*)__pyx_ptype_11etreepublic__Element));
    Py_DECREF(((PyObject*)__pyx_ptype_11etreepublic_FallbackElementClassLookup));
    Py_DECREF(((PyObject*)__pyx_ptype_11etreepublic__Document));
    Py_DECREF(((PyObject*)__pyx_ptype_11etreepublic__ElementIterator));
    Py_DECREF(((PyObject*)__pyx_ptype_11etreepublic_ElementBase));
    Py_DECREF(((PyObject*)__pyx_ptype_11etreepublic__ElementTagMatcher));
    /*--- Builtin cleanup code ---*/
    Py_DECREF(__pyx_builtin_AttributeError); __pyx_builtin_AttributeError = 0;
    Py_DECREF(__pyx_builtin_ValueError); __pyx_builtin_ValueError = 0;
    Py_DECREF(__pyx_builtin_TypeError); __pyx_builtin_TypeError = 0;
    Py_DECREF(__pyx_builtin_IndexError); __pyx_builtin_IndexError = 0;
    Py_DECREF(__pyx_builtin_StopIteration); __pyx_builtin_StopIteration = 0;
    Py_DECREF(__pyx_builtin_bool); __pyx_builtin_bool = 0;
    Py_DECREF(__pyx_builtin_enumerate); __pyx_builtin_enumerate = 0;
    /*--- Intern cleanup code ---*/
    Py_DECREF(__pyx_num_0); __pyx_num_0 = 0;
    Py_DECREF(__pyx_num_1); __pyx_num_1 = 0;
    Py_DECREF(__pyx_num_neg_1); __pyx_num_neg_1 = 0;
    Py_DECREF(__pyx_n___int__); __pyx_n___int__ = 0;
    Py_DECREF(__pyx_n_addattr); __pyx_n_addattr = 0;
    Py_DECREF(__pyx_n_nonPositiveInteger); __pyx_n_nonPositiveInteger = 0;
    Py_DECREF(__pyx_n_text); __pyx_n_text = 0;
    Py_DECREF(__pyx_n___str__); __pyx_n___str__ = 0;
    Py_DECREF(__pyx_n__init); __pyx_n__init = 0;
    Py_DECREF(__pyx_n_ENTITY); __pyx_n_ENTITY = 0;
    Py_DECREF(__pyx_n_integer); __pyx_n_integer = 0;
    Py_DECREF(__pyx_n_remove_blank_text); __pyx_n_remove_blank_text = 0;
    Py_DECREF(__pyx_n_find); __pyx_n_find = 0;
    Py_DECREF(__pyx_n_set_default_parser); __pyx_n_set_default_parser = 0;
    Py_DECREF(__pyx_n___rshift__); __pyx_n___rshift__ = 0;
    Py_DECREF(__pyx_n_setElementClassLookup); __pyx_n_setElementClassLookup = 0;
    Py_DECREF(__pyx_n_negativeInteger); __pyx_n_negativeInteger = 0;
    Py_DECREF(__pyx_n_positiveInteger); __pyx_n_positiveInteger = 0;
    Py_DECREF(__pyx_n_unsignedShort); __pyx_n_unsignedShort = 0;
    Py_DECREF(__pyx_n_tail); __pyx_n_tail = 0;
    Py_DECREF(__pyx_n___copy__); __pyx_n___copy__ = 0;
    Py_DECREF(__pyx_n___call__); __pyx_n___call__ = 0;
    Py_DECREF(__pyx_n_match); __pyx_n_match = 0;
    Py_DECREF(__pyx_n_unsignedByte); __pyx_n_unsignedByte = 0;
    Py_DECREF(__pyx_n_etree); __pyx_n_etree = 0;
    Py_DECREF(__pyx_n_string); __pyx_n_string = 0;
    Py_DECREF(__pyx_n___getitem__); __pyx_n___getitem__ = 0;
    Py_DECREF(__pyx_n___delitem__); __pyx_n___delitem__ = 0;
    Py_DECREF(__pyx_n_tostring); __pyx_n_tostring = 0;
    Py_DECREF(__pyx_n___pow__); __pyx_n___pow__ = 0;
    Py_DECREF(__pyx_n_insert); __pyx_n_insert = 0;
    Py_DECREF(__pyx_n_IndexError); __pyx_n_IndexError = 0;
    Py_DECREF(__pyx_n___checkBool); __pyx_n___checkBool = 0;
    Py_DECREF(__pyx_n___richcmp__); __pyx_n___richcmp__ = 0;
    Py_DECREF(__pyx_n_pyval); __pyx_n_pyval = 0;
    Py_DECREF(__pyx_n___nonzero__); __pyx_n___nonzero__ = 0;
    Py_DECREF(__pyx_n_name); __pyx_n_name = 0;
    Py_DECREF(__pyx_n_unregister); __pyx_n_unregister = 0;
    Py_DECREF(__pyx_n_TREE); __pyx_n_TREE = 0;
    Py_DECREF(__pyx_n_remove); __pyx_n_remove = 0;
    Py_DECREF(__pyx_n_pickleReduce); __pyx_n_pickleReduce = 0;
    Py_DECREF(__pyx_n_NMTOKEN); __pyx_n_NMTOKEN = 0;
    Py_DECREF(__pyx_n_token); __pyx_n_token = 0;
    Py_DECREF(__pyx_n_descendantpaths); __pyx_n_descendantpaths = 0;
    Py_DECREF(__pyx_n_xsd); __pyx_n_xsd = 0;
    Py_DECREF(__pyx_n_ElementChildIterator); __pyx_n_ElementChildIterator = 0;
    Py_DECREF(__pyx_n___long__); __pyx_n___long__ = 0;
    Py_DECREF(__pyx_n_xsi); __pyx_n_xsi = 0;
    Py_DECREF(__pyx_n_False); __pyx_n_False = 0;
    Py_DECREF(__pyx_n_set); __pyx_n_set = 0;
    Py_DECREF(__pyx_n_strip); __pyx_n_strip = 0;
    Py_DECREF(__pyx_n___truediv__); __pyx_n___truediv__ = 0;
    Py_DECREF(__pyx_n_XMLParser); __pyx_n_XMLParser = 0;
    Py_DECREF(__pyx_n_IDREF); __pyx_n_IDREF = 0;
    Py_DECREF(__pyx_n_append); __pyx_n_append = 0;
    Py_DECREF(__pyx_n_unsignedLong); __pyx_n_unsignedLong = 0;
    Py_DECREF(__pyx_n___setattr__); __pyx_n___setattr__ = 0;
    Py_DECREF(__pyx_n_findtext); __pyx_n_findtext = 0;
    Py_DECREF(__pyx_n___getattr__); __pyx_n___getattr__ = 0;
    Py_DECREF(__pyx_n_findall); __pyx_n_findall = 0;
    Py_DECREF(__pyx_n_re); __pyx_n_re = 0;
    Py_DECREF(__pyx_n_getchildren); __pyx_n_getchildren = 0;
    Py_DECREF(__pyx_n_True); __pyx_n_True = 0;
    Py_DECREF(__pyx_n_None); __pyx_n_None = 0;
    Py_DECREF(__pyx_n_pytype); __pyx_n_pytype = 0;
    Py_DECREF(__pyx_n_update); __pyx_n_update = 0;
    Py_DECREF(__pyx_n___setitem__); __pyx_n___setitem__ = 0;
    Py_DECREF(__pyx_n_groups); __pyx_n_groups = 0;
    Py_DECREF(__pyx_n___name__); __pyx_n___name__ = 0;
    Py_DECREF(__pyx_n_byte); __pyx_n_byte = 0;
    Py_DECREF(__pyx_n___version__); __pyx_n___version__ = 0;
    Py_DECREF(__pyx_n_setPytypeAttributeTag); __pyx_n_setPytypeAttributeTag = 0;
    Py_DECREF(__pyx_n_TypeError); __pyx_n_TypeError = 0;
    Py_DECREF(__pyx_n_language); __pyx_n_language = 0;
    Py_DECREF(__pyx_n_items); __pyx_n_items = 0;
    Py_DECREF(__pyx_n___xor__); __pyx_n___xor__ = 0;
    Py_DECREF(__pyx_n___delattr__); __pyx_n___delattr__ = 0;
    Py_DECREF(__pyx_n_itertools); __pyx_n_itertools = 0;
    Py_DECREF(__pyx_n___mul__); __pyx_n___mul__ = 0;
    Py_DECREF(__pyx_n_constructor); __pyx_n_constructor = 0;
    Py_DECREF(__pyx_n_attrib); __pyx_n_attrib = 0;
    Py_DECREF(__pyx_n___set__); __pyx_n___set__ = 0;
    Py_DECREF(__pyx_n_getparent); __pyx_n_getparent = 0;
    Py_DECREF(__pyx_n_float); __pyx_n_float = 0;
    Py_DECREF(__pyx_n___builtin__); __pyx_n___builtin__ = 0;
    Py_DECREF(__pyx_n_replace); __pyx_n_replace = 0;
    Py_DECREF(__pyx_n_StopIteration); __pyx_n_StopIteration = 0;
    Py_DECREF(__pyx_n_boolean); __pyx_n_boolean = 0;
    Py_DECREF(__pyx_n_enumerate); __pyx_n_enumerate = 0;
    Py_DECREF(__pyx_n___and__); __pyx_n___and__ = 0;
    Py_DECREF(__pyx_n_copy_reg); __pyx_n_copy_reg = 0;
    Py_DECREF(__pyx_n_next); __pyx_n_next = 0;
    Py_DECREF(__pyx_n___float__); __pyx_n___float__ = 0;
    Py_DECREF(__pyx_n_py); __pyx_n_py = 0;
    Py_DECREF(__pyx_n_add); __pyx_n_add = 0;
    Py_DECREF(__pyx_n_long); __pyx_n_long = 0;
    Py_DECREF(__pyx_n___abs__); __pyx_n___abs__ = 0;
    Py_DECREF(__pyx_n_itervalues); __pyx_n_itervalues = 0;
    Py_DECREF(__pyx_n___len__); __pyx_n___len__ = 0;
    Py_DECREF(__pyx_n_XML); __pyx_n_XML = 0;
    Py_DECREF(__pyx_n___lower_bool); __pyx_n___lower_bool = 0;
    Py_DECREF(__pyx_n___invert__); __pyx_n___invert__ = 0;
    Py_DECREF(__pyx_n___iter__); __pyx_n___iter__ = 0;
    Py_DECREF(__pyx_n_short); __pyx_n_short = 0;
    Py_DECREF(__pyx_n_countchildren); __pyx_n_countchildren = 0;
    Py_DECREF(__pyx_n___lshift__); __pyx_n___lshift__ = 0;
    Py_DECREF(__pyx_n_true); __pyx_n_true = 0;
    Py_DECREF(__pyx_n_hasattr); __pyx_n_hasattr = 0;
    Py_DECREF(__pyx_n_none); __pyx_n_none = 0;
    Py_DECREF(__pyx_n_Set); __pyx_n_Set = 0;
    Py_DECREF(__pyx_n_join); __pyx_n_join = 0;
    Py_DECREF(__pyx_n_NCName); __pyx_n_NCName = 0;
    Py_DECREF(__pyx_n_setattr); __pyx_n_setattr = 0;
    Py_DECREF(__pyx_n___mod__); __pyx_n___mod__ = 0;
    Py_DECREF(__pyx_n_double); __pyx_n_double = 0;
    Py_DECREF(__pyx_n_unsignedInt); __pyx_n_unsignedInt = 0;
    Py_DECREF(__pyx_n_value); __pyx_n_value = 0;
    Py_DECREF(__pyx_n_compile); __pyx_n_compile = 0;
    Py_DECREF(__pyx_n_str); __pyx_n_str = 0;
    Py_DECREF(__pyx_n___sub__); __pyx_n___sub__ = 0;
    Py_DECREF(__pyx_n_pickle); __pyx_n_pickle = 0;
    Py_DECREF(__pyx_n_false); __pyx_n_false = 0;
    Py_DECREF(__pyx_n_int); __pyx_n_int = 0;
    Py_DECREF(__pyx_n_iterfind); __pyx_n_iterfind = 0;
    Py_DECREF(__pyx_n_iterchildren); __pyx_n_iterchildren = 0;
    Py_DECREF(__pyx_n_parse); __pyx_n_parse = 0;
    Py_DECREF(__pyx_n_tag); __pyx_n_tag = 0;
    Py_DECREF(__pyx_n_strlen); __pyx_n_strlen = 0;
    Py_DECREF(__pyx_n___init__); __pyx_n___init__ = 0;
    Py_DECREF(__pyx_n_normalizedString); __pyx_n_normalizedString = 0;
    Py_DECREF(__pyx_n_nonNegativeInteger); __pyx_n_nonNegativeInteger = 0;
    Py_DECREF(__pyx_n_lxml); __pyx_n_lxml = 0;
    Py_DECREF(__pyx_n_end); __pyx_n_end = 0;
    Py_DECREF(__pyx_n_xmlSchemaTypes); __pyx_n_xmlSchemaTypes = 0;
    Py_DECREF(__pyx_n__setValueParser); __pyx_n__setValueParser = 0;
    Py_DECREF(__pyx_n_get); __pyx_n_get = 0;
    Py_DECREF(__pyx_n_PYTYPE_ATTRIBUTE); __pyx_n_PYTYPE_ATTRIBUTE = 0;
    Py_DECREF(__pyx_n___pos__); __pyx_n___pos__ = 0;
    Py_DECREF(__pyx_n_ETXPath); __pyx_n_ETXPath = 0;
    Py_DECREF(__pyx_n_bool); __pyx_n_bool = 0;
    Py_DECREF(__pyx_n_split); __pyx_n_split = 0;
    Py_DECREF(__pyx_n___dealloc__); __pyx_n___dealloc__ = 0;
    Py_DECREF(__pyx_n_ValueError); __pyx_n_ValueError = 0;
    Py_DECREF(__pyx_n___repr__); __pyx_n___repr__ = 0;
    Py_DECREF(__pyx_n_E); __pyx_n_E = 0;
    Py_DECREF(__pyx_n_Name); __pyx_n_Name = 0;
    Py_DECREF(__pyx_n_makeelement); __pyx_n_makeelement = 0;
    Py_DECREF(__pyx_n_U); __pyx_n_U = 0;
    Py_DECREF(__pyx_n___or__); __pyx_n___or__ = 0;
    Py_DECREF(__pyx_n___add__); __pyx_n___add__ = 0;
    Py_DECREF(__pyx_n_islice); __pyx_n_islice = 0;
    Py_DECREF(__pyx_n_ID); __pyx_n_ID = 0;
    Py_DECREF(__pyx_n_lower); __pyx_n_lower = 0;
    Py_DECREF(__pyx_n__setText); __pyx_n__setText = 0;
    Py_DECREF(__pyx_n_fromstring); __pyx_n_fromstring = 0;
    Py_DECREF(__pyx_n_register); __pyx_n_register = 0;
    Py_DECREF(__pyx_n_nsmap); __pyx_n_nsmap = 0;
    Py_DECREF(__pyx_n___div__); __pyx_n___div__ = 0;
    Py_DECREF(__pyx_n___neg__); __pyx_n___neg__ = 0;
    Py_DECREF(__pyx_n_sets); __pyx_n_sets = 0;
    Py_DECREF(__pyx_n_AttributeError); __pyx_n_AttributeError = 0;
    Py_DECREF(__pyx_n_NoneType); __pyx_n_NoneType = 0;
    Py_INCREF(Py_None); return Py_None;
  }

  static char *__pyx_filenames[] = {
    "lxml.objectify.pyx",
    "objectpath.pxi",
    "python.pxd",
    "etreepublic.pxd",
  };

  /* Runtime support code */

  static void __pyx_init_filenames(void) {
    __pyx_f = __pyx_filenames;
  }
  
static int __Pyx_GetStarArgs(
    PyObject **args, 
    PyObject **kwds,
    char *kwd_list[], 
    Py_ssize_t nargs,
    PyObject **args2, 
    PyObject **kwds2,
    char rqd_kwds[])
{
    PyObject *x = 0, *args1 = 0, *kwds1 = 0;
    int i;
    char **p;
    
    if (args2)
        *args2 = 0;
    if (kwds2)
        *kwds2 = 0;
    
    if (args2) {
        args1 = PyTuple_GetSlice(*args, 0, nargs);
        if (!args1)
            goto bad;
        *args2 = PyTuple_GetSlice(*args, nargs, PyTuple_GET_SIZE(*args));
        if (!*args2)
            goto bad;
    }
    else if (PyTuple_GET_SIZE(*args) > nargs) {
        int m = nargs;
        int n = PyTuple_GET_SIZE(*args);
        PyErr_Format(PyExc_TypeError,
            "function takes at most %d positional arguments (%d given)",
                m, n);
        goto bad;
    }
    else {
        args1 = *args;
        Py_INCREF(args1);
    }
    
    if (rqd_kwds && !*kwds)
            for (i = 0, p = kwd_list; *p; i++, p++)
                if (rqd_kwds[i])
                    goto missing_kwarg;
    
    if (kwds2) {
        if (*kwds) {
            kwds1 = PyDict_New();
            if (!kwds1)
                goto bad;
            *kwds2 = PyDict_Copy(*kwds);
            if (!*kwds2)
                goto bad;
            for (i = 0, p = kwd_list; *p; i++, p++) {
                x = PyDict_GetItemString(*kwds, *p);
                if (x) {
                    if (PyDict_SetItemString(kwds1, *p, x) < 0)
                        goto bad;
                    if (PyDict_DelItemString(*kwds2, *p) < 0)
                        goto bad;
                }
                else if (rqd_kwds && rqd_kwds[i])
                    goto missing_kwarg;
            }
        }
        else {
            *kwds2 = PyDict_New();
            if (!*kwds2)
                goto bad;
        }
    }
    else {
        kwds1 = *kwds;
        Py_XINCREF(kwds1);
        if (rqd_kwds && *kwds)
            for (i = 0, p = kwd_list; *p; i++, p++)
                if (rqd_kwds[i] && !PyDict_GetItemString(*kwds, *p))
                        goto missing_kwarg;
    }
    
    *args = args1;
    *kwds = kwds1;
    return 0;
missing_kwarg:
    PyErr_Format(PyExc_TypeError,
        "required keyword argument '%s' is missing", *p);
bad:
    Py_XDECREF(args1);
    Py_XDECREF(kwds1);
    if (args2) {
        Py_XDECREF(*args2);
    }
    if (kwds2) {
        Py_XDECREF(*kwds2);
    }
    return -1;
}

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) {
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type))
        return 1;
    PyErr_Format(PyExc_TypeError,
        "Argument '%s' has incorrect type (expected %s, got %s)",
        name, type->tp_name, obj->ob_type->tp_name);
    return 0;
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
    PyObject *__import__ = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    __import__ = PyObject_GetAttrString(__pyx_b, "__import__");
    if (!__import__)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    module = PyObject_CallFunction(__import__, "OOOO",
        name, global_dict, empty_dict, list);
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(__import__);
    Py_XDECREF(empty_dict);
    return module;
}

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result)
        PyErr_SetObject(PyExc_NameError, name);
    return result;
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_Get();
    PyErr_Fetch(type, value, tb);
    PyErr_NormalizeException(type, value, tb);
    if (PyErr_Occurred())
        goto bad;
    Py_INCREF(*type);
    Py_INCREF(*value);
    Py_INCREF(*tb);
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    /* Make sure tstate is in a consistent state when we XDECREF
    these objects (XDECREF may run arbitrary code). */
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
    return 0;
bad:
    Py_XDECREF(*type);
    Py_XDECREF(*value);
    Py_XDECREF(*tb);
    return -1;
}

static void __Pyx_UnpackError(void) {
    PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size");
}

static PyObject *__Pyx_UnpackItem(PyObject *iter) {
    PyObject *item;
    if (!(item = PyIter_Next(iter))) {
        if (!PyErr_Occurred())
            __Pyx_UnpackError();
    }
    return item;
}

static int __Pyx_EndUnpack(PyObject *iter) {
    PyObject *item;
    if ((item = PyIter_Next(iter))) {
        Py_DECREF(item);
        __Pyx_UnpackError();
        return -1;
    }
    else if (!PyErr_Occurred())
        return 0;
    else
        return -1;
}

static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (obj == Py_None || PyObject_TypeCheck(obj, type))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
        obj->ob_type->tp_name, type->tp_name);
    return 0;
}

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    #if PY_VERSION_HEX < 0x02050000
    if (!PyClass_Check(type))
    #else
    if (!PyType_Check(type))
    #endif
    {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        /* Normalize to raise <class>, <instance> */
        Py_DECREF(value);
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            type = (PyObject*) type->ob_type;
            Py_INCREF(type);
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception class must be a subclass of BaseException");
                goto raise_error;
            }
        #endif
    }
    PyErr_Restore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}

static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
    while (t->p) {
        *t->p = PyString_InternFromString(t->s);
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name,
    long size)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    result = PyObject_GetAttrString(py_module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError, 
            "%s.%s is not a type object",
            module_name, class_name);
        goto bad;
    }
    if (((PyTypeObject *)result)->tp_basicsize != size) {
        PyErr_Format(PyExc_ValueError, 
            "%s.%s does not appear to be the correct type object",
            module_name, class_name);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return 0;
}
#endif

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    
    py_name = PyString_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
    PyObject *pycobj = 0;
    int result;
    
    pycobj = PyCObject_FromVoidPtr(vtable, 0);
    if (!pycobj)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", pycobj) < 0)
        goto bad;
    result = 0;
    goto done;

bad:
    result = -1;
done:
    Py_XDECREF(pycobj);
    return result;
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(char *funcname) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyObject *empty_tuple = 0;
    PyObject *empty_string = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    
    py_srcfile = PyString_FromString(__pyx_filename);
    if (!py_srcfile) goto bad;
    py_funcname = PyString_FromString(funcname);
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    empty_tuple = PyTuple_New(0);
    if (!empty_tuple) goto bad;
    empty_string = PyString_FromString("");
    if (!empty_string) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        empty_string, /*PyObject *code,*/
        empty_tuple,  /*PyObject *consts,*/
        empty_tuple,  /*PyObject *names,*/
        empty_tuple,  /*PyObject *varnames,*/
        empty_tuple,  /*PyObject *freevars,*/
        empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        empty_string  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_Get(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(empty_tuple);
    Py_XDECREF(empty_string);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_RegisterCleanup() {
    /* Don't use Py_AtExit because that has a 32-call limit 
     * and is called after python finalization. 
     */

    PyObject *cleanup_func = 0;
    PyObject *atexit = 0;
    PyObject *reg = 0;
    PyObject *args = 0;
    PyObject *res = 0;
    int ret = -1;
    
    cleanup_func = PyCFunction_New(&cleanup_def, 0);
    args = PyTuple_New(1);
    if (!cleanup_func || !args)
        goto bad;
    PyTuple_SET_ITEM(args, 0, cleanup_func);
    cleanup_func = 0;

    atexit = __Pyx_ImportModule("atexit");
    if (!atexit)
        goto bad;
    reg = PyObject_GetAttrString(atexit, "register");
    if (!reg)
        goto bad;
    res = PyObject_CallObject(reg, args);
    if (!res)
        goto bad;
    ret = 0;
bad:
    Py_XDECREF(cleanup_func);
    Py_XDECREF(atexit);
    Py_XDECREF(reg);
    Py_XDECREF(args);
    Py_XDECREF(res);
    return ret;
}
