Upload Tizen:Base source
[toolchains/python-lxml.git] / src / lxml / lxml.objectify.c
1 /* Generated by Cython 0.11.3 on Tue Sep 29 22:46:05 2009 */
2
3 #define PY_SSIZE_T_CLEAN
4 #include "Python.h"
5 #include "structmember.h"
6 #ifndef Py_PYTHON_H
7     #error Python headers needed to compile C extensions, please install development version of Python.
8 #else
9 #ifndef PY_LONG_LONG
10   #define PY_LONG_LONG LONG_LONG
11 #endif
12 #ifndef DL_EXPORT
13   #define DL_EXPORT(t) t
14 #endif
15 #if PY_VERSION_HEX < 0x02040000
16   #define METH_COEXIST 0
17   #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
18 #endif
19 #if PY_VERSION_HEX < 0x02050000
20   typedef int Py_ssize_t;
21   #define PY_SSIZE_T_MAX INT_MAX
22   #define PY_SSIZE_T_MIN INT_MIN
23   #define PY_FORMAT_SIZE_T ""
24   #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
25   #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
26   #define PyNumber_Index(o)    PyNumber_Int(o)
27   #define PyIndex_Check(o)     PyNumber_Check(o)
28 #endif
29 #if PY_VERSION_HEX < 0x02060000
30   #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
31   #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
32   #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
33   #define PyVarObject_HEAD_INIT(type, size) \
34           PyObject_HEAD_INIT(type) size,
35   #define PyType_Modified(t)
36
37   typedef struct {
38        void *buf;
39        PyObject *obj;
40        Py_ssize_t len;
41        Py_ssize_t itemsize;
42        int readonly;
43        int ndim;
44        char *format;
45        Py_ssize_t *shape;
46        Py_ssize_t *strides;
47        Py_ssize_t *suboffsets;
48        void *internal;
49   } Py_buffer;
50
51   #define PyBUF_SIMPLE 0
52   #define PyBUF_WRITABLE 0x0001
53   #define PyBUF_FORMAT 0x0004
54   #define PyBUF_ND 0x0008
55   #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
56   #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
57   #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
58   #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
59   #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
60
61 #endif
62 #if PY_MAJOR_VERSION < 3
63   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
64 #else
65   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
66 #endif
67 #if PY_MAJOR_VERSION >= 3
68   #define Py_TPFLAGS_CHECKTYPES 0
69   #define Py_TPFLAGS_HAVE_INDEX 0
70 #endif
71 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
72   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
73 #endif
74 #if PY_MAJOR_VERSION >= 3
75   #define PyBaseString_Type            PyUnicode_Type
76   #define PyString_Type                PyBytes_Type
77   #define PyString_CheckExact          PyBytes_CheckExact
78   #define PyInt_Type                   PyLong_Type
79   #define PyInt_Check(op)              PyLong_Check(op)
80   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
81   #define PyInt_FromString             PyLong_FromString
82   #define PyInt_FromUnicode            PyLong_FromUnicode
83   #define PyInt_FromLong               PyLong_FromLong
84   #define PyInt_FromSize_t             PyLong_FromSize_t
85   #define PyInt_FromSsize_t            PyLong_FromSsize_t
86   #define PyInt_AsLong                 PyLong_AsLong
87   #define PyInt_AS_LONG                PyLong_AS_LONG
88   #define PyInt_AsSsize_t              PyLong_AsSsize_t
89   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
90   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
91   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
92 #else
93   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
94   #define PyBytes_Type                 PyString_Type
95 #endif
96 #if PY_MAJOR_VERSION >= 3
97   #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
98 #endif
99 #if !defined(WIN32) && !defined(MS_WINDOWS)
100   #ifndef __stdcall
101     #define __stdcall
102   #endif
103   #ifndef __cdecl
104     #define __cdecl
105   #endif
106   #ifndef __fastcall
107     #define __fastcall
108   #endif
109 #else
110   #define _USE_MATH_DEFINES
111 #endif
112 #if PY_VERSION_HEX < 0x02050000
113   #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
114   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
115   #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
116 #else
117   #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
118   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
119   #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
120 #endif
121 #if PY_VERSION_HEX < 0x02050000
122   #define __Pyx_NAMESTR(n) ((char *)(n))
123   #define __Pyx_DOCSTR(n)  ((char *)(n))
124 #else
125   #define __Pyx_NAMESTR(n) (n)
126   #define __Pyx_DOCSTR(n)  (n)
127 #endif
128 #ifdef __cplusplus
129 #define __PYX_EXTERN_C extern "C"
130 #else
131 #define __PYX_EXTERN_C extern
132 #endif
133 #include <math.h>
134 #define __PYX_HAVE_API__lxml__objectify
135 #include "string.h"
136 #include "stdio.h"
137 #include "stdlib.h"
138 #include "stdarg.h"
139 #include "etree_defs.h"
140 #include "lxml-version.h"
141 #include "libxml/xmlversion.h"
142 #include "libxml/encoding.h"
143 #include "libxml/chvalid.h"
144 #include "libxml/hash.h"
145 #include "libxml/tree.h"
146 #include "libxml/uri.h"
147 #include "libxml/HTMLtree.h"
148 #include "libxml/valid.h"
149 #include "libxml/xmlIO.h"
150 #include "libxml/xmlsave.h"
151 #include "libxml/globals.h"
152 #include "libxml/xmlstring.h"
153 #include "libxml/xmlmemory.h"
154 #include "pythread.h"
155 #include "lxml.etree_api.h"
156 #define __PYX_USE_C99_COMPLEX defined(_Complex_I)
157
158
159 #ifdef __GNUC__
160 #define INLINE __inline__
161 #elif _WIN32
162 #define INLINE __inline
163 #else
164 #define INLINE 
165 #endif
166
167 typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/
168
169
170
171 static int __pyx_skip_dispatch = 0;
172
173
174 /* Type Conversion Predeclarations */
175
176 #if PY_MAJOR_VERSION < 3
177 #define __Pyx_PyBytes_FromString          PyString_FromString
178 #define __Pyx_PyBytes_FromStringAndSize   PyString_FromStringAndSize
179 #define __Pyx_PyBytes_AsString            PyString_AsString
180 #else
181 #define __Pyx_PyBytes_FromString          PyBytes_FromString
182 #define __Pyx_PyBytes_FromStringAndSize   PyBytes_FromStringAndSize
183 #define __Pyx_PyBytes_AsString            PyBytes_AsString
184 #endif
185
186 #define __Pyx_PyBytes_FromUString(s)      __Pyx_PyBytes_FromString((char*)s)
187 #define __Pyx_PyBytes_AsUString(s)        ((unsigned char*) __Pyx_PyBytes_AsString(s))
188
189 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
190 static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
191 static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
192
193 #if !defined(T_PYSSIZET)
194 #if PY_VERSION_HEX < 0x02050000
195 #define T_PYSSIZET T_INT
196 #elif !defined(T_LONGLONG)
197 #define T_PYSSIZET \
198         ((sizeof(Py_ssize_t) == sizeof(int))  ? T_INT  : \
199         ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
200 #else
201 #define T_PYSSIZET \
202         ((sizeof(Py_ssize_t) == sizeof(int))          ? T_INT      : \
203         ((sizeof(Py_ssize_t) == sizeof(long))         ? T_LONG     : \
204         ((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
205 #endif
206 #endif
207
208
209 #if !defined(T_ULONGLONG)
210 #define __Pyx_T_UNSIGNED_INT(x) \
211         ((sizeof(x) == sizeof(unsigned char))  ? T_UBYTE : \
212         ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
213         ((sizeof(x) == sizeof(unsigned int))   ? T_UINT : \
214         ((sizeof(x) == sizeof(unsigned long))  ? T_ULONG : -1))))
215 #else
216 #define __Pyx_T_UNSIGNED_INT(x) \
217         ((sizeof(x) == sizeof(unsigned char))  ? T_UBYTE : \
218         ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
219         ((sizeof(x) == sizeof(unsigned int))   ? T_UINT : \
220         ((sizeof(x) == sizeof(unsigned long))  ? T_ULONG : \
221         ((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))))
222 #endif
223 #if !defined(T_LONGLONG)
224 #define __Pyx_T_SIGNED_INT(x) \
225         ((sizeof(x) == sizeof(char))  ? T_BYTE : \
226         ((sizeof(x) == sizeof(short)) ? T_SHORT : \
227         ((sizeof(x) == sizeof(int))   ? T_INT : \
228         ((sizeof(x) == sizeof(long))  ? T_LONG : -1))))
229 #else
230 #define __Pyx_T_SIGNED_INT(x) \
231         ((sizeof(x) == sizeof(char))  ? T_BYTE : \
232         ((sizeof(x) == sizeof(short)) ? T_SHORT : \
233         ((sizeof(x) == sizeof(int))   ? T_INT : \
234         ((sizeof(x) == sizeof(long))  ? T_LONG : \
235         ((sizeof(x) == sizeof(PY_LONG_LONG))   ? T_LONGLONG : -1)))))
236 #endif
237
238 #define __Pyx_T_FLOATING(x) \
239         ((sizeof(x) == sizeof(float)) ? T_FLOAT : \
240         ((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1))
241
242 #if !defined(T_SIZET)
243 #if !defined(T_ULONGLONG)
244 #define T_SIZET \
245         ((sizeof(size_t) == sizeof(unsigned int))  ? T_UINT  : \
246         ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
247 #else
248 #define T_SIZET \
249         ((sizeof(size_t) == sizeof(unsigned int))          ? T_UINT      : \
250         ((sizeof(size_t) == sizeof(unsigned long))         ? T_ULONG     : \
251         ((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
252 #endif
253 #endif
254
255 static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
256 static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
257 static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
258
259 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
260
261
262 #ifdef __GNUC__
263 /* Test for GCC > 2.95 */
264 #if __GNUC__ > 2 ||               (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) 
265 #define likely(x)   __builtin_expect(!!(x), 1)
266 #define unlikely(x) __builtin_expect(!!(x), 0)
267 #else /* __GNUC__ > 2 ... */
268 #define likely(x)   (x)
269 #define unlikely(x) (x)
270 #endif /* __GNUC__ > 2 ... */
271 #else /* __GNUC__ */
272 #define likely(x)   (x)
273 #define unlikely(x) (x)
274 #endif /* __GNUC__ */
275     
276 static PyObject *__pyx_m;
277 static PyObject *__pyx_b;
278 static PyObject *__pyx_empty_tuple;
279 static PyObject *__pyx_empty_bytes;
280 static int __pyx_lineno;
281 static int __pyx_clineno = 0;
282 static const char * __pyx_cfilenm= __FILE__;
283 static const char *__pyx_filename;
284 static const char **__pyx_f;
285
286
287 #ifdef CYTHON_REFNANNY
288 typedef struct {
289   void (*INCREF)(void*, PyObject*, int);
290   void (*DECREF)(void*, PyObject*, int);
291   void (*GOTREF)(void*, PyObject*, int);
292   void (*GIVEREF)(void*, PyObject*, int);
293   void* (*NewContext)(const char*, int, const char*);
294   void (*FinishContext)(void**);
295 } __Pyx_RefnannyAPIStruct;
296 static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL;
297 #define __Pyx_ImportRefcountAPI(name)   (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI")
298 #define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__)
299 #define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__)
300 #define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__)
301 #define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__)
302 #define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r)
303 #define __Pyx_SetupRefcountContext(name)   void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__)
304 #define __Pyx_FinishRefcountContext()   __Pyx_Refnanny->FinishContext(&__pyx_refchk)
305 #else
306 #define __Pyx_INCREF(r) Py_INCREF(r)
307 #define __Pyx_DECREF(r) Py_DECREF(r)
308 #define __Pyx_GOTREF(r)
309 #define __Pyx_GIVEREF(r)
310 #define __Pyx_XDECREF(r) Py_XDECREF(r)
311 #define __Pyx_SetupRefcountContext(name)
312 #define __Pyx_FinishRefcountContext()
313 #endif /* CYTHON_REFNANNY */
314 #define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r)
315 #define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r)
316
317 static void __Pyx_RaiseDoubleKeywordsError(
318     const char* func_name, PyObject* kw_name); /*proto*/
319
320 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
321     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
322
323 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
324
325 static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
326
327 static INLINE void __Pyx_RaiseTooManyValuesError(void);
328
329 static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
330 static int __Pyx_EndUnpack(PyObject *); /*proto*/
331
332 static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
333
334
335 static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
336     PyObject *r;
337     if (!j) return NULL;
338     r = PyObject_GetItem(o, j);
339     Py_DECREF(j);
340     return r;
341 }
342
343
344 #define __Pyx_GetItemInt_List(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
345                                                     __Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \
346                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
347
348 static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
349     if (likely(o != Py_None)) {
350         if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
351             PyObject *r = PyList_GET_ITEM(o, i);
352             Py_INCREF(r);
353             return r;
354         }
355         else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
356             PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
357             Py_INCREF(r);
358             return r;
359         }
360     }
361     return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
362 }
363
364 #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
365                                                     __Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \
366                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
367
368 static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
369     if (likely(o != Py_None)) {
370         if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
371             PyObject *r = PyTuple_GET_ITEM(o, i);
372             Py_INCREF(r);
373             return r;
374         }
375         else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
376             PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
377             Py_INCREF(r);
378             return r;
379         }
380     }
381     return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
382 }
383
384
385 #define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
386                                                     __Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \
387                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
388
389 static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
390     PyObject *r;
391     if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
392         r = PyList_GET_ITEM(o, i);
393         Py_INCREF(r);
394     }
395     else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
396         r = PyTuple_GET_ITEM(o, i);
397         Py_INCREF(r);
398     }
399     else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
400         r = PySequence_GetItem(o, i);
401     }
402     else {
403         r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
404     }
405     return r;
406 }
407
408 #if PY_VERSION_HEX < 0x02050000
409 #ifndef PyAnySet_CheckExact
410
411 #define PyAnySet_CheckExact(ob) \
412     ((ob)->ob_type == &PySet_Type || \
413      (ob)->ob_type == &PyFrozenSet_Type)
414
415 #define PySet_New(iterable) \
416     PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL)
417
418 #define Pyx_PyFrozenSet_New(iterable) \
419     PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL)
420
421 #define PySet_Size(anyset) \
422     PyObject_Size((anyset))
423
424 #define PySet_Contains(anyset, key) \
425     PySequence_Contains((anyset), (key))
426
427 #define PySet_Pop(set) \
428     PyObject_CallMethod(set, (char *)"pop", NULL)
429
430 static INLINE int PySet_Clear(PyObject *set) {
431     PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL);
432     if (!ret) return -1;
433     Py_DECREF(ret); return 0;
434 }
435
436 static INLINE int PySet_Discard(PyObject *set, PyObject *key) {
437     PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key);
438     if (!ret) return -1;
439     Py_DECREF(ret); return 0;
440 }
441
442 static INLINE int PySet_Add(PyObject *set, PyObject *key) {
443     PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key);
444     if (!ret) return -1;
445     Py_DECREF(ret); return 0;
446 }
447
448 #endif /* PyAnySet_CheckExact (<= Py2.4) */
449
450 #if PY_VERSION_HEX < 0x02040000
451 #ifndef Py_SETOBJECT_H
452 #define Py_SETOBJECT_H
453
454 static PyTypeObject *__Pyx_PySet_Type = NULL;
455 static PyTypeObject *__Pyx_PyFrozenSet_Type = NULL;
456
457 #define PySet_Type (*__Pyx_PySet_Type)
458 #define PyFrozenSet_Type (*__Pyx_PyFrozenSet_Type)
459
460 #define PyAnySet_Check(ob) \
461     (PyAnySet_CheckExact(ob) || \
462      PyType_IsSubtype((ob)->ob_type, &PySet_Type) || \
463      PyType_IsSubtype((ob)->ob_type, &PyFrozenSet_Type))
464
465 #define PyFrozenSet_CheckExact(ob) ((ob)->ob_type == &PyFrozenSet_Type)
466
467 static int __Pyx_Py23SetsImport(void) {
468     PyObject *sets=0, *Set=0, *ImmutableSet=0;
469
470     sets = PyImport_ImportModule((char *)"sets");
471     if (!sets) goto bad;
472     Set = PyObject_GetAttrString(sets, (char *)"Set");
473     if (!Set) goto bad;
474     ImmutableSet = PyObject_GetAttrString(sets, (char *)"ImmutableSet");
475     if (!ImmutableSet) goto bad;
476     Py_DECREF(sets);
477
478     __Pyx_PySet_Type       = (PyTypeObject*) Set;
479     __Pyx_PyFrozenSet_Type = (PyTypeObject*) ImmutableSet;
480
481     return 0;
482
483  bad:
484     Py_XDECREF(sets);
485     Py_XDECREF(Set);
486     Py_XDECREF(ImmutableSet);
487     return -1;
488 }
489
490 #else
491 static int __Pyx_Py23SetsImport(void) { return 0; }
492 #endif /* !Py_SETOBJECT_H */
493 #endif /* < Py2.4  */
494 #endif /* < Py2.5  */
495
496 static INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict,
497     const char* function_name, int kw_allowed); /*proto*/
498
499 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
500
501 #define __Pyx_DelItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
502                                                     __Pyx_DelItemInt_Fast(o, i, size <= sizeof(long)) : \
503                                                     __Pyx_DelItem_Generic(o, to_py_func(i)))
504
505 static INLINE int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
506     int r;
507     if (!j) return -1;
508     r = PyObject_DelItem(o, j);
509     Py_DECREF(j);
510     return r;
511 }
512
513 static INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
514     if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && likely(i >= 0))
515         return PySequence_DelItem(o, i);
516     else {
517         PyObject *j = fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i);
518         return __Pyx_DelItem_Generic(o, j);
519     }
520 }
521
522 static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
523     const char *name, int exact); /*proto*/
524
525 static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
526 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
527
528 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
529
530 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
531
532 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
533
534 static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
535 static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
536
537 static PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/
538
539 static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
540
541 static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
542
543 static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
544
545 static INLINE char __Pyx_PyInt_AsChar(PyObject *);
546
547 static INLINE short __Pyx_PyInt_AsShort(PyObject *);
548
549 static INLINE int __Pyx_PyInt_AsInt(PyObject *);
550
551 static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
552
553 static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
554
555 static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
556
557 static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
558
559 static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
560
561 static INLINE long __Pyx_PyInt_AsLong(PyObject *);
562
563 static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
564
565 static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
566
567 static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
568
569 static void __Pyx_WriteUnraisable(const char *name); /*proto*/
570
571 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size);  /*proto*/
572
573 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
574
575 static void __Pyx_AddTraceback(const char *funcname); /*proto*/
576
577 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
578
579 /* Type declarations */
580
581 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":4
582  * # ObjectPath
583  * 
584  * ctypedef struct _ObjectPath:             # <<<<<<<<<<<<<<
585  *     char* href
586  *     char* name
587  */
588
589 typedef struct {
590   char *href;
591   char *name;
592   Py_ssize_t index;
593 } __pyx_t_4lxml_9objectify__ObjectPath;
594
595 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":121
596  * 
597  * # Forward declaration
598  * cdef class PyType             # <<<<<<<<<<<<<<
599  * 
600  * ################################################################################
601  */
602
603 struct __pyx_obj_4lxml_9objectify_PyType {
604   PyObject_HEAD
605   PyObject *name;
606   PyObject *type_check;
607   PyObject *stringify;
608   PyObject *_type;
609   PyObject *_schema_types;
610 };
611
612 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1169
613  * # adapted ElementMaker supports registered PyTypes
614  * 
615  * cdef class _ObjectifyElementMakerCaller:             # <<<<<<<<<<<<<<
616  *     cdef object _tag
617  *     cdef object _nsmap
618  */
619
620 struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller {
621   PyObject_HEAD
622   PyObject *_tag;
623   PyObject *_nsmap;
624   PyObject *_element_factory;
625   int _annotate;
626 };
627
628 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":126
629  * # Element class for the main API
630  * 
631  * cdef class ObjectifiedElement(ElementBase):             # <<<<<<<<<<<<<<
632  *     u"""Main XML Element class.
633  * 
634  */
635
636 struct __pyx_obj_4lxml_9objectify_ObjectifiedElement {
637   struct LxmlElementBase __pyx_base;
638 };
639
640 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":638
641  * # Data type support in subclasses
642  * 
643  * cdef class ObjectifiedDataElement(ObjectifiedElement):             # <<<<<<<<<<<<<<
644  *     u"""This is the base class for all data type Elements.  Subclasses should
645  *     override the 'pyval' property and possibly the __str__ method.
646  */
647
648 struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement {
649   struct __pyx_obj_4lxml_9objectify_ObjectifiedElement __pyx_base;
650 };
651
652 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":658
653  *         cetree.setNodeText(self._c_node, s)
654  * 
655  * cdef class NumberElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<<
656  *     cdef object _parse_value
657  *     def _setValueParser(self, function):
658  */
659
660 struct __pyx_obj_4lxml_9objectify_NumberElement {
661   struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
662   PyObject *_parse_value;
663 };
664
665 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":760
666  *         self._parse_value = long
667  * 
668  * cdef class FloatElement(NumberElement):             # <<<<<<<<<<<<<<
669  *     def _init(self):
670  *         self._parse_value = float
671  */
672
673 struct __pyx_obj_4lxml_9objectify_FloatElement {
674   struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
675 };
676
677 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":752
678  *         return _numericValueOf(self) ^ _numericValueOf(other)
679  * 
680  * cdef class IntElement(NumberElement):             # <<<<<<<<<<<<<<
681  *     def _init(self):
682  *         self._parse_value = int
683  */
684
685 struct __pyx_obj_4lxml_9objectify_IntElement {
686   struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
687 };
688
689 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":848
690  *             return None
691  * 
692  * cdef class BoolElement(IntElement):             # <<<<<<<<<<<<<<
693  *     u"""Boolean type base on string values: 'true' or 'false'.
694  * 
695  */
696
697 struct __pyx_obj_4lxml_9objectify_BoolElement {
698   struct __pyx_obj_4lxml_9objectify_IntElement __pyx_base;
699 };
700
701 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":756
702  *         self._parse_value = int
703  * 
704  * cdef class LongElement(NumberElement):             # <<<<<<<<<<<<<<
705  *     def _init(self):
706  *         self._parse_value = long
707  */
708
709 struct __pyx_obj_4lxml_9objectify_LongElement {
710   struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
711 };
712
713 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1253
714  *     cdef _ObjectifyElementMakerCaller NEW_ELEMENT_MAKER "PY_NEW" (object t)
715  * 
716  * cdef class ElementMaker:             # <<<<<<<<<<<<<<
717  *     u"""ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)
718  * 
719  */
720
721 struct __pyx_obj_4lxml_9objectify_ElementMaker {
722   PyObject_HEAD
723   PyObject *_makeelement;
724   PyObject *_namespace;
725   PyObject *_nsmap;
726   int _annotate;
727 };
728
729 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1391
730  * # Element class lookup
731  * 
732  * cdef class ObjectifyElementClassLookup(ElementClassLookup):             # <<<<<<<<<<<<<<
733  *     u"""ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None)
734  *     Element class lookup method that uses the objectify classes.
735  */
736
737 struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup {
738   struct LxmlElementClassLookup __pyx_base;
739   PyObject *empty_data_class;
740   PyObject *tree_class;
741 };
742
743 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":826
744  *         return complex(textOf(self._c_node))
745  * 
746  * cdef class NoneElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<<
747  *     def __str__(self):
748  *         return u"None"
749  */
750
751 struct __pyx_obj_4lxml_9objectify_NoneElement {
752   struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
753 };
754
755 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":10
756  * 
757  * 
758  * cdef class ObjectPath:             # <<<<<<<<<<<<<<
759  *     u"""ObjectPath(path)
760  *     Immutable object that represents a compiled object path.
761  */
762
763 struct __pyx_obj_4lxml_9objectify_ObjectPath {
764   PyObject_HEAD
765   PyObject *find;
766   PyObject *_path;
767   PyObject *_path_str;
768   __pyx_t_4lxml_9objectify__ObjectPath *_c_path;
769   Py_ssize_t _path_len;
770 };
771
772 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":764
773  *         self._parse_value = float
774  * 
775  * cdef class StringElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<<
776  *     u"""String data class.
777  * 
778  */
779
780 struct __pyx_obj_4lxml_9objectify_StringElement {
781   struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
782 };
783 /* Module declarations from lxml.cstd */
784
785 /* Module declarations from lxml.tree */
786
787 /* Module declarations from __builtin__ */
788
789 /* Module declarations from lxml.python */
790
791 static PyTypeObject *__pyx_ptype_4lxml_6python_slice = 0;
792 static PyTypeObject *__pyx_ptype_4lxml_6python_unicode = 0;
793 /* Module declarations from lxml.etree */
794
795 /* Module declarations from lxml.etreepublic */
796
797 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__Document = 0;
798 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__Element = 0;
799 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic_ElementBase = 0;
800 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__ElementTree = 0;
801 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic_ElementClassLookup = 0;
802 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic_FallbackElementClassLookup = 0;
803 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__ElementTagMatcher = 0;
804 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__ElementIterator = 0;
805 /* Module declarations from lxml.objectify */
806
807 static PyTypeObject *__pyx_ptype_4lxml_9objectify_PyType = 0;
808 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifiedElement = 0;
809 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement = 0;
810 static PyTypeObject *__pyx_ptype_4lxml_9objectify_NumberElement = 0;
811 static PyTypeObject *__pyx_ptype_4lxml_9objectify_IntElement = 0;
812 static PyTypeObject *__pyx_ptype_4lxml_9objectify_LongElement = 0;
813 static PyTypeObject *__pyx_ptype_4lxml_9objectify_FloatElement = 0;
814 static PyTypeObject *__pyx_ptype_4lxml_9objectify_StringElement = 0;
815 static PyTypeObject *__pyx_ptype_4lxml_9objectify_NoneElement = 0;
816 static PyTypeObject *__pyx_ptype_4lxml_9objectify_BoolElement = 0;
817 static PyTypeObject *__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = 0;
818 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ElementMaker = 0;
819 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = 0;
820 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectPath = 0;
821 static PyObject *__pyx_v_4lxml_9objectify_etree = 0;
822 static PyObject *__pyx_v_4lxml_9objectify_re = 0;
823 static PyObject *__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = 0;
824 static PyObject *__pyx_v_4lxml_9objectify_is_special_method = 0;
825 static PyObject *__pyx_v_4lxml_9objectify_islice = 0;
826 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = 0;
827 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = 0;
828 static char *__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE;
829 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = 0;
830 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = 0;
831 static char *__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME;
832 static PyObject *__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = 0;
833 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_NS = 0;
834 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = 0;
835 static char *__pyx_v_4lxml_9objectify__XML_SCHEMA_NS;
836 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = 0;
837 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = 0;
838 static char *__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS;
839 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = 0;
840 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = 0;
841 static PyObject *__pyx_v_4lxml_9objectify__PYTYPE_DICT = 0;
842 static PyObject *__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = 0;
843 static PyObject *__pyx_v_4lxml_9objectify__TYPE_CHECKS = 0;
844 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_4lxml_9objectify_TREE_PYTYPE = 0;
845 static int __pyx_v_4lxml_9objectify___RECURSIVE_STR;
846 static PyObject *__pyx_v_4lxml_9objectify__strip_attributes = 0;
847 static PyObject *__pyx_v_4lxml_9objectify___DEFAULT_PARSER = 0;
848 static PyObject *__pyx_v_4lxml_9objectify_objectify_parser = 0;
849 static PyObject *__pyx_v_4lxml_9objectify__fromstring = 0;
850 static PyObject *__pyx_v_4lxml_9objectify__parse = 0;
851 static PyObject *__pyx_v_4lxml_9objectify__DEFAULT_NSMAP = 0;
852 static PyObject *__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = 0;
853 static PyObject *__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = 0;
854 static PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *); /*proto*/
855 static PyObject *__pyx_f_4lxml_9objectify__unicodeAndUtf8(PyObject *); /*proto*/
856 static INLINE int __pyx_f_4lxml_9objectify__tagMatches(xmlNode *, char *, char *); /*proto*/
857 static Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *); /*proto*/
858 static xmlNode *__pyx_f_4lxml_9objectify__findFollowingSibling(xmlNode *, char *, char *, Py_ssize_t); /*proto*/
859 static PyObject *__pyx_f_4lxml_9objectify__lookupChild(struct LxmlElement *, PyObject *); /*proto*/
860 static PyObject *__pyx_f_4lxml_9objectify__lookupChildOrRaise(struct LxmlElement *, PyObject *); /*proto*/
861 static PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *, PyObject *); /*proto*/
862 static PyObject *__pyx_f_4lxml_9objectify__replaceElement(struct LxmlElement *, PyObject *); /*proto*/
863 static PyObject *__pyx_f_4lxml_9objectify__appendValue(struct LxmlElement *, PyObject *, PyObject *); /*proto*/
864 static PyObject *__pyx_f_4lxml_9objectify__setElementValue(struct LxmlElement *, PyObject *); /*proto*/
865 static PyObject *__pyx_f_4lxml_9objectify__setSlice(PyObject *, struct LxmlElement *, PyObject *); /*proto*/
866 static PyObject *__pyx_f_4lxml_9objectify___parseBool(PyObject *, int __pyx_skip_dispatch); /*proto*/
867 static INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *); /*proto*/
868 static INLINE PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9objectify_NumberElement *); /*proto*/
869 static INLINE PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *); /*proto*/
870 static INLINE PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *); /*proto*/
871 static INLINE PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *, PyObject *, int); /*proto*/
872 static PyObject *__pyx_f_4lxml_9objectify__lower_bool(PyObject *); /*proto*/
873 static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *); /*proto*/
874 static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void); /*proto*/
875 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guessPyType(PyObject *, struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
876 static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *); /*proto*/
877 static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *, PyObject *); /*proto*/
878 static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *, int); /*proto*/
879 static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *, PyObject *); /*proto*/
880 static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *, struct LxmlDocument *, xmlNode *); /*proto*/
881 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check_type(xmlNode *, struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
882 static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *, int, int, int, int, PyObject *, PyObject *); /*proto*/
883 static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
884 static PyObject *__pyx_f_4lxml_9objectify__parseObjectPathString(PyObject *); /*proto*/
885 static PyObject *__pyx_f_4lxml_9objectify__parseObjectPathList(PyObject *); /*proto*/
886 static __pyx_t_4lxml_9objectify__ObjectPath *__pyx_f_4lxml_9objectify__buildObjectPathSegments(PyObject *); /*proto*/
887 static PyObject *__pyx_f_4lxml_9objectify__findObjectPath(struct LxmlElement *, __pyx_t_4lxml_9objectify__ObjectPath *, Py_ssize_t, PyObject *, int); /*proto*/
888 static PyObject *__pyx_f_4lxml_9objectify__createObjectPath(struct LxmlElement *, __pyx_t_4lxml_9objectify__ObjectPath *, Py_ssize_t, int, PyObject *); /*proto*/
889 static PyObject *__pyx_f_4lxml_9objectify__buildDescendantPaths(xmlNode *, PyObject *); /*proto*/
890 static int __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(xmlNode *, PyObject *, PyObject *); /*proto*/
891 #define __Pyx_MODULE_NAME "lxml.objectify"
892 int __pyx_module_is_main_lxml__objectify = 0;
893
894 /* Implementation of lxml.objectify */
895 static PyObject *__pyx_builtin_ValueError;
896 static PyObject *__pyx_builtin_TypeError;
897 static PyObject *__pyx_builtin_object;
898 static PyObject *__pyx_builtin_IndexError;
899 static PyObject *__pyx_builtin_AttributeError;
900 static PyObject *__pyx_builtin_oct;
901 static PyObject *__pyx_builtin_hex;
902 static PyObject *__pyx_builtin_enumerate;
903 static PyObject *__pyx_builtin_map;
904 static char __pyx_k_0[] = "0";
905 static char __pyx_k_1[] = "http://codespeak.net/lxml/objectify/pytype";
906 static char __pyx_k_2[] = "UTF-8";
907 static char __pyx_k_3[] = "ElementChildIterator";
908 static char __pyx_k_4[] = "";
909 static char __pyx_k_5[] = "{%s}*";
910 static char __pyx_k_6[] = "attribute '%s' of '%s' objects is not writable";
911 static char __pyx_k_7[] = "assignment to root element is invalid";
912 static char __pyx_k_8[] = "deleting items not supported by root element";
913 static char __pyx_k_9[] = ".";
914 static char __pyx_k_E[] = "E";
915 static char __pyx_k_U[] = "U";
916 static char __pyx_k_f[] = "f";
917 static char __pyx_k_10[] = "no such child: ";
918 static char __pyx_k_11[] = "Invalid slice";
919 static char __pyx_k_12[] = "attempt to assign sequence of size %d to extended slice of size %d";
920 static char __pyx_k_13[] = "invalid types for * operator";
921 static char __pyx_k_14[] = "Invalid boolean value: '%s'";
922 static char __pyx_k_15[] = "1";
923 static char __pyx_k_16[] = "Type name must be a string";
924 static char __pyx_k_17[] = "Type check function must be callable (or None)";
925 static char __pyx_k_18[] = "Data classes must inherit from ObjectifiedDataElement";
926 static char __pyx_k_19[] = "PyType(%s, %s)";
927 static char __pyx_k_20[] = "Cannot register tree type";
928 static char __pyx_k_21[] = "inconsistent before/after dependencies";
929 static char __pyx_k_23[] = "{%s}";
930 static char __pyx_k_24[] = "{";
931   static char __pyx_k_26[] = "    ";
932   static char __pyx_k_27[] = "%s%s = %s [%s]\n";
933   static char __pyx_k_28[] = "py:";
934   static char __pyx_k_29[] = "xsi:";
935   static char __pyx_k_30[] = "%s  * %s = %r\n";
936   static char __pyx_k_31[] = "__unpickleElementTree";
937   static char __pyx_k_32[] = ":";
938   static char __pyx_k_42[] = "parser must inherit from lxml.etree.XMLParser";
939   static char __pyx_k_43[] = "set_element_class_lookup";
940   static char __pyx_k_44[] = "XSD types require the XSD namespace";
941   static char __pyx_k_45[] = "xsd:";
942   static char __pyx_k_46[] = "invalid number of arguments: needs one or two";
943   static char __pyx_k_47[] = "index not allowed on root node";
944   static char __pyx_k_48[] = "invalid path";
945   static char __pyx_k_49[] = "index must be enclosed in []";
946   static char __pyx_k_50[] = "root element does not match: need %s, got %s";
947   static char __pyx_k_51[] = "cannot update root node";
948   static char __pyx_k_52[] = "creating indexed path attributes is not supported";
949   static char __pyx_k_53[] = "{}";
950   static char __pyx_k_54[] = "[%d]";
951   static char __pyx_k_55[] = "The list of XML Schema datatypes this Python type maps to.\n\n        Note that this must be set before registering the type!\n        ";
952   static char __pyx_k_56[] = "A fake implementation for __dict__ to support dir() etc.\n\n        Note that this only considers the first child with a given name.\n        ";
953   static char __pyx_k_57[] = "The ``lxml.objectify`` module implements a Python object API for\nXML.  It is based on `lxml.etree`.\n";
954   static char __pyx_k_58[] = "ObjectifiedDataElement";
955   static char __pyx_k_59[] = "ObjectifyElementClassLookup";
956   static char __pyx_k_60[] = "enable_recursive_str";
957   static char __pyx_k_61[] = "set_pytype_attribute_tag";
958   static char __pyx_k_62[] = "__.*__$";
959   static char __pyx_k_63[] = "http://www.w3.org/2001/XMLSchema";
960   static char __pyx_k_64[] = "http://www.w3.org/2001/XMLSchema-instance";
961   static char __pyx_k_65[] = "{%s}nil";
962   static char __pyx_k_66[] = "{%s}type";
963   static char __pyx_k_67[] = "pickleReduceElementTree";
964 static char __pyx_k_68[] = "(\\.?)\\s*(?:\\{([^}]*)\\})?\\s*([^.{}\\[\\]\\s]+)\\s*(?:\\[\\s*([-0-9]+)\\s*\\])?";
965 static char __pyx_k_ID[] = "ID";
966 static char __pyx_k_on[] = "on";
967 static char __pyx_k_py[] = "py";
968 static char __pyx_k_re[] = "re";
969 static char __pyx_k_XML[] = "XML";
970 static char __pyx_k_add[] = "add";
971 static char __pyx_k_doc[] = "doc";
972 static char __pyx_k_end[] = "end";
973 static char __pyx_k_get[] = "get";
974 static char __pyx_k_hex[] = "hex";
975 static char __pyx_k_int[] = "int";
976 static char __pyx_k_map[] = "map";
977 static char __pyx_k_nil[] = "nil";
978 static char __pyx_k_oct[] = "oct";
979 static char __pyx_k_str[] = "str";
980 static char __pyx_k_tag[] = "tag";
981 static char __pyx_k_xml[] = "xml";
982 static char __pyx_k_xsd[] = "xsd";
983 static char __pyx_k_xsi[] = "xsi";
984 static char __pyx_k_Name[] = "Name";
985 static char __pyx_k_None[] = "None";
986 static char __pyx_k_TREE[] = "TREE";
987 static char __pyx_k__doc[] = "_doc";
988 static char __pyx_k__tag[] = "_tag";
989 static char __pyx_k__xsi[] = "_xsi";
990 static char __pyx_k_base[] = "base";
991 static char __pyx_k_bool[] = "bool";
992 static char __pyx_k_byte[] = "byte";
993 static char __pyx_k_dict[] = "dict";
994 static char __pyx_k_dump[] = "dump";
995 static char __pyx_k_find[] = "find";
996 static char __pyx_k_href[] = "href";
997 static char __pyx_k_join[] = "join";
998 static char __pyx_k_last[] = "last";
999 static char __pyx_k_long[] = "long";
1000 static char __pyx_k_lxml[] = "lxml";
1001 static char __pyx_k_name[] = "name";
1002 static char __pyx_k_next[] = "next";
1003 static char __pyx_k_none[] = "none";
1004 static char __pyx_k_path[] = "path";
1005 static char __pyx_k_prev[] = "prev";
1006 static char __pyx_k_root[] = "root";
1007 static char __pyx_k_step[] = "step";
1008 static char __pyx_k_tail[] = "tail";
1009 static char __pyx_k_text[] = "text";
1010 static char __pyx_k_true[] = "true";
1011 static char __pyx_k_type[] = "type";
1012 static char __pyx_k_ASCII[] = "ASCII";
1013 static char __pyx_k_IDREF[] = "IDREF";
1014 static char __pyx_k__path[] = "_path";
1015 static char __pyx_k__type[] = "_type";
1016 static char __pyx_k_after[] = "after";
1017 static char __pyx_k_etree[] = "etree";
1018 static char __pyx_k_false[] = "false";
1019 static char __pyx_k_float[] = "float";
1020 static char __pyx_k_index[] = "index";
1021 static char __pyx_k_items[] = "items";
1022 static char __pyx_k_match[] = "match";
1023 static char __pyx_k_nsmap[] = "nsmap";
1024 static char __pyx_k_parse[] = "parse";
1025 static char __pyx_k_pyval[] = "pyval";
1026 static char __pyx_k_short[] = "short";
1027 static char __pyx_k_split[] = "split";
1028 static char __pyx_k_start[] = "start";
1029 static char __pyx_k_strip[] = "strip";
1030 static char __pyx_k_token[] = "token";
1031 static char __pyx_k_value[] = "value";
1032 static char __pyx_k_ENTITY[] = "ENTITY";
1033 static char __pyx_k_NCName[] = "NCName";
1034 static char __pyx_k_PyType[] = "PyType";
1035 static char __pyx_k__nsmap[] = "_nsmap";
1036 static char __pyx_k__value[] = "_value";
1037 static char __pyx_k_attrib[] = "attrib";
1038 static char __pyx_k_before[] = "before";
1039 static char __pyx_k_double[] = "double";
1040 static char __pyx_k_groups[] = "groups";
1041 static char __pyx_k_insert[] = "insert";
1042 static char __pyx_k_islice[] = "islice";
1043 static char __pyx_k_object[] = "object";
1044 static char __pyx_k_parent[] = "parent";
1045 static char __pyx_k_parser[] = "parser";
1046 static char __pyx_k_pickle[] = "pickle";
1047 static char __pyx_k_prefix[] = "prefix";
1048 static char __pyx_k_pytype[] = "pytype";
1049 static char __pyx_k_remove[] = "remove";
1050 static char __pyx_k_string[] = "string";
1051 static char __pyx_k_update[] = "update";
1052 static char __pyx_k_values[] = "values";
1053 static char __pyx_k_ETXPath[] = "ETXPath";
1054 static char __pyx_k_Element[] = "Element";
1055 static char __pyx_k_NMTOKEN[] = "NMTOKEN";
1056 static char __pyx_k___all__[] = "__all__";
1057 static char __pyx_k___set__[] = "__set__";
1058 static char __pyx_k__c_node[] = "_c_node";
1059 static char __pyx_k__c_path[] = "_c_path";
1060 static char __pyx_k__pytype[] = "_pytype";
1061 static char __pyx_k_addnext[] = "addnext";
1062 static char __pyx_k_boolean[] = "boolean";
1063 static char __pyx_k_compile[] = "compile";
1064 static char __pyx_k_copyreg[] = "copyreg";
1065 static char __pyx_k_default[] = "default";
1066 static char __pyx_k_findall[] = "findall";
1067 static char __pyx_k_integer[] = "integer";
1068 static char __pyx_k_replace[] = "replace";
1069 static char __pyx_k_xsi_nil[] = "xsi_nil";
1070 static char __pyx_k_NoneType[] = "NoneType";
1071 static char __pyx_k___call__[] = "__call__";
1072 static char __pyx_k___copy__[] = "__copy__";
1073 static char __pyx_k___main__[] = "__main__";
1074 static char __pyx_k___name__[] = "__name__";
1075 static char __pyx_k_annotate[] = "annotate";
1076 static char __pyx_k_base_url[] = "base_url";
1077 static char __pyx_k_children[] = "children";
1078 static char __pyx_k_copy_reg[] = "copy_reg";
1079 static char __pyx_k_language[] = "language";
1080 static char __pyx_k_register[] = "register";
1081 static char __pyx_k_tostring[] = "tostring";
1082 static char __pyx_k_TypeError[] = "TypeError";
1083 static char __pyx_k_XMLParser[] = "XMLParser";
1084 static char __pyx_k__annotate[] = "_annotate";
1085 static char __pyx_k__path_len[] = "_path_len";
1086 static char __pyx_k__path_str[] = "_path_str";
1087 static char __pyx_k_enumerate[] = "enumerate";
1088 static char __pyx_k_getparent[] = "getparent";
1089 static char __pyx_k_itertools[] = "itertools";
1090 static char __pyx_k_namespace[] = "namespace";
1091 static char __pyx_k_stringify[] = "stringify";
1092 static char __pyx_k_IndexError[] = "IndexError";
1093 static char __pyx_k_IntElement[] = "IntElement";
1094 static char __pyx_k_ObjectPath[] = "ObjectPath";
1095 static char __pyx_k_ValueError[] = "ValueError";
1096 static char __pyx_k__namespace[] = "_namespace";
1097 static char __pyx_k_deannotate[] = "deannotate";
1098 static char __pyx_k_empty_type[] = "empty_type";
1099 static char __pyx_k_fromstring[] = "fromstring";
1100 static char __pyx_k_ignore_old[] = "ignore_old";
1101 static char __pyx_k_ignore_xsi[] = "ignore_xsi";
1102 static char __pyx_k_makeparser[] = "makeparser";
1103 static char __pyx_k_new_parser[] = "new_parser";
1104 static char __pyx_k_pyannotate[] = "pyannotate";
1105 static char __pyx_k_pytypename[] = "pytypename";
1106 static char __pyx_k_tree_class[] = "tree_class";
1107 static char __pyx_k_type_check[] = "type_check";
1108 static char __pyx_k_type_class[] = "type_class";
1109 static char __pyx_k_BoolElement[] = "BoolElement";
1110 static char __pyx_k_DataElement[] = "DataElement";
1111 static char __pyx_k_ElementTree[] = "ElementTree";
1112 static char __pyx_k_LongElement[] = "LongElement";
1113 static char __pyx_k_NoneElement[] = "NoneElement";
1114 static char __pyx_k___checkBool[] = "__checkBool";
1115 static char __pyx_k___getattr__[] = "__getattr__";
1116 static char __pyx_k___getitem__[] = "__getitem__";
1117 static char __pyx_k___parseBool[] = "__parseBool";
1118 static char __pyx_k___version__[] = "__version__";
1119 static char __pyx_k_constructor[] = "constructor";
1120 static char __pyx_k_makeelement[] = "makeelement";
1121 static char __pyx_k_unsignedInt[] = "unsignedInt";
1122 static char __pyx_k_xsiannotate[] = "xsiannotate";
1123 static char __pyx_k_ElementMaker[] = "ElementMaker";
1124 static char __pyx_k_FloatElement[] = "FloatElement";
1125 static char __pyx_k__ElementTree[] = "_ElementTree";
1126 static char __pyx_k___lower_bool[] = "__lower_bool";
1127 static char __pyx_k__makeelement[] = "_makeelement";
1128 static char __pyx_k__parse_value[] = "_parse_value";
1129 static char __pyx_k_annotate_xsi[] = "annotate_xsi";
1130 static char __pyx_k_empty_pytype[] = "empty_pytype";
1131 static char __pyx_k_iterchildren[] = "iterchildren";
1132 static char __pyx_k_unsignedByte[] = "unsignedByte";
1133 static char __pyx_k_unsignedLong[] = "unsignedLong";
1134 static char __pyx_k_NumberElement[] = "NumberElement";
1135 static char __pyx_k_StringElement[] = "StringElement";
1136 static char __pyx_k__schema_types[] = "_schema_types";
1137 static char __pyx_k_attribute_tag[] = "attribute_tag";
1138 static char __pyx_k_ignore_pytype[] = "ignore_pytype";
1139 static char __pyx_k_unsignedShort[] = "unsignedShort";
1140 static char __pyx_k_AttributeError[] = "AttributeError";
1141 static char __pyx_k_xmlSchemaTypes[] = "xmlSchemaTypes";
1142 static char __pyx_k_annotate_pytype[] = "annotate_pytype";
1143 static char __pyx_k_element_or_tree[] = "element_or_tree";
1144 static char __pyx_k_negativeInteger[] = "negativeInteger";
1145 static char __pyx_k_positiveInteger[] = "positiveInteger";
1146 static char __pyx_k_PYTYPE_ATTRIBUTE[] = "PYTYPE_ATTRIBUTE";
1147 static char __pyx_k__element_factory[] = "_element_factory";
1148 static char __pyx_k__lookup_function[] = "_lookup_function";
1149 static char __pyx_k_empty_data_class[] = "empty_data_class";
1150 static char __pyx_k_normalizedString[] = "normalizedString";
1151 static char __pyx_k_strip_attributes[] = "strip_attributes";
1152 static char __pyx_k_remove_blank_text[] = "remove_blank_text";
1153 static char __pyx_k_ObjectifiedElement[] = "ObjectifiedElement";
1154 static char __pyx_k_getRegisteredTypes[] = "getRegisteredTypes";
1155 static char __pyx_k_nonNegativeInteger[] = "nonNegativeInteger";
1156 static char __pyx_k_nonPositiveInteger[] = "nonPositiveInteger";
1157 static char __pyx_k_set_default_parser[] = "set_default_parser";
1158 static char __pyx_k_pickleReduceElement[] = "pickleReduceElement";
1159 static PyObject *__pyx_kp_u_0;
1160 static PyObject *__pyx_kp_u_1;
1161 static PyObject *__pyx_kp_u_10;
1162 static PyObject *__pyx_kp_u_11;
1163 static PyObject *__pyx_kp_u_12;
1164 static PyObject *__pyx_kp_u_13;
1165 static PyObject *__pyx_kp_u_14;
1166 static PyObject *__pyx_kp_u_15;
1167 static PyObject *__pyx_kp_u_16;
1168 static PyObject *__pyx_kp_u_17;
1169 static PyObject *__pyx_kp_u_18;
1170 static PyObject *__pyx_kp_u_19;
1171 static PyObject *__pyx_kp_u_20;
1172 static PyObject *__pyx_kp_u_21;
1173 static PyObject *__pyx_kp_u_23;
1174 static PyObject *__pyx_kp_u_24;
1175 static PyObject *__pyx_kp_u_26;
1176 static PyObject *__pyx_kp_u_27;
1177 static PyObject *__pyx_kp_u_28;
1178 static PyObject *__pyx_kp_u_29;
1179 static PyObject *__pyx_n_ui_3;
1180 static PyObject *__pyx_kp_u_30;
1181 static PyObject *__pyx_n_ui_31;
1182 static PyObject *__pyx_kp_b_32;
1183 static PyObject *__pyx_kp_u_32;
1184 static PyObject *__pyx_kp_u_4;
1185 static PyObject *__pyx_kp_u_42;
1186 static PyObject *__pyx_n_ui_43;
1187 static PyObject *__pyx_kp_u_44;
1188 static PyObject *__pyx_kp_u_45;
1189 static PyObject *__pyx_kp_u_46;
1190 static PyObject *__pyx_kp_u_47;
1191 static PyObject *__pyx_kp_u_48;
1192 static PyObject *__pyx_kp_u_49;
1193 static PyObject *__pyx_kp_u_5;
1194 static PyObject *__pyx_kp_u_50;
1195 static PyObject *__pyx_kp_u_51;
1196 static PyObject *__pyx_kp_u_52;
1197 static PyObject *__pyx_kp_u_53;
1198 static PyObject *__pyx_kp_u_54;
1199 static PyObject *__pyx_n_u_58;
1200 static PyObject *__pyx_n_u_59;
1201 static PyObject *__pyx_kp_u_6;
1202 static PyObject *__pyx_n_u_60;
1203 static PyObject *__pyx_n_u_61;
1204 static PyObject *__pyx_n_ui_61;
1205 static PyObject *__pyx_kp_u_62;
1206 static PyObject *__pyx_kp_u_63;
1207 static PyObject *__pyx_kp_u_64;
1208 static PyObject *__pyx_kp_u_65;
1209 static PyObject *__pyx_kp_u_66;
1210 static PyObject *__pyx_n_ui_67;
1211 static PyObject *__pyx_kp_u_68;
1212 static PyObject *__pyx_kp_u_7;
1213 static PyObject *__pyx_kp_u_8;
1214 static PyObject *__pyx_kp_u_9;
1215 static PyObject *__pyx_n_ui_AttributeError;
1216 static PyObject *__pyx_n_u_BoolElement;
1217 static PyObject *__pyx_n_u_DataElement;
1218 static PyObject *__pyx_n_u_E;
1219 static PyObject *__pyx_n_ui_E;
1220 static PyObject *__pyx_n_u_ENTITY;
1221 static PyObject *__pyx_n_ui_ETXPath;
1222 static PyObject *__pyx_n_u_Element;
1223 static PyObject *__pyx_n_u_ElementMaker;
1224 static PyObject *__pyx_n_ui_ElementTree;
1225 static PyObject *__pyx_n_u_FloatElement;
1226 static PyObject *__pyx_n_u_ID;
1227 static PyObject *__pyx_n_u_IDREF;
1228 static PyObject *__pyx_n_ui_IndexError;
1229 static PyObject *__pyx_n_u_IntElement;
1230 static PyObject *__pyx_n_u_LongElement;
1231 static PyObject *__pyx_n_u_NCName;
1232 static PyObject *__pyx_n_u_NMTOKEN;
1233 static PyObject *__pyx_n_u_Name;
1234 static PyObject *__pyx_n_u_None;
1235 static PyObject *__pyx_n_u_NoneElement;
1236 static PyObject *__pyx_n_u_NoneType;
1237 static PyObject *__pyx_n_u_NumberElement;
1238 static PyObject *__pyx_n_u_ObjectPath;
1239 static PyObject *__pyx_n_u_ObjectifiedElement;
1240 static PyObject *__pyx_n_u_PYTYPE_ATTRIBUTE;
1241 static PyObject *__pyx_n_ui_PYTYPE_ATTRIBUTE;
1242 static PyObject *__pyx_n_u_PyType;
1243 static PyObject *__pyx_n_u_StringElement;
1244 static PyObject *__pyx_n_u_TREE;
1245 static PyObject *__pyx_n_ui_TypeError;
1246 static PyObject *__pyx_n_ui_U;
1247 static PyObject *__pyx_n_ui_ValueError;
1248 static PyObject *__pyx_n_u_XML;
1249 static PyObject *__pyx_n_ui_XMLParser;
1250 static PyObject *__pyx_n_ui__ElementTree;
1251 static PyObject *__pyx_n_ui___all__;
1252 static PyObject *__pyx_n_ui___call__;
1253 static PyObject *__pyx_n_ui___checkBool;
1254 static PyObject *__pyx_n_ui___copy__;
1255 static PyObject *__pyx_n_ui___getattr__;
1256 static PyObject *__pyx_n_ui___getitem__;
1257 static PyObject *__pyx_n_ui___lower_bool;
1258 static PyObject *__pyx_n_ui___main__;
1259 static PyObject *__pyx_n_ui___name__;
1260 static PyObject *__pyx_n_ui___parseBool;
1261 static PyObject *__pyx_n_ui___set__;
1262 static PyObject *__pyx_n_ui___version__;
1263 static PyObject *__pyx_n_ui__annotate;
1264 static PyObject *__pyx_n_ui__c_node;
1265 static PyObject *__pyx_n_ui__c_path;
1266 static PyObject *__pyx_n_ui__doc;
1267 static PyObject *__pyx_n_ui__element_factory;
1268 static PyObject *__pyx_n_ui__lookup_function;
1269 static PyObject *__pyx_n_ui__makeelement;
1270 static PyObject *__pyx_n_ui__namespace;
1271 static PyObject *__pyx_n_ui__nsmap;
1272 static PyObject *__pyx_n_ui__parse_value;
1273 static PyObject *__pyx_n_ui__path;
1274 static PyObject *__pyx_n_ui__path_len;
1275 static PyObject *__pyx_n_ui__path_str;
1276 static PyObject *__pyx_n_ui__pytype;
1277 static PyObject *__pyx_n_ui__schema_types;
1278 static PyObject *__pyx_n_ui__tag;
1279 static PyObject *__pyx_n_ui__type;
1280 static PyObject *__pyx_n_ui__value;
1281 static PyObject *__pyx_n_ui__xsi;
1282 static PyObject *__pyx_n_ui_add;
1283 static PyObject *__pyx_n_ui_addnext;
1284 static PyObject *__pyx_n_ui_after;
1285 static PyObject *__pyx_n_u_annotate;
1286 static PyObject *__pyx_n_ui_annotate;
1287 static PyObject *__pyx_n_ui_annotate_pytype;
1288 static PyObject *__pyx_n_ui_annotate_xsi;
1289 static PyObject *__pyx_n_ui_attrib;
1290 static PyObject *__pyx_n_ui_attribute_tag;
1291 static PyObject *__pyx_n_u_base;
1292 static PyObject *__pyx_n_ui_base;
1293 static PyObject *__pyx_n_ui_base_url;
1294 static PyObject *__pyx_n_ui_before;
1295 static PyObject *__pyx_n_u_bool;
1296 static PyObject *__pyx_n_u_boolean;
1297 static PyObject *__pyx_n_u_byte;
1298 static PyObject *__pyx_n_ui_children;
1299 static PyObject *__pyx_n_ui_compile;
1300 static PyObject *__pyx_n_ui_constructor;
1301 static PyObject *__pyx_n_ui_copy_reg;
1302 static PyObject *__pyx_n_ui_copyreg;
1303 static PyObject *__pyx_n_u_deannotate;
1304 static PyObject *__pyx_n_ui_default;
1305 static PyObject *__pyx_n_ui_dict;
1306 static PyObject *__pyx_n_ui_doc;
1307 static PyObject *__pyx_n_u_double;
1308 static PyObject *__pyx_n_u_dump;
1309 static PyObject *__pyx_n_ui_element_or_tree;
1310 static PyObject *__pyx_n_ui_empty_data_class;
1311 static PyObject *__pyx_n_ui_empty_pytype;
1312 static PyObject *__pyx_n_ui_empty_type;
1313 static PyObject *__pyx_n_ui_end;
1314 static PyObject *__pyx_n_ui_enumerate;
1315 static PyObject *__pyx_n_bi_etree;
1316 static PyObject *__pyx_n_ui_etree;
1317 static PyObject *__pyx_n_ui_f;
1318 static PyObject *__pyx_n_u_false;
1319 static PyObject *__pyx_n_ui_find;
1320 static PyObject *__pyx_n_ui_findall;
1321 static PyObject *__pyx_n_u_float;
1322 static PyObject *__pyx_n_u_fromstring;
1323 static PyObject *__pyx_n_ui_fromstring;
1324 static PyObject *__pyx_n_ui_get;
1325 static PyObject *__pyx_n_u_getRegisteredTypes;
1326 static PyObject *__pyx_n_ui_getparent;
1327 static PyObject *__pyx_n_ui_groups;
1328 static PyObject *__pyx_n_ui_hex;
1329 static PyObject *__pyx_n_ui_href;
1330 static PyObject *__pyx_n_ui_ignore_old;
1331 static PyObject *__pyx_n_ui_ignore_pytype;
1332 static PyObject *__pyx_n_ui_ignore_xsi;
1333 static PyObject *__pyx_n_ui_index;
1334 static PyObject *__pyx_n_ui_insert;
1335 static PyObject *__pyx_n_u_int;
1336 static PyObject *__pyx_n_u_integer;
1337 static PyObject *__pyx_n_bi_islice;
1338 static PyObject *__pyx_n_ui_islice;
1339 static PyObject *__pyx_n_ui_items;
1340 static PyObject *__pyx_n_ui_iterchildren;
1341 static PyObject *__pyx_n_ui_itertools;
1342 static PyObject *__pyx_n_ui_join;
1343 static PyObject *__pyx_n_u_language;
1344 static PyObject *__pyx_n_ui_last;
1345 static PyObject *__pyx_n_u_long;
1346 static PyObject *__pyx_n_ui_lxml;
1347 static PyObject *__pyx_n_ui_makeelement;
1348 static PyObject *__pyx_n_u_makeparser;
1349 static PyObject *__pyx_n_ui_map;
1350 static PyObject *__pyx_n_ui_match;
1351 static PyObject *__pyx_n_ui_name;
1352 static PyObject *__pyx_n_ui_namespace;
1353 static PyObject *__pyx_n_u_negativeInteger;
1354 static PyObject *__pyx_n_ui_new_parser;
1355 static PyObject *__pyx_n_ui_next;
1356 static PyObject *__pyx_n_u_nonNegativeInteger;
1357 static PyObject *__pyx_n_u_nonPositiveInteger;
1358 static PyObject *__pyx_n_u_none;
1359 static PyObject *__pyx_n_u_normalizedString;
1360 static PyObject *__pyx_n_ui_nsmap;
1361 static PyObject *__pyx_n_ui_object;
1362 static PyObject *__pyx_n_ui_oct;
1363 static PyObject *__pyx_n_ui_on;
1364 static PyObject *__pyx_n_ui_parent;
1365 static PyObject *__pyx_n_u_parse;
1366 static PyObject *__pyx_n_ui_parse;
1367 static PyObject *__pyx_n_ui_parser;
1368 static PyObject *__pyx_n_ui_path;
1369 static PyObject *__pyx_n_ui_pickle;
1370 static PyObject *__pyx_n_ui_pickleReduceElement;
1371 static PyObject *__pyx_n_u_positiveInteger;
1372 static PyObject *__pyx_n_ui_prefix;
1373 static PyObject *__pyx_n_ui_prev;
1374 static PyObject *__pyx_n_u_py;
1375 static PyObject *__pyx_n_u_pyannotate;
1376 static PyObject *__pyx_n_u_pytype;
1377 static PyObject *__pyx_n_ui_pytype;
1378 static PyObject *__pyx_n_u_pytypename;
1379 static PyObject *__pyx_n_u_pyval;
1380 static PyObject *__pyx_n_ui_pyval;
1381 static PyObject *__pyx_n_ui_re;
1382 static PyObject *__pyx_n_ui_register;
1383 static PyObject *__pyx_n_ui_remove;
1384 static PyObject *__pyx_n_b_remove_blank_text;
1385 static PyObject *__pyx_n_u_remove_blank_text;
1386 static PyObject *__pyx_n_ui_remove_blank_text;
1387 static PyObject *__pyx_n_ui_replace;
1388 static PyObject *__pyx_n_ui_root;
1389 static PyObject *__pyx_n_u_set_default_parser;
1390 static PyObject *__pyx_n_u_short;
1391 static PyObject *__pyx_n_ui_split;
1392 static PyObject *__pyx_n_ui_start;
1393 static PyObject *__pyx_n_ui_step;
1394 static PyObject *__pyx_n_u_str;
1395 static PyObject *__pyx_n_u_string;
1396 static PyObject *__pyx_n_ui_stringify;
1397 static PyObject *__pyx_n_ui_strip;
1398 static PyObject *__pyx_n_ui_strip_attributes;
1399 static PyObject *__pyx_n_u_tag;
1400 static PyObject *__pyx_n_ui_tag;
1401 static PyObject *__pyx_n_u_tail;
1402 static PyObject *__pyx_n_u_text;
1403 static PyObject *__pyx_n_ui_text;
1404 static PyObject *__pyx_n_u_token;
1405 static PyObject *__pyx_n_ui_tostring;
1406 static PyObject *__pyx_n_ui_tree_class;
1407 static PyObject *__pyx_n_u_true;
1408 static PyObject *__pyx_n_ui_type;
1409 static PyObject *__pyx_n_ui_type_check;
1410 static PyObject *__pyx_n_ui_type_class;
1411 static PyObject *__pyx_n_u_unsignedByte;
1412 static PyObject *__pyx_n_u_unsignedInt;
1413 static PyObject *__pyx_n_u_unsignedLong;
1414 static PyObject *__pyx_n_u_unsignedShort;
1415 static PyObject *__pyx_n_ui_update;
1416 static PyObject *__pyx_n_u_value;
1417 static PyObject *__pyx_n_ui_value;
1418 static PyObject *__pyx_n_ui_values;
1419 static PyObject *__pyx_n_ui_xml;
1420 static PyObject *__pyx_n_ui_xmlSchemaTypes;
1421 static PyObject *__pyx_n_u_xsd;
1422 static PyObject *__pyx_n_u_xsi;
1423 static PyObject *__pyx_n_ui_xsi;
1424 static PyObject *__pyx_n_ui_xsi_nil;
1425 static PyObject *__pyx_n_u_xsiannotate;
1426 static PyObject *__pyx_int_0;
1427 static PyObject *__pyx_int_1;
1428 static PyObject *__pyx_int_neg_1;
1429 static PyObject *__pyx_k_22;
1430 static PyObject *__pyx_k_25;
1431 static PyObject *__pyx_k_33;
1432 static PyObject *__pyx_k_34;
1433 static PyObject *__pyx_k_35;
1434 static PyObject *__pyx_k_36;
1435 static PyObject *__pyx_k_37;
1436 static PyObject *__pyx_k_38;
1437 static PyObject *__pyx_k_39;
1438 static PyObject *__pyx_k_40;
1439 static PyObject *__pyx_k_41;
1440
1441 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":40
1442  * from itertools import islice
1443  * 
1444  * cdef object _typename(object t):             # <<<<<<<<<<<<<<
1445  *     cdef char* c_name
1446  *     cdef char* s
1447  */
1448
1449 static  PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *__pyx_v_t) {
1450   char *__pyx_v_c_name;
1451   char *__pyx_v_s;
1452   PyObject *__pyx_r = NULL;
1453   int __pyx_t_1;
1454   PyObject *__pyx_t_2 = NULL;
1455   __Pyx_SetupRefcountContext("_typename");
1456   __Pyx_INCREF(__pyx_v_t);
1457
1458   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":43
1459  *     cdef char* c_name
1460  *     cdef char* s
1461  *     c_name = python._fqtypename(t)             # <<<<<<<<<<<<<<
1462  *     s = cstd.strrchr(c_name, c'.')
1463  *     if s is not NULL:
1464  */
1465   __pyx_v_c_name = _fqtypename(__pyx_v_t);
1466
1467   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":44
1468  *     cdef char* s
1469  *     c_name = python._fqtypename(t)
1470  *     s = cstd.strrchr(c_name, c'.')             # <<<<<<<<<<<<<<
1471  *     if s is not NULL:
1472  *         c_name = s + 1
1473  */
1474   __pyx_v_s = strrchr(__pyx_v_c_name, '.');
1475
1476   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":45
1477  *     c_name = python._fqtypename(t)
1478  *     s = cstd.strrchr(c_name, c'.')
1479  *     if s is not NULL:             # <<<<<<<<<<<<<<
1480  *         c_name = s + 1
1481  *     return pyunicode(c_name)
1482  */
1483   __pyx_t_1 = (__pyx_v_s != NULL);
1484   if (__pyx_t_1) {
1485
1486     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":46
1487  *     s = cstd.strrchr(c_name, c'.')
1488  *     if s is not NULL:
1489  *         c_name = s + 1             # <<<<<<<<<<<<<<
1490  *     return pyunicode(c_name)
1491  * 
1492  */
1493     __pyx_v_c_name = (__pyx_v_s + 1);
1494     goto __pyx_L3;
1495   }
1496   __pyx_L3:;
1497
1498   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":47
1499  *     if s is not NULL:
1500  *         c_name = s + 1
1501  *     return pyunicode(c_name)             # <<<<<<<<<<<<<<
1502  * 
1503  * # namespace/name for "pytype" hint attribute
1504  */
1505   __Pyx_XDECREF(__pyx_r);
1506   __pyx_t_2 = pyunicode(__pyx_v_c_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1507   __Pyx_GOTREF(__pyx_t_2);
1508   __pyx_r = __pyx_t_2;
1509   __pyx_t_2 = 0;
1510   goto __pyx_L0;
1511
1512   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1513   goto __pyx_L0;
1514   __pyx_L1_error:;
1515   __Pyx_XDECREF(__pyx_t_2);
1516   __Pyx_AddTraceback("lxml.objectify._typename");
1517   __pyx_r = 0;
1518   __pyx_L0:;
1519   __Pyx_DECREF(__pyx_v_t);
1520   __Pyx_XGIVEREF(__pyx_r);
1521   __Pyx_FinishRefcountContext();
1522   return __pyx_r;
1523 }
1524
1525 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":63
1526  * TREE_PYTYPE_NAME = u"TREE"
1527  * 
1528  * cdef _unicodeAndUtf8(s):             # <<<<<<<<<<<<<<
1529  *     return (s, python.PyUnicode_AsUTF8String(s))
1530  * 
1531  */
1532
1533 static  PyObject *__pyx_f_4lxml_9objectify__unicodeAndUtf8(PyObject *__pyx_v_s) {
1534   PyObject *__pyx_r = NULL;
1535   PyObject *__pyx_t_1 = NULL;
1536   PyObject *__pyx_t_2 = NULL;
1537   __Pyx_SetupRefcountContext("_unicodeAndUtf8");
1538
1539   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":64
1540  * 
1541  * cdef _unicodeAndUtf8(s):
1542  *     return (s, python.PyUnicode_AsUTF8String(s))             # <<<<<<<<<<<<<<
1543  * 
1544  * def set_pytype_attribute_tag(attribute_tag=None):
1545  */
1546   __Pyx_XDECREF(__pyx_r);
1547   __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1548   __Pyx_GOTREF(__pyx_t_1);
1549   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1550   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1551   __Pyx_INCREF(__pyx_v_s);
1552   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_s);
1553   __Pyx_GIVEREF(__pyx_v_s);
1554   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
1555   __Pyx_GIVEREF(__pyx_t_1);
1556   __pyx_t_1 = 0;
1557   __pyx_r = ((PyObject *)__pyx_t_2);
1558   __pyx_t_2 = 0;
1559   goto __pyx_L0;
1560
1561   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1562   goto __pyx_L0;
1563   __pyx_L1_error:;
1564   __Pyx_XDECREF(__pyx_t_1);
1565   __Pyx_XDECREF(__pyx_t_2);
1566   __Pyx_AddTraceback("lxml.objectify._unicodeAndUtf8");
1567   __pyx_r = 0;
1568   __pyx_L0:;
1569   __Pyx_XGIVEREF(__pyx_r);
1570   __Pyx_FinishRefcountContext();
1571   return __pyx_r;
1572 }
1573
1574 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":66
1575  *     return (s, python.PyUnicode_AsUTF8String(s))
1576  * 
1577  * def set_pytype_attribute_tag(attribute_tag=None):             # <<<<<<<<<<<<<<
1578  *     u"""set_pytype_attribute_tag(attribute_tag=None)
1579  *     Change name and namespace of the XML attribute that holds Python type
1580  */
1581
1582 static PyObject *__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1583 static char __pyx_doc_4lxml_9objectify_set_pytype_attribute_tag[] = "set_pytype_attribute_tag(attribute_tag=None)\n    Change name and namespace of the XML attribute that holds Python type\n    information.\n\n    Do not use this unless you know what you are doing.\n\n    Reset by calling without argument.\n\n    Default: \"{http://codespeak.net/lxml/objectify/pytype}pytype\"\n    ";
1584 static PyObject *__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1585   PyObject *__pyx_v_attribute_tag = 0;
1586   PyObject *__pyx_r = NULL;
1587   int __pyx_t_1;
1588   PyObject *__pyx_t_2 = NULL;
1589   PyObject *__pyx_t_3 = NULL;
1590   PyObject *__pyx_t_4 = NULL;
1591   PyObject *__pyx_t_5 = NULL;
1592   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_attribute_tag,0};
1593   __Pyx_SetupRefcountContext("set_pytype_attribute_tag");
1594   __pyx_self = __pyx_self;
1595   if (unlikely(__pyx_kwds)) {
1596     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
1597     PyObject* values[1] = {0};
1598     values[0] = ((PyObject *)Py_None);
1599     switch (PyTuple_GET_SIZE(__pyx_args)) {
1600       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1601       case  0: break;
1602       default: goto __pyx_L5_argtuple_error;
1603     }
1604     switch (PyTuple_GET_SIZE(__pyx_args)) {
1605       case  0:
1606       if (kw_args > 0) {
1607         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_attribute_tag);
1608         if (unlikely(value)) { values[0] = value; kw_args--; }
1609       }
1610     }
1611     if (unlikely(kw_args > 0)) {
1612       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "set_pytype_attribute_tag") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1613     }
1614     __pyx_v_attribute_tag = values[0];
1615   } else {
1616     __pyx_v_attribute_tag = ((PyObject *)Py_None);
1617     switch (PyTuple_GET_SIZE(__pyx_args)) {
1618       case  1: __pyx_v_attribute_tag = PyTuple_GET_ITEM(__pyx_args, 0);
1619       case  0: break;
1620       default: goto __pyx_L5_argtuple_error;
1621     }
1622   }
1623   goto __pyx_L4_argument_unpacking_done;
1624   __pyx_L5_argtuple_error:;
1625   __Pyx_RaiseArgtupleInvalid("set_pytype_attribute_tag", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1626   __pyx_L3_error:;
1627   __Pyx_AddTraceback("lxml.objectify.set_pytype_attribute_tag");
1628   return NULL;
1629   __pyx_L4_argument_unpacking_done:;
1630   __Pyx_INCREF(__pyx_v_attribute_tag);
1631
1632   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":80
1633  *     global PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8
1634  *     global PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8
1635  *     if attribute_tag is None:             # <<<<<<<<<<<<<<
1636  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
1637  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
1638  */
1639   __pyx_t_1 = (__pyx_v_attribute_tag == Py_None);
1640   if (__pyx_t_1) {
1641
1642     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":82
1643  *     if attribute_tag is None:
1644  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
1645  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")             # <<<<<<<<<<<<<<
1646  *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
1647  *             _unicodeAndUtf8(u"pytype")
1648  */
1649     __pyx_t_2 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(((PyObject *)__pyx_kp_u_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1650     __Pyx_GOTREF(__pyx_t_2);
1651     if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
1652       PyObject* tuple = __pyx_t_2;
1653       __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
1654       __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
1655
1656       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":81
1657  *     global PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8
1658  *     if attribute_tag is None:
1659  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \             # <<<<<<<<<<<<<<
1660  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
1661  *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
1662  */
1663       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1664       __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
1665       __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
1666       __Pyx_GIVEREF(__pyx_t_3);
1667       __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_t_3;
1668       __pyx_t_3 = 0;
1669       __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1670       __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1671       __Pyx_GIVEREF(__pyx_t_4);
1672       __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_t_4;
1673       __pyx_t_4 = 0;
1674     } else {
1675       __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1676       __Pyx_GOTREF(__pyx_t_5);
1677       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1678       __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1679       __Pyx_GOTREF(__pyx_t_3);
1680       __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1681       __Pyx_GOTREF(__pyx_t_4);
1682       if (__Pyx_EndUnpack(__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1683       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1684       __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
1685       __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
1686       __Pyx_GIVEREF(__pyx_t_3);
1687       __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_t_3;
1688       __pyx_t_3 = 0;
1689       __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1690       __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1691       __Pyx_GIVEREF(__pyx_t_4);
1692       __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_t_4;
1693       __pyx_t_4 = 0;
1694     }
1695
1696     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":84
1697  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
1698  *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
1699  *             _unicodeAndUtf8(u"pytype")             # <<<<<<<<<<<<<<
1700  *     else:
1701  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
1702  */
1703     __pyx_t_2 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(((PyObject *)__pyx_n_u_pytype)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1704     __Pyx_GOTREF(__pyx_t_2);
1705     if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
1706       PyObject* tuple = __pyx_t_2;
1707       __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
1708       __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
1709
1710       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":83
1711  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
1712  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
1713  *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \             # <<<<<<<<<<<<<<
1714  *             _unicodeAndUtf8(u"pytype")
1715  *     else:
1716  */
1717       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1718       __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
1719       __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
1720       __Pyx_GIVEREF(__pyx_t_4);
1721       __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_t_4;
1722       __pyx_t_4 = 0;
1723       __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1724       __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1725       __Pyx_GIVEREF(__pyx_t_3);
1726       __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_t_3;
1727       __pyx_t_3 = 0;
1728     } else {
1729       __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1730       __Pyx_GOTREF(__pyx_t_5);
1731       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1732       __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1733       __Pyx_GOTREF(__pyx_t_4);
1734       __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1735       __Pyx_GOTREF(__pyx_t_3);
1736       if (__Pyx_EndUnpack(__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1737       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1738       __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
1739       __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
1740       __Pyx_GIVEREF(__pyx_t_4);
1741       __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_t_4;
1742       __pyx_t_4 = 0;
1743       __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1744       __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1745       __Pyx_GIVEREF(__pyx_t_3);
1746       __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_t_3;
1747       __pyx_t_3 = 0;
1748     }
1749     goto __pyx_L6;
1750   }
1751   /*else*/ {
1752
1753     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":87
1754  *     else:
1755  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
1756  *             cetree.getNsTag(attribute_tag)             # <<<<<<<<<<<<<<
1757  *         PYTYPE_NAMESPACE = python.PyUnicode_FromEncodedObject(
1758  *             PYTYPE_NAMESPACE_UTF8, 'UTF-8', NULL)
1759  */
1760     __pyx_t_2 = getNsTag(__pyx_v_attribute_tag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1761     __Pyx_GOTREF(__pyx_t_2);
1762     if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
1763       PyObject* tuple = __pyx_t_2;
1764       __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
1765       __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
1766
1767       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":86
1768  *             _unicodeAndUtf8(u"pytype")
1769  *     else:
1770  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \             # <<<<<<<<<<<<<<
1771  *             cetree.getNsTag(attribute_tag)
1772  *         PYTYPE_NAMESPACE = python.PyUnicode_FromEncodedObject(
1773  */
1774       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1775       __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1776       __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1777       __Pyx_GIVEREF(__pyx_t_3);
1778       __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_t_3;
1779       __pyx_t_3 = 0;
1780       __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1781       __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1782       __Pyx_GIVEREF(__pyx_t_4);
1783       __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_t_4;
1784       __pyx_t_4 = 0;
1785     } else {
1786       __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1787       __Pyx_GOTREF(__pyx_t_5);
1788       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1789       __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1790       __Pyx_GOTREF(__pyx_t_3);
1791       __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1792       __Pyx_GOTREF(__pyx_t_4);
1793       if (__Pyx_EndUnpack(__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1794       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1795       __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1796       __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1797       __Pyx_GIVEREF(__pyx_t_3);
1798       __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_t_3;
1799       __pyx_t_3 = 0;
1800       __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1801       __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1802       __Pyx_GIVEREF(__pyx_t_4);
1803       __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_t_4;
1804       __pyx_t_4 = 0;
1805     }
1806
1807     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":89
1808  *             cetree.getNsTag(attribute_tag)
1809  *         PYTYPE_NAMESPACE = python.PyUnicode_FromEncodedObject(
1810  *             PYTYPE_NAMESPACE_UTF8, 'UTF-8', NULL)             # <<<<<<<<<<<<<<
1811  *         PYTYPE_ATTRIBUTE_NAME = python.PyUnicode_FromEncodedObject(
1812  *             PYTYPE_ATTRIBUTE_NAME_UTF8, 'UTF-8', NULL)
1813  */
1814     __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8, __pyx_k_2, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815     __Pyx_GOTREF(__pyx_t_2);
1816     __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
1817     __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
1818     __Pyx_GIVEREF(__pyx_t_2);
1819     __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_t_2;
1820     __pyx_t_2 = 0;
1821
1822     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":91
1823  *             PYTYPE_NAMESPACE_UTF8, 'UTF-8', NULL)
1824  *         PYTYPE_ATTRIBUTE_NAME = python.PyUnicode_FromEncodedObject(
1825  *             PYTYPE_ATTRIBUTE_NAME_UTF8, 'UTF-8', NULL)             # <<<<<<<<<<<<<<
1826  * 
1827  *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE_UTF8)
1828  */
1829     __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8, __pyx_k_2, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1830     __Pyx_GOTREF(__pyx_t_2);
1831     __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
1832     __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
1833     __Pyx_GIVEREF(__pyx_t_2);
1834     __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_t_2;
1835     __pyx_t_2 = 0;
1836   }
1837   __pyx_L6:;
1838
1839   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":93
1840  *             PYTYPE_ATTRIBUTE_NAME_UTF8, 'UTF-8', NULL)
1841  * 
1842  *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE_UTF8)             # <<<<<<<<<<<<<<
1843  *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME_UTF8)
1844  *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
1845  */
1846   __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE = PyString_AS_STRING(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1847
1848   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":94
1849  * 
1850  *     _PYTYPE_NAMESPACE      = _cstr(PYTYPE_NAMESPACE_UTF8)
1851  *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME_UTF8)             # <<<<<<<<<<<<<<
1852  *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
1853  *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
1854  */
1855   __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME = PyString_AS_STRING(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1856
1857   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":96
1858  *     _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME_UTF8)
1859  *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
1860  *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
1861  * 
1862  * set_pytype_attribute_tag()
1863  */
1864   __pyx_t_2 = namespacedNameFromNsName(__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1865   __Pyx_GOTREF(__pyx_t_2);
1866   if (PyObject_SetAttr(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1867   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1868
1869   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1870   goto __pyx_L0;
1871   __pyx_L1_error:;
1872   __Pyx_XDECREF(__pyx_t_2);
1873   __Pyx_XDECREF(__pyx_t_3);
1874   __Pyx_XDECREF(__pyx_t_4);
1875   __Pyx_XDECREF(__pyx_t_5);
1876   __Pyx_AddTraceback("lxml.objectify.set_pytype_attribute_tag");
1877   __pyx_r = NULL;
1878   __pyx_L0:;
1879   __Pyx_DECREF(__pyx_v_attribute_tag);
1880   __Pyx_XGIVEREF(__pyx_r);
1881   __Pyx_FinishRefcountContext();
1882   return __pyx_r;
1883 }
1884
1885 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":140
1886  *     subclasses.
1887  *     """
1888  *     def __iter__(self):             # <<<<<<<<<<<<<<
1889  *         u"""Iterate over self and all siblings with the same tag.
1890  *         """
1891  */
1892
1893 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(PyObject *__pyx_v_self); /*proto*/
1894 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__[] = "Iterate over self and all siblings with the same tag.\n        ";
1895 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(PyObject *__pyx_v_self) {
1896   PyObject *__pyx_v_parent;
1897   PyObject *__pyx_r = NULL;
1898   PyObject *__pyx_t_1 = NULL;
1899   PyObject *__pyx_t_2 = NULL;
1900   int __pyx_t_3;
1901   PyObject *__pyx_t_4 = NULL;
1902   PyObject *__pyx_t_5 = NULL;
1903   __Pyx_SetupRefcountContext("__iter__");
1904   __Pyx_INCREF((PyObject *)__pyx_v_self);
1905   __pyx_v_parent = Py_None; __Pyx_INCREF(Py_None);
1906
1907   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":143
1908  *         u"""Iterate over self and all siblings with the same tag.
1909  *         """
1910  *         parent = self.getparent()             # <<<<<<<<<<<<<<
1911  *         if parent is None:
1912  *             return iter([self])
1913  */
1914   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui_getparent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1915   __Pyx_GOTREF(__pyx_t_1);
1916   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1917   __Pyx_GOTREF(__pyx_t_2);
1918   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1919   __Pyx_DECREF(__pyx_v_parent);
1920   __pyx_v_parent = __pyx_t_2;
1921   __pyx_t_2 = 0;
1922
1923   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":144
1924  *         """
1925  *         parent = self.getparent()
1926  *         if parent is None:             # <<<<<<<<<<<<<<
1927  *             return iter([self])
1928  *         return etree.ElementChildIterator(parent, tag=self.tag)
1929  */
1930   __pyx_t_3 = (__pyx_v_parent == Py_None);
1931   if (__pyx_t_3) {
1932
1933     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":145
1934  *         parent = self.getparent()
1935  *         if parent is None:
1936  *             return iter([self])             # <<<<<<<<<<<<<<
1937  *         return etree.ElementChildIterator(parent, tag=self.tag)
1938  * 
1939  */
1940     __Pyx_XDECREF(__pyx_r);
1941     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1942     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1943     __Pyx_INCREF(__pyx_v_self);
1944     PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
1945     __Pyx_GIVEREF(__pyx_v_self);
1946     __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1947     __Pyx_GOTREF(__pyx_t_1);
1948     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
1949     __pyx_r = __pyx_t_1;
1950     __pyx_t_1 = 0;
1951     goto __pyx_L0;
1952     goto __pyx_L5;
1953   }
1954   __pyx_L5:;
1955
1956   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":146
1957  *         if parent is None:
1958  *             return iter([self])
1959  *         return etree.ElementChildIterator(parent, tag=self.tag)             # <<<<<<<<<<<<<<
1960  * 
1961  *     def __str__(self):
1962  */
1963   __Pyx_XDECREF(__pyx_r);
1964   __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1965   __Pyx_GOTREF(__pyx_t_1);
1966   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1967   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1968   __Pyx_INCREF(__pyx_v_parent);
1969   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_parent);
1970   __Pyx_GIVEREF(__pyx_v_parent);
1971   __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1972   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
1973   __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui_tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1974   __Pyx_GOTREF(__pyx_t_5);
1975   if (PyDict_SetItem(__pyx_t_4, __pyx_n_ui_tag, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1976   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1977   __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1978   __Pyx_GOTREF(__pyx_t_5);
1979   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1980   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
1981   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
1982   __pyx_r = __pyx_t_5;
1983   __pyx_t_5 = 0;
1984   goto __pyx_L0;
1985
1986   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1987   goto __pyx_L0;
1988   __pyx_L1_error:;
1989   __Pyx_XDECREF(__pyx_t_1);
1990   __Pyx_XDECREF(__pyx_t_2);
1991   __Pyx_XDECREF(__pyx_t_4);
1992   __Pyx_XDECREF(__pyx_t_5);
1993   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__iter__");
1994   __pyx_r = NULL;
1995   __pyx_L0:;
1996   __Pyx_DECREF(__pyx_v_parent);
1997   __Pyx_DECREF((PyObject *)__pyx_v_self);
1998   __Pyx_XGIVEREF(__pyx_r);
1999   __Pyx_FinishRefcountContext();
2000   return __pyx_r;
2001 }
2002
2003 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":148
2004  *         return etree.ElementChildIterator(parent, tag=self.tag)
2005  * 
2006  *     def __str__(self):             # <<<<<<<<<<<<<<
2007  *         if __RECURSIVE_STR:
2008  *             return _dump(self, 0)
2009  */
2010
2011 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__(PyObject *__pyx_v_self); /*proto*/
2012 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__(PyObject *__pyx_v_self) {
2013   PyObject *__pyx_r = NULL;
2014   int __pyx_t_1;
2015   PyObject *__pyx_t_2 = NULL;
2016   PyObject *__pyx_t_3 = NULL;
2017   __Pyx_SetupRefcountContext("__str__");
2018   __Pyx_INCREF((PyObject *)__pyx_v_self);
2019
2020   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":149
2021  * 
2022  *     def __str__(self):
2023  *         if __RECURSIVE_STR:             # <<<<<<<<<<<<<<
2024  *             return _dump(self, 0)
2025  *         else:
2026  */
2027   __pyx_t_1 = __pyx_v_4lxml_9objectify___RECURSIVE_STR;
2028   if (__pyx_t_1) {
2029
2030     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":150
2031  *     def __str__(self):
2032  *         if __RECURSIVE_STR:
2033  *             return _dump(self, 0)             # <<<<<<<<<<<<<<
2034  *         else:
2035  *             return textOf(self._c_node) or u''
2036  */
2037     __Pyx_XDECREF(__pyx_r);
2038     __pyx_t_2 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_self), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2039     __Pyx_GOTREF(__pyx_t_2);
2040     __pyx_r = __pyx_t_2;
2041     __pyx_t_2 = 0;
2042     goto __pyx_L0;
2043     goto __pyx_L5;
2044   }
2045   /*else*/ {
2046
2047     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":152
2048  *             return _dump(self, 0)
2049  *         else:
2050  *             return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
2051  * 
2052  *     property text:
2053  */
2054     __Pyx_XDECREF(__pyx_r);
2055     __pyx_t_2 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2056     __Pyx_GOTREF(__pyx_t_2);
2057     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2058     if (!__pyx_t_1) {
2059       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2060       __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
2061       __pyx_t_3 = __pyx_kp_u_4;
2062     } else {
2063       __pyx_t_3 = __pyx_t_2;
2064       __pyx_t_2 = 0;
2065     }
2066     __pyx_r = __pyx_t_3;
2067     __pyx_t_3 = 0;
2068     goto __pyx_L0;
2069   }
2070   __pyx_L5:;
2071
2072   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2073   goto __pyx_L0;
2074   __pyx_L1_error:;
2075   __Pyx_XDECREF(__pyx_t_2);
2076   __Pyx_XDECREF(__pyx_t_3);
2077   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__str__");
2078   __pyx_r = NULL;
2079   __pyx_L0:;
2080   __Pyx_DECREF((PyObject *)__pyx_v_self);
2081   __Pyx_XGIVEREF(__pyx_r);
2082   __Pyx_FinishRefcountContext();
2083   return __pyx_r;
2084 }
2085
2086 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":155
2087  * 
2088  *     property text:
2089  *         def __get__(self):             # <<<<<<<<<<<<<<
2090  *             return textOf(self._c_node)
2091  * 
2092  */
2093
2094 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(PyObject *__pyx_v_self); /*proto*/
2095 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(PyObject *__pyx_v_self) {
2096   PyObject *__pyx_r = NULL;
2097   PyObject *__pyx_t_1 = NULL;
2098   __Pyx_SetupRefcountContext("__get__");
2099
2100   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":156
2101  *     property text:
2102  *         def __get__(self):
2103  *             return textOf(self._c_node)             # <<<<<<<<<<<<<<
2104  * 
2105  *     property __dict__:
2106  */
2107   __Pyx_XDECREF(__pyx_r);
2108   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2109   __Pyx_GOTREF(__pyx_t_1);
2110   __pyx_r = __pyx_t_1;
2111   __pyx_t_1 = 0;
2112   goto __pyx_L0;
2113
2114   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2115   goto __pyx_L0;
2116   __pyx_L1_error:;
2117   __Pyx_XDECREF(__pyx_t_1);
2118   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.text.__get__");
2119   __pyx_r = NULL;
2120   __pyx_L0:;
2121   __Pyx_XGIVEREF(__pyx_r);
2122   __Pyx_FinishRefcountContext();
2123   return __pyx_r;
2124 }
2125
2126 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":163
2127  *         Note that this only considers the first child with a given name.
2128  *         """
2129  *         def __get__(self):             # <<<<<<<<<<<<<<
2130  *             cdef char* c_ns
2131  *             cdef char* c_child_ns
2132  */
2133
2134 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(PyObject *__pyx_v_self); /*proto*/
2135 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(PyObject *__pyx_v_self) {
2136   char *__pyx_v_c_ns;
2137   struct LxmlElement *__pyx_v_child;
2138   PyObject *__pyx_v_children;
2139   PyObject *__pyx_v_tag;
2140   PyObject *__pyx_v_name;
2141   PyObject *__pyx_r = NULL;
2142   int __pyx_t_1;
2143   PyObject *__pyx_t_2 = NULL;
2144   PyObject *__pyx_t_3 = NULL;
2145   Py_ssize_t __pyx_t_4;
2146   PyObject *__pyx_t_5 = NULL;
2147   PyObject *__pyx_t_6 = NULL;
2148   __Pyx_SetupRefcountContext("__get__");
2149   __Pyx_INCREF((PyObject *)__pyx_v_self);
2150   __pyx_v_child = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
2151   __pyx_v_children = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
2152   __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
2153   __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
2154
2155   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":168
2156  *             cdef _Element child
2157  *             cdef dict children
2158  *             c_ns = tree._getNs(self._c_node)             # <<<<<<<<<<<<<<
2159  *             if c_ns is NULL:
2160  *                 tag = None
2161  */
2162   __pyx_v_c_ns = _getNs(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node);
2163
2164   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":169
2165  *             cdef dict children
2166  *             c_ns = tree._getNs(self._c_node)
2167  *             if c_ns is NULL:             # <<<<<<<<<<<<<<
2168  *                 tag = None
2169  *             else:
2170  */
2171   __pyx_t_1 = (__pyx_v_c_ns == NULL);
2172   if (__pyx_t_1) {
2173
2174     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":170
2175  *             c_ns = tree._getNs(self._c_node)
2176  *             if c_ns is NULL:
2177  *                 tag = None             # <<<<<<<<<<<<<<
2178  *             else:
2179  *                 tag = u"{%s}*" % pyunicode(c_ns)
2180  */
2181     __Pyx_INCREF(Py_None);
2182     __Pyx_DECREF(__pyx_v_tag);
2183     __pyx_v_tag = Py_None;
2184     goto __pyx_L5;
2185   }
2186   /*else*/ {
2187
2188     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":172
2189  *                 tag = None
2190  *             else:
2191  *                 tag = u"{%s}*" % pyunicode(c_ns)             # <<<<<<<<<<<<<<
2192  *             children = {}
2193  *             for child in etree.ElementChildIterator(self, tag=tag):
2194  */
2195     __pyx_t_2 = pyunicode(__pyx_v_c_ns); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2196     __Pyx_GOTREF(__pyx_t_2);
2197     __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_5), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2198     __Pyx_GOTREF(__pyx_t_3);
2199     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2200     __Pyx_DECREF(__pyx_v_tag);
2201     __pyx_v_tag = __pyx_t_3;
2202     __pyx_t_3 = 0;
2203   }
2204   __pyx_L5:;
2205
2206   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":173
2207  *             else:
2208  *                 tag = u"{%s}*" % pyunicode(c_ns)
2209  *             children = {}             # <<<<<<<<<<<<<<
2210  *             for child in etree.ElementChildIterator(self, tag=tag):
2211  *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
2212  */
2213   __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2214   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
2215   __Pyx_DECREF(((PyObject *)__pyx_v_children));
2216   __pyx_v_children = __pyx_t_3;
2217   __pyx_t_3 = 0;
2218
2219   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":174
2220  *                 tag = u"{%s}*" % pyunicode(c_ns)
2221  *             children = {}
2222  *             for child in etree.ElementChildIterator(self, tag=tag):             # <<<<<<<<<<<<<<
2223  *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
2224  *                     continue
2225  */
2226   __pyx_t_3 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2227   __Pyx_GOTREF(__pyx_t_3);
2228   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2229   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
2230   __Pyx_INCREF(__pyx_v_self);
2231   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
2232   __Pyx_GIVEREF(__pyx_v_self);
2233   __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2234   __Pyx_GOTREF(((PyObject *)__pyx_t_5));
2235   if (PyDict_SetItem(__pyx_t_5, __pyx_n_ui_tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2236   __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2237   __Pyx_GOTREF(__pyx_t_6);
2238   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2239   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
2240   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
2241   if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
2242     __pyx_t_4 = 0; __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5);
2243   } else {
2244     __pyx_t_4 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2245     __Pyx_GOTREF(__pyx_t_5);
2246   }
2247   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2248   for (;;) {
2249     if (likely(PyList_CheckExact(__pyx_t_5))) {
2250       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)) break;
2251       __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++;
2252     } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
2253       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
2254       __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++;
2255     } else {
2256       __pyx_t_6 = PyIter_Next(__pyx_t_5);
2257       if (!__pyx_t_6) {
2258         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2259         break;
2260       }
2261       __Pyx_GOTREF(__pyx_t_6);
2262     }
2263     if (!(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2264     __Pyx_DECREF(((PyObject *)__pyx_v_child));
2265     __pyx_v_child = ((struct LxmlElement *)__pyx_t_6);
2266     __pyx_t_6 = 0;
2267
2268     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":175
2269  *             children = {}
2270  *             for child in etree.ElementChildIterator(self, tag=tag):
2271  *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:             # <<<<<<<<<<<<<<
2272  *                     continue
2273  *                 name = pyunicode(child._c_node.name)
2274  */
2275     if ((__pyx_v_c_ns == NULL)) {
2276       __pyx_t_1 = (_getNs(__pyx_v_child->_c_node) != NULL);
2277     } else {
2278       __pyx_t_1 = (__pyx_v_c_ns == NULL);
2279     }
2280     if (__pyx_t_1) {
2281
2282       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":176
2283  *             for child in etree.ElementChildIterator(self, tag=tag):
2284  *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
2285  *                     continue             # <<<<<<<<<<<<<<
2286  *                 name = pyunicode(child._c_node.name)
2287  *                 if python.PyDict_GetItem(children, name) is NULL:
2288  */
2289       goto __pyx_L6_continue;
2290       goto __pyx_L8;
2291     }
2292     __pyx_L8:;
2293
2294     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":177
2295  *                 if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
2296  *                     continue
2297  *                 name = pyunicode(child._c_node.name)             # <<<<<<<<<<<<<<
2298  *                 if python.PyDict_GetItem(children, name) is NULL:
2299  *                     children[name] = child
2300  */
2301     __pyx_t_6 = pyunicode(__pyx_v_child->_c_node->name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2302     __Pyx_GOTREF(__pyx_t_6);
2303     __Pyx_DECREF(__pyx_v_name);
2304     __pyx_v_name = __pyx_t_6;
2305     __pyx_t_6 = 0;
2306
2307     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":178
2308  *                     continue
2309  *                 name = pyunicode(child._c_node.name)
2310  *                 if python.PyDict_GetItem(children, name) is NULL:             # <<<<<<<<<<<<<<
2311  *                     children[name] = child
2312  *             return children
2313  */
2314     __pyx_t_1 = (PyDict_GetItem(((PyObject *)__pyx_v_children), __pyx_v_name) == NULL);
2315     if (__pyx_t_1) {
2316
2317       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":179
2318  *                 name = pyunicode(child._c_node.name)
2319  *                 if python.PyDict_GetItem(children, name) is NULL:
2320  *                     children[name] = child             # <<<<<<<<<<<<<<
2321  *             return children
2322  * 
2323  */
2324       if (PyDict_SetItem(((PyObject *)__pyx_v_children), __pyx_v_name, ((PyObject *)__pyx_v_child)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2325       goto __pyx_L9;
2326     }
2327     __pyx_L9:;
2328     __pyx_L6_continue:;
2329   }
2330   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2331
2332   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":180
2333  *                 if python.PyDict_GetItem(children, name) is NULL:
2334  *                     children[name] = child
2335  *             return children             # <<<<<<<<<<<<<<
2336  * 
2337  *     def __len__(self):
2338  */
2339   __Pyx_XDECREF(__pyx_r);
2340   __Pyx_INCREF(((PyObject *)__pyx_v_children));
2341   __pyx_r = ((PyObject *)__pyx_v_children);
2342   goto __pyx_L0;
2343
2344   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2345   goto __pyx_L0;
2346   __pyx_L1_error:;
2347   __Pyx_XDECREF(__pyx_t_2);
2348   __Pyx_XDECREF(__pyx_t_3);
2349   __Pyx_XDECREF(__pyx_t_5);
2350   __Pyx_XDECREF(__pyx_t_6);
2351   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__dict__.__get__");
2352   __pyx_r = NULL;
2353   __pyx_L0:;
2354   __Pyx_DECREF((PyObject *)__pyx_v_child);
2355   __Pyx_DECREF(__pyx_v_children);
2356   __Pyx_DECREF(__pyx_v_tag);
2357   __Pyx_DECREF(__pyx_v_name);
2358   __Pyx_DECREF((PyObject *)__pyx_v_self);
2359   __Pyx_XGIVEREF(__pyx_r);
2360   __Pyx_FinishRefcountContext();
2361   return __pyx_r;
2362 }
2363
2364 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":182
2365  *             return children
2366  * 
2367  *     def __len__(self):             # <<<<<<<<<<<<<<
2368  *         u"""Count self and siblings with the same tag.
2369  *         """
2370  */
2371
2372 static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__(PyObject *__pyx_v_self); /*proto*/
2373 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___len__[] = "Count self and siblings with the same tag.\n        ";
2374 static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__(PyObject *__pyx_v_self) {
2375   Py_ssize_t __pyx_r;
2376   __Pyx_SetupRefcountContext("__len__");
2377
2378   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":185
2379  *         u"""Count self and siblings with the same tag.
2380  *         """
2381  *         return _countSiblings(self._c_node)             # <<<<<<<<<<<<<<
2382  * 
2383  *     def countchildren(self):
2384  */
2385   __pyx_r = __pyx_f_4lxml_9objectify__countSiblings(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node);
2386   goto __pyx_L0;
2387
2388   __pyx_r = 0;
2389   __pyx_L0:;
2390   __Pyx_FinishRefcountContext();
2391   return __pyx_r;
2392 }
2393
2394 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":187
2395  *         return _countSiblings(self._c_node)
2396  * 
2397  *     def countchildren(self):             # <<<<<<<<<<<<<<
2398  *         u"""countchildren(self)
2399  * 
2400  */
2401
2402 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_countchildren(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
2403 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_countchildren[] = "countchildren(self)\n\n        Return the number of children of this element, regardless of their\n        name.\n        ";
2404 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_countchildren(PyObject *__pyx_v_self, PyObject *unused) {
2405   Py_ssize_t __pyx_v_c;
2406   xmlNode *__pyx_v_c_node;
2407   PyObject *__pyx_r = NULL;
2408   int __pyx_t_1;
2409   PyObject *__pyx_t_2 = NULL;
2410   __Pyx_SetupRefcountContext("countchildren");
2411   __Pyx_INCREF((PyObject *)__pyx_v_self);
2412
2413   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":196
2414  *         cdef Py_ssize_t c
2415  *         cdef tree.xmlNode* c_node
2416  *         c = 0             # <<<<<<<<<<<<<<
2417  *         c_node = self._c_node.children
2418  *         while c_node is not NULL:
2419  */
2420   __pyx_v_c = 0;
2421
2422   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":197
2423  *         cdef tree.xmlNode* c_node
2424  *         c = 0
2425  *         c_node = self._c_node.children             # <<<<<<<<<<<<<<
2426  *         while c_node is not NULL:
2427  *             if tree._isElement(c_node):
2428  */
2429   __pyx_v_c_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->children;
2430
2431   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":198
2432  *         c = 0
2433  *         c_node = self._c_node.children
2434  *         while c_node is not NULL:             # <<<<<<<<<<<<<<
2435  *             if tree._isElement(c_node):
2436  *                 c = c + 1
2437  */
2438   while (1) {
2439     __pyx_t_1 = (__pyx_v_c_node != NULL);
2440     if (!__pyx_t_1) break;
2441
2442     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":199
2443  *         c_node = self._c_node.children
2444  *         while c_node is not NULL:
2445  *             if tree._isElement(c_node):             # <<<<<<<<<<<<<<
2446  *                 c = c + 1
2447  *             c_node = c_node.next
2448  */
2449     __pyx_t_1 = _isElement(__pyx_v_c_node);
2450     if (__pyx_t_1) {
2451
2452       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":200
2453  *         while c_node is not NULL:
2454  *             if tree._isElement(c_node):
2455  *                 c = c + 1             # <<<<<<<<<<<<<<
2456  *             c_node = c_node.next
2457  *         return c
2458  */
2459       __pyx_v_c = (__pyx_v_c + 1);
2460       goto __pyx_L7;
2461     }
2462     __pyx_L7:;
2463
2464     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":201
2465  *             if tree._isElement(c_node):
2466  *                 c = c + 1
2467  *             c_node = c_node.next             # <<<<<<<<<<<<<<
2468  *         return c
2469  * 
2470  */
2471     __pyx_v_c_node = __pyx_v_c_node->next;
2472   }
2473
2474   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":202
2475  *                 c = c + 1
2476  *             c_node = c_node.next
2477  *         return c             # <<<<<<<<<<<<<<
2478  * 
2479  *     def getchildren(self):
2480  */
2481   __Pyx_XDECREF(__pyx_r);
2482   __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_c); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2483   __Pyx_GOTREF(__pyx_t_2);
2484   __pyx_r = __pyx_t_2;
2485   __pyx_t_2 = 0;
2486   goto __pyx_L0;
2487
2488   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2489   goto __pyx_L0;
2490   __pyx_L1_error:;
2491   __Pyx_XDECREF(__pyx_t_2);
2492   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.countchildren");
2493   __pyx_r = NULL;
2494   __pyx_L0:;
2495   __Pyx_DECREF((PyObject *)__pyx_v_self);
2496   __Pyx_XGIVEREF(__pyx_r);
2497   __Pyx_FinishRefcountContext();
2498   return __pyx_r;
2499 }
2500
2501 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":204
2502  *         return c
2503  * 
2504  *     def getchildren(self):             # <<<<<<<<<<<<<<
2505  *         u"""getchildren(self)
2506  * 
2507  */
2508
2509 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_getchildren(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
2510 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_getchildren[] = "getchildren(self)\n\n        Returns a sequence of all direct children.  The elements are\n        returned in document order.\n        ";
2511 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_getchildren(PyObject *__pyx_v_self, PyObject *unused) {
2512   xmlNode *__pyx_v_c_node;
2513   PyObject *__pyx_v_result = 0;
2514   PyObject *__pyx_r = NULL;
2515   PyObject *__pyx_t_1 = NULL;
2516   int __pyx_t_2;
2517   int __pyx_t_3;
2518   __Pyx_SetupRefcountContext("getchildren");
2519   __Pyx_INCREF((PyObject *)__pyx_v_self);
2520
2521   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":211
2522  *         """
2523  *         cdef tree.xmlNode* c_node
2524  *         cdef list result = []             # <<<<<<<<<<<<<<
2525  *         c_node = self._c_node.children
2526  *         while c_node is not NULL:
2527  */
2528   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2529   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
2530   __pyx_v_result = __pyx_t_1;
2531   __pyx_t_1 = 0;
2532
2533   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":212
2534  *         cdef tree.xmlNode* c_node
2535  *         cdef list result = []
2536  *         c_node = self._c_node.children             # <<<<<<<<<<<<<<
2537  *         while c_node is not NULL:
2538  *             if tree._isElement(c_node):
2539  */
2540   __pyx_v_c_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->children;
2541
2542   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":213
2543  *         cdef list result = []
2544  *         c_node = self._c_node.children
2545  *         while c_node is not NULL:             # <<<<<<<<<<<<<<
2546  *             if tree._isElement(c_node):
2547  *                 result.append(cetree.elementFactory(self._doc, c_node))
2548  */
2549   while (1) {
2550     __pyx_t_2 = (__pyx_v_c_node != NULL);
2551     if (!__pyx_t_2) break;
2552
2553     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":214
2554  *         c_node = self._c_node.children
2555  *         while c_node is not NULL:
2556  *             if tree._isElement(c_node):             # <<<<<<<<<<<<<<
2557  *                 result.append(cetree.elementFactory(self._doc, c_node))
2558  *             c_node = c_node.next
2559  */
2560     __pyx_t_2 = _isElement(__pyx_v_c_node);
2561     if (__pyx_t_2) {
2562
2563       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":215
2564  *         while c_node is not NULL:
2565  *             if tree._isElement(c_node):
2566  *                 result.append(cetree.elementFactory(self._doc, c_node))             # <<<<<<<<<<<<<<
2567  *             c_node = c_node.next
2568  *         return result
2569  */
2570       if (unlikely(__pyx_v_result == Py_None)) {
2571         PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
2572       }
2573       __pyx_t_1 = ((PyObject *)elementFactory(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2574       __Pyx_GOTREF(__pyx_t_1);
2575       __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_result), __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2576       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2577       goto __pyx_L7;
2578     }
2579     __pyx_L7:;
2580
2581     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":216
2582  *             if tree._isElement(c_node):
2583  *                 result.append(cetree.elementFactory(self._doc, c_node))
2584  *             c_node = c_node.next             # <<<<<<<<<<<<<<
2585  *         return result
2586  * 
2587  */
2588     __pyx_v_c_node = __pyx_v_c_node->next;
2589   }
2590
2591   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":217
2592  *                 result.append(cetree.elementFactory(self._doc, c_node))
2593  *             c_node = c_node.next
2594  *         return result             # <<<<<<<<<<<<<<
2595  * 
2596  *     def __getattr__(self, tag):
2597  */
2598   __Pyx_XDECREF(__pyx_r);
2599   __Pyx_INCREF(((PyObject *)__pyx_v_result));
2600   __pyx_r = ((PyObject *)__pyx_v_result);
2601   goto __pyx_L0;
2602
2603   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2604   goto __pyx_L0;
2605   __pyx_L1_error:;
2606   __Pyx_XDECREF(__pyx_t_1);
2607   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.getchildren");
2608   __pyx_r = NULL;
2609   __pyx_L0:;
2610   __Pyx_XDECREF(__pyx_v_result);
2611   __Pyx_DECREF((PyObject *)__pyx_v_self);
2612   __Pyx_XGIVEREF(__pyx_r);
2613   __Pyx_FinishRefcountContext();
2614   return __pyx_r;
2615 }
2616
2617 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":219
2618  *         return result
2619  * 
2620  *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
2621  *         u"""Return the (first) child with the given tag name.  If no namespace
2622  *         is provided, the child will be looked up in the same one as self.
2623  */
2624
2625 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
2626 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        ";
2627 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
2628   PyObject *__pyx_r = NULL;
2629   PyObject *__pyx_t_1 = NULL;
2630   PyObject *__pyx_t_2 = NULL;
2631   int __pyx_t_3;
2632   PyObject *__pyx_t_4 = NULL;
2633   __Pyx_SetupRefcountContext("__getattr__");
2634   __Pyx_INCREF((PyObject *)__pyx_v_self);
2635   __Pyx_INCREF(__pyx_v_tag);
2636
2637   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":223
2638  *         is provided, the child will be looked up in the same one as self.
2639  *         """
2640  *         if is_special_method(tag):             # <<<<<<<<<<<<<<
2641  *             return object.__getattr__(self, tag)
2642  *         return _lookupChildOrRaise(self, tag)
2643  */
2644   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2645   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
2646   __Pyx_INCREF(__pyx_v_tag);
2647   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag);
2648   __Pyx_GIVEREF(__pyx_v_tag);
2649   __pyx_t_2 = PyObject_Call(__pyx_v_4lxml_9objectify_is_special_method, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2650   __Pyx_GOTREF(__pyx_t_2);
2651   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
2652   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2653   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2654   if (__pyx_t_3) {
2655
2656     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":224
2657  *         """
2658  *         if is_special_method(tag):
2659  *             return object.__getattr__(self, tag)             # <<<<<<<<<<<<<<
2660  *         return _lookupChildOrRaise(self, tag)
2661  * 
2662  */
2663     __Pyx_XDECREF(__pyx_r);
2664     __pyx_t_2 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_ui___getattr__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2665     __Pyx_GOTREF(__pyx_t_2);
2666     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2667     __Pyx_GOTREF(((PyObject *)__pyx_t_1));
2668     __Pyx_INCREF(__pyx_v_self);
2669     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
2670     __Pyx_GIVEREF(__pyx_v_self);
2671     __Pyx_INCREF(__pyx_v_tag);
2672     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_tag);
2673     __Pyx_GIVEREF(__pyx_v_tag);
2674     __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2675     __Pyx_GOTREF(__pyx_t_4);
2676     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2677     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
2678     __pyx_r = __pyx_t_4;
2679     __pyx_t_4 = 0;
2680     goto __pyx_L0;
2681     goto __pyx_L5;
2682   }
2683   __pyx_L5:;
2684
2685   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":225
2686  *         if is_special_method(tag):
2687  *             return object.__getattr__(self, tag)
2688  *         return _lookupChildOrRaise(self, tag)             # <<<<<<<<<<<<<<
2689  * 
2690  *     def __setattr__(self, tag, value):
2691  */
2692   __Pyx_XDECREF(__pyx_r);
2693   __pyx_t_4 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2694   __Pyx_GOTREF(__pyx_t_4);
2695   __pyx_r = __pyx_t_4;
2696   __pyx_t_4 = 0;
2697   goto __pyx_L0;
2698
2699   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2700   goto __pyx_L0;
2701   __pyx_L1_error:;
2702   __Pyx_XDECREF(__pyx_t_1);
2703   __Pyx_XDECREF(__pyx_t_2);
2704   __Pyx_XDECREF(__pyx_t_4);
2705   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getattr__");
2706   __pyx_r = NULL;
2707   __pyx_L0:;
2708   __Pyx_DECREF((PyObject *)__pyx_v_self);
2709   __Pyx_DECREF(__pyx_v_tag);
2710   __Pyx_XGIVEREF(__pyx_r);
2711   __Pyx_FinishRefcountContext();
2712   return __pyx_r;
2713 }
2714
2715 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":227
2716  *         return _lookupChildOrRaise(self, tag)
2717  * 
2718  *     def __setattr__(self, tag, value):             # <<<<<<<<<<<<<<
2719  *         u"""Set the value of the (first) child with the given tag name.  If no
2720  *         namespace is provided, the child will be looked up in the same one as
2721  */
2722
2723 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value); /*proto*/
2724 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        ";
2725 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
2726   struct LxmlElement *__pyx_v_element;
2727   int __pyx_r;
2728   PyObject *__pyx_t_1 = NULL;
2729   int __pyx_t_2;
2730   int __pyx_t_3;
2731   int __pyx_t_4;
2732   PyObject *__pyx_t_5 = NULL;
2733   int __pyx_t_6;
2734   PyObject *__pyx_t_7 = NULL;
2735   __Pyx_SetupRefcountContext("__setattr__");
2736   __Pyx_INCREF((PyObject *)__pyx_v_self);
2737   __Pyx_INCREF(__pyx_v_tag);
2738   __Pyx_INCREF(__pyx_v_value);
2739   __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
2740
2741   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":234
2742  *         cdef _Element element
2743  *         # properties are looked up /after/ __setattr__, so we must emulate them
2744  *         if tag == u'text' or tag == u'pyval':             # <<<<<<<<<<<<<<
2745  *             # read-only !
2746  *             raise TypeError, u"attribute '%s' of '%s' objects is not writable" % \
2747  */
2748   __pyx_t_1 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_n_u_text), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2749   __Pyx_GOTREF(__pyx_t_1);
2750   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2751   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2752   if (!__pyx_t_2) {
2753     __pyx_t_1 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_n_u_pyval), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2754     __Pyx_GOTREF(__pyx_t_1);
2755     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2756     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2757     __pyx_t_4 = __pyx_t_3;
2758   } else {
2759     __pyx_t_4 = __pyx_t_2;
2760   }
2761   if (__pyx_t_4) {
2762
2763     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":237
2764  *             # read-only !
2765  *             raise TypeError, u"attribute '%s' of '%s' objects is not writable" % \
2766  *                             (tag, _typename(self))             # <<<<<<<<<<<<<<
2767  *         elif tag == u'tail':
2768  *             cetree.setTailText(self._c_node, value)
2769  */
2770     __pyx_t_1 = __pyx_f_4lxml_9objectify__typename(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2771     __Pyx_GOTREF(__pyx_t_1);
2772     __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2773     __Pyx_GOTREF(((PyObject *)__pyx_t_5));
2774     __Pyx_INCREF(__pyx_v_tag);
2775     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tag);
2776     __Pyx_GIVEREF(__pyx_v_tag);
2777     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
2778     __Pyx_GIVEREF(__pyx_t_1);
2779     __pyx_t_1 = 0;
2780     __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_6), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2781     __Pyx_GOTREF(__pyx_t_1);
2782     __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
2783     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_1, 0);
2784     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2785     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2786     goto __pyx_L5;
2787   }
2788
2789   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":238
2790  *             raise TypeError, u"attribute '%s' of '%s' objects is not writable" % \
2791  *                             (tag, _typename(self))
2792  *         elif tag == u'tail':             # <<<<<<<<<<<<<<
2793  *             cetree.setTailText(self._c_node, value)
2794  *             return
2795  */
2796   __pyx_t_1 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_n_u_tail), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2797   __Pyx_GOTREF(__pyx_t_1);
2798   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2799   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2800   if (__pyx_t_4) {
2801
2802     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":239
2803  *                             (tag, _typename(self))
2804  *         elif tag == u'tail':
2805  *             cetree.setTailText(self._c_node, value)             # <<<<<<<<<<<<<<
2806  *             return
2807  *         elif tag == u'tag':
2808  */
2809     __pyx_t_6 = setTailText(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node, __pyx_v_value); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2810
2811     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":240
2812  *         elif tag == u'tail':
2813  *             cetree.setTailText(self._c_node, value)
2814  *             return             # <<<<<<<<<<<<<<
2815  *         elif tag == u'tag':
2816  *             ElementBase.tag.__set__(self, value)
2817  */
2818     __pyx_r = 0;
2819     goto __pyx_L0;
2820     goto __pyx_L5;
2821   }
2822
2823   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":241
2824  *             cetree.setTailText(self._c_node, value)
2825  *             return
2826  *         elif tag == u'tag':             # <<<<<<<<<<<<<<
2827  *             ElementBase.tag.__set__(self, value)
2828  *             return
2829  */
2830   __pyx_t_1 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_n_u_tag), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2831   __Pyx_GOTREF(__pyx_t_1);
2832   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2833   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2834   if (__pyx_t_4) {
2835
2836     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":242
2837  *             return
2838  *         elif tag == u'tag':
2839  *             ElementBase.tag.__set__(self, value)             # <<<<<<<<<<<<<<
2840  *             return
2841  *         elif tag == u'base':
2842  */
2843     __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic_ElementBase)), __pyx_n_ui_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2844     __Pyx_GOTREF(__pyx_t_1);
2845     __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_ui___set__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2846     __Pyx_GOTREF(__pyx_t_5);
2847     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2848     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2849     __Pyx_GOTREF(((PyObject *)__pyx_t_1));
2850     __Pyx_INCREF(__pyx_v_self);
2851     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
2852     __Pyx_GIVEREF(__pyx_v_self);
2853     __Pyx_INCREF(__pyx_v_value);
2854     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
2855     __Pyx_GIVEREF(__pyx_v_value);
2856     __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2857     __Pyx_GOTREF(__pyx_t_7);
2858     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2859     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
2860     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2861
2862     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":243
2863  *         elif tag == u'tag':
2864  *             ElementBase.tag.__set__(self, value)
2865  *             return             # <<<<<<<<<<<<<<
2866  *         elif tag == u'base':
2867  *             ElementBase.base.__set__(self, value)
2868  */
2869     __pyx_r = 0;
2870     goto __pyx_L0;
2871     goto __pyx_L5;
2872   }
2873
2874   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":244
2875  *             ElementBase.tag.__set__(self, value)
2876  *             return
2877  *         elif tag == u'base':             # <<<<<<<<<<<<<<
2878  *             ElementBase.base.__set__(self, value)
2879  *             return
2880  */
2881   __pyx_t_7 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_n_u_base), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2882   __Pyx_GOTREF(__pyx_t_7);
2883   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2884   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2885   if (__pyx_t_4) {
2886
2887     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":245
2888  *             return
2889  *         elif tag == u'base':
2890  *             ElementBase.base.__set__(self, value)             # <<<<<<<<<<<<<<
2891  *             return
2892  *         tag = _buildChildTag(self, tag)
2893  */
2894     __pyx_t_7 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic_ElementBase)), __pyx_n_ui_base); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2895     __Pyx_GOTREF(__pyx_t_7);
2896     __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_ui___set__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2897     __Pyx_GOTREF(__pyx_t_1);
2898     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2899     __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2900     __Pyx_GOTREF(((PyObject *)__pyx_t_7));
2901     __Pyx_INCREF(__pyx_v_self);
2902     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self);
2903     __Pyx_GIVEREF(__pyx_v_self);
2904     __Pyx_INCREF(__pyx_v_value);
2905     PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_value);
2906     __Pyx_GIVEREF(__pyx_v_value);
2907     __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2908     __Pyx_GOTREF(__pyx_t_5);
2909     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2910     __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
2911     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2912
2913     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":246
2914  *         elif tag == u'base':
2915  *             ElementBase.base.__set__(self, value)
2916  *             return             # <<<<<<<<<<<<<<
2917  *         tag = _buildChildTag(self, tag)
2918  *         element = _lookupChild(self, tag)
2919  */
2920     __pyx_r = 0;
2921     goto __pyx_L0;
2922     goto __pyx_L5;
2923   }
2924   __pyx_L5:;
2925
2926   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":247
2927  *             ElementBase.base.__set__(self, value)
2928  *             return
2929  *         tag = _buildChildTag(self, tag)             # <<<<<<<<<<<<<<
2930  *         element = _lookupChild(self, tag)
2931  *         if element is None:
2932  */
2933   __pyx_t_5 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2934   __Pyx_GOTREF(__pyx_t_5);
2935   __Pyx_DECREF(__pyx_v_tag);
2936   __pyx_v_tag = __pyx_t_5;
2937   __pyx_t_5 = 0;
2938
2939   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":248
2940  *             return
2941  *         tag = _buildChildTag(self, tag)
2942  *         element = _lookupChild(self, tag)             # <<<<<<<<<<<<<<
2943  *         if element is None:
2944  *             _appendValue(self, tag, value)
2945  */
2946   __pyx_t_5 = __pyx_f_4lxml_9objectify__lookupChild(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2947   __Pyx_GOTREF(__pyx_t_5);
2948   if (!(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2949   __Pyx_DECREF(((PyObject *)__pyx_v_element));
2950   __pyx_v_element = ((struct LxmlElement *)__pyx_t_5);
2951   __pyx_t_5 = 0;
2952
2953   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":249
2954  *         tag = _buildChildTag(self, tag)
2955  *         element = _lookupChild(self, tag)
2956  *         if element is None:             # <<<<<<<<<<<<<<
2957  *             _appendValue(self, tag, value)
2958  *         else:
2959  */
2960   __pyx_t_4 = (((PyObject *)__pyx_v_element) == Py_None);
2961   if (__pyx_t_4) {
2962
2963     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":250
2964  *         element = _lookupChild(self, tag)
2965  *         if element is None:
2966  *             _appendValue(self, tag, value)             # <<<<<<<<<<<<<<
2967  *         else:
2968  *             _replaceElement(element, value)
2969  */
2970     __pyx_t_5 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag, __pyx_v_value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2971     __Pyx_GOTREF(__pyx_t_5);
2972     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2973     goto __pyx_L6;
2974   }
2975   /*else*/ {
2976
2977     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":252
2978  *             _appendValue(self, tag, value)
2979  *         else:
2980  *             _replaceElement(element, value)             # <<<<<<<<<<<<<<
2981  * 
2982  *     def __delattr__(self, tag):
2983  */
2984     __pyx_t_5 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2985     __Pyx_GOTREF(__pyx_t_5);
2986     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2987   }
2988   __pyx_L6:;
2989
2990   __pyx_r = 0;
2991   goto __pyx_L0;
2992   __pyx_L1_error:;
2993   __Pyx_XDECREF(__pyx_t_1);
2994   __Pyx_XDECREF(__pyx_t_5);
2995   __Pyx_XDECREF(__pyx_t_7);
2996   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setattr__");
2997   __pyx_r = -1;
2998   __pyx_L0:;
2999   __Pyx_DECREF((PyObject *)__pyx_v_element);
3000   __Pyx_DECREF((PyObject *)__pyx_v_self);
3001   __Pyx_DECREF(__pyx_v_tag);
3002   __Pyx_DECREF(__pyx_v_value);
3003   __Pyx_FinishRefcountContext();
3004   return __pyx_r;
3005 }
3006
3007 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":254
3008  *             _replaceElement(element, value)
3009  * 
3010  *     def __delattr__(self, tag):             # <<<<<<<<<<<<<<
3011  *         child = _lookupChildOrRaise(self, tag)
3012  *         self.remove(child)
3013  */
3014
3015 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
3016 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
3017   PyObject *__pyx_v_child;
3018   int __pyx_r;
3019   PyObject *__pyx_t_1 = NULL;
3020   PyObject *__pyx_t_2 = NULL;
3021   PyObject *__pyx_t_3 = NULL;
3022   __Pyx_SetupRefcountContext("__delattr__");
3023   __pyx_v_child = Py_None; __Pyx_INCREF(Py_None);
3024
3025   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":255
3026  * 
3027  *     def __delattr__(self, tag):
3028  *         child = _lookupChildOrRaise(self, tag)             # <<<<<<<<<<<<<<
3029  *         self.remove(child)
3030  * 
3031  */
3032   __pyx_t_1 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3033   __Pyx_GOTREF(__pyx_t_1);
3034   __Pyx_DECREF(__pyx_v_child);
3035   __pyx_v_child = __pyx_t_1;
3036   __pyx_t_1 = 0;
3037
3038   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":256
3039  *     def __delattr__(self, tag):
3040  *         child = _lookupChildOrRaise(self, tag)
3041  *         self.remove(child)             # <<<<<<<<<<<<<<
3042  * 
3043  *     def addattr(self, tag, value):
3044  */
3045   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3046   __Pyx_GOTREF(__pyx_t_1);
3047   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3048   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3049   __Pyx_INCREF(__pyx_v_child);
3050   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_child);
3051   __Pyx_GIVEREF(__pyx_v_child);
3052   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3053   __Pyx_GOTREF(__pyx_t_3);
3054   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3055   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3056   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3057
3058   __pyx_r = 0;
3059   goto __pyx_L0;
3060   __pyx_L1_error:;
3061   __Pyx_XDECREF(__pyx_t_1);
3062   __Pyx_XDECREF(__pyx_t_2);
3063   __Pyx_XDECREF(__pyx_t_3);
3064   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delattr__");
3065   __pyx_r = -1;
3066   __pyx_L0:;
3067   __Pyx_DECREF(__pyx_v_child);
3068   __Pyx_FinishRefcountContext();
3069   return __pyx_r;
3070 }
3071
3072 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":258
3073  *         self.remove(child)
3074  * 
3075  *     def addattr(self, tag, value):             # <<<<<<<<<<<<<<
3076  *         u"""addattr(self, tag, value)
3077  * 
3078  */
3079
3080 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3081 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_addattr[] = "addattr(self, tag, value)\n\n        Add a child value to the element.\n\n        As opposed to append(), it sets a data value, not an element.\n        ";
3082 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3083   PyObject *__pyx_v_tag = 0;
3084   PyObject *__pyx_v_value = 0;
3085   PyObject *__pyx_r = NULL;
3086   PyObject *__pyx_t_1 = NULL;
3087   PyObject *__pyx_t_2 = NULL;
3088   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_tag,&__pyx_n_ui_value,0};
3089   __Pyx_SetupRefcountContext("addattr");
3090   if (unlikely(__pyx_kwds)) {
3091     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
3092     PyObject* values[2] = {0,0};
3093     switch (PyTuple_GET_SIZE(__pyx_args)) {
3094       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3095       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3096       case  0: break;
3097       default: goto __pyx_L5_argtuple_error;
3098     }
3099     switch (PyTuple_GET_SIZE(__pyx_args)) {
3100       case  0:
3101       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_tag);
3102       if (likely(values[0])) kw_args--;
3103       else goto __pyx_L5_argtuple_error;
3104       case  1:
3105       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_value);
3106       if (likely(values[1])) kw_args--;
3107       else {
3108         __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3109       }
3110     }
3111     if (unlikely(kw_args > 0)) {
3112       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "addattr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3113     }
3114     __pyx_v_tag = values[0];
3115     __pyx_v_value = values[1];
3116   } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
3117     goto __pyx_L5_argtuple_error;
3118   } else {
3119     __pyx_v_tag = PyTuple_GET_ITEM(__pyx_args, 0);
3120     __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
3121   }
3122   goto __pyx_L4_argument_unpacking_done;
3123   __pyx_L5_argtuple_error:;
3124   __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3125   __pyx_L3_error:;
3126   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.addattr");
3127   return NULL;
3128   __pyx_L4_argument_unpacking_done:;
3129
3130   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":265
3131  *         As opposed to append(), it sets a data value, not an element.
3132  *         """
3133  *         _appendValue(self, _buildChildTag(self, tag), value)             # <<<<<<<<<<<<<<
3134  * 
3135  *     def __getitem__(self, key):
3136  */
3137   __pyx_t_1 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3138   __Pyx_GOTREF(__pyx_t_1);
3139   __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self), __pyx_t_1, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3140   __Pyx_GOTREF(__pyx_t_2);
3141   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3142   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3143
3144   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3145   goto __pyx_L0;
3146   __pyx_L1_error:;
3147   __Pyx_XDECREF(__pyx_t_1);
3148   __Pyx_XDECREF(__pyx_t_2);
3149   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.addattr");
3150   __pyx_r = NULL;
3151   __pyx_L0:;
3152   __Pyx_XGIVEREF(__pyx_r);
3153   __Pyx_FinishRefcountContext();
3154   return __pyx_r;
3155 }
3156
3157 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":267
3158  *         _appendValue(self, _buildChildTag(self, tag), value)
3159  * 
3160  *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
3161  *         u"""Return a sibling, counting from the first child of the parent.  The
3162  *         method behaves like both a dict and a sequence.
3163  */
3164
3165 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
3166 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        ";
3167 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
3168   xmlNode *__pyx_v_c_self_node;
3169   xmlNode *__pyx_v_c_parent;
3170   xmlNode *__pyx_v_c_node;
3171   PyObject *__pyx_r = NULL;
3172   int __pyx_t_1;
3173   PyObject *__pyx_t_2 = NULL;
3174   PyObject *__pyx_t_3 = NULL;
3175   Py_ssize_t __pyx_t_4;
3176   __Pyx_SetupRefcountContext("__getitem__");
3177   __Pyx_INCREF((PyObject *)__pyx_v_self);
3178   __Pyx_INCREF(__pyx_v_key);
3179
3180   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":283
3181  *         cdef tree.xmlNode* c_node
3182  *         cdef Py_ssize_t start, stop, step, slicelength
3183  *         if python._isString(key):             # <<<<<<<<<<<<<<
3184  *             return _lookupChildOrRaise(self, key)
3185  *         elif python.PySlice_Check(key):
3186  */
3187   __pyx_t_1 = _isString(__pyx_v_key);
3188   if (__pyx_t_1) {
3189
3190     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":284
3191  *         cdef Py_ssize_t start, stop, step, slicelength
3192  *         if python._isString(key):
3193  *             return _lookupChildOrRaise(self, key)             # <<<<<<<<<<<<<<
3194  *         elif python.PySlice_Check(key):
3195  *             return list(self)[key]
3196  */
3197     __Pyx_XDECREF(__pyx_r);
3198     __pyx_t_2 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3199     __Pyx_GOTREF(__pyx_t_2);
3200     __pyx_r = __pyx_t_2;
3201     __pyx_t_2 = 0;
3202     goto __pyx_L0;
3203     goto __pyx_L5;
3204   }
3205
3206   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":285
3207  *         if python._isString(key):
3208  *             return _lookupChildOrRaise(self, key)
3209  *         elif python.PySlice_Check(key):             # <<<<<<<<<<<<<<
3210  *             return list(self)[key]
3211  *         # normal item access
3212  */
3213   __pyx_t_1 = PySlice_Check(__pyx_v_key);
3214   if (__pyx_t_1) {
3215
3216     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":286
3217  *             return _lookupChildOrRaise(self, key)
3218  *         elif python.PySlice_Check(key):
3219  *             return list(self)[key]             # <<<<<<<<<<<<<<
3220  *         # normal item access
3221  *         c_self_node = self._c_node
3222  */
3223     __Pyx_XDECREF(__pyx_r);
3224     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3225     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3226     __Pyx_INCREF(__pyx_v_self);
3227     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
3228     __Pyx_GIVEREF(__pyx_v_self);
3229     __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyList_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3230     __Pyx_GOTREF(__pyx_t_3);
3231     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3232     __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3233     __Pyx_GOTREF(__pyx_t_2);
3234     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3235     __pyx_r = __pyx_t_2;
3236     __pyx_t_2 = 0;
3237     goto __pyx_L0;
3238     goto __pyx_L5;
3239   }
3240   __pyx_L5:;
3241
3242   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":288
3243  *             return list(self)[key]
3244  *         # normal item access
3245  *         c_self_node = self._c_node             # <<<<<<<<<<<<<<
3246  *         c_parent = c_self_node.parent
3247  *         if c_parent is NULL:
3248  */
3249   __pyx_v_c_self_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node;
3250
3251   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":289
3252  *         # normal item access
3253  *         c_self_node = self._c_node
3254  *         c_parent = c_self_node.parent             # <<<<<<<<<<<<<<
3255  *         if c_parent is NULL:
3256  *             if key == 0:
3257  */
3258   __pyx_v_c_parent = __pyx_v_c_self_node->parent;
3259
3260   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":290
3261  *         c_self_node = self._c_node
3262  *         c_parent = c_self_node.parent
3263  *         if c_parent is NULL:             # <<<<<<<<<<<<<<
3264  *             if key == 0:
3265  *                 return self
3266  */
3267   __pyx_t_1 = (__pyx_v_c_parent == NULL);
3268   if (__pyx_t_1) {
3269
3270     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":291
3271  *         c_parent = c_self_node.parent
3272  *         if c_parent is NULL:
3273  *             if key == 0:             # <<<<<<<<<<<<<<
3274  *                 return self
3275  *             else:
3276  */
3277     __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3278     __Pyx_GOTREF(__pyx_t_2);
3279     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3280     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3281     if (__pyx_t_1) {
3282
3283       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":292
3284  *         if c_parent is NULL:
3285  *             if key == 0:
3286  *                 return self             # <<<<<<<<<<<<<<
3287  *             else:
3288  *                 raise IndexError, unicode(key)
3289  */
3290       __Pyx_XDECREF(__pyx_r);
3291       __Pyx_INCREF(__pyx_v_self);
3292       __pyx_r = __pyx_v_self;
3293       goto __pyx_L0;
3294       goto __pyx_L7;
3295     }
3296     /*else*/ {
3297
3298       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":294
3299  *                 return self
3300  *             else:
3301  *                 raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
3302  *         if key < 0:
3303  *             c_node = c_parent.last
3304  */
3305       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3306       __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3307       __Pyx_INCREF(__pyx_v_key);
3308       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
3309       __Pyx_GIVEREF(__pyx_v_key);
3310       __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3311       __Pyx_GOTREF(__pyx_t_3);
3312       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3313       __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_3, 0);
3314       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3315       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3316     }
3317     __pyx_L7:;
3318     goto __pyx_L6;
3319   }
3320   __pyx_L6:;
3321
3322   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":295
3323  *             else:
3324  *                 raise IndexError, unicode(key)
3325  *         if key < 0:             # <<<<<<<<<<<<<<
3326  *             c_node = c_parent.last
3327  *         else:
3328  */
3329   __pyx_t_3 = PyObject_RichCompare(__pyx_v_key, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3330   __Pyx_GOTREF(__pyx_t_3);
3331   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3332   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3333   if (__pyx_t_1) {
3334
3335     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":296
3336  *                 raise IndexError, unicode(key)
3337  *         if key < 0:
3338  *             c_node = c_parent.last             # <<<<<<<<<<<<<<
3339  *         else:
3340  *             c_node = c_parent.children
3341  */
3342     __pyx_v_c_node = __pyx_v_c_parent->last;
3343     goto __pyx_L8;
3344   }
3345   /*else*/ {
3346
3347     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":298
3348  *             c_node = c_parent.last
3349  *         else:
3350  *             c_node = c_parent.children             # <<<<<<<<<<<<<<
3351  *         c_node = _findFollowingSibling(
3352  *             c_node, tree._getNs(c_self_node), c_self_node.name, key)
3353  */
3354     __pyx_v_c_node = __pyx_v_c_parent->children;
3355   }
3356   __pyx_L8:;
3357
3358   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":300
3359  *             c_node = c_parent.children
3360  *         c_node = _findFollowingSibling(
3361  *             c_node, tree._getNs(c_self_node), c_self_node.name, key)             # <<<<<<<<<<<<<<
3362  *         if c_node is NULL:
3363  *             raise IndexError, unicode(key)
3364  */
3365   __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3366   __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_t_4);
3367
3368   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":301
3369  *         c_node = _findFollowingSibling(
3370  *             c_node, tree._getNs(c_self_node), c_self_node.name, key)
3371  *         if c_node is NULL:             # <<<<<<<<<<<<<<
3372  *             raise IndexError, unicode(key)
3373  *         return elementFactory(self._doc, c_node)
3374  */
3375   __pyx_t_1 = (__pyx_v_c_node == NULL);
3376   if (__pyx_t_1) {
3377
3378     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":302
3379  *             c_node, tree._getNs(c_self_node), c_self_node.name, key)
3380  *         if c_node is NULL:
3381  *             raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
3382  *         return elementFactory(self._doc, c_node)
3383  * 
3384  */
3385     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3386     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
3387     __Pyx_INCREF(__pyx_v_key);
3388     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
3389     __Pyx_GIVEREF(__pyx_v_key);
3390     __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3391     __Pyx_GOTREF(__pyx_t_2);
3392     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
3393     __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_2, 0);
3394     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3395     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3396     goto __pyx_L9;
3397   }
3398   __pyx_L9:;
3399
3400   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":303
3401  *         if c_node is NULL:
3402  *             raise IndexError, unicode(key)
3403  *         return elementFactory(self._doc, c_node)             # <<<<<<<<<<<<<<
3404  * 
3405  *     def __setitem__(self, key, value):
3406  */
3407   __Pyx_XDECREF(__pyx_r);
3408   __pyx_t_2 = ((PyObject *)elementFactory(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3409   __Pyx_GOTREF(__pyx_t_2);
3410   __pyx_r = __pyx_t_2;
3411   __pyx_t_2 = 0;
3412   goto __pyx_L0;
3413
3414   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3415   goto __pyx_L0;
3416   __pyx_L1_error:;
3417   __Pyx_XDECREF(__pyx_t_2);
3418   __Pyx_XDECREF(__pyx_t_3);
3419   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getitem__");
3420   __pyx_r = NULL;
3421   __pyx_L0:;
3422   __Pyx_DECREF((PyObject *)__pyx_v_self);
3423   __Pyx_DECREF(__pyx_v_key);
3424   __Pyx_XGIVEREF(__pyx_r);
3425   __Pyx_FinishRefcountContext();
3426   return __pyx_r;
3427 }
3428
3429 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":305
3430  *         return elementFactory(self._doc, c_node)
3431  * 
3432  *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
3433  *         u"""Set the value of a sibling, counting from the first child of the
3434  *         parent.  Implements key assignment, item assignment and slice
3435  */
3436
3437 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
3438 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___setitem__[] = "Set the value of a sibling, counting from the first child of the\n        parent.  Implements key assignment, item assignment and slice\n        assignment.\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        ";
3439 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
3440   struct LxmlElement *__pyx_v_element;
3441   xmlNode *__pyx_v_c_node;
3442   int __pyx_r;
3443   int __pyx_t_1;
3444   PyObject *__pyx_t_2 = NULL;
3445   Py_ssize_t __pyx_t_3;
3446   PyObject *__pyx_t_4 = NULL;
3447   __Pyx_SetupRefcountContext("__setitem__");
3448   __Pyx_INCREF((PyObject *)__pyx_v_self);
3449   __Pyx_INCREF(__pyx_v_key);
3450   __Pyx_INCREF(__pyx_v_value);
3451   __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
3452
3453   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":320
3454  *         cdef _Element element
3455  *         cdef tree.xmlNode* c_node
3456  *         if python._isString(key):             # <<<<<<<<<<<<<<
3457  *             key = _buildChildTag(self, key)
3458  *             element = _lookupChild(self, key)
3459  */
3460   __pyx_t_1 = _isString(__pyx_v_key);
3461   if (__pyx_t_1) {
3462
3463     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":321
3464  *         cdef tree.xmlNode* c_node
3465  *         if python._isString(key):
3466  *             key = _buildChildTag(self, key)             # <<<<<<<<<<<<<<
3467  *             element = _lookupChild(self, key)
3468  *             if element is None:
3469  */
3470     __pyx_t_2 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3471     __Pyx_GOTREF(__pyx_t_2);
3472     __Pyx_DECREF(__pyx_v_key);
3473     __pyx_v_key = __pyx_t_2;
3474     __pyx_t_2 = 0;
3475
3476     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":322
3477  *         if python._isString(key):
3478  *             key = _buildChildTag(self, key)
3479  *             element = _lookupChild(self, key)             # <<<<<<<<<<<<<<
3480  *             if element is None:
3481  *                 _appendValue(self, key, value)
3482  */
3483     __pyx_t_2 = __pyx_f_4lxml_9objectify__lookupChild(((struct LxmlElement *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3484     __Pyx_GOTREF(__pyx_t_2);
3485     if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3486     __Pyx_DECREF(((PyObject *)__pyx_v_element));
3487     __pyx_v_element = ((struct LxmlElement *)__pyx_t_2);
3488     __pyx_t_2 = 0;
3489
3490     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":323
3491  *             key = _buildChildTag(self, key)
3492  *             element = _lookupChild(self, key)
3493  *             if element is None:             # <<<<<<<<<<<<<<
3494  *                 _appendValue(self, key, value)
3495  *             else:
3496  */
3497     __pyx_t_1 = (((PyObject *)__pyx_v_element) == Py_None);
3498     if (__pyx_t_1) {
3499
3500       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":324
3501  *             element = _lookupChild(self, key)
3502  *             if element is None:
3503  *                 _appendValue(self, key, value)             # <<<<<<<<<<<<<<
3504  *             else:
3505  *                 _replaceElement(element, value)
3506  */
3507       __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self), __pyx_v_key, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3508       __Pyx_GOTREF(__pyx_t_2);
3509       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3510       goto __pyx_L6;
3511     }
3512     /*else*/ {
3513
3514       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":326
3515  *                 _appendValue(self, key, value)
3516  *             else:
3517  *                 _replaceElement(element, value)             # <<<<<<<<<<<<<<
3518  *             return
3519  * 
3520  */
3521       __pyx_t_2 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3522       __Pyx_GOTREF(__pyx_t_2);
3523       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3524     }
3525     __pyx_L6:;
3526
3527     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":327
3528  *             else:
3529  *                 _replaceElement(element, value)
3530  *             return             # <<<<<<<<<<<<<<
3531  * 
3532  *         if self._c_node.parent is NULL:
3533  */
3534     __pyx_r = 0;
3535     goto __pyx_L0;
3536     goto __pyx_L5;
3537   }
3538   __pyx_L5:;
3539
3540   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":329
3541  *             return
3542  * 
3543  *         if self._c_node.parent is NULL:             # <<<<<<<<<<<<<<
3544  *             # the 'root[i] = ...' case
3545  *             raise TypeError, u"assignment to root element is invalid"
3546  */
3547   __pyx_t_1 = (((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->parent == NULL);
3548   if (__pyx_t_1) {
3549
3550     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":331
3551  *         if self._c_node.parent is NULL:
3552  *             # the 'root[i] = ...' case
3553  *             raise TypeError, u"assignment to root element is invalid"             # <<<<<<<<<<<<<<
3554  * 
3555  *         if python.PySlice_Check(key):
3556  */
3557     __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_7), 0);
3558     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3559     goto __pyx_L7;
3560   }
3561   __pyx_L7:;
3562
3563   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":333
3564  *             raise TypeError, u"assignment to root element is invalid"
3565  * 
3566  *         if python.PySlice_Check(key):             # <<<<<<<<<<<<<<
3567  *             # slice assignment
3568  *             _setSlice(key, self, value)
3569  */
3570   __pyx_t_1 = PySlice_Check(__pyx_v_key);
3571   if (__pyx_t_1) {
3572
3573     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":335
3574  *         if python.PySlice_Check(key):
3575  *             # slice assignment
3576  *             _setSlice(key, self, value)             # <<<<<<<<<<<<<<
3577  *         else:
3578  *             # normal index assignment
3579  */
3580     __pyx_t_2 = __pyx_f_4lxml_9objectify__setSlice(__pyx_v_key, ((struct LxmlElement *)__pyx_v_self), __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3581     __Pyx_GOTREF(__pyx_t_2);
3582     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3583     goto __pyx_L8;
3584   }
3585   /*else*/ {
3586
3587     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":338
3588  *         else:
3589  *             # normal index assignment
3590  *             if key < 0:             # <<<<<<<<<<<<<<
3591  *                 c_node = self._c_node.parent.last
3592  *             else:
3593  */
3594     __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3595     __Pyx_GOTREF(__pyx_t_2);
3596     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3597     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3598     if (__pyx_t_1) {
3599
3600       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":339
3601  *             # normal index assignment
3602  *             if key < 0:
3603  *                 c_node = self._c_node.parent.last             # <<<<<<<<<<<<<<
3604  *             else:
3605  *                 c_node = self._c_node.parent.children
3606  */
3607       __pyx_v_c_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->parent->last;
3608       goto __pyx_L9;
3609     }
3610     /*else*/ {
3611
3612       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":341
3613  *                 c_node = self._c_node.parent.last
3614  *             else:
3615  *                 c_node = self._c_node.parent.children             # <<<<<<<<<<<<<<
3616  *             c_node = _findFollowingSibling(
3617  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
3618  */
3619       __pyx_v_c_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->parent->children;
3620     }
3621     __pyx_L9:;
3622
3623     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":343
3624  *                 c_node = self._c_node.parent.children
3625  *             c_node = _findFollowingSibling(
3626  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)             # <<<<<<<<<<<<<<
3627  *             if c_node is NULL:
3628  *                 raise IndexError, unicode(key)
3629  */
3630     __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3631     __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, _getNs(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node), ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->name, __pyx_t_3);
3632
3633     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":344
3634  *             c_node = _findFollowingSibling(
3635  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
3636  *             if c_node is NULL:             # <<<<<<<<<<<<<<
3637  *                 raise IndexError, unicode(key)
3638  *             element = elementFactory(self._doc, c_node)
3639  */
3640     __pyx_t_1 = (__pyx_v_c_node == NULL);
3641     if (__pyx_t_1) {
3642
3643       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":345
3644  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
3645  *             if c_node is NULL:
3646  *                 raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
3647  *             element = elementFactory(self._doc, c_node)
3648  *             _replaceElement(element, value)
3649  */
3650       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3651       __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3652       __Pyx_INCREF(__pyx_v_key);
3653       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
3654       __Pyx_GIVEREF(__pyx_v_key);
3655       __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3656       __Pyx_GOTREF(__pyx_t_4);
3657       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3658       __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_4, 0);
3659       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3660       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3661       goto __pyx_L10;
3662     }
3663     __pyx_L10:;
3664
3665     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":346
3666  *             if c_node is NULL:
3667  *                 raise IndexError, unicode(key)
3668  *             element = elementFactory(self._doc, c_node)             # <<<<<<<<<<<<<<
3669  *             _replaceElement(element, value)
3670  * 
3671  */
3672     __pyx_t_4 = ((PyObject *)elementFactory(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3673     __Pyx_GOTREF(__pyx_t_4);
3674     __Pyx_DECREF(((PyObject *)__pyx_v_element));
3675     __pyx_v_element = ((struct LxmlElement *)__pyx_t_4);
3676     __pyx_t_4 = 0;
3677
3678     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":347
3679  *                 raise IndexError, unicode(key)
3680  *             element = elementFactory(self._doc, c_node)
3681  *             _replaceElement(element, value)             # <<<<<<<<<<<<<<
3682  * 
3683  *     def __delitem__(self, key):
3684  */
3685     __pyx_t_4 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3686     __Pyx_GOTREF(__pyx_t_4);
3687     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3688   }
3689   __pyx_L8:;
3690
3691   __pyx_r = 0;
3692   goto __pyx_L0;
3693   __pyx_L1_error:;
3694   __Pyx_XDECREF(__pyx_t_2);
3695   __Pyx_XDECREF(__pyx_t_4);
3696   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setitem__");
3697   __pyx_r = -1;
3698   __pyx_L0:;
3699   __Pyx_DECREF((PyObject *)__pyx_v_element);
3700   __Pyx_DECREF((PyObject *)__pyx_v_self);
3701   __Pyx_DECREF(__pyx_v_key);
3702   __Pyx_DECREF(__pyx_v_value);
3703   __Pyx_FinishRefcountContext();
3704   return __pyx_r;
3705 }
3706
3707 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":349
3708  *             _replaceElement(element, value)
3709  * 
3710  *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
3711  *         cdef Py_ssize_t start, stop, step, slicelength
3712  *         parent = self.getparent()
3713  */
3714
3715 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
3716 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
3717   PyObject *__pyx_v_parent;
3718   PyObject *__pyx_v_del_items;
3719   PyObject *__pyx_v_remove;
3720   PyObject *__pyx_v_el;
3721   PyObject *__pyx_v_sibling;
3722   int __pyx_r;
3723   PyObject *__pyx_t_1 = NULL;
3724   PyObject *__pyx_t_2 = NULL;
3725   int __pyx_t_3;
3726   Py_ssize_t __pyx_t_4;
3727   PyObject *__pyx_t_5 = NULL;
3728   __Pyx_SetupRefcountContext("__delitem__");
3729   __Pyx_INCREF((PyObject *)__pyx_v_self);
3730   __Pyx_INCREF(__pyx_v_key);
3731   __pyx_v_parent = Py_None; __Pyx_INCREF(Py_None);
3732   __pyx_v_del_items = Py_None; __Pyx_INCREF(Py_None);
3733   __pyx_v_remove = Py_None; __Pyx_INCREF(Py_None);
3734   __pyx_v_el = Py_None; __Pyx_INCREF(Py_None);
3735   __pyx_v_sibling = Py_None; __Pyx_INCREF(Py_None);
3736
3737   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":351
3738  *     def __delitem__(self, key):
3739  *         cdef Py_ssize_t start, stop, step, slicelength
3740  *         parent = self.getparent()             # <<<<<<<<<<<<<<
3741  *         if parent is None:
3742  *             raise TypeError, u"deleting items not supported by root element"
3743  */
3744   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui_getparent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3745   __Pyx_GOTREF(__pyx_t_1);
3746   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3747   __Pyx_GOTREF(__pyx_t_2);
3748   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3749   __Pyx_DECREF(__pyx_v_parent);
3750   __pyx_v_parent = __pyx_t_2;
3751   __pyx_t_2 = 0;
3752
3753   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":352
3754  *         cdef Py_ssize_t start, stop, step, slicelength
3755  *         parent = self.getparent()
3756  *         if parent is None:             # <<<<<<<<<<<<<<
3757  *             raise TypeError, u"deleting items not supported by root element"
3758  *         if python.PySlice_Check(key):
3759  */
3760   __pyx_t_3 = (__pyx_v_parent == Py_None);
3761   if (__pyx_t_3) {
3762
3763     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":353
3764  *         parent = self.getparent()
3765  *         if parent is None:
3766  *             raise TypeError, u"deleting items not supported by root element"             # <<<<<<<<<<<<<<
3767  *         if python.PySlice_Check(key):
3768  *             # slice deletion
3769  */
3770     __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_8), 0);
3771     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3772     goto __pyx_L5;
3773   }
3774   __pyx_L5:;
3775
3776   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":354
3777  *         if parent is None:
3778  *             raise TypeError, u"deleting items not supported by root element"
3779  *         if python.PySlice_Check(key):             # <<<<<<<<<<<<<<
3780  *             # slice deletion
3781  *             del_items = list(self)[key]
3782  */
3783   __pyx_t_3 = PySlice_Check(__pyx_v_key);
3784   if (__pyx_t_3) {
3785
3786     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":356
3787  *         if python.PySlice_Check(key):
3788  *             # slice deletion
3789  *             del_items = list(self)[key]             # <<<<<<<<<<<<<<
3790  *             remove = parent.remove
3791  *             for el in del_items:
3792  */
3793     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3794     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3795     __Pyx_INCREF(__pyx_v_self);
3796     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
3797     __Pyx_GIVEREF(__pyx_v_self);
3798     __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyList_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3799     __Pyx_GOTREF(__pyx_t_1);
3800     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3801     __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3802     __Pyx_GOTREF(__pyx_t_2);
3803     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3804     __Pyx_DECREF(__pyx_v_del_items);
3805     __pyx_v_del_items = __pyx_t_2;
3806     __pyx_t_2 = 0;
3807
3808     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":357
3809  *             # slice deletion
3810  *             del_items = list(self)[key]
3811  *             remove = parent.remove             # <<<<<<<<<<<<<<
3812  *             for el in del_items:
3813  *                 remove(el)
3814  */
3815     __pyx_t_2 = PyObject_GetAttr(__pyx_v_parent, __pyx_n_ui_remove); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3816     __Pyx_GOTREF(__pyx_t_2);
3817     __Pyx_DECREF(__pyx_v_remove);
3818     __pyx_v_remove = __pyx_t_2;
3819     __pyx_t_2 = 0;
3820
3821     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":358
3822  *             del_items = list(self)[key]
3823  *             remove = parent.remove
3824  *             for el in del_items:             # <<<<<<<<<<<<<<
3825  *                 remove(el)
3826  *         else:
3827  */
3828     if (PyList_CheckExact(__pyx_v_del_items) || PyTuple_CheckExact(__pyx_v_del_items)) {
3829       __pyx_t_4 = 0; __pyx_t_2 = __pyx_v_del_items; __Pyx_INCREF(__pyx_t_2);
3830     } else {
3831       __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_del_items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3832       __Pyx_GOTREF(__pyx_t_2);
3833     }
3834     for (;;) {
3835       if (likely(PyList_CheckExact(__pyx_t_2))) {
3836         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
3837         __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
3838       } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
3839         if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
3840         __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
3841       } else {
3842         __pyx_t_1 = PyIter_Next(__pyx_t_2);
3843         if (!__pyx_t_1) {
3844           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3845           break;
3846         }
3847         __Pyx_GOTREF(__pyx_t_1);
3848       }
3849       __Pyx_DECREF(__pyx_v_el);
3850       __pyx_v_el = __pyx_t_1;
3851       __pyx_t_1 = 0;
3852
3853       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":359
3854  *             remove = parent.remove
3855  *             for el in del_items:
3856  *                 remove(el)             # <<<<<<<<<<<<<<
3857  *         else:
3858  *             # normal index deletion
3859  */
3860       __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3861       __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3862       __Pyx_INCREF(__pyx_v_el);
3863       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_el);
3864       __Pyx_GIVEREF(__pyx_v_el);
3865       __pyx_t_5 = PyObject_Call(__pyx_v_remove, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3866       __Pyx_GOTREF(__pyx_t_5);
3867       __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
3868       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3869     }
3870     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3871     goto __pyx_L6;
3872   }
3873   /*else*/ {
3874
3875     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":362
3876  *         else:
3877  *             # normal index deletion
3878  *             sibling = self.__getitem__(key)             # <<<<<<<<<<<<<<
3879  *             parent.remove(sibling)
3880  * 
3881  */
3882     __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui___getitem__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3883     __Pyx_GOTREF(__pyx_t_2);
3884     __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3885     __Pyx_GOTREF(((PyObject *)__pyx_t_5));
3886     __Pyx_INCREF(__pyx_v_key);
3887     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_key);
3888     __Pyx_GIVEREF(__pyx_v_key);
3889     __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3890     __Pyx_GOTREF(__pyx_t_1);
3891     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3892     __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
3893     __Pyx_DECREF(__pyx_v_sibling);
3894     __pyx_v_sibling = __pyx_t_1;
3895     __pyx_t_1 = 0;
3896
3897     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":363
3898  *             # normal index deletion
3899  *             sibling = self.__getitem__(key)
3900  *             parent.remove(sibling)             # <<<<<<<<<<<<<<
3901  * 
3902  *     def iterfind(self, path):
3903  */
3904     __pyx_t_1 = PyObject_GetAttr(__pyx_v_parent, __pyx_n_ui_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3905     __Pyx_GOTREF(__pyx_t_1);
3906     __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3907     __Pyx_GOTREF(((PyObject *)__pyx_t_5));
3908     __Pyx_INCREF(__pyx_v_sibling);
3909     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_sibling);
3910     __Pyx_GIVEREF(__pyx_v_sibling);
3911     __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3912     __Pyx_GOTREF(__pyx_t_2);
3913     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3914     __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
3915     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3916   }
3917   __pyx_L6:;
3918
3919   __pyx_r = 0;
3920   goto __pyx_L0;
3921   __pyx_L1_error:;
3922   __Pyx_XDECREF(__pyx_t_1);
3923   __Pyx_XDECREF(__pyx_t_2);
3924   __Pyx_XDECREF(__pyx_t_5);
3925   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delitem__");
3926   __pyx_r = -1;
3927   __pyx_L0:;
3928   __Pyx_DECREF(__pyx_v_parent);
3929   __Pyx_DECREF(__pyx_v_del_items);
3930   __Pyx_DECREF(__pyx_v_remove);
3931   __Pyx_DECREF(__pyx_v_el);
3932   __Pyx_DECREF(__pyx_v_sibling);
3933   __Pyx_DECREF((PyObject *)__pyx_v_self);
3934   __Pyx_DECREF(__pyx_v_key);
3935   __Pyx_FinishRefcountContext();
3936   return __pyx_r;
3937 }
3938
3939 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":365
3940  *             parent.remove(sibling)
3941  * 
3942  *     def iterfind(self, path):             # <<<<<<<<<<<<<<
3943  *         u"iterfind(self, path)"
3944  *         # Reimplementation of Element.iterfind() to make it work without child
3945  */
3946
3947 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_iterfind(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
3948 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_iterfind[] = "iterfind(self, path)";
3949 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_iterfind(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
3950   PyObject *__pyx_v_xpath;
3951   PyObject *__pyx_r = NULL;
3952   PyObject *__pyx_t_1 = NULL;
3953   PyObject *__pyx_t_2 = NULL;
3954   PyObject *__pyx_t_3 = NULL;
3955   __Pyx_SetupRefcountContext("iterfind");
3956   __pyx_v_xpath = Py_None; __Pyx_INCREF(Py_None);
3957
3958   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":369
3959  *         # Reimplementation of Element.iterfind() to make it work without child
3960  *         # iteration.
3961  *         xpath = etree.ETXPath(path)             # <<<<<<<<<<<<<<
3962  *         return iter(xpath(self))
3963  * 
3964  */
3965   __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_ETXPath); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3966   __Pyx_GOTREF(__pyx_t_1);
3967   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3968   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3969   __Pyx_INCREF(__pyx_v_path);
3970   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
3971   __Pyx_GIVEREF(__pyx_v_path);
3972   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3973   __Pyx_GOTREF(__pyx_t_3);
3974   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3975   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3976   __Pyx_DECREF(__pyx_v_xpath);
3977   __pyx_v_xpath = __pyx_t_3;
3978   __pyx_t_3 = 0;
3979
3980   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":370
3981  *         # iteration.
3982  *         xpath = etree.ETXPath(path)
3983  *         return iter(xpath(self))             # <<<<<<<<<<<<<<
3984  * 
3985  *     def findall(self, path):
3986  */
3987   __Pyx_XDECREF(__pyx_r);
3988   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3989   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
3990   __Pyx_INCREF(__pyx_v_self);
3991   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
3992   __Pyx_GIVEREF(__pyx_v_self);
3993   __pyx_t_2 = PyObject_Call(__pyx_v_xpath, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3994   __Pyx_GOTREF(__pyx_t_2);
3995   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
3996   __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3997   __Pyx_GOTREF(__pyx_t_3);
3998   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3999   __pyx_r = __pyx_t_3;
4000   __pyx_t_3 = 0;
4001   goto __pyx_L0;
4002
4003   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4004   goto __pyx_L0;
4005   __pyx_L1_error:;
4006   __Pyx_XDECREF(__pyx_t_1);
4007   __Pyx_XDECREF(__pyx_t_2);
4008   __Pyx_XDECREF(__pyx_t_3);
4009   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.iterfind");
4010   __pyx_r = NULL;
4011   __pyx_L0:;
4012   __Pyx_DECREF(__pyx_v_xpath);
4013   __Pyx_XGIVEREF(__pyx_r);
4014   __Pyx_FinishRefcountContext();
4015   return __pyx_r;
4016 }
4017
4018 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":372
4019  *         return iter(xpath(self))
4020  * 
4021  *     def findall(self, path):             # <<<<<<<<<<<<<<
4022  *         u"findall(self, path)"
4023  *         # Reimplementation of Element.findall() to make it work without child
4024  */
4025
4026 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findall(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
4027 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_findall[] = "findall(self, path)";
4028 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findall(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
4029   PyObject *__pyx_v_xpath;
4030   PyObject *__pyx_r = NULL;
4031   PyObject *__pyx_t_1 = NULL;
4032   PyObject *__pyx_t_2 = NULL;
4033   PyObject *__pyx_t_3 = NULL;
4034   __Pyx_SetupRefcountContext("findall");
4035   __pyx_v_xpath = Py_None; __Pyx_INCREF(Py_None);
4036
4037   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":376
4038  *         # Reimplementation of Element.findall() to make it work without child
4039  *         # iteration.
4040  *         xpath = etree.ETXPath(path)             # <<<<<<<<<<<<<<
4041  *         return xpath(self)
4042  * 
4043  */
4044   __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_ETXPath); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4045   __Pyx_GOTREF(__pyx_t_1);
4046   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4047   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
4048   __Pyx_INCREF(__pyx_v_path);
4049   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
4050   __Pyx_GIVEREF(__pyx_v_path);
4051   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4052   __Pyx_GOTREF(__pyx_t_3);
4053   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4054   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
4055   __Pyx_DECREF(__pyx_v_xpath);
4056   __pyx_v_xpath = __pyx_t_3;
4057   __pyx_t_3 = 0;
4058
4059   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":377
4060  *         # iteration.
4061  *         xpath = etree.ETXPath(path)
4062  *         return xpath(self)             # <<<<<<<<<<<<<<
4063  * 
4064  *     def find(self, path):
4065  */
4066   __Pyx_XDECREF(__pyx_r);
4067   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4068   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
4069   __Pyx_INCREF(__pyx_v_self);
4070   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
4071   __Pyx_GIVEREF(__pyx_v_self);
4072   __pyx_t_2 = PyObject_Call(__pyx_v_xpath, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4073   __Pyx_GOTREF(__pyx_t_2);
4074   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
4075   __pyx_r = __pyx_t_2;
4076   __pyx_t_2 = 0;
4077   goto __pyx_L0;
4078
4079   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4080   goto __pyx_L0;
4081   __pyx_L1_error:;
4082   __Pyx_XDECREF(__pyx_t_1);
4083   __Pyx_XDECREF(__pyx_t_2);
4084   __Pyx_XDECREF(__pyx_t_3);
4085   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.findall");
4086   __pyx_r = NULL;
4087   __pyx_L0:;
4088   __Pyx_DECREF(__pyx_v_xpath);
4089   __Pyx_XGIVEREF(__pyx_r);
4090   __Pyx_FinishRefcountContext();
4091   return __pyx_r;
4092 }
4093
4094 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":379
4095  *         return xpath(self)
4096  * 
4097  *     def find(self, path):             # <<<<<<<<<<<<<<
4098  *         u"find(self, path)"
4099  *         # Reimplementation of Element.find() to make it work without child
4100  */
4101
4102 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_find(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
4103 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_find[] = "find(self, path)";
4104 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_find(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
4105   PyObject *__pyx_v_result;
4106   PyObject *__pyx_r = NULL;
4107   PyObject *__pyx_t_1 = NULL;
4108   PyObject *__pyx_t_2 = NULL;
4109   PyObject *__pyx_t_3 = NULL;
4110   int __pyx_t_4;
4111   Py_ssize_t __pyx_t_5;
4112   int __pyx_t_6;
4113   __Pyx_SetupRefcountContext("find");
4114   __Pyx_INCREF((PyObject *)__pyx_v_self);
4115   __Pyx_INCREF(__pyx_v_path);
4116   __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
4117
4118   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":383
4119  *         # Reimplementation of Element.find() to make it work without child
4120  *         # iteration.
4121  *         result = self.findall(path)             # <<<<<<<<<<<<<<
4122  *         if isinstance(result, list) and len(result):
4123  *             return result[0]
4124  */
4125   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui_findall); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4126   __Pyx_GOTREF(__pyx_t_1);
4127   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4128   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
4129   __Pyx_INCREF(__pyx_v_path);
4130   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
4131   __Pyx_GIVEREF(__pyx_v_path);
4132   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4133   __Pyx_GOTREF(__pyx_t_3);
4134   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4135   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
4136   __Pyx_DECREF(__pyx_v_result);
4137   __pyx_v_result = __pyx_t_3;
4138   __pyx_t_3 = 0;
4139
4140   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":384
4141  *         # iteration.
4142  *         result = self.findall(path)
4143  *         if isinstance(result, list) and len(result):             # <<<<<<<<<<<<<<
4144  *             return result[0]
4145  *         elif isinstance(result, _Element):
4146  */
4147   __pyx_t_4 = PyObject_TypeCheck(__pyx_v_result, ((PyTypeObject *)((PyObject*)&PyList_Type))); 
4148   if (__pyx_t_4) {
4149     __pyx_t_5 = PyObject_Length(__pyx_v_result); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4150     __pyx_t_6 = __pyx_t_5;
4151   } else {
4152     __pyx_t_6 = __pyx_t_4;
4153   }
4154   if (__pyx_t_6) {
4155
4156     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":385
4157  *         result = self.findall(path)
4158  *         if isinstance(result, list) and len(result):
4159  *             return result[0]             # <<<<<<<<<<<<<<
4160  *         elif isinstance(result, _Element):
4161  *             return result
4162  */
4163     __Pyx_XDECREF(__pyx_r);
4164     __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_result, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4165     __Pyx_GOTREF(__pyx_t_3);
4166     __pyx_r = __pyx_t_3;
4167     __pyx_t_3 = 0;
4168     goto __pyx_L0;
4169     goto __pyx_L5;
4170   }
4171
4172   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":386
4173  *         if isinstance(result, list) and len(result):
4174  *             return result[0]
4175  *         elif isinstance(result, _Element):             # <<<<<<<<<<<<<<
4176  *             return result
4177  *         else:
4178  */
4179   __pyx_t_6 = PyObject_TypeCheck(__pyx_v_result, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
4180   if (__pyx_t_6) {
4181
4182     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":387
4183  *             return result[0]
4184  *         elif isinstance(result, _Element):
4185  *             return result             # <<<<<<<<<<<<<<
4186  *         else:
4187  *             return None
4188  */
4189     __Pyx_XDECREF(__pyx_r);
4190     __Pyx_INCREF(__pyx_v_result);
4191     __pyx_r = __pyx_v_result;
4192     goto __pyx_L0;
4193     goto __pyx_L5;
4194   }
4195   /*else*/ {
4196
4197     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":389
4198  *             return result
4199  *         else:
4200  *             return None             # <<<<<<<<<<<<<<
4201  * 
4202  *     def findtext(self, path, default=None):
4203  */
4204     __Pyx_XDECREF(__pyx_r);
4205     __Pyx_INCREF(Py_None);
4206     __pyx_r = Py_None;
4207     goto __pyx_L0;
4208   }
4209   __pyx_L5:;
4210
4211   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4212   goto __pyx_L0;
4213   __pyx_L1_error:;
4214   __Pyx_XDECREF(__pyx_t_1);
4215   __Pyx_XDECREF(__pyx_t_2);
4216   __Pyx_XDECREF(__pyx_t_3);
4217   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.find");
4218   __pyx_r = NULL;
4219   __pyx_L0:;
4220   __Pyx_DECREF(__pyx_v_result);
4221   __Pyx_DECREF((PyObject *)__pyx_v_self);
4222   __Pyx_DECREF(__pyx_v_path);
4223   __Pyx_XGIVEREF(__pyx_r);
4224   __Pyx_FinishRefcountContext();
4225   return __pyx_r;
4226 }
4227
4228 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":391
4229  *             return None
4230  * 
4231  *     def findtext(self, path, default=None):             # <<<<<<<<<<<<<<
4232  *         u"findtext(self, path, default=None)"
4233  *         # Reimplementation of Element.findtext() to make it work without child
4234  */
4235
4236 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findtext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4237 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_findtext[] = "findtext(self, path, default=None)";
4238 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findtext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4239   PyObject *__pyx_v_path = 0;
4240   PyObject *__pyx_v_default = 0;
4241   PyObject *__pyx_v_result;
4242   PyObject *__pyx_r = NULL;
4243   PyObject *__pyx_t_1 = NULL;
4244   PyObject *__pyx_t_2 = NULL;
4245   PyObject *__pyx_t_3 = NULL;
4246   int __pyx_t_4;
4247   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_path,&__pyx_n_ui_default,0};
4248   __Pyx_SetupRefcountContext("findtext");
4249   if (unlikely(__pyx_kwds)) {
4250     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
4251     PyObject* values[2] = {0,0};
4252     values[1] = ((PyObject *)Py_None);
4253     switch (PyTuple_GET_SIZE(__pyx_args)) {
4254       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4255       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4256       case  0: break;
4257       default: goto __pyx_L5_argtuple_error;
4258     }
4259     switch (PyTuple_GET_SIZE(__pyx_args)) {
4260       case  0:
4261       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_path);
4262       if (likely(values[0])) kw_args--;
4263       else goto __pyx_L5_argtuple_error;
4264       case  1:
4265       if (kw_args > 1) {
4266         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_default);
4267         if (unlikely(value)) { values[1] = value; kw_args--; }
4268       }
4269     }
4270     if (unlikely(kw_args > 0)) {
4271       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "findtext") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4272     }
4273     __pyx_v_path = values[0];
4274     __pyx_v_default = values[1];
4275   } else {
4276     __pyx_v_default = ((PyObject *)Py_None);
4277     switch (PyTuple_GET_SIZE(__pyx_args)) {
4278       case  2: __pyx_v_default = PyTuple_GET_ITEM(__pyx_args, 1);
4279       case  1: __pyx_v_path = PyTuple_GET_ITEM(__pyx_args, 0);
4280       break;
4281       default: goto __pyx_L5_argtuple_error;
4282     }
4283   }
4284   goto __pyx_L4_argument_unpacking_done;
4285   __pyx_L5_argtuple_error:;
4286   __Pyx_RaiseArgtupleInvalid("findtext", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4287   __pyx_L3_error:;
4288   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.findtext");
4289   return NULL;
4290   __pyx_L4_argument_unpacking_done:;
4291   __Pyx_INCREF((PyObject *)__pyx_v_self);
4292   __Pyx_INCREF(__pyx_v_path);
4293   __Pyx_INCREF(__pyx_v_default);
4294   __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
4295
4296   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":395
4297  *         # Reimplementation of Element.findtext() to make it work without child
4298  *         # iteration.
4299  *         result = self.find(path)             # <<<<<<<<<<<<<<
4300  *         if isinstance(result, _Element):
4301  *             return result.text or u""
4302  */
4303   __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui_find); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4304   __Pyx_GOTREF(__pyx_t_1);
4305   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4306   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
4307   __Pyx_INCREF(__pyx_v_path);
4308   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
4309   __Pyx_GIVEREF(__pyx_v_path);
4310   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4311   __Pyx_GOTREF(__pyx_t_3);
4312   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4313   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
4314   __Pyx_DECREF(__pyx_v_result);
4315   __pyx_v_result = __pyx_t_3;
4316   __pyx_t_3 = 0;
4317
4318   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":396
4319  *         # iteration.
4320  *         result = self.find(path)
4321  *         if isinstance(result, _Element):             # <<<<<<<<<<<<<<
4322  *             return result.text or u""
4323  *         else:
4324  */
4325   __pyx_t_4 = PyObject_TypeCheck(__pyx_v_result, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
4326   if (__pyx_t_4) {
4327
4328     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":397
4329  *         result = self.find(path)
4330  *         if isinstance(result, _Element):
4331  *             return result.text or u""             # <<<<<<<<<<<<<<
4332  *         else:
4333  *             return default
4334  */
4335     __Pyx_XDECREF(__pyx_r);
4336     __pyx_t_3 = PyObject_GetAttr(__pyx_v_result, __pyx_n_ui_text); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4337     __Pyx_GOTREF(__pyx_t_3);
4338     __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4339     if (!__pyx_t_4) {
4340       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4341       __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
4342       __pyx_t_2 = __pyx_kp_u_4;
4343     } else {
4344       __pyx_t_2 = __pyx_t_3;
4345       __pyx_t_3 = 0;
4346     }
4347     __pyx_r = __pyx_t_2;
4348     __pyx_t_2 = 0;
4349     goto __pyx_L0;
4350     goto __pyx_L6;
4351   }
4352   /*else*/ {
4353
4354     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":399
4355  *             return result.text or u""
4356  *         else:
4357  *             return default             # <<<<<<<<<<<<<<
4358  * 
4359  *     def descendantpaths(self, prefix=None):
4360  */
4361     __Pyx_XDECREF(__pyx_r);
4362     __Pyx_INCREF(__pyx_v_default);
4363     __pyx_r = __pyx_v_default;
4364     goto __pyx_L0;
4365   }
4366   __pyx_L6:;
4367
4368   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4369   goto __pyx_L0;
4370   __pyx_L1_error:;
4371   __Pyx_XDECREF(__pyx_t_1);
4372   __Pyx_XDECREF(__pyx_t_2);
4373   __Pyx_XDECREF(__pyx_t_3);
4374   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.findtext");
4375   __pyx_r = NULL;
4376   __pyx_L0:;
4377   __Pyx_DECREF(__pyx_v_result);
4378   __Pyx_DECREF((PyObject *)__pyx_v_self);
4379   __Pyx_DECREF(__pyx_v_path);
4380   __Pyx_DECREF(__pyx_v_default);
4381   __Pyx_XGIVEREF(__pyx_r);
4382   __Pyx_FinishRefcountContext();
4383   return __pyx_r;
4384 }
4385
4386 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":401
4387  *             return default
4388  * 
4389  *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<<
4390  *         u"""descendantpaths(self, prefix=None)
4391  * 
4392  */
4393
4394 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4395 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_descendantpaths[] = "descendantpaths(self, prefix=None)\n\n        Returns a list of object path expressions for all descendants.\n        ";
4396 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4397   PyObject *__pyx_v_prefix = 0;
4398   PyObject *__pyx_r = NULL;
4399   int __pyx_t_1;
4400   int __pyx_t_2;
4401   PyObject *__pyx_t_3 = NULL;
4402   PyObject *__pyx_t_4 = NULL;
4403   PyObject *__pyx_t_5 = NULL;
4404   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_prefix,0};
4405   __Pyx_SetupRefcountContext("descendantpaths");
4406   if (unlikely(__pyx_kwds)) {
4407     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
4408     PyObject* values[1] = {0};
4409     values[0] = ((PyObject *)Py_None);
4410     switch (PyTuple_GET_SIZE(__pyx_args)) {
4411       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4412       case  0: break;
4413       default: goto __pyx_L5_argtuple_error;
4414     }
4415     switch (PyTuple_GET_SIZE(__pyx_args)) {
4416       case  0:
4417       if (kw_args > 1) {
4418         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_prefix);
4419         if (unlikely(value)) { values[0] = value; kw_args--; }
4420       }
4421     }
4422     if (unlikely(kw_args > 0)) {
4423       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "descendantpaths") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4424     }
4425     __pyx_v_prefix = values[0];
4426   } else {
4427     __pyx_v_prefix = ((PyObject *)Py_None);
4428     switch (PyTuple_GET_SIZE(__pyx_args)) {
4429       case  1: __pyx_v_prefix = PyTuple_GET_ITEM(__pyx_args, 0);
4430       case  0: break;
4431       default: goto __pyx_L5_argtuple_error;
4432     }
4433   }
4434   goto __pyx_L4_argument_unpacking_done;
4435   __pyx_L5_argtuple_error:;
4436   __Pyx_RaiseArgtupleInvalid("descendantpaths", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4437   __pyx_L3_error:;
4438   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths");
4439   return NULL;
4440   __pyx_L4_argument_unpacking_done:;
4441   __Pyx_INCREF((PyObject *)__pyx_v_self);
4442   __Pyx_INCREF(__pyx_v_prefix);
4443
4444   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":406
4445  *         Returns a list of object path expressions for all descendants.
4446  *         """
4447  *         if prefix is not None and not python._isString(prefix):             # <<<<<<<<<<<<<<
4448  *             prefix = u'.'.join(prefix)
4449  *         return _buildDescendantPaths(self._c_node, prefix)
4450  */
4451   __pyx_t_1 = (__pyx_v_prefix != Py_None);
4452   if (__pyx_t_1) {
4453     __pyx_t_2 = (!_isString(__pyx_v_prefix));
4454   } else {
4455     __pyx_t_2 = __pyx_t_1;
4456   }
4457   if (__pyx_t_2) {
4458
4459     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":407
4460  *         """
4461  *         if prefix is not None and not python._isString(prefix):
4462  *             prefix = u'.'.join(prefix)             # <<<<<<<<<<<<<<
4463  *         return _buildDescendantPaths(self._c_node, prefix)
4464  * 
4465  */
4466     __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_u_9), __pyx_n_ui_join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4467     __Pyx_GOTREF(__pyx_t_3);
4468     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4469     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
4470     __Pyx_INCREF(__pyx_v_prefix);
4471     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_prefix);
4472     __Pyx_GIVEREF(__pyx_v_prefix);
4473     __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4474     __Pyx_GOTREF(__pyx_t_5);
4475     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4476     __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
4477     __Pyx_DECREF(__pyx_v_prefix);
4478     __pyx_v_prefix = __pyx_t_5;
4479     __pyx_t_5 = 0;
4480     goto __pyx_L6;
4481   }
4482   __pyx_L6:;
4483
4484   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":408
4485  *         if prefix is not None and not python._isString(prefix):
4486  *             prefix = u'.'.join(prefix)
4487  *         return _buildDescendantPaths(self._c_node, prefix)             # <<<<<<<<<<<<<<
4488  * 
4489  * cdef inline bint _tagMatches(tree.xmlNode* c_node, char* c_href, char* c_name):
4490  */
4491   __Pyx_XDECREF(__pyx_r);
4492   __pyx_t_5 = ((PyObject *)__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_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4493   __Pyx_GOTREF(__pyx_t_5);
4494   __pyx_r = __pyx_t_5;
4495   __pyx_t_5 = 0;
4496   goto __pyx_L0;
4497
4498   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4499   goto __pyx_L0;
4500   __pyx_L1_error:;
4501   __Pyx_XDECREF(__pyx_t_3);
4502   __Pyx_XDECREF(__pyx_t_4);
4503   __Pyx_XDECREF(__pyx_t_5);
4504   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths");
4505   __pyx_r = NULL;
4506   __pyx_L0:;
4507   __Pyx_DECREF((PyObject *)__pyx_v_self);
4508   __Pyx_DECREF(__pyx_v_prefix);
4509   __Pyx_XGIVEREF(__pyx_r);
4510   __Pyx_FinishRefcountContext();
4511   return __pyx_r;
4512 }
4513
4514 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":410
4515  *         return _buildDescendantPaths(self._c_node, prefix)
4516  * 
4517  * cdef inline bint _tagMatches(tree.xmlNode* c_node, char* c_href, char* c_name):             # <<<<<<<<<<<<<<
4518  *     cdef char* c_node_href
4519  *     if c_node.name != c_name:
4520  */
4521
4522 static INLINE int __pyx_f_4lxml_9objectify__tagMatches(xmlNode *__pyx_v_c_node, char *__pyx_v_c_href, char *__pyx_v_c_name) {
4523   char *__pyx_v_c_node_href;
4524   int __pyx_r;
4525   int __pyx_t_1;
4526   __Pyx_SetupRefcountContext("_tagMatches");
4527
4528   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":412
4529  * cdef inline bint _tagMatches(tree.xmlNode* c_node, char* c_href, char* c_name):
4530  *     cdef char* c_node_href
4531  *     if c_node.name != c_name:             # <<<<<<<<<<<<<<
4532  *         return 0
4533  *     if c_href == NULL:
4534  */
4535   __pyx_t_1 = (__pyx_v_c_node->name != __pyx_v_c_name);
4536   if (__pyx_t_1) {
4537
4538     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":413
4539  *     cdef char* c_node_href
4540  *     if c_node.name != c_name:
4541  *         return 0             # <<<<<<<<<<<<<<
4542  *     if c_href == NULL:
4543  *         return 1
4544  */
4545     __pyx_r = 0;
4546     goto __pyx_L0;
4547     goto __pyx_L3;
4548   }
4549   __pyx_L3:;
4550
4551   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":414
4552  *     if c_node.name != c_name:
4553  *         return 0
4554  *     if c_href == NULL:             # <<<<<<<<<<<<<<
4555  *         return 1
4556  *     c_node_href = tree._getNs(c_node)
4557  */
4558   __pyx_t_1 = (__pyx_v_c_href == NULL);
4559   if (__pyx_t_1) {
4560
4561     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":415
4562  *         return 0
4563  *     if c_href == NULL:
4564  *         return 1             # <<<<<<<<<<<<<<
4565  *     c_node_href = tree._getNs(c_node)
4566  *     if c_node_href == NULL:
4567  */
4568     __pyx_r = 1;
4569     goto __pyx_L0;
4570     goto __pyx_L4;
4571   }
4572   __pyx_L4:;
4573
4574   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":416
4575  *     if c_href == NULL:
4576  *         return 1
4577  *     c_node_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
4578  *     if c_node_href == NULL:
4579  *         return c_href[0] == c'\0'
4580  */
4581   __pyx_v_c_node_href = _getNs(__pyx_v_c_node);
4582
4583   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":417
4584  *         return 1
4585  *     c_node_href = tree._getNs(c_node)
4586  *     if c_node_href == NULL:             # <<<<<<<<<<<<<<
4587  *         return c_href[0] == c'\0'
4588  *     return cstd.strcmp(c_node_href, c_href) == 0
4589  */
4590   __pyx_t_1 = (__pyx_v_c_node_href == NULL);
4591   if (__pyx_t_1) {
4592
4593     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":418
4594  *     c_node_href = tree._getNs(c_node)
4595  *     if c_node_href == NULL:
4596  *         return c_href[0] == c'\0'             # <<<<<<<<<<<<<<
4597  *     return cstd.strcmp(c_node_href, c_href) == 0
4598  * 
4599  */
4600     __pyx_r = ((__pyx_v_c_href[0]) == '\x00');
4601     goto __pyx_L0;
4602     goto __pyx_L5;
4603   }
4604   __pyx_L5:;
4605
4606   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":419
4607  *     if c_node_href == NULL:
4608  *         return c_href[0] == c'\0'
4609  *     return cstd.strcmp(c_node_href, c_href) == 0             # <<<<<<<<<<<<<<
4610  * 
4611  * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):
4612  */
4613   __pyx_r = (strcmp(__pyx_v_c_node_href, __pyx_v_c_href) == 0);
4614   goto __pyx_L0;
4615
4616   __pyx_r = 0;
4617   __pyx_L0:;
4618   __Pyx_FinishRefcountContext();
4619   return __pyx_r;
4620 }
4621
4622 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":421
4623  *     return cstd.strcmp(c_node_href, c_href) == 0
4624  * 
4625  * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):             # <<<<<<<<<<<<<<
4626  *     cdef tree.xmlNode* c_node
4627  *     cdef char* c_href
4628  */
4629
4630 static  Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *__pyx_v_c_start_node) {
4631   xmlNode *__pyx_v_c_node;
4632   char *__pyx_v_c_href;
4633   char *__pyx_v_c_tag;
4634   Py_ssize_t __pyx_v_count;
4635   Py_ssize_t __pyx_r;
4636   int __pyx_t_1;
4637   __Pyx_SetupRefcountContext("_countSiblings");
4638
4639   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":426
4640  *     cdef char* c_tag
4641  *     cdef Py_ssize_t count
4642  *     c_tag  = c_start_node.name             # <<<<<<<<<<<<<<
4643  *     c_href = tree._getNs(c_start_node)
4644  *     count = 1
4645  */
4646   __pyx_v_c_tag = __pyx_v_c_start_node->name;
4647
4648   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":427
4649  *     cdef Py_ssize_t count
4650  *     c_tag  = c_start_node.name
4651  *     c_href = tree._getNs(c_start_node)             # <<<<<<<<<<<<<<
4652  *     count = 1
4653  *     c_node = c_start_node.next
4654  */
4655   __pyx_v_c_href = _getNs(__pyx_v_c_start_node);
4656
4657   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":428
4658  *     c_tag  = c_start_node.name
4659  *     c_href = tree._getNs(c_start_node)
4660  *     count = 1             # <<<<<<<<<<<<<<
4661  *     c_node = c_start_node.next
4662  *     while c_node is not NULL:
4663  */
4664   __pyx_v_count = 1;
4665
4666   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":429
4667  *     c_href = tree._getNs(c_start_node)
4668  *     count = 1
4669  *     c_node = c_start_node.next             # <<<<<<<<<<<<<<
4670  *     while c_node is not NULL:
4671  *         if c_node.type == tree.XML_ELEMENT_NODE and \
4672  */
4673   __pyx_v_c_node = __pyx_v_c_start_node->next;
4674
4675   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":430
4676  *     count = 1
4677  *     c_node = c_start_node.next
4678  *     while c_node is not NULL:             # <<<<<<<<<<<<<<
4679  *         if c_node.type == tree.XML_ELEMENT_NODE and \
4680  *                _tagMatches(c_node, c_href, c_tag):
4681  */
4682   while (1) {
4683     __pyx_t_1 = (__pyx_v_c_node != NULL);
4684     if (!__pyx_t_1) break;
4685
4686     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":431
4687  *     c_node = c_start_node.next
4688  *     while c_node is not NULL:
4689  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
4690  *                _tagMatches(c_node, c_href, c_tag):
4691  *             count = count + 1
4692  */
4693     if ((__pyx_v_c_node->type == XML_ELEMENT_NODE)) {
4694
4695       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":432
4696  *     while c_node is not NULL:
4697  *         if c_node.type == tree.XML_ELEMENT_NODE and \
4698  *                _tagMatches(c_node, c_href, c_tag):             # <<<<<<<<<<<<<<
4699  *             count = count + 1
4700  *         c_node = c_node.next
4701  */
4702       __pyx_t_1 = __pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_tag);
4703     } else {
4704       __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
4705     }
4706     if (__pyx_t_1) {
4707
4708       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":433
4709  *         if c_node.type == tree.XML_ELEMENT_NODE and \
4710  *                _tagMatches(c_node, c_href, c_tag):
4711  *             count = count + 1             # <<<<<<<<<<<<<<
4712  *         c_node = c_node.next
4713  *     c_node = c_start_node.prev
4714  */
4715       __pyx_v_count = (__pyx_v_count + 1);
4716       goto __pyx_L5;
4717     }
4718     __pyx_L5:;
4719
4720     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":434
4721  *                _tagMatches(c_node, c_href, c_tag):
4722  *             count = count + 1
4723  *         c_node = c_node.next             # <<<<<<<<<<<<<<
4724  *     c_node = c_start_node.prev
4725  *     while c_node is not NULL:
4726  */
4727     __pyx_v_c_node = __pyx_v_c_node->next;
4728   }
4729
4730   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":435
4731  *             count = count + 1
4732  *         c_node = c_node.next
4733  *     c_node = c_start_node.prev             # <<<<<<<<<<<<<<
4734  *     while c_node is not NULL:
4735  *         if c_node.type == tree.XML_ELEMENT_NODE and \
4736  */
4737   __pyx_v_c_node = __pyx_v_c_start_node->prev;
4738
4739   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":436
4740  *         c_node = c_node.next
4741  *     c_node = c_start_node.prev
4742  *     while c_node is not NULL:             # <<<<<<<<<<<<<<
4743  *         if c_node.type == tree.XML_ELEMENT_NODE and \
4744  *                _tagMatches(c_node, c_href, c_tag):
4745  */
4746   while (1) {
4747     __pyx_t_1 = (__pyx_v_c_node != NULL);
4748     if (!__pyx_t_1) break;
4749
4750     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":437
4751  *     c_node = c_start_node.prev
4752  *     while c_node is not NULL:
4753  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
4754  *                _tagMatches(c_node, c_href, c_tag):
4755  *             count = count + 1
4756  */
4757     if ((__pyx_v_c_node->type == XML_ELEMENT_NODE)) {
4758
4759       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":438
4760  *     while c_node is not NULL:
4761  *         if c_node.type == tree.XML_ELEMENT_NODE and \
4762  *                _tagMatches(c_node, c_href, c_tag):             # <<<<<<<<<<<<<<
4763  *             count = count + 1
4764  *         c_node = c_node.prev
4765  */
4766       __pyx_t_1 = __pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_tag);
4767     } else {
4768       __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
4769     }
4770     if (__pyx_t_1) {
4771
4772       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":439
4773  *         if c_node.type == tree.XML_ELEMENT_NODE and \
4774  *                _tagMatches(c_node, c_href, c_tag):
4775  *             count = count + 1             # <<<<<<<<<<<<<<
4776  *         c_node = c_node.prev
4777  *     return count
4778  */
4779       __pyx_v_count = (__pyx_v_count + 1);
4780       goto __pyx_L8;
4781     }
4782     __pyx_L8:;
4783
4784     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":440
4785  *                _tagMatches(c_node, c_href, c_tag):
4786  *             count = count + 1
4787  *         c_node = c_node.prev             # <<<<<<<<<<<<<<
4788  *     return count
4789  * 
4790  */
4791     __pyx_v_c_node = __pyx_v_c_node->prev;
4792   }
4793
4794   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":441
4795  *             count = count + 1
4796  *         c_node = c_node.prev
4797  *     return count             # <<<<<<<<<<<<<<
4798  * 
4799  * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,
4800  */
4801   __pyx_r = __pyx_v_count;
4802   goto __pyx_L0;
4803
4804   __pyx_r = 0;
4805   __pyx_L0:;
4806   __Pyx_FinishRefcountContext();
4807   return __pyx_r;
4808 }
4809
4810 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":443
4811  *     return count
4812  * 
4813  * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
4814  *                                          char* href, char* name,
4815  *                                          Py_ssize_t index):
4816  */
4817
4818 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) {
4819   xmlNode *(*__pyx_v_next)(xmlNode *);
4820   xmlNode *__pyx_r;
4821   int __pyx_t_1;
4822   __Pyx_SetupRefcountContext("_findFollowingSibling");
4823
4824   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":447
4825  *                                          Py_ssize_t index):
4826  *     cdef tree.xmlNode* (*next)(tree.xmlNode*)
4827  *     if index >= 0:             # <<<<<<<<<<<<<<
4828  *         next = cetree.nextElement
4829  *     else:
4830  */
4831   __pyx_t_1 = (__pyx_v_index >= 0);
4832   if (__pyx_t_1) {
4833
4834     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":448
4835  *     cdef tree.xmlNode* (*next)(tree.xmlNode*)
4836  *     if index >= 0:
4837  *         next = cetree.nextElement             # <<<<<<<<<<<<<<
4838  *     else:
4839  *         index = -1 - index
4840  */
4841     __pyx_v_next = nextElement;
4842     goto __pyx_L3;
4843   }
4844   /*else*/ {
4845
4846     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":450
4847  *         next = cetree.nextElement
4848  *     else:
4849  *         index = -1 - index             # <<<<<<<<<<<<<<
4850  *         next = cetree.previousElement
4851  *     while c_node is not NULL:
4852  */
4853     __pyx_v_index = (-1 - __pyx_v_index);
4854
4855     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":451
4856  *     else:
4857  *         index = -1 - index
4858  *         next = cetree.previousElement             # <<<<<<<<<<<<<<
4859  *     while c_node is not NULL:
4860  *         if c_node.type == tree.XML_ELEMENT_NODE and \
4861  */
4862     __pyx_v_next = previousElement;
4863   }
4864   __pyx_L3:;
4865
4866   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":452
4867  *         index = -1 - index
4868  *         next = cetree.previousElement
4869  *     while c_node is not NULL:             # <<<<<<<<<<<<<<
4870  *         if c_node.type == tree.XML_ELEMENT_NODE and \
4871  *                _tagMatches(c_node, href, name):
4872  */
4873   while (1) {
4874     __pyx_t_1 = (__pyx_v_c_node != NULL);
4875     if (!__pyx_t_1) break;
4876
4877     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":453
4878  *         next = cetree.previousElement
4879  *     while c_node is not NULL:
4880  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
4881  *                _tagMatches(c_node, href, name):
4882  *             index = index - 1
4883  */
4884     if ((__pyx_v_c_node->type == XML_ELEMENT_NODE)) {
4885
4886       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":454
4887  *     while c_node is not NULL:
4888  *         if c_node.type == tree.XML_ELEMENT_NODE and \
4889  *                _tagMatches(c_node, href, name):             # <<<<<<<<<<<<<<
4890  *             index = index - 1
4891  *             if index < 0:
4892  */
4893       __pyx_t_1 = __pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_href, __pyx_v_name);
4894     } else {
4895       __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
4896     }
4897     if (__pyx_t_1) {
4898
4899       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":455
4900  *         if c_node.type == tree.XML_ELEMENT_NODE and \
4901  *                _tagMatches(c_node, href, name):
4902  *             index = index - 1             # <<<<<<<<<<<<<<
4903  *             if index < 0:
4904  *                 return c_node
4905  */
4906       __pyx_v_index = (__pyx_v_index - 1);
4907
4908       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":456
4909  *                _tagMatches(c_node, href, name):
4910  *             index = index - 1
4911  *             if index < 0:             # <<<<<<<<<<<<<<
4912  *                 return c_node
4913  *         c_node = next(c_node)
4914  */
4915       __pyx_t_1 = (__pyx_v_index < 0);
4916       if (__pyx_t_1) {
4917
4918         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":457
4919  *             index = index - 1
4920  *             if index < 0:
4921  *                 return c_node             # <<<<<<<<<<<<<<
4922  *         c_node = next(c_node)
4923  *     return NULL
4924  */
4925         __pyx_r = __pyx_v_c_node;
4926         goto __pyx_L0;
4927         goto __pyx_L7;
4928       }
4929       __pyx_L7:;
4930       goto __pyx_L6;
4931     }
4932     __pyx_L6:;
4933
4934     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":458
4935  *             if index < 0:
4936  *                 return c_node
4937  *         c_node = next(c_node)             # <<<<<<<<<<<<<<
4938  *     return NULL
4939  * 
4940  */
4941     __pyx_v_c_node = __pyx_v_next(__pyx_v_c_node);
4942   }
4943
4944   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":459
4945  *                 return c_node
4946  *         c_node = next(c_node)
4947  *     return NULL             # <<<<<<<<<<<<<<
4948  * 
4949  * cdef object _lookupChild(_Element parent, tag):
4950  */
4951   __pyx_r = NULL;
4952   goto __pyx_L0;
4953
4954   __pyx_r = 0;
4955   __pyx_L0:;
4956   __Pyx_FinishRefcountContext();
4957   return __pyx_r;
4958 }
4959
4960 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":461
4961  *     return NULL
4962  * 
4963  * cdef object _lookupChild(_Element parent, tag):             # <<<<<<<<<<<<<<
4964  *     cdef tree.xmlNode* c_result
4965  *     cdef tree.xmlNode* c_node
4966  */
4967
4968 static  PyObject *__pyx_f_4lxml_9objectify__lookupChild(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
4969   xmlNode *__pyx_v_c_result;
4970   xmlNode *__pyx_v_c_node;
4971   char *__pyx_v_c_href;
4972   char *__pyx_v_c_tag;
4973   PyObject *__pyx_v_ns;
4974   PyObject *__pyx_r = NULL;
4975   PyObject *__pyx_t_1 = NULL;
4976   PyObject *__pyx_t_2 = NULL;
4977   PyObject *__pyx_t_3 = NULL;
4978   PyObject *__pyx_t_4 = NULL;
4979   int __pyx_t_5;
4980   __Pyx_SetupRefcountContext("_lookupChild");
4981   __Pyx_INCREF((PyObject *)__pyx_v_parent);
4982   __Pyx_INCREF(__pyx_v_tag);
4983   __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
4984
4985   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":466
4986  *     cdef char* c_href
4987  *     cdef char* c_tag
4988  *     c_node = parent._c_node             # <<<<<<<<<<<<<<
4989  *     ns, tag = cetree.getNsTag(tag)
4990  *     c_tag = tree.xmlDictExists(
4991  */
4992   __pyx_v_c_node = __pyx_v_parent->_c_node;
4993
4994   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":467
4995  *     cdef char* c_tag
4996  *     c_node = parent._c_node
4997  *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<<
4998  *     c_tag = tree.xmlDictExists(
4999  *         c_node.doc.dict, _cstr(tag), python.PyString_GET_SIZE(tag))
5000  */
5001   __pyx_t_1 = getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5002   __Pyx_GOTREF(__pyx_t_1);
5003   if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
5004     PyObject* tuple = __pyx_t_1;
5005     __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
5006     __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
5007     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5008     __Pyx_DECREF(__pyx_v_ns);
5009     __pyx_v_ns = __pyx_t_2;
5010     __pyx_t_2 = 0;
5011     __Pyx_DECREF(__pyx_v_tag);
5012     __pyx_v_tag = __pyx_t_3;
5013     __pyx_t_3 = 0;
5014   } else {
5015     __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5016     __Pyx_GOTREF(__pyx_t_4);
5017     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5018     __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_4, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5019     __Pyx_GOTREF(__pyx_t_2);
5020     __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_4, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5021     __Pyx_GOTREF(__pyx_t_3);
5022     if (__Pyx_EndUnpack(__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5023     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5024     __Pyx_DECREF(__pyx_v_ns);
5025     __pyx_v_ns = __pyx_t_2;
5026     __pyx_t_2 = 0;
5027     __Pyx_DECREF(__pyx_v_tag);
5028     __pyx_v_tag = __pyx_t_3;
5029     __pyx_t_3 = 0;
5030   }
5031
5032   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":469
5033  *     ns, tag = cetree.getNsTag(tag)
5034  *     c_tag = tree.xmlDictExists(
5035  *         c_node.doc.dict, _cstr(tag), python.PyString_GET_SIZE(tag))             # <<<<<<<<<<<<<<
5036  *     if c_tag is NULL:
5037  *         return None
5038  */
5039   __pyx_v_c_tag = xmlDictExists(__pyx_v_c_node->doc->dict, PyString_AS_STRING(__pyx_v_tag), PyString_GET_SIZE(__pyx_v_tag));
5040
5041   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":470
5042  *     c_tag = tree.xmlDictExists(
5043  *         c_node.doc.dict, _cstr(tag), python.PyString_GET_SIZE(tag))
5044  *     if c_tag is NULL:             # <<<<<<<<<<<<<<
5045  *         return None
5046  *     if ns is None:
5047  */
5048   __pyx_t_5 = (__pyx_v_c_tag == NULL);
5049   if (__pyx_t_5) {
5050
5051     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":471
5052  *         c_node.doc.dict, _cstr(tag), python.PyString_GET_SIZE(tag))
5053  *     if c_tag is NULL:
5054  *         return None             # <<<<<<<<<<<<<<
5055  *     if ns is None:
5056  *         c_href = tree._getNs(c_node)
5057  */
5058     __Pyx_XDECREF(__pyx_r);
5059     __Pyx_INCREF(Py_None);
5060     __pyx_r = Py_None;
5061     goto __pyx_L0;
5062     goto __pyx_L3;
5063   }
5064   __pyx_L3:;
5065
5066   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":472
5067  *     if c_tag is NULL:
5068  *         return None
5069  *     if ns is None:             # <<<<<<<<<<<<<<
5070  *         c_href = tree._getNs(c_node)
5071  *     else:
5072  */
5073   __pyx_t_5 = (__pyx_v_ns == Py_None);
5074   if (__pyx_t_5) {
5075
5076     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":473
5077  *         return None
5078  *     if ns is None:
5079  *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
5080  *     else:
5081  *         c_href = _cstr(ns)
5082  */
5083     __pyx_v_c_href = _getNs(__pyx_v_c_node);
5084     goto __pyx_L4;
5085   }
5086   /*else*/ {
5087
5088     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":475
5089  *         c_href = tree._getNs(c_node)
5090  *     else:
5091  *         c_href = _cstr(ns)             # <<<<<<<<<<<<<<
5092  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
5093  *     if c_result is NULL:
5094  */
5095     __pyx_v_c_href = PyString_AS_STRING(__pyx_v_ns);
5096   }
5097   __pyx_L4:;
5098
5099   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":476
5100  *     else:
5101  *         c_href = _cstr(ns)
5102  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)             # <<<<<<<<<<<<<<
5103  *     if c_result is NULL:
5104  *         return None
5105  */
5106   __pyx_v_c_result = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node->children, __pyx_v_c_href, __pyx_v_c_tag, 0);
5107
5108   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":477
5109  *         c_href = _cstr(ns)
5110  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
5111  *     if c_result is NULL:             # <<<<<<<<<<<<<<
5112  *         return None
5113  *     return elementFactory(parent._doc, c_result)
5114  */
5115   __pyx_t_5 = (__pyx_v_c_result == NULL);
5116   if (__pyx_t_5) {
5117
5118     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":478
5119  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
5120  *     if c_result is NULL:
5121  *         return None             # <<<<<<<<<<<<<<
5122  *     return elementFactory(parent._doc, c_result)
5123  * 
5124  */
5125     __Pyx_XDECREF(__pyx_r);
5126     __Pyx_INCREF(Py_None);
5127     __pyx_r = Py_None;
5128     goto __pyx_L0;
5129     goto __pyx_L5;
5130   }
5131   __pyx_L5:;
5132
5133   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":479
5134  *     if c_result is NULL:
5135  *         return None
5136  *     return elementFactory(parent._doc, c_result)             # <<<<<<<<<<<<<<
5137  * 
5138  * cdef object _lookupChildOrRaise(_Element parent, tag):
5139  */
5140   __Pyx_XDECREF(__pyx_r);
5141   __pyx_t_1 = ((PyObject *)elementFactory(__pyx_v_parent->_doc, __pyx_v_c_result)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5142   __Pyx_GOTREF(__pyx_t_1);
5143   __pyx_r = __pyx_t_1;
5144   __pyx_t_1 = 0;
5145   goto __pyx_L0;
5146
5147   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5148   goto __pyx_L0;
5149   __pyx_L1_error:;
5150   __Pyx_XDECREF(__pyx_t_1);
5151   __Pyx_XDECREF(__pyx_t_2);
5152   __Pyx_XDECREF(__pyx_t_3);
5153   __Pyx_XDECREF(__pyx_t_4);
5154   __Pyx_AddTraceback("lxml.objectify._lookupChild");
5155   __pyx_r = 0;
5156   __pyx_L0:;
5157   __Pyx_DECREF(__pyx_v_ns);
5158   __Pyx_DECREF((PyObject *)__pyx_v_parent);
5159   __Pyx_DECREF(__pyx_v_tag);
5160   __Pyx_XGIVEREF(__pyx_r);
5161   __Pyx_FinishRefcountContext();
5162   return __pyx_r;
5163 }
5164
5165 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":481
5166  *     return elementFactory(parent._doc, c_result)
5167  * 
5168  * cdef object _lookupChildOrRaise(_Element parent, tag):             # <<<<<<<<<<<<<<
5169  *     element = _lookupChild(parent, tag)
5170  *     if element is None:
5171  */
5172
5173 static  PyObject *__pyx_f_4lxml_9objectify__lookupChildOrRaise(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
5174   PyObject *__pyx_v_element;
5175   PyObject *__pyx_r = NULL;
5176   PyObject *__pyx_t_1 = NULL;
5177   int __pyx_t_2;
5178   PyObject *__pyx_t_3 = NULL;
5179   __Pyx_SetupRefcountContext("_lookupChildOrRaise");
5180   __Pyx_INCREF((PyObject *)__pyx_v_parent);
5181   __Pyx_INCREF(__pyx_v_tag);
5182   __pyx_v_element = Py_None; __Pyx_INCREF(Py_None);
5183
5184   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":482
5185  * 
5186  * cdef object _lookupChildOrRaise(_Element parent, tag):
5187  *     element = _lookupChild(parent, tag)             # <<<<<<<<<<<<<<
5188  *     if element is None:
5189  *         raise AttributeError, \
5190  */
5191   __pyx_t_1 = __pyx_f_4lxml_9objectify__lookupChild(__pyx_v_parent, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5192   __Pyx_GOTREF(__pyx_t_1);
5193   __Pyx_DECREF(__pyx_v_element);
5194   __pyx_v_element = __pyx_t_1;
5195   __pyx_t_1 = 0;
5196
5197   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":483
5198  * cdef object _lookupChildOrRaise(_Element parent, tag):
5199  *     element = _lookupChild(parent, tag)
5200  *     if element is None:             # <<<<<<<<<<<<<<
5201  *         raise AttributeError, \
5202  *             u"no such child: " + _buildChildTag(parent, tag)
5203  */
5204   __pyx_t_2 = (__pyx_v_element == Py_None);
5205   if (__pyx_t_2) {
5206
5207     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":485
5208  *     if element is None:
5209  *         raise AttributeError, \
5210  *             u"no such child: " + _buildChildTag(parent, tag)             # <<<<<<<<<<<<<<
5211  *     return element
5212  * 
5213  */
5214     __pyx_t_1 = __pyx_f_4lxml_9objectify__buildChildTag(__pyx_v_parent, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5215     __Pyx_GOTREF(__pyx_t_1);
5216     __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_kp_u_10), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5217     __Pyx_GOTREF(__pyx_t_3);
5218     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5219     __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_t_3, 0);
5220     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5221     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5222     goto __pyx_L3;
5223   }
5224   __pyx_L3:;
5225
5226   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":486
5227  *         raise AttributeError, \
5228  *             u"no such child: " + _buildChildTag(parent, tag)
5229  *     return element             # <<<<<<<<<<<<<<
5230  * 
5231  * cdef object _buildChildTag(_Element parent, tag):
5232  */
5233   __Pyx_XDECREF(__pyx_r);
5234   __Pyx_INCREF(__pyx_v_element);
5235   __pyx_r = __pyx_v_element;
5236   goto __pyx_L0;
5237
5238   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5239   goto __pyx_L0;
5240   __pyx_L1_error:;
5241   __Pyx_XDECREF(__pyx_t_1);
5242   __Pyx_XDECREF(__pyx_t_3);
5243   __Pyx_AddTraceback("lxml.objectify._lookupChildOrRaise");
5244   __pyx_r = 0;
5245   __pyx_L0:;
5246   __Pyx_DECREF(__pyx_v_element);
5247   __Pyx_DECREF((PyObject *)__pyx_v_parent);
5248   __Pyx_DECREF(__pyx_v_tag);
5249   __Pyx_XGIVEREF(__pyx_r);
5250   __Pyx_FinishRefcountContext();
5251   return __pyx_r;
5252 }
5253
5254 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":488
5255  *     return element
5256  * 
5257  * cdef object _buildChildTag(_Element parent, tag):             # <<<<<<<<<<<<<<
5258  *     cdef char* c_href
5259  *     cdef char* c_tag
5260  */
5261
5262 static  PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
5263   char *__pyx_v_c_href;
5264   char *__pyx_v_c_tag;
5265   PyObject *__pyx_v_ns;
5266   PyObject *__pyx_r = NULL;
5267   PyObject *__pyx_t_1 = NULL;
5268   PyObject *__pyx_t_2 = NULL;
5269   PyObject *__pyx_t_3 = NULL;
5270   PyObject *__pyx_t_4 = NULL;
5271   int __pyx_t_5;
5272   __Pyx_SetupRefcountContext("_buildChildTag");
5273   __Pyx_INCREF((PyObject *)__pyx_v_parent);
5274   __Pyx_INCREF(__pyx_v_tag);
5275   __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
5276
5277   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":491
5278  *     cdef char* c_href
5279  *     cdef char* c_tag
5280  *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<<
5281  *     c_tag = _cstr(tag)
5282  *     if ns is None:
5283  */
5284   __pyx_t_1 = getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5285   __Pyx_GOTREF(__pyx_t_1);
5286   if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
5287     PyObject* tuple = __pyx_t_1;
5288     __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
5289     __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
5290     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5291     __Pyx_DECREF(__pyx_v_ns);
5292     __pyx_v_ns = __pyx_t_2;
5293     __pyx_t_2 = 0;
5294     __Pyx_DECREF(__pyx_v_tag);
5295     __pyx_v_tag = __pyx_t_3;
5296     __pyx_t_3 = 0;
5297   } else {
5298     __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5299     __Pyx_GOTREF(__pyx_t_4);
5300     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5301     __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_4, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5302     __Pyx_GOTREF(__pyx_t_2);
5303     __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_4, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5304     __Pyx_GOTREF(__pyx_t_3);
5305     if (__Pyx_EndUnpack(__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5306     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5307     __Pyx_DECREF(__pyx_v_ns);
5308     __pyx_v_ns = __pyx_t_2;
5309     __pyx_t_2 = 0;
5310     __Pyx_DECREF(__pyx_v_tag);
5311     __pyx_v_tag = __pyx_t_3;
5312     __pyx_t_3 = 0;
5313   }
5314
5315   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":492
5316  *     cdef char* c_tag
5317  *     ns, tag = cetree.getNsTag(tag)
5318  *     c_tag = _cstr(tag)             # <<<<<<<<<<<<<<
5319  *     if ns is None:
5320  *         c_href = tree._getNs(parent._c_node)
5321  */
5322   __pyx_v_c_tag = PyString_AS_STRING(__pyx_v_tag);
5323
5324   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":493
5325  *     ns, tag = cetree.getNsTag(tag)
5326  *     c_tag = _cstr(tag)
5327  *     if ns is None:             # <<<<<<<<<<<<<<
5328  *         c_href = tree._getNs(parent._c_node)
5329  *     else:
5330  */
5331   __pyx_t_5 = (__pyx_v_ns == Py_None);
5332   if (__pyx_t_5) {
5333
5334     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":494
5335  *     c_tag = _cstr(tag)
5336  *     if ns is None:
5337  *         c_href = tree._getNs(parent._c_node)             # <<<<<<<<<<<<<<
5338  *     else:
5339  *         c_href = _cstr(ns)
5340  */
5341     __pyx_v_c_href = _getNs(__pyx_v_parent->_c_node);
5342     goto __pyx_L3;
5343   }
5344   /*else*/ {
5345
5346     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":496
5347  *         c_href = tree._getNs(parent._c_node)
5348  *     else:
5349  *         c_href = _cstr(ns)             # <<<<<<<<<<<<<<
5350  *     return cetree.namespacedNameFromNsName(c_href, c_tag)
5351  * 
5352  */
5353     __pyx_v_c_href = PyString_AS_STRING(__pyx_v_ns);
5354   }
5355   __pyx_L3:;
5356
5357   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":497
5358  *     else:
5359  *         c_href = _cstr(ns)
5360  *     return cetree.namespacedNameFromNsName(c_href, c_tag)             # <<<<<<<<<<<<<<
5361  * 
5362  * cdef _replaceElement(_Element element, value):
5363  */
5364   __Pyx_XDECREF(__pyx_r);
5365   __pyx_t_1 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5366   __Pyx_GOTREF(__pyx_t_1);
5367   __pyx_r = __pyx_t_1;
5368   __pyx_t_1 = 0;
5369   goto __pyx_L0;
5370
5371   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5372   goto __pyx_L0;
5373   __pyx_L1_error:;
5374   __Pyx_XDECREF(__pyx_t_1);
5375   __Pyx_XDECREF(__pyx_t_2);
5376   __Pyx_XDECREF(__pyx_t_3);
5377   __Pyx_XDECREF(__pyx_t_4);
5378   __Pyx_AddTraceback("lxml.objectify._buildChildTag");
5379   __pyx_r = 0;
5380   __pyx_L0:;
5381   __Pyx_DECREF(__pyx_v_ns);
5382   __Pyx_DECREF((PyObject *)__pyx_v_parent);
5383   __Pyx_DECREF(__pyx_v_tag);
5384   __Pyx_XGIVEREF(__pyx_r);
5385   __Pyx_FinishRefcountContext();
5386   return __pyx_r;
5387 }
5388
5389 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":499
5390  *     return cetree.namespacedNameFromNsName(c_href, c_tag)
5391  * 
5392  * cdef _replaceElement(_Element element, value):             # <<<<<<<<<<<<<<
5393  *     cdef _Element new_element
5394  *     if isinstance(value, _Element):
5395  */
5396
5397 static  PyObject *__pyx_f_4lxml_9objectify__replaceElement(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_value) {
5398   struct LxmlElement *__pyx_v_new_element;
5399   PyObject *__pyx_r = NULL;
5400   int __pyx_t_1;
5401   PyObject *__pyx_t_2 = NULL;
5402   PyObject *__pyx_t_3 = NULL;
5403   PyObject *__pyx_t_4 = NULL;
5404   __Pyx_SetupRefcountContext("_replaceElement");
5405   __Pyx_INCREF((PyObject *)__pyx_v_element);
5406   __Pyx_INCREF(__pyx_v_value);
5407   __pyx_v_new_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
5408
5409   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":501
5410  * cdef _replaceElement(_Element element, value):
5411  *     cdef _Element new_element
5412  *     if isinstance(value, _Element):             # <<<<<<<<<<<<<<
5413  *         # deep copy the new element
5414  *         new_element = cetree.deepcopyNodeToDocument(
5415  */
5416   __pyx_t_1 = PyObject_TypeCheck(__pyx_v_value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
5417   if (__pyx_t_1) {
5418
5419     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":504
5420  *         # deep copy the new element
5421  *         new_element = cetree.deepcopyNodeToDocument(
5422  *             element._doc, (<_Element>value)._c_node)             # <<<<<<<<<<<<<<
5423  *         new_element.tag = element.tag
5424  *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
5425  */
5426     __pyx_t_2 = ((PyObject *)deepcopyNodeToDocument(__pyx_v_element->_doc, ((struct LxmlElement *)__pyx_v_value)->_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5427     __Pyx_GOTREF(__pyx_t_2);
5428     __Pyx_DECREF(((PyObject *)__pyx_v_new_element));
5429     __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_2);
5430     __pyx_t_2 = 0;
5431
5432     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":505
5433  *         new_element = cetree.deepcopyNodeToDocument(
5434  *             element._doc, (<_Element>value)._c_node)
5435  *         new_element.tag = element.tag             # <<<<<<<<<<<<<<
5436  *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
5437  *         element[:] = value
5438  */
5439     __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_ui_tag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5440     __Pyx_GOTREF(__pyx_t_2);
5441     if (PyObject_SetAttr(((PyObject *)__pyx_v_new_element), __pyx_n_ui_tag, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5442     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5443     goto __pyx_L3;
5444   }
5445
5446   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":506
5447  *             element._doc, (<_Element>value)._c_node)
5448  *         new_element.tag = element.tag
5449  *     elif python.PyList_Check(value) or python.PyTuple_Check(value):             # <<<<<<<<<<<<<<
5450  *         element[:] = value
5451  *         return
5452  */
5453   if (!PyList_Check(__pyx_v_value)) {
5454     __pyx_t_1 = PyTuple_Check(__pyx_v_value);
5455   } else {
5456     __pyx_t_1 = PyList_Check(__pyx_v_value);
5457   }
5458   if (__pyx_t_1) {
5459
5460     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":507
5461  *         new_element.tag = element.tag
5462  *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
5463  *         element[:] = value             # <<<<<<<<<<<<<<
5464  *         return
5465  *     else:
5466  */
5467     if (PySequence_SetSlice(((PyObject *)__pyx_v_element), 0, PY_SSIZE_T_MAX, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5468
5469     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":508
5470  *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
5471  *         element[:] = value
5472  *         return             # <<<<<<<<<<<<<<
5473  *     else:
5474  *         new_element = element.makeelement(element.tag)
5475  */
5476     __Pyx_XDECREF(__pyx_r);
5477     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5478     goto __pyx_L0;
5479     goto __pyx_L3;
5480   }
5481   /*else*/ {
5482
5483     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":510
5484  *         return
5485  *     else:
5486  *         new_element = element.makeelement(element.tag)             # <<<<<<<<<<<<<<
5487  *         _setElementValue(new_element, value)
5488  *     element.getparent().replace(element, new_element)
5489  */
5490     __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_ui_makeelement); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5491     __Pyx_GOTREF(__pyx_t_2);
5492     __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_ui_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5493     __Pyx_GOTREF(__pyx_t_3);
5494     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5495     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
5496     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
5497     __Pyx_GIVEREF(__pyx_t_3);
5498     __pyx_t_3 = 0;
5499     __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5500     __Pyx_GOTREF(__pyx_t_3);
5501     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5502     __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
5503     if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5504     __Pyx_DECREF(((PyObject *)__pyx_v_new_element));
5505     __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_3);
5506     __pyx_t_3 = 0;
5507
5508     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":511
5509  *     else:
5510  *         new_element = element.makeelement(element.tag)
5511  *         _setElementValue(new_element, value)             # <<<<<<<<<<<<<<
5512  *     element.getparent().replace(element, new_element)
5513  * 
5514  */
5515     __pyx_t_3 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5516     __Pyx_GOTREF(__pyx_t_3);
5517     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5518   }
5519   __pyx_L3:;
5520
5521   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":512
5522  *         new_element = element.makeelement(element.tag)
5523  *         _setElementValue(new_element, value)
5524  *     element.getparent().replace(element, new_element)             # <<<<<<<<<<<<<<
5525  * 
5526  * cdef _appendValue(_Element parent, tag, value):
5527  */
5528   __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_ui_getparent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5529   __Pyx_GOTREF(__pyx_t_3);
5530   __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5531   __Pyx_GOTREF(__pyx_t_4);
5532   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5533   __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_ui_replace); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5534   __Pyx_GOTREF(__pyx_t_3);
5535   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5536   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5537   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
5538   __Pyx_INCREF(((PyObject *)__pyx_v_element));
5539   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_element));
5540   __Pyx_GIVEREF(((PyObject *)__pyx_v_element));
5541   __Pyx_INCREF(((PyObject *)__pyx_v_new_element));
5542   PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_new_element));
5543   __Pyx_GIVEREF(((PyObject *)__pyx_v_new_element));
5544   __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5545   __Pyx_GOTREF(__pyx_t_2);
5546   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5547   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
5548   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5549
5550   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5551   goto __pyx_L0;
5552   __pyx_L1_error:;
5553   __Pyx_XDECREF(__pyx_t_2);
5554   __Pyx_XDECREF(__pyx_t_3);
5555   __Pyx_XDECREF(__pyx_t_4);
5556   __Pyx_AddTraceback("lxml.objectify._replaceElement");
5557   __pyx_r = 0;
5558   __pyx_L0:;
5559   __Pyx_DECREF((PyObject *)__pyx_v_new_element);
5560   __Pyx_DECREF((PyObject *)__pyx_v_element);
5561   __Pyx_DECREF(__pyx_v_value);
5562   __Pyx_XGIVEREF(__pyx_r);
5563   __Pyx_FinishRefcountContext();
5564   return __pyx_r;
5565 }
5566
5567 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":514
5568  *     element.getparent().replace(element, new_element)
5569  * 
5570  * cdef _appendValue(_Element parent, tag, value):             # <<<<<<<<<<<<<<
5571  *     cdef _Element new_element
5572  *     if isinstance(value, _Element):
5573  */
5574
5575 static  PyObject *__pyx_f_4lxml_9objectify__appendValue(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
5576   struct LxmlElement *__pyx_v_new_element;
5577   PyObject *__pyx_v_item;
5578   PyObject *__pyx_r = NULL;
5579   int __pyx_t_1;
5580   PyObject *__pyx_t_2 = NULL;
5581   Py_ssize_t __pyx_t_3;
5582   PyObject *__pyx_t_4 = NULL;
5583   __Pyx_SetupRefcountContext("_appendValue");
5584   __Pyx_INCREF((PyObject *)__pyx_v_parent);
5585   __Pyx_INCREF(__pyx_v_tag);
5586   __Pyx_INCREF(__pyx_v_value);
5587   __pyx_v_new_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
5588   __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);
5589
5590   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":516
5591  * cdef _appendValue(_Element parent, tag, value):
5592  *     cdef _Element new_element
5593  *     if isinstance(value, _Element):             # <<<<<<<<<<<<<<
5594  *         # deep copy the new element
5595  *         new_element = cetree.deepcopyNodeToDocument(
5596  */
5597   __pyx_t_1 = PyObject_TypeCheck(__pyx_v_value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
5598   if (__pyx_t_1) {
5599
5600     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":519
5601  *         # deep copy the new element
5602  *         new_element = cetree.deepcopyNodeToDocument(
5603  *             parent._doc, (<_Element>value)._c_node)             # <<<<<<<<<<<<<<
5604  *         new_element.tag = tag
5605  *         cetree.appendChild(parent, new_element)
5606  */
5607     __pyx_t_2 = ((PyObject *)deepcopyNodeToDocument(__pyx_v_parent->_doc, ((struct LxmlElement *)__pyx_v_value)->_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5608     __Pyx_GOTREF(__pyx_t_2);
5609     __Pyx_DECREF(((PyObject *)__pyx_v_new_element));
5610     __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_2);
5611     __pyx_t_2 = 0;
5612
5613     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":520
5614  *         new_element = cetree.deepcopyNodeToDocument(
5615  *             parent._doc, (<_Element>value)._c_node)
5616  *         new_element.tag = tag             # <<<<<<<<<<<<<<
5617  *         cetree.appendChild(parent, new_element)
5618  *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
5619  */
5620     if (PyObject_SetAttr(((PyObject *)__pyx_v_new_element), __pyx_n_ui_tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5621
5622     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":521
5623  *             parent._doc, (<_Element>value)._c_node)
5624  *         new_element.tag = tag
5625  *         cetree.appendChild(parent, new_element)             # <<<<<<<<<<<<<<
5626  *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
5627  *         for item in value:
5628  */
5629     appendChild(__pyx_v_parent, __pyx_v_new_element);
5630     goto __pyx_L3;
5631   }
5632
5633   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":522
5634  *         new_element.tag = tag
5635  *         cetree.appendChild(parent, new_element)
5636  *     elif python.PyList_Check(value) or python.PyTuple_Check(value):             # <<<<<<<<<<<<<<
5637  *         for item in value:
5638  *             _appendValue(parent, tag, item)
5639  */
5640   if (!PyList_Check(__pyx_v_value)) {
5641     __pyx_t_1 = PyTuple_Check(__pyx_v_value);
5642   } else {
5643     __pyx_t_1 = PyList_Check(__pyx_v_value);
5644   }
5645   if (__pyx_t_1) {
5646
5647     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":523
5648  *         cetree.appendChild(parent, new_element)
5649  *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
5650  *         for item in value:             # <<<<<<<<<<<<<<
5651  *             _appendValue(parent, tag, item)
5652  *     else:
5653  */
5654     if (PyList_CheckExact(__pyx_v_value) || PyTuple_CheckExact(__pyx_v_value)) {
5655       __pyx_t_3 = 0; __pyx_t_2 = __pyx_v_value; __Pyx_INCREF(__pyx_t_2);
5656     } else {
5657       __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5658       __Pyx_GOTREF(__pyx_t_2);
5659     }
5660     for (;;) {
5661       if (likely(PyList_CheckExact(__pyx_t_2))) {
5662         if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
5663         __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
5664       } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
5665         if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
5666         __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
5667       } else {
5668         __pyx_t_4 = PyIter_Next(__pyx_t_2);
5669         if (!__pyx_t_4) {
5670           if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5671           break;
5672         }
5673         __Pyx_GOTREF(__pyx_t_4);
5674       }
5675       __Pyx_DECREF(__pyx_v_item);
5676       __pyx_v_item = __pyx_t_4;
5677       __pyx_t_4 = 0;
5678
5679       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":524
5680  *     elif python.PyList_Check(value) or python.PyTuple_Check(value):
5681  *         for item in value:
5682  *             _appendValue(parent, tag, item)             # <<<<<<<<<<<<<<
5683  *     else:
5684  *         new_element = cetree.makeElement(
5685  */
5686       __pyx_t_4 = __pyx_f_4lxml_9objectify__appendValue(__pyx_v_parent, __pyx_v_tag, __pyx_v_item); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5687       __Pyx_GOTREF(__pyx_t_4);
5688       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5689     }
5690     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5691     goto __pyx_L3;
5692   }
5693   /*else*/ {
5694
5695     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":527
5696  *     else:
5697  *         new_element = cetree.makeElement(
5698  *             tag, parent._doc, None, None, None, None, None)             # <<<<<<<<<<<<<<
5699  *         _setElementValue(new_element, value)
5700  *         cetree.appendChild(parent, new_element)
5701  */
5702     __pyx_t_2 = ((PyObject *)makeElement(__pyx_v_tag, __pyx_v_parent->_doc, Py_None, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5703     __Pyx_GOTREF(__pyx_t_2);
5704     __Pyx_DECREF(((PyObject *)__pyx_v_new_element));
5705     __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_2);
5706     __pyx_t_2 = 0;
5707
5708     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":528
5709  *         new_element = cetree.makeElement(
5710  *             tag, parent._doc, None, None, None, None, None)
5711  *         _setElementValue(new_element, value)             # <<<<<<<<<<<<<<
5712  *         cetree.appendChild(parent, new_element)
5713  * 
5714  */
5715     __pyx_t_2 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5716     __Pyx_GOTREF(__pyx_t_2);
5717     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5718
5719     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":529
5720  *             tag, parent._doc, None, None, None, None, None)
5721  *         _setElementValue(new_element, value)
5722  *         cetree.appendChild(parent, new_element)             # <<<<<<<<<<<<<<
5723  * 
5724  * cdef _setElementValue(_Element element, value):
5725  */
5726     appendChild(__pyx_v_parent, __pyx_v_new_element);
5727   }
5728   __pyx_L3:;
5729
5730   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5731   goto __pyx_L0;
5732   __pyx_L1_error:;
5733   __Pyx_XDECREF(__pyx_t_2);
5734   __Pyx_XDECREF(__pyx_t_4);
5735   __Pyx_AddTraceback("lxml.objectify._appendValue");
5736   __pyx_r = 0;
5737   __pyx_L0:;
5738   __Pyx_DECREF((PyObject *)__pyx_v_new_element);
5739   __Pyx_DECREF(__pyx_v_item);
5740   __Pyx_DECREF((PyObject *)__pyx_v_parent);
5741   __Pyx_DECREF(__pyx_v_tag);
5742   __Pyx_DECREF(__pyx_v_value);
5743   __Pyx_XGIVEREF(__pyx_r);
5744   __Pyx_FinishRefcountContext();
5745   return __pyx_r;
5746 }
5747
5748 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":531
5749  *         cetree.appendChild(parent, new_element)
5750  * 
5751  * cdef _setElementValue(_Element element, value):             # <<<<<<<<<<<<<<
5752  *     cdef python.PyObject* _pytype
5753  *     if value is None:
5754  */
5755
5756 static  PyObject *__pyx_f_4lxml_9objectify__setElementValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_value) {
5757   PyObject *__pyx_v__pytype;
5758   PyObject *__pyx_v_pytype_name;
5759   PyObject *__pyx_r = NULL;
5760   int __pyx_t_1;
5761   int __pyx_t_2;
5762   PyObject *__pyx_t_3 = NULL;
5763   PyObject *__pyx_t_4 = NULL;
5764   __Pyx_SetupRefcountContext("_setElementValue");
5765   __Pyx_INCREF((PyObject *)__pyx_v_element);
5766   __Pyx_INCREF(__pyx_v_value);
5767   __pyx_v_pytype_name = Py_None; __Pyx_INCREF(Py_None);
5768
5769   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":533
5770  * cdef _setElementValue(_Element element, value):
5771  *     cdef python.PyObject* _pytype
5772  *     if value is None:             # <<<<<<<<<<<<<<
5773  *         cetree.setAttributeValue(
5774  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
5775  */
5776   __pyx_t_1 = (__pyx_v_value == Py_None);
5777   if (__pyx_t_1) {
5778
5779     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":535
5780  *     if value is None:
5781  *         cetree.setAttributeValue(
5782  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")             # <<<<<<<<<<<<<<
5783  *     elif isinstance(value, _Element):
5784  *         _replaceElement(element, value)
5785  */
5786     __pyx_t_2 = setAttributeValue(__pyx_v_element, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, ((PyObject *)__pyx_n_u_true)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5787     goto __pyx_L3;
5788   }
5789
5790   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":536
5791  *         cetree.setAttributeValue(
5792  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
5793  *     elif isinstance(value, _Element):             # <<<<<<<<<<<<<<
5794  *         _replaceElement(element, value)
5795  *         return
5796  */
5797   __pyx_t_1 = PyObject_TypeCheck(__pyx_v_value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
5798   if (__pyx_t_1) {
5799
5800     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":537
5801  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
5802  *     elif isinstance(value, _Element):
5803  *         _replaceElement(element, value)             # <<<<<<<<<<<<<<
5804  *         return
5805  *     else:
5806  */
5807     __pyx_t_3 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5808     __Pyx_GOTREF(__pyx_t_3);
5809     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5810
5811     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":538
5812  *     elif isinstance(value, _Element):
5813  *         _replaceElement(element, value)
5814  *         return             # <<<<<<<<<<<<<<
5815  *     else:
5816  *         cetree.delAttributeFromNsName(
5817  */
5818     __Pyx_XDECREF(__pyx_r);
5819     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5820     goto __pyx_L0;
5821     goto __pyx_L3;
5822   }
5823   /*else*/ {
5824
5825     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":541
5826  *     else:
5827  *         cetree.delAttributeFromNsName(
5828  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, "nil")             # <<<<<<<<<<<<<<
5829  *         if python._isString(value):
5830  *             pytype_name = u"str"
5831  */
5832     delAttributeFromNsName(__pyx_v_element->_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_nil);
5833
5834     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":542
5835  *         cetree.delAttributeFromNsName(
5836  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, "nil")
5837  *         if python._isString(value):             # <<<<<<<<<<<<<<
5838  *             pytype_name = u"str"
5839  *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
5840  */
5841     __pyx_t_1 = _isString(__pyx_v_value);
5842     if (__pyx_t_1) {
5843
5844       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":543
5845  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, "nil")
5846  *         if python._isString(value):
5847  *             pytype_name = u"str"             # <<<<<<<<<<<<<<
5848  *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
5849  *         else:
5850  */
5851       __Pyx_INCREF(((PyObject *)__pyx_n_u_str));
5852       __Pyx_DECREF(__pyx_v_pytype_name);
5853       __pyx_v_pytype_name = ((PyObject *)__pyx_n_u_str);
5854
5855       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":544
5856  *         if python._isString(value):
5857  *             pytype_name = u"str"
5858  *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)             # <<<<<<<<<<<<<<
5859  *         else:
5860  *             pytype_name = _typename(value)
5861  */
5862       __pyx_v__pytype = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_pytype_name);
5863       goto __pyx_L4;
5864     }
5865     /*else*/ {
5866
5867       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":546
5868  *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
5869  *         else:
5870  *             pytype_name = _typename(value)             # <<<<<<<<<<<<<<
5871  *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
5872  *             if _pytype is not NULL:
5873  */
5874       __pyx_t_3 = __pyx_f_4lxml_9objectify__typename(__pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5875       __Pyx_GOTREF(__pyx_t_3);
5876       __Pyx_DECREF(__pyx_v_pytype_name);
5877       __pyx_v_pytype_name = __pyx_t_3;
5878       __pyx_t_3 = 0;
5879
5880       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":547
5881  *         else:
5882  *             pytype_name = _typename(value)
5883  *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)             # <<<<<<<<<<<<<<
5884  *             if _pytype is not NULL:
5885  *                 value = (<PyType>_pytype).stringify(value)
5886  */
5887       __pyx_v__pytype = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_pytype_name);
5888
5889       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":548
5890  *             pytype_name = _typename(value)
5891  *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
5892  *             if _pytype is not NULL:             # <<<<<<<<<<<<<<
5893  *                 value = (<PyType>_pytype).stringify(value)
5894  *             else:
5895  */
5896       __pyx_t_1 = (__pyx_v__pytype != NULL);
5897       if (__pyx_t_1) {
5898
5899         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":549
5900  *             _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
5901  *             if _pytype is not NULL:
5902  *                 value = (<PyType>_pytype).stringify(value)             # <<<<<<<<<<<<<<
5903  *             else:
5904  *                 value = unicode(value)
5905  */
5906         __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5907         __Pyx_GOTREF(((PyObject *)__pyx_t_3));
5908         __Pyx_INCREF(__pyx_v_value);
5909         PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value);
5910         __Pyx_GIVEREF(__pyx_v_value);
5911         __pyx_t_4 = PyObject_Call(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v__pytype)->stringify, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5912         __Pyx_GOTREF(__pyx_t_4);
5913         __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
5914         __Pyx_DECREF(__pyx_v_value);
5915         __pyx_v_value = __pyx_t_4;
5916         __pyx_t_4 = 0;
5917         goto __pyx_L5;
5918       }
5919       /*else*/ {
5920
5921         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":551
5922  *                 value = (<PyType>_pytype).stringify(value)
5923  *             else:
5924  *                 value = unicode(value)             # <<<<<<<<<<<<<<
5925  *         if _pytype is not NULL:
5926  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
5927  */
5928         __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5929         __Pyx_GOTREF(((PyObject *)__pyx_t_4));
5930         __Pyx_INCREF(__pyx_v_value);
5931         PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
5932         __Pyx_GIVEREF(__pyx_v_value);
5933         __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5934         __Pyx_GOTREF(__pyx_t_3);
5935         __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
5936         __Pyx_DECREF(__pyx_v_value);
5937         __pyx_v_value = __pyx_t_3;
5938         __pyx_t_3 = 0;
5939       }
5940       __pyx_L5:;
5941     }
5942     __pyx_L4:;
5943
5944     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":552
5945  *             else:
5946  *                 value = unicode(value)
5947  *         if _pytype is not NULL:             # <<<<<<<<<<<<<<
5948  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
5949  *         else:
5950  */
5951     __pyx_t_1 = (__pyx_v__pytype != NULL);
5952     if (__pyx_t_1) {
5953
5954       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":553
5955  *                 value = unicode(value)
5956  *         if _pytype is not NULL:
5957  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<<
5958  *         else:
5959  *             cetree.delAttributeFromNsName(
5960  */
5961       __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5962       __Pyx_GOTREF(__pyx_t_3);
5963       __pyx_t_2 = setAttributeValue(__pyx_v_element, __pyx_t_3, __pyx_v_pytype_name); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5964       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5965       goto __pyx_L6;
5966     }
5967     /*else*/ {
5968
5969       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":556
5970  *         else:
5971  *             cetree.delAttributeFromNsName(
5972  *                 element._c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
5973  *     cetree.setNodeText(element._c_node, value)
5974  * 
5975  */
5976       delAttributeFromNsName(__pyx_v_element->_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME);
5977     }
5978     __pyx_L6:;
5979   }
5980   __pyx_L3:;
5981
5982   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":557
5983  *             cetree.delAttributeFromNsName(
5984  *                 element._c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
5985  *     cetree.setNodeText(element._c_node, value)             # <<<<<<<<<<<<<<
5986  * 
5987  * cdef _setSlice(slice, _Element target, items):
5988  */
5989   __pyx_t_2 = setNodeText(__pyx_v_element->_c_node, __pyx_v_value); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5990
5991   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5992   goto __pyx_L0;
5993   __pyx_L1_error:;
5994   __Pyx_XDECREF(__pyx_t_3);
5995   __Pyx_XDECREF(__pyx_t_4);
5996   __Pyx_AddTraceback("lxml.objectify._setElementValue");
5997   __pyx_r = 0;
5998   __pyx_L0:;
5999   __Pyx_DECREF(__pyx_v_pytype_name);
6000   __Pyx_DECREF((PyObject *)__pyx_v_element);
6001   __Pyx_DECREF(__pyx_v_value);
6002   __Pyx_XGIVEREF(__pyx_r);
6003   __Pyx_FinishRefcountContext();
6004   return __pyx_r;
6005 }
6006
6007 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":559
6008  *     cetree.setNodeText(element._c_node, value)
6009  * 
6010  * cdef _setSlice(slice, _Element target, items):             # <<<<<<<<<<<<<<
6011  *     cdef _Element parent
6012  *     cdef tree.xmlNode* c_node
6013  */
6014
6015 static  PyObject *__pyx_f_4lxml_9objectify__setSlice(PyObject *__pyx_v_slice, struct LxmlElement *__pyx_v_target, PyObject *__pyx_v_items) {
6016   struct LxmlElement *__pyx_v_parent;
6017   xmlNode *__pyx_v_c_node;
6018   Py_ssize_t __pyx_v_c_step;
6019   Py_ssize_t __pyx_v_pos;
6020   PyObject *__pyx_v_new_items;
6021   PyObject *__pyx_v_del_items;
6022   PyObject *__pyx_v_tag;
6023   PyObject *__pyx_v_item;
6024   PyObject *__pyx_v_new_element;
6025   PyObject *__pyx_v_replace;
6026   PyObject *__pyx_v_remove;
6027   PyObject *__pyx_v_add;
6028   PyObject *__pyx_r = NULL;
6029   int __pyx_t_1;
6030   Py_ssize_t __pyx_t_2;
6031   PyObject *__pyx_t_3 = NULL;
6032   PyObject *__pyx_t_4 = NULL;
6033   int __pyx_t_5;
6034   PyObject *__pyx_t_6 = NULL;
6035   __Pyx_SetupRefcountContext("_setSlice");
6036   __Pyx_INCREF(__pyx_v_slice);
6037   __Pyx_INCREF((PyObject *)__pyx_v_target);
6038   __Pyx_INCREF(__pyx_v_items);
6039   __pyx_v_parent = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
6040   __pyx_v_new_items = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
6041   __pyx_v_del_items = Py_None; __Pyx_INCREF(Py_None);
6042   __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
6043   __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);
6044   __pyx_v_new_element = Py_None; __Pyx_INCREF(Py_None);
6045   __pyx_v_replace = Py_None; __Pyx_INCREF(Py_None);
6046   __pyx_v_remove = Py_None; __Pyx_INCREF(Py_None);
6047   __pyx_v_add = Py_None; __Pyx_INCREF(Py_None);
6048
6049   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":565
6050  *     cdef list new_items
6051  *     # collect existing slice
6052  *     if (<python.slice>slice).step is None:             # <<<<<<<<<<<<<<
6053  *         c_step = 1
6054  *     else:
6055  */
6056   __pyx_t_1 = (((PySliceObject *)__pyx_v_slice)->step == Py_None);
6057   if (__pyx_t_1) {
6058
6059     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":566
6060  *     # collect existing slice
6061  *     if (<python.slice>slice).step is None:
6062  *         c_step = 1             # <<<<<<<<<<<<<<
6063  *     else:
6064  *         c_step = (<python.slice>slice).step
6065  */
6066     __pyx_v_c_step = 1;
6067     goto __pyx_L3;
6068   }
6069   /*else*/ {
6070
6071     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":568
6072  *         c_step = 1
6073  *     else:
6074  *         c_step = (<python.slice>slice).step             # <<<<<<<<<<<<<<
6075  *     if c_step == 0:
6076  *         raise ValueError, u"Invalid slice"
6077  */
6078     __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(((PySliceObject *)__pyx_v_slice)->step); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6079     __pyx_v_c_step = __pyx_t_2;
6080   }
6081   __pyx_L3:;
6082
6083   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":569
6084  *     else:
6085  *         c_step = (<python.slice>slice).step
6086  *     if c_step == 0:             # <<<<<<<<<<<<<<
6087  *         raise ValueError, u"Invalid slice"
6088  *     del_items = target[slice]
6089  */
6090   __pyx_t_1 = (__pyx_v_c_step == 0);
6091   if (__pyx_t_1) {
6092
6093     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":570
6094  *         c_step = (<python.slice>slice).step
6095  *     if c_step == 0:
6096  *         raise ValueError, u"Invalid slice"             # <<<<<<<<<<<<<<
6097  *     del_items = target[slice]
6098  * 
6099  */
6100     __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_11), 0);
6101     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6102     goto __pyx_L4;
6103   }
6104   __pyx_L4:;
6105
6106   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":571
6107  *     if c_step == 0:
6108  *         raise ValueError, u"Invalid slice"
6109  *     del_items = target[slice]             # <<<<<<<<<<<<<<
6110  * 
6111  *     # collect new values
6112  */
6113   __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_target), __pyx_v_slice); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6114   __Pyx_GOTREF(__pyx_t_3);
6115   __Pyx_DECREF(__pyx_v_del_items);
6116   __pyx_v_del_items = __pyx_t_3;
6117   __pyx_t_3 = 0;
6118
6119   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":574
6120  * 
6121  *     # collect new values
6122  *     new_items = []             # <<<<<<<<<<<<<<
6123  *     tag = target.tag
6124  *     for item in items:
6125  */
6126   __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6127   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
6128   __Pyx_DECREF(((PyObject *)__pyx_v_new_items));
6129   __pyx_v_new_items = __pyx_t_3;
6130   __pyx_t_3 = 0;
6131
6132   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":575
6133  *     # collect new values
6134  *     new_items = []
6135  *     tag = target.tag             # <<<<<<<<<<<<<<
6136  *     for item in items:
6137  *         if isinstance(item, _Element):
6138  */
6139   __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_target), __pyx_n_ui_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6140   __Pyx_GOTREF(__pyx_t_3);
6141   __Pyx_DECREF(__pyx_v_tag);
6142   __pyx_v_tag = __pyx_t_3;
6143   __pyx_t_3 = 0;
6144
6145   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":576
6146  *     new_items = []
6147  *     tag = target.tag
6148  *     for item in items:             # <<<<<<<<<<<<<<
6149  *         if isinstance(item, _Element):
6150  *             # deep copy the new element
6151  */
6152   if (PyList_CheckExact(__pyx_v_items) || PyTuple_CheckExact(__pyx_v_items)) {
6153     __pyx_t_2 = 0; __pyx_t_3 = __pyx_v_items; __Pyx_INCREF(__pyx_t_3);
6154   } else {
6155     __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6156     __Pyx_GOTREF(__pyx_t_3);
6157   }
6158   for (;;) {
6159     if (likely(PyList_CheckExact(__pyx_t_3))) {
6160       if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
6161       __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
6162     } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
6163       if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
6164       __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
6165     } else {
6166       __pyx_t_4 = PyIter_Next(__pyx_t_3);
6167       if (!__pyx_t_4) {
6168         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6169         break;
6170       }
6171       __Pyx_GOTREF(__pyx_t_4);
6172     }
6173     __Pyx_DECREF(__pyx_v_item);
6174     __pyx_v_item = __pyx_t_4;
6175     __pyx_t_4 = 0;
6176
6177     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":577
6178  *     tag = target.tag
6179  *     for item in items:
6180  *         if isinstance(item, _Element):             # <<<<<<<<<<<<<<
6181  *             # deep copy the new element
6182  *             new_element = cetree.deepcopyNodeToDocument(
6183  */
6184     __pyx_t_1 = PyObject_TypeCheck(__pyx_v_item, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
6185     if (__pyx_t_1) {
6186
6187       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":580
6188  *             # deep copy the new element
6189  *             new_element = cetree.deepcopyNodeToDocument(
6190  *                 target._doc, (<_Element>item)._c_node)             # <<<<<<<<<<<<<<
6191  *             new_element.tag = tag
6192  *         else:
6193  */
6194       __pyx_t_4 = ((PyObject *)deepcopyNodeToDocument(__pyx_v_target->_doc, ((struct LxmlElement *)__pyx_v_item)->_c_node)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6195       __Pyx_GOTREF(__pyx_t_4);
6196       __Pyx_DECREF(__pyx_v_new_element);
6197       __pyx_v_new_element = __pyx_t_4;
6198       __pyx_t_4 = 0;
6199
6200       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":581
6201  *             new_element = cetree.deepcopyNodeToDocument(
6202  *                 target._doc, (<_Element>item)._c_node)
6203  *             new_element.tag = tag             # <<<<<<<<<<<<<<
6204  *         else:
6205  *             new_element = cetree.makeElement(
6206  */
6207       if (PyObject_SetAttr(__pyx_v_new_element, __pyx_n_ui_tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6208       goto __pyx_L7;
6209     }
6210     /*else*/ {
6211
6212       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":584
6213  *         else:
6214  *             new_element = cetree.makeElement(
6215  *                 tag, target._doc, None, None, None, None, None)             # <<<<<<<<<<<<<<
6216  *             _setElementValue(new_element, item)
6217  *         new_items.append(new_element)
6218  */
6219       __pyx_t_4 = ((PyObject *)makeElement(__pyx_v_tag, __pyx_v_target->_doc, Py_None, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6220       __Pyx_GOTREF(__pyx_t_4);
6221       __Pyx_DECREF(__pyx_v_new_element);
6222       __pyx_v_new_element = __pyx_t_4;
6223       __pyx_t_4 = 0;
6224
6225       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":585
6226  *             new_element = cetree.makeElement(
6227  *                 tag, target._doc, None, None, None, None, None)
6228  *             _setElementValue(new_element, item)             # <<<<<<<<<<<<<<
6229  *         new_items.append(new_element)
6230  * 
6231  */
6232       if (!(__Pyx_TypeTest(__pyx_v_new_element, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6233       __pyx_t_4 = __pyx_f_4lxml_9objectify__setElementValue(((struct LxmlElement *)__pyx_v_new_element), __pyx_v_item); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6234       __Pyx_GOTREF(__pyx_t_4);
6235       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6236     }
6237     __pyx_L7:;
6238
6239     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":586
6240  *                 tag, target._doc, None, None, None, None, None)
6241  *             _setElementValue(new_element, item)
6242  *         new_items.append(new_element)             # <<<<<<<<<<<<<<
6243  * 
6244  *     # sanity check - raise what a list would raise
6245  */
6246     if (unlikely(__pyx_v_new_items == Py_None)) {
6247       PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
6248     }
6249     __pyx_t_5 = PyList_Append(((PyObject *)__pyx_v_new_items), __pyx_v_new_element); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6250   }
6251   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6252
6253   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":589
6254  * 
6255  *     # sanity check - raise what a list would raise
6256  *     if c_step != 1 and \             # <<<<<<<<<<<<<<
6257  *             python.PyList_GET_SIZE(del_items) != python.PyList_GET_SIZE(new_items):
6258  *         raise ValueError, \
6259  */
6260   if ((__pyx_v_c_step != 1)) {
6261
6262     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":590
6263  *     # sanity check - raise what a list would raise
6264  *     if c_step != 1 and \
6265  *             python.PyList_GET_SIZE(del_items) != python.PyList_GET_SIZE(new_items):             # <<<<<<<<<<<<<<
6266  *         raise ValueError, \
6267  *             u"attempt to assign sequence of size %d to extended slice of size %d" % (
6268  */
6269     __pyx_t_1 = (PyList_GET_SIZE(__pyx_v_del_items) != PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
6270   } else {
6271     __pyx_t_1 = (__pyx_v_c_step != 1);
6272   }
6273   if (__pyx_t_1) {
6274
6275     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":593
6276  *         raise ValueError, \
6277  *             u"attempt to assign sequence of size %d to extended slice of size %d" % (
6278  *             python.PyList_GET_SIZE(new_items),             # <<<<<<<<<<<<<<
6279  *             python.PyList_GET_SIZE(del_items))
6280  * 
6281  */
6282     __pyx_t_3 = PyInt_FromSsize_t(PyList_GET_SIZE(((PyObject *)__pyx_v_new_items))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6283     __Pyx_GOTREF(__pyx_t_3);
6284
6285     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":594
6286  *             u"attempt to assign sequence of size %d to extended slice of size %d" % (
6287  *             python.PyList_GET_SIZE(new_items),
6288  *             python.PyList_GET_SIZE(del_items))             # <<<<<<<<<<<<<<
6289  * 
6290  *     # replace existing items
6291  */
6292     __pyx_t_4 = PyInt_FromSsize_t(PyList_GET_SIZE(__pyx_v_del_items)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6293     __Pyx_GOTREF(__pyx_t_4);
6294     __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6295     __Pyx_GOTREF(((PyObject *)__pyx_t_6));
6296     PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
6297     __Pyx_GIVEREF(__pyx_t_3);
6298     PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
6299     __Pyx_GIVEREF(__pyx_t_4);
6300     __pyx_t_3 = 0;
6301     __pyx_t_4 = 0;
6302     __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_12), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6303     __Pyx_GOTREF(__pyx_t_4);
6304     __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
6305     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0);
6306     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6307     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6308     goto __pyx_L8;
6309   }
6310   __pyx_L8:;
6311
6312   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":597
6313  * 
6314  *     # replace existing items
6315  *     pos = 0             # <<<<<<<<<<<<<<
6316  *     parent = target.getparent()
6317  *     replace = parent.replace
6318  */
6319   __pyx_v_pos = 0;
6320
6321   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":598
6322  *     # replace existing items
6323  *     pos = 0
6324  *     parent = target.getparent()             # <<<<<<<<<<<<<<
6325  *     replace = parent.replace
6326  *     while pos < python.PyList_GET_SIZE(new_items) and \
6327  */
6328   __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_target), __pyx_n_ui_getparent); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6329   __Pyx_GOTREF(__pyx_t_4);
6330   __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6331   __Pyx_GOTREF(__pyx_t_6);
6332   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6333   if (!(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6334   __Pyx_DECREF(((PyObject *)__pyx_v_parent));
6335   __pyx_v_parent = ((struct LxmlElement *)__pyx_t_6);
6336   __pyx_t_6 = 0;
6337
6338   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":599
6339  *     pos = 0
6340  *     parent = target.getparent()
6341  *     replace = parent.replace             # <<<<<<<<<<<<<<
6342  *     while pos < python.PyList_GET_SIZE(new_items) and \
6343  *             pos < python.PyList_GET_SIZE(del_items):
6344  */
6345   __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_parent), __pyx_n_ui_replace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6346   __Pyx_GOTREF(__pyx_t_6);
6347   __Pyx_DECREF(__pyx_v_replace);
6348   __pyx_v_replace = __pyx_t_6;
6349   __pyx_t_6 = 0;
6350
6351   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":600
6352  *     parent = target.getparent()
6353  *     replace = parent.replace
6354  *     while pos < python.PyList_GET_SIZE(new_items) and \             # <<<<<<<<<<<<<<
6355  *             pos < python.PyList_GET_SIZE(del_items):
6356  *         replace(del_items[pos], new_items[pos])
6357  */
6358   while (1) {
6359     if ((__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)))) {
6360
6361       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":601
6362  *     replace = parent.replace
6363  *     while pos < python.PyList_GET_SIZE(new_items) and \
6364  *             pos < python.PyList_GET_SIZE(del_items):             # <<<<<<<<<<<<<<
6365  *         replace(del_items[pos], new_items[pos])
6366  *         pos += 1
6367  */
6368       __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(__pyx_v_del_items));
6369     } else {
6370       __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
6371     }
6372     if (!__pyx_t_1) break;
6373
6374     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":602
6375  *     while pos < python.PyList_GET_SIZE(new_items) and \
6376  *             pos < python.PyList_GET_SIZE(del_items):
6377  *         replace(del_items[pos], new_items[pos])             # <<<<<<<<<<<<<<
6378  *         pos += 1
6379  *     # remove leftover items
6380  */
6381     __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_del_items, __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6382     __Pyx_GOTREF(__pyx_t_6);
6383     __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6384     __Pyx_GOTREF(__pyx_t_4);
6385     __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6386     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
6387     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
6388     __Pyx_GIVEREF(__pyx_t_6);
6389     PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
6390     __Pyx_GIVEREF(__pyx_t_4);
6391     __pyx_t_6 = 0;
6392     __pyx_t_4 = 0;
6393     __pyx_t_4 = PyObject_Call(__pyx_v_replace, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6394     __Pyx_GOTREF(__pyx_t_4);
6395     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
6396     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6397
6398     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":603
6399  *             pos < python.PyList_GET_SIZE(del_items):
6400  *         replace(del_items[pos], new_items[pos])
6401  *         pos += 1             # <<<<<<<<<<<<<<
6402  *     # remove leftover items
6403  *     if pos < python.PyList_GET_SIZE(del_items):
6404  */
6405     __pyx_v_pos += 1;
6406   }
6407
6408   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":605
6409  *         pos += 1
6410  *     # remove leftover items
6411  *     if pos < python.PyList_GET_SIZE(del_items):             # <<<<<<<<<<<<<<
6412  *         remove = parent.remove
6413  *         while pos < python.PyList_GET_SIZE(del_items):
6414  */
6415   __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(__pyx_v_del_items));
6416   if (__pyx_t_1) {
6417
6418     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":606
6419  *     # remove leftover items
6420  *     if pos < python.PyList_GET_SIZE(del_items):
6421  *         remove = parent.remove             # <<<<<<<<<<<<<<
6422  *         while pos < python.PyList_GET_SIZE(del_items):
6423  *             remove(del_items[pos])
6424  */
6425     __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_parent), __pyx_n_ui_remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6426     __Pyx_GOTREF(__pyx_t_4);
6427     __Pyx_DECREF(__pyx_v_remove);
6428     __pyx_v_remove = __pyx_t_4;
6429     __pyx_t_4 = 0;
6430
6431     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":607
6432  *     if pos < python.PyList_GET_SIZE(del_items):
6433  *         remove = parent.remove
6434  *         while pos < python.PyList_GET_SIZE(del_items):             # <<<<<<<<<<<<<<
6435  *             remove(del_items[pos])
6436  *             pos += 1
6437  */
6438     while (1) {
6439       __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(__pyx_v_del_items));
6440       if (!__pyx_t_1) break;
6441
6442       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":608
6443  *         remove = parent.remove
6444  *         while pos < python.PyList_GET_SIZE(del_items):
6445  *             remove(del_items[pos])             # <<<<<<<<<<<<<<
6446  *             pos += 1
6447  *     # append remaining new items
6448  */
6449       __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_del_items, __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6450       __Pyx_GOTREF(__pyx_t_4);
6451       __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6452       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
6453       PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
6454       __Pyx_GIVEREF(__pyx_t_4);
6455       __pyx_t_4 = 0;
6456       __pyx_t_4 = PyObject_Call(__pyx_v_remove, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6457       __Pyx_GOTREF(__pyx_t_4);
6458       __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
6459       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6460
6461       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":609
6462  *         while pos < python.PyList_GET_SIZE(del_items):
6463  *             remove(del_items[pos])
6464  *             pos += 1             # <<<<<<<<<<<<<<
6465  *     # append remaining new items
6466  *     if pos < python.PyList_GET_SIZE(new_items):
6467  */
6468       __pyx_v_pos += 1;
6469     }
6470     goto __pyx_L11;
6471   }
6472   __pyx_L11:;
6473
6474   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":611
6475  *             pos += 1
6476  *     # append remaining new items
6477  *     if pos < python.PyList_GET_SIZE(new_items):             # <<<<<<<<<<<<<<
6478  *         # the sanity check above guarantees (step == 1)
6479  *         if pos > 0:
6480  */
6481   __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
6482   if (__pyx_t_1) {
6483
6484     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":613
6485  *     if pos < python.PyList_GET_SIZE(new_items):
6486  *         # the sanity check above guarantees (step == 1)
6487  *         if pos > 0:             # <<<<<<<<<<<<<<
6488  *             item = new_items[pos-1]
6489  *         else:
6490  */
6491     __pyx_t_1 = (__pyx_v_pos > 0);
6492     if (__pyx_t_1) {
6493
6494       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":614
6495  *         # the sanity check above guarantees (step == 1)
6496  *         if pos > 0:
6497  *             item = new_items[pos-1]             # <<<<<<<<<<<<<<
6498  *         else:
6499  *             if (<python.slice>slice).start > 0:
6500  */
6501       __pyx_t_2 = (__pyx_v_pos - 1);
6502       __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_t_2, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6503       __Pyx_GOTREF(__pyx_t_4);
6504       __Pyx_DECREF(__pyx_v_item);
6505       __pyx_v_item = __pyx_t_4;
6506       __pyx_t_4 = 0;
6507       goto __pyx_L15;
6508     }
6509     /*else*/ {
6510
6511       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":616
6512  *             item = new_items[pos-1]
6513  *         else:
6514  *             if (<python.slice>slice).start > 0:             # <<<<<<<<<<<<<<
6515  *                 c_node = parent._c_node.children
6516  *             else:
6517  */
6518       __pyx_t_4 = PyObject_RichCompare(((PySliceObject *)__pyx_v_slice)->start, __pyx_int_0, Py_GT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6519       __Pyx_GOTREF(__pyx_t_4);
6520       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6521       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6522       if (__pyx_t_1) {
6523
6524         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":617
6525  *         else:
6526  *             if (<python.slice>slice).start > 0:
6527  *                 c_node = parent._c_node.children             # <<<<<<<<<<<<<<
6528  *             else:
6529  *                 c_node = parent._c_node.last
6530  */
6531         __pyx_v_c_node = __pyx_v_parent->_c_node->children;
6532         goto __pyx_L16;
6533       }
6534       /*else*/ {
6535
6536         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":619
6537  *                 c_node = parent._c_node.children
6538  *             else:
6539  *                 c_node = parent._c_node.last             # <<<<<<<<<<<<<<
6540  *             c_node = _findFollowingSibling(
6541  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
6542  */
6543         __pyx_v_c_node = __pyx_v_parent->_c_node->last;
6544       }
6545       __pyx_L16:;
6546
6547       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":622
6548  *             c_node = _findFollowingSibling(
6549  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
6550  *                 (<python.slice>slice).start - 1)             # <<<<<<<<<<<<<<
6551  *             if c_node is NULL:
6552  *                 while pos < python.PyList_GET_SIZE(new_items):
6553  */
6554       __pyx_t_4 = PyNumber_Subtract(((PySliceObject *)__pyx_v_slice)->start, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6555       __Pyx_GOTREF(__pyx_t_4);
6556       __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6557       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6558       __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, _getNs(__pyx_v_target->_c_node), __pyx_v_target->_c_node->name, __pyx_t_2);
6559
6560       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":623
6561  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
6562  *                 (<python.slice>slice).start - 1)
6563  *             if c_node is NULL:             # <<<<<<<<<<<<<<
6564  *                 while pos < python.PyList_GET_SIZE(new_items):
6565  *                     cetree.appendChild(parent, new_items[pos])
6566  */
6567       __pyx_t_1 = (__pyx_v_c_node == NULL);
6568       if (__pyx_t_1) {
6569
6570         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":624
6571  *                 (<python.slice>slice).start - 1)
6572  *             if c_node is NULL:
6573  *                 while pos < python.PyList_GET_SIZE(new_items):             # <<<<<<<<<<<<<<
6574  *                     cetree.appendChild(parent, new_items[pos])
6575  *                     pos += 1
6576  */
6577         while (1) {
6578           __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
6579           if (!__pyx_t_1) break;
6580
6581           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":625
6582  *             if c_node is NULL:
6583  *                 while pos < python.PyList_GET_SIZE(new_items):
6584  *                     cetree.appendChild(parent, new_items[pos])             # <<<<<<<<<<<<<<
6585  *                     pos += 1
6586  *                 return
6587  */
6588           __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6589           __Pyx_GOTREF(__pyx_t_4);
6590           if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6591           appendChild(__pyx_v_parent, ((struct LxmlElement *)__pyx_t_4));
6592           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6593
6594           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":626
6595  *                 while pos < python.PyList_GET_SIZE(new_items):
6596  *                     cetree.appendChild(parent, new_items[pos])
6597  *                     pos += 1             # <<<<<<<<<<<<<<
6598  *                 return
6599  *             item = cetree.elementFactory(parent._doc, c_node)
6600  */
6601           __pyx_v_pos += 1;
6602         }
6603
6604         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":627
6605  *                     cetree.appendChild(parent, new_items[pos])
6606  *                     pos += 1
6607  *                 return             # <<<<<<<<<<<<<<
6608  *             item = cetree.elementFactory(parent._doc, c_node)
6609  *         while pos < python.PyList_GET_SIZE(new_items):
6610  */
6611         __Pyx_XDECREF(__pyx_r);
6612         __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6613         goto __pyx_L0;
6614         goto __pyx_L17;
6615       }
6616       __pyx_L17:;
6617
6618       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":628
6619  *                     pos += 1
6620  *                 return
6621  *             item = cetree.elementFactory(parent._doc, c_node)             # <<<<<<<<<<<<<<
6622  *         while pos < python.PyList_GET_SIZE(new_items):
6623  *             add = item.addnext
6624  */
6625       __pyx_t_4 = ((PyObject *)elementFactory(__pyx_v_parent->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6626       __Pyx_GOTREF(__pyx_t_4);
6627       __Pyx_DECREF(__pyx_v_item);
6628       __pyx_v_item = __pyx_t_4;
6629       __pyx_t_4 = 0;
6630     }
6631     __pyx_L15:;
6632
6633     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":629
6634  *                 return
6635  *             item = cetree.elementFactory(parent._doc, c_node)
6636  *         while pos < python.PyList_GET_SIZE(new_items):             # <<<<<<<<<<<<<<
6637  *             add = item.addnext
6638  *             item = new_items[pos]
6639  */
6640     while (1) {
6641       __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
6642       if (!__pyx_t_1) break;
6643
6644       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":630
6645  *             item = cetree.elementFactory(parent._doc, c_node)
6646  *         while pos < python.PyList_GET_SIZE(new_items):
6647  *             add = item.addnext             # <<<<<<<<<<<<<<
6648  *             item = new_items[pos]
6649  *             add(item)
6650  */
6651       __pyx_t_4 = PyObject_GetAttr(__pyx_v_item, __pyx_n_ui_addnext); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6652       __Pyx_GOTREF(__pyx_t_4);
6653       __Pyx_DECREF(__pyx_v_add);
6654       __pyx_v_add = __pyx_t_4;
6655       __pyx_t_4 = 0;
6656
6657       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":631
6658  *         while pos < python.PyList_GET_SIZE(new_items):
6659  *             add = item.addnext
6660  *             item = new_items[pos]             # <<<<<<<<<<<<<<
6661  *             add(item)
6662  *             pos += 1
6663  */
6664       __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6665       __Pyx_GOTREF(__pyx_t_4);
6666       __Pyx_DECREF(__pyx_v_item);
6667       __pyx_v_item = __pyx_t_4;
6668       __pyx_t_4 = 0;
6669
6670       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":632
6671  *             add = item.addnext
6672  *             item = new_items[pos]
6673  *             add(item)             # <<<<<<<<<<<<<<
6674  *             pos += 1
6675  * 
6676  */
6677       __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6678       __Pyx_GOTREF(((PyObject *)__pyx_t_4));
6679       __Pyx_INCREF(__pyx_v_item);
6680       PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_item);
6681       __Pyx_GIVEREF(__pyx_v_item);
6682       __pyx_t_3 = PyObject_Call(__pyx_v_add, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6683       __Pyx_GOTREF(__pyx_t_3);
6684       __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
6685       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6686
6687       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":633
6688  *             item = new_items[pos]
6689  *             add(item)
6690  *             pos += 1             # <<<<<<<<<<<<<<
6691  * 
6692  * ################################################################################
6693  */
6694       __pyx_v_pos += 1;
6695     }
6696     goto __pyx_L14;
6697   }
6698   __pyx_L14:;
6699
6700   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6701   goto __pyx_L0;
6702   __pyx_L1_error:;
6703   __Pyx_XDECREF(__pyx_t_3);
6704   __Pyx_XDECREF(__pyx_t_4);
6705   __Pyx_XDECREF(__pyx_t_6);
6706   __Pyx_AddTraceback("lxml.objectify._setSlice");
6707   __pyx_r = 0;
6708   __pyx_L0:;
6709   __Pyx_DECREF((PyObject *)__pyx_v_parent);
6710   __Pyx_DECREF(__pyx_v_new_items);
6711   __Pyx_DECREF(__pyx_v_del_items);
6712   __Pyx_DECREF(__pyx_v_tag);
6713   __Pyx_DECREF(__pyx_v_item);
6714   __Pyx_DECREF(__pyx_v_new_element);
6715   __Pyx_DECREF(__pyx_v_replace);
6716   __Pyx_DECREF(__pyx_v_remove);
6717   __Pyx_DECREF(__pyx_v_add);
6718   __Pyx_DECREF(__pyx_v_slice);
6719   __Pyx_DECREF((PyObject *)__pyx_v_target);
6720   __Pyx_DECREF(__pyx_v_items);
6721   __Pyx_XGIVEREF(__pyx_r);
6722   __Pyx_FinishRefcountContext();
6723   return __pyx_r;
6724 }
6725
6726 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":643
6727  *     """
6728  *     property pyval:
6729  *         def __get__(self):             # <<<<<<<<<<<<<<
6730  *             return textOf(self._c_node)
6731  * 
6732  */
6733
6734 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
6735 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(PyObject *__pyx_v_self) {
6736   PyObject *__pyx_r = NULL;
6737   PyObject *__pyx_t_1 = NULL;
6738   __Pyx_SetupRefcountContext("__get__");
6739
6740   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":644
6741  *     property pyval:
6742  *         def __get__(self):
6743  *             return textOf(self._c_node)             # <<<<<<<<<<<<<<
6744  * 
6745  *     def __str__(self):
6746  */
6747   __Pyx_XDECREF(__pyx_r);
6748   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6749   __Pyx_GOTREF(__pyx_t_1);
6750   __pyx_r = __pyx_t_1;
6751   __pyx_t_1 = 0;
6752   goto __pyx_L0;
6753
6754   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6755   goto __pyx_L0;
6756   __pyx_L1_error:;
6757   __Pyx_XDECREF(__pyx_t_1);
6758   __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.pyval.__get__");
6759   __pyx_r = NULL;
6760   __pyx_L0:;
6761   __Pyx_XGIVEREF(__pyx_r);
6762   __Pyx_FinishRefcountContext();
6763   return __pyx_r;
6764 }
6765
6766 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":646
6767  *             return textOf(self._c_node)
6768  * 
6769  *     def __str__(self):             # <<<<<<<<<<<<<<
6770  *         return textOf(self._c_node) or u''
6771  * 
6772  */
6773
6774 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(PyObject *__pyx_v_self); /*proto*/
6775 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(PyObject *__pyx_v_self) {
6776   PyObject *__pyx_r = NULL;
6777   PyObject *__pyx_t_1 = NULL;
6778   int __pyx_t_2;
6779   PyObject *__pyx_t_3 = NULL;
6780   __Pyx_SetupRefcountContext("__str__");
6781
6782   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":647
6783  * 
6784  *     def __str__(self):
6785  *         return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
6786  * 
6787  *     def __repr__(self):
6788  */
6789   __Pyx_XDECREF(__pyx_r);
6790   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6791   __Pyx_GOTREF(__pyx_t_1);
6792   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6793   if (!__pyx_t_2) {
6794     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6795     __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
6796     __pyx_t_3 = __pyx_kp_u_4;
6797   } else {
6798     __pyx_t_3 = __pyx_t_1;
6799     __pyx_t_1 = 0;
6800   }
6801   __pyx_r = __pyx_t_3;
6802   __pyx_t_3 = 0;
6803   goto __pyx_L0;
6804
6805   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6806   goto __pyx_L0;
6807   __pyx_L1_error:;
6808   __Pyx_XDECREF(__pyx_t_1);
6809   __Pyx_XDECREF(__pyx_t_3);
6810   __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.__str__");
6811   __pyx_r = NULL;
6812   __pyx_L0:;
6813   __Pyx_XGIVEREF(__pyx_r);
6814   __Pyx_FinishRefcountContext();
6815   return __pyx_r;
6816 }
6817
6818 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":649
6819  *         return textOf(self._c_node) or u''
6820  * 
6821  *     def __repr__(self):             # <<<<<<<<<<<<<<
6822  *         return textOf(self._c_node) or u''
6823  * 
6824  */
6825
6826 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__(PyObject *__pyx_v_self); /*proto*/
6827 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__(PyObject *__pyx_v_self) {
6828   PyObject *__pyx_r = NULL;
6829   PyObject *__pyx_t_1 = NULL;
6830   int __pyx_t_2;
6831   PyObject *__pyx_t_3 = NULL;
6832   __Pyx_SetupRefcountContext("__repr__");
6833
6834   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":650
6835  * 
6836  *     def __repr__(self):
6837  *         return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
6838  * 
6839  *     def _setText(self, s):
6840  */
6841   __Pyx_XDECREF(__pyx_r);
6842   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6843   __Pyx_GOTREF(__pyx_t_1);
6844   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6845   if (!__pyx_t_2) {
6846     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6847     __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
6848     __pyx_t_3 = __pyx_kp_u_4;
6849   } else {
6850     __pyx_t_3 = __pyx_t_1;
6851     __pyx_t_1 = 0;
6852   }
6853   __pyx_r = __pyx_t_3;
6854   __pyx_t_3 = 0;
6855   goto __pyx_L0;
6856
6857   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6858   goto __pyx_L0;
6859   __pyx_L1_error:;
6860   __Pyx_XDECREF(__pyx_t_1);
6861   __Pyx_XDECREF(__pyx_t_3);
6862   __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.__repr__");
6863   __pyx_r = NULL;
6864   __pyx_L0:;
6865   __Pyx_XGIVEREF(__pyx_r);
6866   __Pyx_FinishRefcountContext();
6867   return __pyx_r;
6868 }
6869
6870 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":652
6871  *         return textOf(self._c_node) or u''
6872  * 
6873  *     def _setText(self, s):             # <<<<<<<<<<<<<<
6874  *         u"""For use in subclasses only. Don't use unless you know what you are
6875  *         doing.
6876  */
6877
6878 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement__setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s); /*proto*/
6879 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        ";
6880 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement__setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s) {
6881   PyObject *__pyx_r = NULL;
6882   int __pyx_t_1;
6883   __Pyx_SetupRefcountContext("_setText");
6884
6885   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":656
6886  *         doing.
6887  *         """
6888  *         cetree.setNodeText(self._c_node, s)             # <<<<<<<<<<<<<<
6889  * 
6890  * cdef class NumberElement(ObjectifiedDataElement):
6891  */
6892   __pyx_t_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_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6893
6894   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6895   goto __pyx_L0;
6896   __pyx_L1_error:;
6897   __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement._setText");
6898   __pyx_r = NULL;
6899   __pyx_L0:;
6900   __Pyx_XGIVEREF(__pyx_r);
6901   __Pyx_FinishRefcountContext();
6902   return __pyx_r;
6903 }
6904
6905 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":660
6906  * cdef class NumberElement(ObjectifiedDataElement):
6907  *     cdef object _parse_value
6908  *     def _setValueParser(self, function):             # <<<<<<<<<<<<<<
6909  *         u"""Set the function that parses the Python value from a string.
6910  * 
6911  */
6912
6913 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function); /*proto*/
6914 static char __pyx_doc_4lxml_9objectify_13NumberElement__setValueParser[] = "Set the function that parses the Python value from a string.\n\n        Do not use this unless you know what you are doing.\n        ";
6915 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function) {
6916   PyObject *__pyx_r = NULL;
6917   __Pyx_SetupRefcountContext("_setValueParser");
6918
6919   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":665
6920  *         Do not use this unless you know what you are doing.
6921  *         """
6922  *         self._parse_value = function             # <<<<<<<<<<<<<<
6923  * 
6924  *     property pyval:
6925  */
6926   __Pyx_INCREF(__pyx_v_function);
6927   __Pyx_GIVEREF(__pyx_v_function);
6928   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_parse_value);
6929   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_parse_value);
6930   ((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_parse_value = __pyx_v_function;
6931
6932   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6933   __Pyx_XGIVEREF(__pyx_r);
6934   __Pyx_FinishRefcountContext();
6935   return __pyx_r;
6936 }
6937
6938 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":668
6939  * 
6940  *     property pyval:
6941  *         def __get__(self):             # <<<<<<<<<<<<<<
6942  *             return _parseNumber(self)
6943  * 
6944  */
6945
6946 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
6947 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(PyObject *__pyx_v_self) {
6948   PyObject *__pyx_r = NULL;
6949   PyObject *__pyx_t_1 = NULL;
6950   __Pyx_SetupRefcountContext("__get__");
6951
6952   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":669
6953  *     property pyval:
6954  *         def __get__(self):
6955  *             return _parseNumber(self)             # <<<<<<<<<<<<<<
6956  * 
6957  *     def __int__(self):
6958  */
6959   __Pyx_XDECREF(__pyx_r);
6960   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6961   __Pyx_GOTREF(__pyx_t_1);
6962   __pyx_r = __pyx_t_1;
6963   __pyx_t_1 = 0;
6964   goto __pyx_L0;
6965
6966   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6967   goto __pyx_L0;
6968   __pyx_L1_error:;
6969   __Pyx_XDECREF(__pyx_t_1);
6970   __Pyx_AddTraceback("lxml.objectify.NumberElement.pyval.__get__");
6971   __pyx_r = NULL;
6972   __pyx_L0:;
6973   __Pyx_XGIVEREF(__pyx_r);
6974   __Pyx_FinishRefcountContext();
6975   return __pyx_r;
6976 }
6977
6978 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":671
6979  *             return _parseNumber(self)
6980  * 
6981  *     def __int__(self):             # <<<<<<<<<<<<<<
6982  *         return int(_parseNumber(self))
6983  * 
6984  */
6985
6986 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___int__(PyObject *__pyx_v_self); /*proto*/
6987 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___int__(PyObject *__pyx_v_self) {
6988   PyObject *__pyx_r = NULL;
6989   PyObject *__pyx_t_1 = NULL;
6990   PyObject *__pyx_t_2 = NULL;
6991   __Pyx_SetupRefcountContext("__int__");
6992
6993   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":672
6994  * 
6995  *     def __int__(self):
6996  *         return int(_parseNumber(self))             # <<<<<<<<<<<<<<
6997  * 
6998  *     def __long__(self):
6999  */
7000   __Pyx_XDECREF(__pyx_r);
7001   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7002   __Pyx_GOTREF(__pyx_t_1);
7003   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7004   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7005   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7006   __Pyx_GIVEREF(__pyx_t_1);
7007   __pyx_t_1 = 0;
7008   __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7009   __Pyx_GOTREF(__pyx_t_1);
7010   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7011   __pyx_r = __pyx_t_1;
7012   __pyx_t_1 = 0;
7013   goto __pyx_L0;
7014
7015   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7016   goto __pyx_L0;
7017   __pyx_L1_error:;
7018   __Pyx_XDECREF(__pyx_t_1);
7019   __Pyx_XDECREF(__pyx_t_2);
7020   __Pyx_AddTraceback("lxml.objectify.NumberElement.__int__");
7021   __pyx_r = NULL;
7022   __pyx_L0:;
7023   __Pyx_XGIVEREF(__pyx_r);
7024   __Pyx_FinishRefcountContext();
7025   return __pyx_r;
7026 }
7027
7028 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":674
7029  *         return int(_parseNumber(self))
7030  * 
7031  *     def __long__(self):             # <<<<<<<<<<<<<<
7032  *         return long(_parseNumber(self))
7033  * 
7034  */
7035
7036 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___long__(PyObject *__pyx_v_self); /*proto*/
7037 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___long__(PyObject *__pyx_v_self) {
7038   PyObject *__pyx_r = NULL;
7039   PyObject *__pyx_t_1 = NULL;
7040   PyObject *__pyx_t_2 = NULL;
7041   __Pyx_SetupRefcountContext("__long__");
7042
7043   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":675
7044  * 
7045  *     def __long__(self):
7046  *         return long(_parseNumber(self))             # <<<<<<<<<<<<<<
7047  * 
7048  *     def __float__(self):
7049  */
7050   __Pyx_XDECREF(__pyx_r);
7051   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7052   __Pyx_GOTREF(__pyx_t_1);
7053   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7054   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7055   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7056   __Pyx_GIVEREF(__pyx_t_1);
7057   __pyx_t_1 = 0;
7058   __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyLong_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7059   __Pyx_GOTREF(__pyx_t_1);
7060   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7061   __pyx_r = __pyx_t_1;
7062   __pyx_t_1 = 0;
7063   goto __pyx_L0;
7064
7065   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7066   goto __pyx_L0;
7067   __pyx_L1_error:;
7068   __Pyx_XDECREF(__pyx_t_1);
7069   __Pyx_XDECREF(__pyx_t_2);
7070   __Pyx_AddTraceback("lxml.objectify.NumberElement.__long__");
7071   __pyx_r = NULL;
7072   __pyx_L0:;
7073   __Pyx_XGIVEREF(__pyx_r);
7074   __Pyx_FinishRefcountContext();
7075   return __pyx_r;
7076 }
7077
7078 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":677
7079  *         return long(_parseNumber(self))
7080  * 
7081  *     def __float__(self):             # <<<<<<<<<<<<<<
7082  *         return float(_parseNumber(self))
7083  * 
7084  */
7085
7086 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___float__(PyObject *__pyx_v_self); /*proto*/
7087 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___float__(PyObject *__pyx_v_self) {
7088   PyObject *__pyx_r = NULL;
7089   PyObject *__pyx_t_1 = NULL;
7090   PyObject *__pyx_t_2 = NULL;
7091   __Pyx_SetupRefcountContext("__float__");
7092
7093   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":678
7094  * 
7095  *     def __float__(self):
7096  *         return float(_parseNumber(self))             # <<<<<<<<<<<<<<
7097  * 
7098  *     def __complex__(self):
7099  */
7100   __Pyx_XDECREF(__pyx_r);
7101   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7102   __Pyx_GOTREF(__pyx_t_1);
7103   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7104   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7105   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7106   __Pyx_GIVEREF(__pyx_t_1);
7107   __pyx_t_1 = 0;
7108   __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyFloat_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7109   __Pyx_GOTREF(__pyx_t_1);
7110   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7111   __pyx_r = __pyx_t_1;
7112   __pyx_t_1 = 0;
7113   goto __pyx_L0;
7114
7115   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7116   goto __pyx_L0;
7117   __pyx_L1_error:;
7118   __Pyx_XDECREF(__pyx_t_1);
7119   __Pyx_XDECREF(__pyx_t_2);
7120   __Pyx_AddTraceback("lxml.objectify.NumberElement.__float__");
7121   __pyx_r = NULL;
7122   __pyx_L0:;
7123   __Pyx_XGIVEREF(__pyx_r);
7124   __Pyx_FinishRefcountContext();
7125   return __pyx_r;
7126 }
7127
7128 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":680
7129  *         return float(_parseNumber(self))
7130  * 
7131  *     def __complex__(self):             # <<<<<<<<<<<<<<
7132  *         return complex(_parseNumber(self))
7133  * 
7134  */
7135
7136 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___complex__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
7137 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___complex__(PyObject *__pyx_v_self, PyObject *unused) {
7138   PyObject *__pyx_r = NULL;
7139   PyObject *__pyx_t_1 = NULL;
7140   PyObject *__pyx_t_2 = NULL;
7141   __Pyx_SetupRefcountContext("__complex__");
7142
7143   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":681
7144  * 
7145  *     def __complex__(self):
7146  *         return complex(_parseNumber(self))             # <<<<<<<<<<<<<<
7147  * 
7148  *     def __str__(self):
7149  */
7150   __Pyx_XDECREF(__pyx_r);
7151   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7152   __Pyx_GOTREF(__pyx_t_1);
7153   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7154   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7155   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7156   __Pyx_GIVEREF(__pyx_t_1);
7157   __pyx_t_1 = 0;
7158   __pyx_t_1 = PyObject_Call(((PyObject*)&PyComplex_Type), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7159   __Pyx_GOTREF(__pyx_t_1);
7160   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7161   __pyx_r = __pyx_t_1;
7162   __pyx_t_1 = 0;
7163   goto __pyx_L0;
7164
7165   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7166   goto __pyx_L0;
7167   __pyx_L1_error:;
7168   __Pyx_XDECREF(__pyx_t_1);
7169   __Pyx_XDECREF(__pyx_t_2);
7170   __Pyx_AddTraceback("lxml.objectify.NumberElement.__complex__");
7171   __pyx_r = NULL;
7172   __pyx_L0:;
7173   __Pyx_XGIVEREF(__pyx_r);
7174   __Pyx_FinishRefcountContext();
7175   return __pyx_r;
7176 }
7177
7178 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":683
7179  *         return complex(_parseNumber(self))
7180  * 
7181  *     def __str__(self):             # <<<<<<<<<<<<<<
7182  *         return unicode(_parseNumber(self))
7183  * 
7184  */
7185
7186 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___str__(PyObject *__pyx_v_self); /*proto*/
7187 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___str__(PyObject *__pyx_v_self) {
7188   PyObject *__pyx_r = NULL;
7189   PyObject *__pyx_t_1 = NULL;
7190   PyObject *__pyx_t_2 = NULL;
7191   __Pyx_SetupRefcountContext("__str__");
7192
7193   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":684
7194  * 
7195  *     def __str__(self):
7196  *         return unicode(_parseNumber(self))             # <<<<<<<<<<<<<<
7197  * 
7198  *     def __repr__(self):
7199  */
7200   __Pyx_XDECREF(__pyx_r);
7201   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7202   __Pyx_GOTREF(__pyx_t_1);
7203   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7204   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7205   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7206   __Pyx_GIVEREF(__pyx_t_1);
7207   __pyx_t_1 = 0;
7208   __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7209   __Pyx_GOTREF(__pyx_t_1);
7210   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7211   __pyx_r = __pyx_t_1;
7212   __pyx_t_1 = 0;
7213   goto __pyx_L0;
7214
7215   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7216   goto __pyx_L0;
7217   __pyx_L1_error:;
7218   __Pyx_XDECREF(__pyx_t_1);
7219   __Pyx_XDECREF(__pyx_t_2);
7220   __Pyx_AddTraceback("lxml.objectify.NumberElement.__str__");
7221   __pyx_r = NULL;
7222   __pyx_L0:;
7223   __Pyx_XGIVEREF(__pyx_r);
7224   __Pyx_FinishRefcountContext();
7225   return __pyx_r;
7226 }
7227
7228 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":686
7229  *         return unicode(_parseNumber(self))
7230  * 
7231  *     def __repr__(self):             # <<<<<<<<<<<<<<
7232  *         return repr(_parseNumber(self))
7233  * 
7234  */
7235
7236 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___repr__(PyObject *__pyx_v_self); /*proto*/
7237 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___repr__(PyObject *__pyx_v_self) {
7238   PyObject *__pyx_r = NULL;
7239   PyObject *__pyx_t_1 = NULL;
7240   PyObject *__pyx_t_2 = NULL;
7241   __Pyx_SetupRefcountContext("__repr__");
7242
7243   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":687
7244  * 
7245  *     def __repr__(self):
7246  *         return repr(_parseNumber(self))             # <<<<<<<<<<<<<<
7247  * 
7248  *     def __oct__(self):
7249  */
7250   __Pyx_XDECREF(__pyx_r);
7251   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7252   __Pyx_GOTREF(__pyx_t_1);
7253   __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7254   __Pyx_GOTREF(__pyx_t_2);
7255   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7256   __pyx_r = __pyx_t_2;
7257   __pyx_t_2 = 0;
7258   goto __pyx_L0;
7259
7260   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7261   goto __pyx_L0;
7262   __pyx_L1_error:;
7263   __Pyx_XDECREF(__pyx_t_1);
7264   __Pyx_XDECREF(__pyx_t_2);
7265   __Pyx_AddTraceback("lxml.objectify.NumberElement.__repr__");
7266   __pyx_r = NULL;
7267   __pyx_L0:;
7268   __Pyx_XGIVEREF(__pyx_r);
7269   __Pyx_FinishRefcountContext();
7270   return __pyx_r;
7271 }
7272
7273 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":689
7274  *         return repr(_parseNumber(self))
7275  * 
7276  *     def __oct__(self):             # <<<<<<<<<<<<<<
7277  *         return oct(_parseNumber(self))
7278  * 
7279  */
7280
7281 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___oct__(PyObject *__pyx_v_self); /*proto*/
7282 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___oct__(PyObject *__pyx_v_self) {
7283   PyObject *__pyx_r = NULL;
7284   PyObject *__pyx_t_1 = NULL;
7285   PyObject *__pyx_t_2 = NULL;
7286   __Pyx_SetupRefcountContext("__oct__");
7287
7288   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":690
7289  * 
7290  *     def __oct__(self):
7291  *         return oct(_parseNumber(self))             # <<<<<<<<<<<<<<
7292  * 
7293  *     def __hex__(self):
7294  */
7295   __Pyx_XDECREF(__pyx_r);
7296   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7297   __Pyx_GOTREF(__pyx_t_1);
7298   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7299   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7300   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7301   __Pyx_GIVEREF(__pyx_t_1);
7302   __pyx_t_1 = 0;
7303   __pyx_t_1 = PyObject_Call(__pyx_builtin_oct, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7304   __Pyx_GOTREF(__pyx_t_1);
7305   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7306   __pyx_r = __pyx_t_1;
7307   __pyx_t_1 = 0;
7308   goto __pyx_L0;
7309
7310   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7311   goto __pyx_L0;
7312   __pyx_L1_error:;
7313   __Pyx_XDECREF(__pyx_t_1);
7314   __Pyx_XDECREF(__pyx_t_2);
7315   __Pyx_AddTraceback("lxml.objectify.NumberElement.__oct__");
7316   __pyx_r = NULL;
7317   __pyx_L0:;
7318   __Pyx_XGIVEREF(__pyx_r);
7319   __Pyx_FinishRefcountContext();
7320   return __pyx_r;
7321 }
7322
7323 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":692
7324  *         return oct(_parseNumber(self))
7325  * 
7326  *     def __hex__(self):             # <<<<<<<<<<<<<<
7327  *         return hex(_parseNumber(self))
7328  * 
7329  */
7330
7331 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___hex__(PyObject *__pyx_v_self); /*proto*/
7332 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___hex__(PyObject *__pyx_v_self) {
7333   PyObject *__pyx_r = NULL;
7334   PyObject *__pyx_t_1 = NULL;
7335   PyObject *__pyx_t_2 = NULL;
7336   __Pyx_SetupRefcountContext("__hex__");
7337
7338   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":693
7339  * 
7340  *     def __hex__(self):
7341  *         return hex(_parseNumber(self))             # <<<<<<<<<<<<<<
7342  * 
7343  *     def __richcmp__(self, other, int op):
7344  */
7345   __Pyx_XDECREF(__pyx_r);
7346   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7347   __Pyx_GOTREF(__pyx_t_1);
7348   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7349   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7350   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7351   __Pyx_GIVEREF(__pyx_t_1);
7352   __pyx_t_1 = 0;
7353   __pyx_t_1 = PyObject_Call(__pyx_builtin_hex, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7354   __Pyx_GOTREF(__pyx_t_1);
7355   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7356   __pyx_r = __pyx_t_1;
7357   __pyx_t_1 = 0;
7358   goto __pyx_L0;
7359
7360   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7361   goto __pyx_L0;
7362   __pyx_L1_error:;
7363   __Pyx_XDECREF(__pyx_t_1);
7364   __Pyx_XDECREF(__pyx_t_2);
7365   __Pyx_AddTraceback("lxml.objectify.NumberElement.__hex__");
7366   __pyx_r = NULL;
7367   __pyx_L0:;
7368   __Pyx_XGIVEREF(__pyx_r);
7369   __Pyx_FinishRefcountContext();
7370   return __pyx_r;
7371 }
7372
7373 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":695
7374  *         return hex(_parseNumber(self))
7375  * 
7376  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
7377  *         return _richcmpPyvals(self, other, op)
7378  * 
7379  */
7380
7381 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
7382 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
7383   PyObject *__pyx_r = NULL;
7384   PyObject *__pyx_t_1 = NULL;
7385   __Pyx_SetupRefcountContext("__richcmp__");
7386
7387   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":696
7388  * 
7389  *     def __richcmp__(self, other, int op):
7390  *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
7391  * 
7392  *     def __add__(self, other):
7393  */
7394   __Pyx_XDECREF(__pyx_r);
7395   __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(__pyx_v_self, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7396   __Pyx_GOTREF(__pyx_t_1);
7397   __pyx_r = __pyx_t_1;
7398   __pyx_t_1 = 0;
7399   goto __pyx_L0;
7400
7401   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7402   goto __pyx_L0;
7403   __pyx_L1_error:;
7404   __Pyx_XDECREF(__pyx_t_1);
7405   __Pyx_AddTraceback("lxml.objectify.NumberElement.__richcmp__");
7406   __pyx_r = NULL;
7407   __pyx_L0:;
7408   __Pyx_XGIVEREF(__pyx_r);
7409   __Pyx_FinishRefcountContext();
7410   return __pyx_r;
7411 }
7412
7413 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":698
7414  *         return _richcmpPyvals(self, other, op)
7415  * 
7416  *     def __add__(self, other):             # <<<<<<<<<<<<<<
7417  *         return _numericValueOf(self) + _numericValueOf(other)
7418  * 
7419  */
7420
7421 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
7422 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7423   PyObject *__pyx_r = NULL;
7424   PyObject *__pyx_t_1 = NULL;
7425   PyObject *__pyx_t_2 = NULL;
7426   PyObject *__pyx_t_3 = NULL;
7427   __Pyx_SetupRefcountContext("__add__");
7428
7429   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":699
7430  * 
7431  *     def __add__(self, other):
7432  *         return _numericValueOf(self) + _numericValueOf(other)             # <<<<<<<<<<<<<<
7433  * 
7434  *     def __sub__(self, other):
7435  */
7436   __Pyx_XDECREF(__pyx_r);
7437   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7438   __Pyx_GOTREF(__pyx_t_1);
7439   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7440   __Pyx_GOTREF(__pyx_t_2);
7441   __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7442   __Pyx_GOTREF(__pyx_t_3);
7443   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7444   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7445   __pyx_r = __pyx_t_3;
7446   __pyx_t_3 = 0;
7447   goto __pyx_L0;
7448
7449   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7450   goto __pyx_L0;
7451   __pyx_L1_error:;
7452   __Pyx_XDECREF(__pyx_t_1);
7453   __Pyx_XDECREF(__pyx_t_2);
7454   __Pyx_XDECREF(__pyx_t_3);
7455   __Pyx_AddTraceback("lxml.objectify.NumberElement.__add__");
7456   __pyx_r = NULL;
7457   __pyx_L0:;
7458   __Pyx_XGIVEREF(__pyx_r);
7459   __Pyx_FinishRefcountContext();
7460   return __pyx_r;
7461 }
7462
7463 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":701
7464  *         return _numericValueOf(self) + _numericValueOf(other)
7465  * 
7466  *     def __sub__(self, other):             # <<<<<<<<<<<<<<
7467  *         return _numericValueOf(self) - _numericValueOf(other)
7468  * 
7469  */
7470
7471 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
7472 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7473   PyObject *__pyx_r = NULL;
7474   PyObject *__pyx_t_1 = NULL;
7475   PyObject *__pyx_t_2 = NULL;
7476   PyObject *__pyx_t_3 = NULL;
7477   __Pyx_SetupRefcountContext("__sub__");
7478
7479   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":702
7480  * 
7481  *     def __sub__(self, other):
7482  *         return _numericValueOf(self) - _numericValueOf(other)             # <<<<<<<<<<<<<<
7483  * 
7484  *     def __mul__(self, other):
7485  */
7486   __Pyx_XDECREF(__pyx_r);
7487   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7488   __Pyx_GOTREF(__pyx_t_1);
7489   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7490   __Pyx_GOTREF(__pyx_t_2);
7491   __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7492   __Pyx_GOTREF(__pyx_t_3);
7493   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7494   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7495   __pyx_r = __pyx_t_3;
7496   __pyx_t_3 = 0;
7497   goto __pyx_L0;
7498
7499   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7500   goto __pyx_L0;
7501   __pyx_L1_error:;
7502   __Pyx_XDECREF(__pyx_t_1);
7503   __Pyx_XDECREF(__pyx_t_2);
7504   __Pyx_XDECREF(__pyx_t_3);
7505   __Pyx_AddTraceback("lxml.objectify.NumberElement.__sub__");
7506   __pyx_r = NULL;
7507   __pyx_L0:;
7508   __Pyx_XGIVEREF(__pyx_r);
7509   __Pyx_FinishRefcountContext();
7510   return __pyx_r;
7511 }
7512
7513 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":704
7514  *         return _numericValueOf(self) - _numericValueOf(other)
7515  * 
7516  *     def __mul__(self, other):             # <<<<<<<<<<<<<<
7517  *         return _numericValueOf(self) * _numericValueOf(other)
7518  * 
7519  */
7520
7521 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
7522 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7523   PyObject *__pyx_r = NULL;
7524   PyObject *__pyx_t_1 = NULL;
7525   PyObject *__pyx_t_2 = NULL;
7526   PyObject *__pyx_t_3 = NULL;
7527   __Pyx_SetupRefcountContext("__mul__");
7528
7529   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":705
7530  * 
7531  *     def __mul__(self, other):
7532  *         return _numericValueOf(self) * _numericValueOf(other)             # <<<<<<<<<<<<<<
7533  * 
7534  *     def __div__(self, other):
7535  */
7536   __Pyx_XDECREF(__pyx_r);
7537   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7538   __Pyx_GOTREF(__pyx_t_1);
7539   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7540   __Pyx_GOTREF(__pyx_t_2);
7541   __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7542   __Pyx_GOTREF(__pyx_t_3);
7543   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7544   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7545   __pyx_r = __pyx_t_3;
7546   __pyx_t_3 = 0;
7547   goto __pyx_L0;
7548
7549   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7550   goto __pyx_L0;
7551   __pyx_L1_error:;
7552   __Pyx_XDECREF(__pyx_t_1);
7553   __Pyx_XDECREF(__pyx_t_2);
7554   __Pyx_XDECREF(__pyx_t_3);
7555   __Pyx_AddTraceback("lxml.objectify.NumberElement.__mul__");
7556   __pyx_r = NULL;
7557   __pyx_L0:;
7558   __Pyx_XGIVEREF(__pyx_r);
7559   __Pyx_FinishRefcountContext();
7560   return __pyx_r;
7561 }
7562
7563 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":707
7564  *         return _numericValueOf(self) * _numericValueOf(other)
7565  * 
7566  *     def __div__(self, other):             # <<<<<<<<<<<<<<
7567  *         return _numericValueOf(self) / _numericValueOf(other)
7568  * 
7569  */
7570
7571 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
7572 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7573   PyObject *__pyx_r = NULL;
7574   PyObject *__pyx_t_1 = NULL;
7575   PyObject *__pyx_t_2 = NULL;
7576   PyObject *__pyx_t_3 = NULL;
7577   __Pyx_SetupRefcountContext("__div__");
7578
7579   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":708
7580  * 
7581  *     def __div__(self, other):
7582  *         return _numericValueOf(self) / _numericValueOf(other)             # <<<<<<<<<<<<<<
7583  * 
7584  *     def __truediv__(self, other):
7585  */
7586   __Pyx_XDECREF(__pyx_r);
7587   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7588   __Pyx_GOTREF(__pyx_t_1);
7589   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7590   __Pyx_GOTREF(__pyx_t_2);
7591   __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7592   __Pyx_GOTREF(__pyx_t_3);
7593   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7594   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7595   __pyx_r = __pyx_t_3;
7596   __pyx_t_3 = 0;
7597   goto __pyx_L0;
7598
7599   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7600   goto __pyx_L0;
7601   __pyx_L1_error:;
7602   __Pyx_XDECREF(__pyx_t_1);
7603   __Pyx_XDECREF(__pyx_t_2);
7604   __Pyx_XDECREF(__pyx_t_3);
7605   __Pyx_AddTraceback("lxml.objectify.NumberElement.__div__");
7606   __pyx_r = NULL;
7607   __pyx_L0:;
7608   __Pyx_XGIVEREF(__pyx_r);
7609   __Pyx_FinishRefcountContext();
7610   return __pyx_r;
7611 }
7612
7613 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":710
7614  *         return _numericValueOf(self) / _numericValueOf(other)
7615  * 
7616  *     def __truediv__(self, other):             # <<<<<<<<<<<<<<
7617  *         return _numericValueOf(self) / _numericValueOf(other)
7618  * 
7619  */
7620
7621 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
7622 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7623   PyObject *__pyx_r = NULL;
7624   PyObject *__pyx_t_1 = NULL;
7625   PyObject *__pyx_t_2 = NULL;
7626   PyObject *__pyx_t_3 = NULL;
7627   __Pyx_SetupRefcountContext("__truediv__");
7628
7629   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":711
7630  * 
7631  *     def __truediv__(self, other):
7632  *         return _numericValueOf(self) / _numericValueOf(other)             # <<<<<<<<<<<<<<
7633  * 
7634  *     def __mod__(self, other):
7635  */
7636   __Pyx_XDECREF(__pyx_r);
7637   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7638   __Pyx_GOTREF(__pyx_t_1);
7639   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7640   __Pyx_GOTREF(__pyx_t_2);
7641   __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7642   __Pyx_GOTREF(__pyx_t_3);
7643   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7644   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7645   __pyx_r = __pyx_t_3;
7646   __pyx_t_3 = 0;
7647   goto __pyx_L0;
7648
7649   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7650   goto __pyx_L0;
7651   __pyx_L1_error:;
7652   __Pyx_XDECREF(__pyx_t_1);
7653   __Pyx_XDECREF(__pyx_t_2);
7654   __Pyx_XDECREF(__pyx_t_3);
7655   __Pyx_AddTraceback("lxml.objectify.NumberElement.__truediv__");
7656   __pyx_r = NULL;
7657   __pyx_L0:;
7658   __Pyx_XGIVEREF(__pyx_r);
7659   __Pyx_FinishRefcountContext();
7660   return __pyx_r;
7661 }
7662
7663 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":713
7664  *         return _numericValueOf(self) / _numericValueOf(other)
7665  * 
7666  *     def __mod__(self, other):             # <<<<<<<<<<<<<<
7667  *         return _numericValueOf(self) % _numericValueOf(other)
7668  * 
7669  */
7670
7671 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
7672 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7673   PyObject *__pyx_r = NULL;
7674   PyObject *__pyx_t_1 = NULL;
7675   PyObject *__pyx_t_2 = NULL;
7676   PyObject *__pyx_t_3 = NULL;
7677   __Pyx_SetupRefcountContext("__mod__");
7678
7679   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":714
7680  * 
7681  *     def __mod__(self, other):
7682  *         return _numericValueOf(self) % _numericValueOf(other)             # <<<<<<<<<<<<<<
7683  * 
7684  *     def __pow__(self, other, modulo):
7685  */
7686   __Pyx_XDECREF(__pyx_r);
7687   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7688   __Pyx_GOTREF(__pyx_t_1);
7689   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7690   __Pyx_GOTREF(__pyx_t_2);
7691   __pyx_t_3 = PyNumber_Remainder(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7692   __Pyx_GOTREF(__pyx_t_3);
7693   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7694   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7695   __pyx_r = __pyx_t_3;
7696   __pyx_t_3 = 0;
7697   goto __pyx_L0;
7698
7699   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7700   goto __pyx_L0;
7701   __pyx_L1_error:;
7702   __Pyx_XDECREF(__pyx_t_1);
7703   __Pyx_XDECREF(__pyx_t_2);
7704   __Pyx_XDECREF(__pyx_t_3);
7705   __Pyx_AddTraceback("lxml.objectify.NumberElement.__mod__");
7706   __pyx_r = NULL;
7707   __pyx_L0:;
7708   __Pyx_XGIVEREF(__pyx_r);
7709   __Pyx_FinishRefcountContext();
7710   return __pyx_r;
7711 }
7712
7713 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":716
7714  *         return _numericValueOf(self) % _numericValueOf(other)
7715  * 
7716  *     def __pow__(self, other, modulo):             # <<<<<<<<<<<<<<
7717  *         if modulo is None:
7718  *             return _numericValueOf(self) ** _numericValueOf(other)
7719  */
7720
7721 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /*proto*/
7722 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) {
7723   PyObject *__pyx_r = NULL;
7724   int __pyx_t_1;
7725   PyObject *__pyx_t_2 = NULL;
7726   PyObject *__pyx_t_3 = NULL;
7727   PyObject *__pyx_t_4 = NULL;
7728   __Pyx_SetupRefcountContext("__pow__");
7729   __Pyx_INCREF(__pyx_v_self);
7730   __Pyx_INCREF(__pyx_v_other);
7731   __Pyx_INCREF(__pyx_v_modulo);
7732
7733   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":717
7734  * 
7735  *     def __pow__(self, other, modulo):
7736  *         if modulo is None:             # <<<<<<<<<<<<<<
7737  *             return _numericValueOf(self) ** _numericValueOf(other)
7738  *         else:
7739  */
7740   __pyx_t_1 = (__pyx_v_modulo == Py_None);
7741   if (__pyx_t_1) {
7742
7743     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":718
7744  *     def __pow__(self, other, modulo):
7745  *         if modulo is None:
7746  *             return _numericValueOf(self) ** _numericValueOf(other)             # <<<<<<<<<<<<<<
7747  *         else:
7748  *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
7749  */
7750     __Pyx_XDECREF(__pyx_r);
7751     __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7752     __Pyx_GOTREF(__pyx_t_2);
7753     __pyx_t_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7754     __Pyx_GOTREF(__pyx_t_3);
7755     __pyx_t_4 = PyNumber_Power(__pyx_t_2, __pyx_t_3, Py_None); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7756     __Pyx_GOTREF(__pyx_t_4);
7757     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7758     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7759     __pyx_r = __pyx_t_4;
7760     __pyx_t_4 = 0;
7761     goto __pyx_L0;
7762     goto __pyx_L5;
7763   }
7764   /*else*/ {
7765
7766     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":720
7767  *             return _numericValueOf(self) ** _numericValueOf(other)
7768  *         else:
7769  *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)             # <<<<<<<<<<<<<<
7770  * 
7771  *     def __neg__(self):
7772  */
7773     __Pyx_XDECREF(__pyx_r);
7774     __pyx_t_4 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7775     __Pyx_GOTREF(__pyx_t_4);
7776     __pyx_t_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7777     __Pyx_GOTREF(__pyx_t_3);
7778     __pyx_t_2 = PyNumber_Power(__pyx_t_4, __pyx_t_3, __pyx_v_modulo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7779     __Pyx_GOTREF(__pyx_t_2);
7780     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7781     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7782     __pyx_r = __pyx_t_2;
7783     __pyx_t_2 = 0;
7784     goto __pyx_L0;
7785   }
7786   __pyx_L5:;
7787
7788   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7789   goto __pyx_L0;
7790   __pyx_L1_error:;
7791   __Pyx_XDECREF(__pyx_t_2);
7792   __Pyx_XDECREF(__pyx_t_3);
7793   __Pyx_XDECREF(__pyx_t_4);
7794   __Pyx_AddTraceback("lxml.objectify.NumberElement.__pow__");
7795   __pyx_r = NULL;
7796   __pyx_L0:;
7797   __Pyx_DECREF(__pyx_v_self);
7798   __Pyx_DECREF(__pyx_v_other);
7799   __Pyx_DECREF(__pyx_v_modulo);
7800   __Pyx_XGIVEREF(__pyx_r);
7801   __Pyx_FinishRefcountContext();
7802   return __pyx_r;
7803 }
7804
7805 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":722
7806  *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
7807  * 
7808  *     def __neg__(self):             # <<<<<<<<<<<<<<
7809  *         return - _numericValueOf(self)
7810  * 
7811  */
7812
7813 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___neg__(PyObject *__pyx_v_self); /*proto*/
7814 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___neg__(PyObject *__pyx_v_self) {
7815   PyObject *__pyx_r = NULL;
7816   PyObject *__pyx_t_1 = NULL;
7817   PyObject *__pyx_t_2 = NULL;
7818   __Pyx_SetupRefcountContext("__neg__");
7819
7820   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":723
7821  * 
7822  *     def __neg__(self):
7823  *         return - _numericValueOf(self)             # <<<<<<<<<<<<<<
7824  * 
7825  *     def __pos__(self):
7826  */
7827   __Pyx_XDECREF(__pyx_r);
7828   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7829   __Pyx_GOTREF(__pyx_t_1);
7830   __pyx_t_2 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7831   __Pyx_GOTREF(__pyx_t_2);
7832   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7833   __pyx_r = __pyx_t_2;
7834   __pyx_t_2 = 0;
7835   goto __pyx_L0;
7836
7837   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7838   goto __pyx_L0;
7839   __pyx_L1_error:;
7840   __Pyx_XDECREF(__pyx_t_1);
7841   __Pyx_XDECREF(__pyx_t_2);
7842   __Pyx_AddTraceback("lxml.objectify.NumberElement.__neg__");
7843   __pyx_r = NULL;
7844   __pyx_L0:;
7845   __Pyx_XGIVEREF(__pyx_r);
7846   __Pyx_FinishRefcountContext();
7847   return __pyx_r;
7848 }
7849
7850 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":725
7851  *         return - _numericValueOf(self)
7852  * 
7853  *     def __pos__(self):             # <<<<<<<<<<<<<<
7854  *         return + _numericValueOf(self)
7855  * 
7856  */
7857
7858 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pos__(PyObject *__pyx_v_self); /*proto*/
7859 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pos__(PyObject *__pyx_v_self) {
7860   PyObject *__pyx_r = NULL;
7861   PyObject *__pyx_t_1 = NULL;
7862   PyObject *__pyx_t_2 = NULL;
7863   __Pyx_SetupRefcountContext("__pos__");
7864
7865   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":726
7866  * 
7867  *     def __pos__(self):
7868  *         return + _numericValueOf(self)             # <<<<<<<<<<<<<<
7869  * 
7870  *     def __abs__(self):
7871  */
7872   __Pyx_XDECREF(__pyx_r);
7873   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7874   __Pyx_GOTREF(__pyx_t_1);
7875   __pyx_t_2 = PyNumber_Positive(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7876   __Pyx_GOTREF(__pyx_t_2);
7877   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7878   __pyx_r = __pyx_t_2;
7879   __pyx_t_2 = 0;
7880   goto __pyx_L0;
7881
7882   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7883   goto __pyx_L0;
7884   __pyx_L1_error:;
7885   __Pyx_XDECREF(__pyx_t_1);
7886   __Pyx_XDECREF(__pyx_t_2);
7887   __Pyx_AddTraceback("lxml.objectify.NumberElement.__pos__");
7888   __pyx_r = NULL;
7889   __pyx_L0:;
7890   __Pyx_XGIVEREF(__pyx_r);
7891   __Pyx_FinishRefcountContext();
7892   return __pyx_r;
7893 }
7894
7895 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":728
7896  *         return + _numericValueOf(self)
7897  * 
7898  *     def __abs__(self):             # <<<<<<<<<<<<<<
7899  *         return abs( _numericValueOf(self) )
7900  * 
7901  */
7902
7903 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___abs__(PyObject *__pyx_v_self); /*proto*/
7904 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___abs__(PyObject *__pyx_v_self) {
7905   PyObject *__pyx_r = NULL;
7906   PyObject *__pyx_t_1 = NULL;
7907   PyObject *__pyx_t_2 = NULL;
7908   __Pyx_SetupRefcountContext("__abs__");
7909
7910   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":729
7911  * 
7912  *     def __abs__(self):
7913  *         return abs( _numericValueOf(self) )             # <<<<<<<<<<<<<<
7914  * 
7915  *     def __nonzero__(self):
7916  */
7917   __Pyx_XDECREF(__pyx_r);
7918   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7919   __Pyx_GOTREF(__pyx_t_1);
7920   __pyx_t_2 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7921   __Pyx_GOTREF(__pyx_t_2);
7922   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7923   __pyx_r = __pyx_t_2;
7924   __pyx_t_2 = 0;
7925   goto __pyx_L0;
7926
7927   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7928   goto __pyx_L0;
7929   __pyx_L1_error:;
7930   __Pyx_XDECREF(__pyx_t_1);
7931   __Pyx_XDECREF(__pyx_t_2);
7932   __Pyx_AddTraceback("lxml.objectify.NumberElement.__abs__");
7933   __pyx_r = NULL;
7934   __pyx_L0:;
7935   __Pyx_XGIVEREF(__pyx_r);
7936   __Pyx_FinishRefcountContext();
7937   return __pyx_r;
7938 }
7939
7940 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":731
7941  *         return abs( _numericValueOf(self) )
7942  * 
7943  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
7944  *         return _numericValueOf(self) != 0
7945  * 
7946  */
7947
7948 static int __pyx_pf_4lxml_9objectify_13NumberElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
7949 static int __pyx_pf_4lxml_9objectify_13NumberElement___nonzero__(PyObject *__pyx_v_self) {
7950   int __pyx_r;
7951   PyObject *__pyx_t_1 = NULL;
7952   PyObject *__pyx_t_2 = NULL;
7953   int __pyx_t_3;
7954   __Pyx_SetupRefcountContext("__nonzero__");
7955
7956   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":732
7957  * 
7958  *     def __nonzero__(self):
7959  *         return _numericValueOf(self) != 0             # <<<<<<<<<<<<<<
7960  * 
7961  *     def __invert__(self):
7962  */
7963   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7964   __Pyx_GOTREF(__pyx_t_1);
7965   __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7966   __Pyx_GOTREF(__pyx_t_2);
7967   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7968   __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7969   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7970   __pyx_r = __pyx_t_3;
7971   goto __pyx_L0;
7972
7973   __pyx_r = 0;
7974   goto __pyx_L0;
7975   __pyx_L1_error:;
7976   __Pyx_XDECREF(__pyx_t_1);
7977   __Pyx_XDECREF(__pyx_t_2);
7978   __Pyx_AddTraceback("lxml.objectify.NumberElement.__nonzero__");
7979   __pyx_r = -1;
7980   __pyx_L0:;
7981   __Pyx_FinishRefcountContext();
7982   return __pyx_r;
7983 }
7984
7985 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":734
7986  *         return _numericValueOf(self) != 0
7987  * 
7988  *     def __invert__(self):             # <<<<<<<<<<<<<<
7989  *         return ~ _numericValueOf(self)
7990  * 
7991  */
7992
7993 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___invert__(PyObject *__pyx_v_self); /*proto*/
7994 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___invert__(PyObject *__pyx_v_self) {
7995   PyObject *__pyx_r = NULL;
7996   PyObject *__pyx_t_1 = NULL;
7997   PyObject *__pyx_t_2 = NULL;
7998   __Pyx_SetupRefcountContext("__invert__");
7999
8000   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":735
8001  * 
8002  *     def __invert__(self):
8003  *         return ~ _numericValueOf(self)             # <<<<<<<<<<<<<<
8004  * 
8005  *     def __lshift__(self, other):
8006  */
8007   __Pyx_XDECREF(__pyx_r);
8008   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8009   __Pyx_GOTREF(__pyx_t_1);
8010   __pyx_t_2 = PyNumber_Invert(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8011   __Pyx_GOTREF(__pyx_t_2);
8012   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8013   __pyx_r = __pyx_t_2;
8014   __pyx_t_2 = 0;
8015   goto __pyx_L0;
8016
8017   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8018   goto __pyx_L0;
8019   __pyx_L1_error:;
8020   __Pyx_XDECREF(__pyx_t_1);
8021   __Pyx_XDECREF(__pyx_t_2);
8022   __Pyx_AddTraceback("lxml.objectify.NumberElement.__invert__");
8023   __pyx_r = NULL;
8024   __pyx_L0:;
8025   __Pyx_XGIVEREF(__pyx_r);
8026   __Pyx_FinishRefcountContext();
8027   return __pyx_r;
8028 }
8029
8030 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":737
8031  *         return ~ _numericValueOf(self)
8032  * 
8033  *     def __lshift__(self, other):             # <<<<<<<<<<<<<<
8034  *         return _numericValueOf(self) << _numericValueOf(other)
8035  * 
8036  */
8037
8038 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8039 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8040   PyObject *__pyx_r = NULL;
8041   PyObject *__pyx_t_1 = NULL;
8042   PyObject *__pyx_t_2 = NULL;
8043   PyObject *__pyx_t_3 = NULL;
8044   __Pyx_SetupRefcountContext("__lshift__");
8045
8046   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":738
8047  * 
8048  *     def __lshift__(self, other):
8049  *         return _numericValueOf(self) << _numericValueOf(other)             # <<<<<<<<<<<<<<
8050  * 
8051  *     def __rshift__(self, other):
8052  */
8053   __Pyx_XDECREF(__pyx_r);
8054   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8055   __Pyx_GOTREF(__pyx_t_1);
8056   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8057   __Pyx_GOTREF(__pyx_t_2);
8058   __pyx_t_3 = PyNumber_Lshift(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8059   __Pyx_GOTREF(__pyx_t_3);
8060   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8061   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8062   __pyx_r = __pyx_t_3;
8063   __pyx_t_3 = 0;
8064   goto __pyx_L0;
8065
8066   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8067   goto __pyx_L0;
8068   __pyx_L1_error:;
8069   __Pyx_XDECREF(__pyx_t_1);
8070   __Pyx_XDECREF(__pyx_t_2);
8071   __Pyx_XDECREF(__pyx_t_3);
8072   __Pyx_AddTraceback("lxml.objectify.NumberElement.__lshift__");
8073   __pyx_r = NULL;
8074   __pyx_L0:;
8075   __Pyx_XGIVEREF(__pyx_r);
8076   __Pyx_FinishRefcountContext();
8077   return __pyx_r;
8078 }
8079
8080 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":740
8081  *         return _numericValueOf(self) << _numericValueOf(other)
8082  * 
8083  *     def __rshift__(self, other):             # <<<<<<<<<<<<<<
8084  *         return _numericValueOf(self) >> _numericValueOf(other)
8085  * 
8086  */
8087
8088 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8089 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8090   PyObject *__pyx_r = NULL;
8091   PyObject *__pyx_t_1 = NULL;
8092   PyObject *__pyx_t_2 = NULL;
8093   PyObject *__pyx_t_3 = NULL;
8094   __Pyx_SetupRefcountContext("__rshift__");
8095
8096   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":741
8097  * 
8098  *     def __rshift__(self, other):
8099  *         return _numericValueOf(self) >> _numericValueOf(other)             # <<<<<<<<<<<<<<
8100  * 
8101  *     def __and__(self, other):
8102  */
8103   __Pyx_XDECREF(__pyx_r);
8104   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8105   __Pyx_GOTREF(__pyx_t_1);
8106   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8107   __Pyx_GOTREF(__pyx_t_2);
8108   __pyx_t_3 = PyNumber_Rshift(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8109   __Pyx_GOTREF(__pyx_t_3);
8110   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8111   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8112   __pyx_r = __pyx_t_3;
8113   __pyx_t_3 = 0;
8114   goto __pyx_L0;
8115
8116   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8117   goto __pyx_L0;
8118   __pyx_L1_error:;
8119   __Pyx_XDECREF(__pyx_t_1);
8120   __Pyx_XDECREF(__pyx_t_2);
8121   __Pyx_XDECREF(__pyx_t_3);
8122   __Pyx_AddTraceback("lxml.objectify.NumberElement.__rshift__");
8123   __pyx_r = NULL;
8124   __pyx_L0:;
8125   __Pyx_XGIVEREF(__pyx_r);
8126   __Pyx_FinishRefcountContext();
8127   return __pyx_r;
8128 }
8129
8130 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":743
8131  *         return _numericValueOf(self) >> _numericValueOf(other)
8132  * 
8133  *     def __and__(self, other):             # <<<<<<<<<<<<<<
8134  *         return _numericValueOf(self) & _numericValueOf(other)
8135  * 
8136  */
8137
8138 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8139 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8140   PyObject *__pyx_r = NULL;
8141   PyObject *__pyx_t_1 = NULL;
8142   PyObject *__pyx_t_2 = NULL;
8143   PyObject *__pyx_t_3 = NULL;
8144   __Pyx_SetupRefcountContext("__and__");
8145
8146   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":744
8147  * 
8148  *     def __and__(self, other):
8149  *         return _numericValueOf(self) & _numericValueOf(other)             # <<<<<<<<<<<<<<
8150  * 
8151  *     def __or__(self, other):
8152  */
8153   __Pyx_XDECREF(__pyx_r);
8154   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8155   __Pyx_GOTREF(__pyx_t_1);
8156   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8157   __Pyx_GOTREF(__pyx_t_2);
8158   __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8159   __Pyx_GOTREF(__pyx_t_3);
8160   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8161   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8162   __pyx_r = __pyx_t_3;
8163   __pyx_t_3 = 0;
8164   goto __pyx_L0;
8165
8166   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8167   goto __pyx_L0;
8168   __pyx_L1_error:;
8169   __Pyx_XDECREF(__pyx_t_1);
8170   __Pyx_XDECREF(__pyx_t_2);
8171   __Pyx_XDECREF(__pyx_t_3);
8172   __Pyx_AddTraceback("lxml.objectify.NumberElement.__and__");
8173   __pyx_r = NULL;
8174   __pyx_L0:;
8175   __Pyx_XGIVEREF(__pyx_r);
8176   __Pyx_FinishRefcountContext();
8177   return __pyx_r;
8178 }
8179
8180 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":746
8181  *         return _numericValueOf(self) & _numericValueOf(other)
8182  * 
8183  *     def __or__(self, other):             # <<<<<<<<<<<<<<
8184  *         return _numericValueOf(self) | _numericValueOf(other)
8185  * 
8186  */
8187
8188 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8189 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8190   PyObject *__pyx_r = NULL;
8191   PyObject *__pyx_t_1 = NULL;
8192   PyObject *__pyx_t_2 = NULL;
8193   PyObject *__pyx_t_3 = NULL;
8194   __Pyx_SetupRefcountContext("__or__");
8195
8196   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":747
8197  * 
8198  *     def __or__(self, other):
8199  *         return _numericValueOf(self) | _numericValueOf(other)             # <<<<<<<<<<<<<<
8200  * 
8201  *     def __xor__(self, other):
8202  */
8203   __Pyx_XDECREF(__pyx_r);
8204   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8205   __Pyx_GOTREF(__pyx_t_1);
8206   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8207   __Pyx_GOTREF(__pyx_t_2);
8208   __pyx_t_3 = PyNumber_Or(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8209   __Pyx_GOTREF(__pyx_t_3);
8210   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8211   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8212   __pyx_r = __pyx_t_3;
8213   __pyx_t_3 = 0;
8214   goto __pyx_L0;
8215
8216   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8217   goto __pyx_L0;
8218   __pyx_L1_error:;
8219   __Pyx_XDECREF(__pyx_t_1);
8220   __Pyx_XDECREF(__pyx_t_2);
8221   __Pyx_XDECREF(__pyx_t_3);
8222   __Pyx_AddTraceback("lxml.objectify.NumberElement.__or__");
8223   __pyx_r = NULL;
8224   __pyx_L0:;
8225   __Pyx_XGIVEREF(__pyx_r);
8226   __Pyx_FinishRefcountContext();
8227   return __pyx_r;
8228 }
8229
8230 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":749
8231  *         return _numericValueOf(self) | _numericValueOf(other)
8232  * 
8233  *     def __xor__(self, other):             # <<<<<<<<<<<<<<
8234  *         return _numericValueOf(self) ^ _numericValueOf(other)
8235  * 
8236  */
8237
8238 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8239 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8240   PyObject *__pyx_r = NULL;
8241   PyObject *__pyx_t_1 = NULL;
8242   PyObject *__pyx_t_2 = NULL;
8243   PyObject *__pyx_t_3 = NULL;
8244   __Pyx_SetupRefcountContext("__xor__");
8245
8246   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":750
8247  * 
8248  *     def __xor__(self, other):
8249  *         return _numericValueOf(self) ^ _numericValueOf(other)             # <<<<<<<<<<<<<<
8250  * 
8251  * cdef class IntElement(NumberElement):
8252  */
8253   __Pyx_XDECREF(__pyx_r);
8254   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8255   __Pyx_GOTREF(__pyx_t_1);
8256   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8257   __Pyx_GOTREF(__pyx_t_2);
8258   __pyx_t_3 = PyNumber_Xor(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8259   __Pyx_GOTREF(__pyx_t_3);
8260   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8261   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8262   __pyx_r = __pyx_t_3;
8263   __pyx_t_3 = 0;
8264   goto __pyx_L0;
8265
8266   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8267   goto __pyx_L0;
8268   __pyx_L1_error:;
8269   __Pyx_XDECREF(__pyx_t_1);
8270   __Pyx_XDECREF(__pyx_t_2);
8271   __Pyx_XDECREF(__pyx_t_3);
8272   __Pyx_AddTraceback("lxml.objectify.NumberElement.__xor__");
8273   __pyx_r = NULL;
8274   __pyx_L0:;
8275   __Pyx_XGIVEREF(__pyx_r);
8276   __Pyx_FinishRefcountContext();
8277   return __pyx_r;
8278 }
8279
8280 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":753
8281  * 
8282  * cdef class IntElement(NumberElement):
8283  *     def _init(self):             # <<<<<<<<<<<<<<
8284  *         self._parse_value = int
8285  * 
8286  */
8287
8288 static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
8289 static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(PyObject *__pyx_v_self, PyObject *unused) {
8290   PyObject *__pyx_r = NULL;
8291   __Pyx_SetupRefcountContext("_init");
8292
8293   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":754
8294  * cdef class IntElement(NumberElement):
8295  *     def _init(self):
8296  *         self._parse_value = int             # <<<<<<<<<<<<<<
8297  * 
8298  * cdef class LongElement(NumberElement):
8299  */
8300   __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
8301   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
8302   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self)->__pyx_base._parse_value);
8303   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self)->__pyx_base._parse_value);
8304   ((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self)->__pyx_base._parse_value = ((PyObject *)((PyObject*)&PyInt_Type));
8305
8306   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8307   __Pyx_XGIVEREF(__pyx_r);
8308   __Pyx_FinishRefcountContext();
8309   return __pyx_r;
8310 }
8311
8312 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":757
8313  * 
8314  * cdef class LongElement(NumberElement):
8315  *     def _init(self):             # <<<<<<<<<<<<<<
8316  *         self._parse_value = long
8317  * 
8318  */
8319
8320 static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
8321 static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(PyObject *__pyx_v_self, PyObject *unused) {
8322   PyObject *__pyx_r = NULL;
8323   __Pyx_SetupRefcountContext("_init");
8324
8325   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":758
8326  * cdef class LongElement(NumberElement):
8327  *     def _init(self):
8328  *         self._parse_value = long             # <<<<<<<<<<<<<<
8329  * 
8330  * cdef class FloatElement(NumberElement):
8331  */
8332   __Pyx_INCREF(((PyObject *)((PyObject*)&PyLong_Type)));
8333   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyLong_Type)));
8334   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self)->__pyx_base._parse_value);
8335   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self)->__pyx_base._parse_value);
8336   ((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self)->__pyx_base._parse_value = ((PyObject *)((PyObject*)&PyLong_Type));
8337
8338   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8339   __Pyx_XGIVEREF(__pyx_r);
8340   __Pyx_FinishRefcountContext();
8341   return __pyx_r;
8342 }
8343
8344 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":761
8345  * 
8346  * cdef class FloatElement(NumberElement):
8347  *     def _init(self):             # <<<<<<<<<<<<<<
8348  *         self._parse_value = float
8349  * 
8350  */
8351
8352 static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
8353 static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(PyObject *__pyx_v_self, PyObject *unused) {
8354   PyObject *__pyx_r = NULL;
8355   __Pyx_SetupRefcountContext("_init");
8356
8357   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":762
8358  * cdef class FloatElement(NumberElement):
8359  *     def _init(self):
8360  *         self._parse_value = float             # <<<<<<<<<<<<<<
8361  * 
8362  * cdef class StringElement(ObjectifiedDataElement):
8363  */
8364   __Pyx_INCREF(((PyObject *)((PyObject*)&PyFloat_Type)));
8365   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyFloat_Type)));
8366   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self)->__pyx_base._parse_value);
8367   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self)->__pyx_base._parse_value);
8368   ((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self)->__pyx_base._parse_value = ((PyObject *)((PyObject*)&PyFloat_Type));
8369
8370   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8371   __Pyx_XGIVEREF(__pyx_r);
8372   __Pyx_FinishRefcountContext();
8373   return __pyx_r;
8374 }
8375
8376 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":772
8377  *     """
8378  *     property pyval:
8379  *         def __get__(self):             # <<<<<<<<<<<<<<
8380  *             return textOf(self._c_node) or u''
8381  * 
8382  */
8383
8384 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
8385 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(PyObject *__pyx_v_self) {
8386   PyObject *__pyx_r = NULL;
8387   PyObject *__pyx_t_1 = NULL;
8388   int __pyx_t_2;
8389   PyObject *__pyx_t_3 = NULL;
8390   __Pyx_SetupRefcountContext("__get__");
8391
8392   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":773
8393  *     property pyval:
8394  *         def __get__(self):
8395  *             return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
8396  * 
8397  *     def __repr__(self):
8398  */
8399   __Pyx_XDECREF(__pyx_r);
8400   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8401   __Pyx_GOTREF(__pyx_t_1);
8402   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8403   if (!__pyx_t_2) {
8404     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8405     __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
8406     __pyx_t_3 = __pyx_kp_u_4;
8407   } else {
8408     __pyx_t_3 = __pyx_t_1;
8409     __pyx_t_1 = 0;
8410   }
8411   __pyx_r = __pyx_t_3;
8412   __pyx_t_3 = 0;
8413   goto __pyx_L0;
8414
8415   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8416   goto __pyx_L0;
8417   __pyx_L1_error:;
8418   __Pyx_XDECREF(__pyx_t_1);
8419   __Pyx_XDECREF(__pyx_t_3);
8420   __Pyx_AddTraceback("lxml.objectify.StringElement.pyval.__get__");
8421   __pyx_r = NULL;
8422   __pyx_L0:;
8423   __Pyx_XGIVEREF(__pyx_r);
8424   __Pyx_FinishRefcountContext();
8425   return __pyx_r;
8426 }
8427
8428 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":775
8429  *             return textOf(self._c_node) or u''
8430  * 
8431  *     def __repr__(self):             # <<<<<<<<<<<<<<
8432  *         return repr(textOf(self._c_node) or u'')
8433  * 
8434  */
8435
8436 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(PyObject *__pyx_v_self); /*proto*/
8437 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(PyObject *__pyx_v_self) {
8438   PyObject *__pyx_r = NULL;
8439   PyObject *__pyx_t_1 = NULL;
8440   int __pyx_t_2;
8441   PyObject *__pyx_t_3 = NULL;
8442   __Pyx_SetupRefcountContext("__repr__");
8443
8444   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":776
8445  * 
8446  *     def __repr__(self):
8447  *         return repr(textOf(self._c_node) or u'')             # <<<<<<<<<<<<<<
8448  * 
8449  *     def strlen(self):
8450  */
8451   __Pyx_XDECREF(__pyx_r);
8452   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8453   __Pyx_GOTREF(__pyx_t_1);
8454   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8455   if (!__pyx_t_2) {
8456     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8457     __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
8458     __pyx_t_3 = __pyx_kp_u_4;
8459   } else {
8460     __pyx_t_3 = __pyx_t_1;
8461     __pyx_t_1 = 0;
8462   }
8463   __pyx_t_1 = PyObject_Repr(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8464   __Pyx_GOTREF(__pyx_t_1);
8465   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8466   __pyx_r = __pyx_t_1;
8467   __pyx_t_1 = 0;
8468   goto __pyx_L0;
8469
8470   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8471   goto __pyx_L0;
8472   __pyx_L1_error:;
8473   __Pyx_XDECREF(__pyx_t_1);
8474   __Pyx_XDECREF(__pyx_t_3);
8475   __Pyx_AddTraceback("lxml.objectify.StringElement.__repr__");
8476   __pyx_r = NULL;
8477   __pyx_L0:;
8478   __Pyx_XGIVEREF(__pyx_r);
8479   __Pyx_FinishRefcountContext();
8480   return __pyx_r;
8481 }
8482
8483 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":778
8484  *         return repr(textOf(self._c_node) or u'')
8485  * 
8486  *     def strlen(self):             # <<<<<<<<<<<<<<
8487  *         text = textOf(self._c_node)
8488  *         if text is None:
8489  */
8490
8491 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_strlen(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
8492 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_strlen(PyObject *__pyx_v_self, PyObject *unused) {
8493   PyObject *__pyx_v_text;
8494   PyObject *__pyx_r = NULL;
8495   PyObject *__pyx_t_1 = NULL;
8496   int __pyx_t_2;
8497   Py_ssize_t __pyx_t_3;
8498   __Pyx_SetupRefcountContext("strlen");
8499   __Pyx_INCREF((PyObject *)__pyx_v_self);
8500   __pyx_v_text = Py_None; __Pyx_INCREF(Py_None);
8501
8502   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":779
8503  * 
8504  *     def strlen(self):
8505  *         text = textOf(self._c_node)             # <<<<<<<<<<<<<<
8506  *         if text is None:
8507  *             return 0
8508  */
8509   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8510   __Pyx_GOTREF(__pyx_t_1);
8511   __Pyx_DECREF(__pyx_v_text);
8512   __pyx_v_text = __pyx_t_1;
8513   __pyx_t_1 = 0;
8514
8515   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":780
8516  *     def strlen(self):
8517  *         text = textOf(self._c_node)
8518  *         if text is None:             # <<<<<<<<<<<<<<
8519  *             return 0
8520  *         else:
8521  */
8522   __pyx_t_2 = (__pyx_v_text == Py_None);
8523   if (__pyx_t_2) {
8524
8525     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":781
8526  *         text = textOf(self._c_node)
8527  *         if text is None:
8528  *             return 0             # <<<<<<<<<<<<<<
8529  *         else:
8530  *             return len(text)
8531  */
8532     __Pyx_XDECREF(__pyx_r);
8533     __Pyx_INCREF(__pyx_int_0);
8534     __pyx_r = __pyx_int_0;
8535     goto __pyx_L0;
8536     goto __pyx_L5;
8537   }
8538   /*else*/ {
8539
8540     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":783
8541  *             return 0
8542  *         else:
8543  *             return len(text)             # <<<<<<<<<<<<<<
8544  * 
8545  *     def __nonzero__(self):
8546  */
8547     __Pyx_XDECREF(__pyx_r);
8548     __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8549     __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8550     __Pyx_GOTREF(__pyx_t_1);
8551     __pyx_r = __pyx_t_1;
8552     __pyx_t_1 = 0;
8553     goto __pyx_L0;
8554   }
8555   __pyx_L5:;
8556
8557   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8558   goto __pyx_L0;
8559   __pyx_L1_error:;
8560   __Pyx_XDECREF(__pyx_t_1);
8561   __Pyx_AddTraceback("lxml.objectify.StringElement.strlen");
8562   __pyx_r = NULL;
8563   __pyx_L0:;
8564   __Pyx_DECREF(__pyx_v_text);
8565   __Pyx_DECREF((PyObject *)__pyx_v_self);
8566   __Pyx_XGIVEREF(__pyx_r);
8567   __Pyx_FinishRefcountContext();
8568   return __pyx_r;
8569 }
8570
8571 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":785
8572  *             return len(text)
8573  * 
8574  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
8575  *         text = textOf(self._c_node)
8576  *         if text is None:
8577  */
8578
8579 static int __pyx_pf_4lxml_9objectify_13StringElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
8580 static int __pyx_pf_4lxml_9objectify_13StringElement___nonzero__(PyObject *__pyx_v_self) {
8581   PyObject *__pyx_v_text;
8582   int __pyx_r;
8583   PyObject *__pyx_t_1 = NULL;
8584   int __pyx_t_2;
8585   Py_ssize_t __pyx_t_3;
8586   __Pyx_SetupRefcountContext("__nonzero__");
8587   __Pyx_INCREF((PyObject *)__pyx_v_self);
8588   __pyx_v_text = Py_None; __Pyx_INCREF(Py_None);
8589
8590   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":786
8591  * 
8592  *     def __nonzero__(self):
8593  *         text = textOf(self._c_node)             # <<<<<<<<<<<<<<
8594  *         if text is None:
8595  *             return False
8596  */
8597   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8598   __Pyx_GOTREF(__pyx_t_1);
8599   __Pyx_DECREF(__pyx_v_text);
8600   __pyx_v_text = __pyx_t_1;
8601   __pyx_t_1 = 0;
8602
8603   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":787
8604  *     def __nonzero__(self):
8605  *         text = textOf(self._c_node)
8606  *         if text is None:             # <<<<<<<<<<<<<<
8607  *             return False
8608  *         return len(text) > 0
8609  */
8610   __pyx_t_2 = (__pyx_v_text == Py_None);
8611   if (__pyx_t_2) {
8612
8613     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":788
8614  *         text = textOf(self._c_node)
8615  *         if text is None:
8616  *             return False             # <<<<<<<<<<<<<<
8617  *         return len(text) > 0
8618  * 
8619  */
8620     __pyx_r = 0;
8621     goto __pyx_L0;
8622     goto __pyx_L5;
8623   }
8624   __pyx_L5:;
8625
8626   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":789
8627  *         if text is None:
8628  *             return False
8629  *         return len(text) > 0             # <<<<<<<<<<<<<<
8630  * 
8631  *     def __richcmp__(self, other, int op):
8632  */
8633   __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8634   __pyx_r = (__pyx_t_3 > 0);
8635   goto __pyx_L0;
8636
8637   __pyx_r = 0;
8638   goto __pyx_L0;
8639   __pyx_L1_error:;
8640   __Pyx_XDECREF(__pyx_t_1);
8641   __Pyx_AddTraceback("lxml.objectify.StringElement.__nonzero__");
8642   __pyx_r = -1;
8643   __pyx_L0:;
8644   __Pyx_DECREF(__pyx_v_text);
8645   __Pyx_DECREF((PyObject *)__pyx_v_self);
8646   __Pyx_FinishRefcountContext();
8647   return __pyx_r;
8648 }
8649
8650 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":791
8651  *         return len(text) > 0
8652  * 
8653  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
8654  *         return _richcmpPyvals(self, other, op)
8655  * 
8656  */
8657
8658 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
8659 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
8660   PyObject *__pyx_r = NULL;
8661   PyObject *__pyx_t_1 = NULL;
8662   __Pyx_SetupRefcountContext("__richcmp__");
8663
8664   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":792
8665  * 
8666  *     def __richcmp__(self, other, int op):
8667  *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
8668  * 
8669  *     def __add__(self, other):
8670  */
8671   __Pyx_XDECREF(__pyx_r);
8672   __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(__pyx_v_self, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8673   __Pyx_GOTREF(__pyx_t_1);
8674   __pyx_r = __pyx_t_1;
8675   __pyx_t_1 = 0;
8676   goto __pyx_L0;
8677
8678   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8679   goto __pyx_L0;
8680   __pyx_L1_error:;
8681   __Pyx_XDECREF(__pyx_t_1);
8682   __Pyx_AddTraceback("lxml.objectify.StringElement.__richcmp__");
8683   __pyx_r = NULL;
8684   __pyx_L0:;
8685   __Pyx_XGIVEREF(__pyx_r);
8686   __Pyx_FinishRefcountContext();
8687   return __pyx_r;
8688 }
8689
8690 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":794
8691  *         return _richcmpPyvals(self, other, op)
8692  * 
8693  *     def __add__(self, other):             # <<<<<<<<<<<<<<
8694  *         text  = _strValueOf(self)
8695  *         other = _strValueOf(other)
8696  */
8697
8698 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8699 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8700   PyObject *__pyx_v_text;
8701   PyObject *__pyx_r = NULL;
8702   PyObject *__pyx_t_1 = NULL;
8703   int __pyx_t_2;
8704   __Pyx_SetupRefcountContext("__add__");
8705   __Pyx_INCREF(__pyx_v_self);
8706   __Pyx_INCREF(__pyx_v_other);
8707   __pyx_v_text = Py_None; __Pyx_INCREF(Py_None);
8708
8709   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":795
8710  * 
8711  *     def __add__(self, other):
8712  *         text  = _strValueOf(self)             # <<<<<<<<<<<<<<
8713  *         other = _strValueOf(other)
8714  *         if text is None:
8715  */
8716   __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8717   __Pyx_GOTREF(__pyx_t_1);
8718   __Pyx_DECREF(__pyx_v_text);
8719   __pyx_v_text = __pyx_t_1;
8720   __pyx_t_1 = 0;
8721
8722   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":796
8723  *     def __add__(self, other):
8724  *         text  = _strValueOf(self)
8725  *         other = _strValueOf(other)             # <<<<<<<<<<<<<<
8726  *         if text is None:
8727  *             return other
8728  */
8729   __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_other); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8730   __Pyx_GOTREF(__pyx_t_1);
8731   __Pyx_DECREF(__pyx_v_other);
8732   __pyx_v_other = __pyx_t_1;
8733   __pyx_t_1 = 0;
8734
8735   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":797
8736  *         text  = _strValueOf(self)
8737  *         other = _strValueOf(other)
8738  *         if text is None:             # <<<<<<<<<<<<<<
8739  *             return other
8740  *         if other is None:
8741  */
8742   __pyx_t_2 = (__pyx_v_text == Py_None);
8743   if (__pyx_t_2) {
8744
8745     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":798
8746  *         other = _strValueOf(other)
8747  *         if text is None:
8748  *             return other             # <<<<<<<<<<<<<<
8749  *         if other is None:
8750  *             return text
8751  */
8752     __Pyx_XDECREF(__pyx_r);
8753     __Pyx_INCREF(__pyx_v_other);
8754     __pyx_r = __pyx_v_other;
8755     goto __pyx_L0;
8756     goto __pyx_L5;
8757   }
8758   __pyx_L5:;
8759
8760   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":799
8761  *         if text is None:
8762  *             return other
8763  *         if other is None:             # <<<<<<<<<<<<<<
8764  *             return text
8765  *         return text + other
8766  */
8767   __pyx_t_2 = (__pyx_v_other == Py_None);
8768   if (__pyx_t_2) {
8769
8770     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":800
8771  *             return other
8772  *         if other is None:
8773  *             return text             # <<<<<<<<<<<<<<
8774  *         return text + other
8775  * 
8776  */
8777     __Pyx_XDECREF(__pyx_r);
8778     __Pyx_INCREF(__pyx_v_text);
8779     __pyx_r = __pyx_v_text;
8780     goto __pyx_L0;
8781     goto __pyx_L6;
8782   }
8783   __pyx_L6:;
8784
8785   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":801
8786  *         if other is None:
8787  *             return text
8788  *         return text + other             # <<<<<<<<<<<<<<
8789  * 
8790  *     def __mul__(self, other):
8791  */
8792   __Pyx_XDECREF(__pyx_r);
8793   __pyx_t_1 = PyNumber_Add(__pyx_v_text, __pyx_v_other); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8794   __Pyx_GOTREF(__pyx_t_1);
8795   __pyx_r = __pyx_t_1;
8796   __pyx_t_1 = 0;
8797   goto __pyx_L0;
8798
8799   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8800   goto __pyx_L0;
8801   __pyx_L1_error:;
8802   __Pyx_XDECREF(__pyx_t_1);
8803   __Pyx_AddTraceback("lxml.objectify.StringElement.__add__");
8804   __pyx_r = NULL;
8805   __pyx_L0:;
8806   __Pyx_DECREF(__pyx_v_text);
8807   __Pyx_DECREF(__pyx_v_self);
8808   __Pyx_DECREF(__pyx_v_other);
8809   __Pyx_XGIVEREF(__pyx_r);
8810   __Pyx_FinishRefcountContext();
8811   return __pyx_r;
8812 }
8813
8814 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":803
8815  *         return text + other
8816  * 
8817  *     def __mul__(self, other):             # <<<<<<<<<<<<<<
8818  *         if isinstance(self, StringElement):
8819  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
8820  */
8821
8822 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8823 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8824   PyObject *__pyx_r = NULL;
8825   int __pyx_t_1;
8826   PyObject *__pyx_t_2 = NULL;
8827   PyObject *__pyx_t_3 = NULL;
8828   PyObject *__pyx_t_4 = NULL;
8829   __Pyx_SetupRefcountContext("__mul__");
8830   __Pyx_INCREF(__pyx_v_self);
8831   __Pyx_INCREF(__pyx_v_other);
8832
8833   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":804
8834  * 
8835  *     def __mul__(self, other):
8836  *         if isinstance(self, StringElement):             # <<<<<<<<<<<<<<
8837  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
8838  *         elif isinstance(other, StringElement):
8839  */
8840   __pyx_t_1 = PyObject_TypeCheck(__pyx_v_self, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement))); 
8841   if (__pyx_t_1) {
8842
8843     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":805
8844  *     def __mul__(self, other):
8845  *         if isinstance(self, StringElement):
8846  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)             # <<<<<<<<<<<<<<
8847  *         elif isinstance(other, StringElement):
8848  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
8849  */
8850     __Pyx_XDECREF(__pyx_r);
8851     __pyx_t_2 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8852     __Pyx_GOTREF(__pyx_t_2);
8853     __pyx_t_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8854     __Pyx_GOTREF(__pyx_t_3);
8855     __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8856     __Pyx_GOTREF(__pyx_t_4);
8857     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8858     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8859     __pyx_r = __pyx_t_4;
8860     __pyx_t_4 = 0;
8861     goto __pyx_L0;
8862     goto __pyx_L5;
8863   }
8864
8865   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":806
8866  *         if isinstance(self, StringElement):
8867  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
8868  *         elif isinstance(other, StringElement):             # <<<<<<<<<<<<<<
8869  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
8870  *         else:
8871  */
8872   __pyx_t_1 = PyObject_TypeCheck(__pyx_v_other, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement))); 
8873   if (__pyx_t_1) {
8874
8875     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":807
8876  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
8877  *         elif isinstance(other, StringElement):
8878  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)             # <<<<<<<<<<<<<<
8879  *         else:
8880  *             raise TypeError, u"invalid types for * operator"
8881  */
8882     __Pyx_XDECREF(__pyx_r);
8883     __pyx_t_4 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8884     __Pyx_GOTREF(__pyx_t_4);
8885     __pyx_t_3 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_other)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8886     __Pyx_GOTREF(__pyx_t_3);
8887     __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8888     __Pyx_GOTREF(__pyx_t_2);
8889     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8890     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8891     __pyx_r = __pyx_t_2;
8892     __pyx_t_2 = 0;
8893     goto __pyx_L0;
8894     goto __pyx_L5;
8895   }
8896   /*else*/ {
8897
8898     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":809
8899  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
8900  *         else:
8901  *             raise TypeError, u"invalid types for * operator"             # <<<<<<<<<<<<<<
8902  * 
8903  *     def __mod__(self, other):
8904  */
8905     __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_13), 0);
8906     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8907   }
8908   __pyx_L5:;
8909
8910   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8911   goto __pyx_L0;
8912   __pyx_L1_error:;
8913   __Pyx_XDECREF(__pyx_t_2);
8914   __Pyx_XDECREF(__pyx_t_3);
8915   __Pyx_XDECREF(__pyx_t_4);
8916   __Pyx_AddTraceback("lxml.objectify.StringElement.__mul__");
8917   __pyx_r = NULL;
8918   __pyx_L0:;
8919   __Pyx_DECREF(__pyx_v_self);
8920   __Pyx_DECREF(__pyx_v_other);
8921   __Pyx_XGIVEREF(__pyx_r);
8922   __Pyx_FinishRefcountContext();
8923   return __pyx_r;
8924 }
8925
8926 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":811
8927  *             raise TypeError, u"invalid types for * operator"
8928  * 
8929  *     def __mod__(self, other):             # <<<<<<<<<<<<<<
8930  *         return _strValueOf(self) % other
8931  * 
8932  */
8933
8934 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8935 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8936   PyObject *__pyx_r = NULL;
8937   PyObject *__pyx_t_1 = NULL;
8938   PyObject *__pyx_t_2 = NULL;
8939   __Pyx_SetupRefcountContext("__mod__");
8940
8941   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":812
8942  * 
8943  *     def __mod__(self, other):
8944  *         return _strValueOf(self) % other             # <<<<<<<<<<<<<<
8945  * 
8946  *     def __int__(self):
8947  */
8948   __Pyx_XDECREF(__pyx_r);
8949   __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8950   __Pyx_GOTREF(__pyx_t_1);
8951   __pyx_t_2 = PyNumber_Remainder(__pyx_t_1, __pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8952   __Pyx_GOTREF(__pyx_t_2);
8953   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8954   __pyx_r = __pyx_t_2;
8955   __pyx_t_2 = 0;
8956   goto __pyx_L0;
8957
8958   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8959   goto __pyx_L0;
8960   __pyx_L1_error:;
8961   __Pyx_XDECREF(__pyx_t_1);
8962   __Pyx_XDECREF(__pyx_t_2);
8963   __Pyx_AddTraceback("lxml.objectify.StringElement.__mod__");
8964   __pyx_r = NULL;
8965   __pyx_L0:;
8966   __Pyx_XGIVEREF(__pyx_r);
8967   __Pyx_FinishRefcountContext();
8968   return __pyx_r;
8969 }
8970
8971 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":814
8972  *         return _strValueOf(self) % other
8973  * 
8974  *     def __int__(self):             # <<<<<<<<<<<<<<
8975  *         return int(textOf(self._c_node))
8976  * 
8977  */
8978
8979 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___int__(PyObject *__pyx_v_self); /*proto*/
8980 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___int__(PyObject *__pyx_v_self) {
8981   PyObject *__pyx_r = NULL;
8982   PyObject *__pyx_t_1 = NULL;
8983   PyObject *__pyx_t_2 = NULL;
8984   __Pyx_SetupRefcountContext("__int__");
8985
8986   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":815
8987  * 
8988  *     def __int__(self):
8989  *         return int(textOf(self._c_node))             # <<<<<<<<<<<<<<
8990  * 
8991  *     def __long__(self):
8992  */
8993   __Pyx_XDECREF(__pyx_r);
8994   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8995   __Pyx_GOTREF(__pyx_t_1);
8996   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8997   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8998   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
8999   __Pyx_GIVEREF(__pyx_t_1);
9000   __pyx_t_1 = 0;
9001   __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9002   __Pyx_GOTREF(__pyx_t_1);
9003   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9004   __pyx_r = __pyx_t_1;
9005   __pyx_t_1 = 0;
9006   goto __pyx_L0;
9007
9008   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9009   goto __pyx_L0;
9010   __pyx_L1_error:;
9011   __Pyx_XDECREF(__pyx_t_1);
9012   __Pyx_XDECREF(__pyx_t_2);
9013   __Pyx_AddTraceback("lxml.objectify.StringElement.__int__");
9014   __pyx_r = NULL;
9015   __pyx_L0:;
9016   __Pyx_XGIVEREF(__pyx_r);
9017   __Pyx_FinishRefcountContext();
9018   return __pyx_r;
9019 }
9020
9021 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":817
9022  *         return int(textOf(self._c_node))
9023  * 
9024  *     def __long__(self):             # <<<<<<<<<<<<<<
9025  *         return long(textOf(self._c_node))
9026  * 
9027  */
9028
9029 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___long__(PyObject *__pyx_v_self); /*proto*/
9030 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___long__(PyObject *__pyx_v_self) {
9031   PyObject *__pyx_r = NULL;
9032   PyObject *__pyx_t_1 = NULL;
9033   PyObject *__pyx_t_2 = NULL;
9034   __Pyx_SetupRefcountContext("__long__");
9035
9036   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":818
9037  * 
9038  *     def __long__(self):
9039  *         return long(textOf(self._c_node))             # <<<<<<<<<<<<<<
9040  * 
9041  *     def __float__(self):
9042  */
9043   __Pyx_XDECREF(__pyx_r);
9044   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9045   __Pyx_GOTREF(__pyx_t_1);
9046   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9047   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
9048   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
9049   __Pyx_GIVEREF(__pyx_t_1);
9050   __pyx_t_1 = 0;
9051   __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyLong_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9052   __Pyx_GOTREF(__pyx_t_1);
9053   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9054   __pyx_r = __pyx_t_1;
9055   __pyx_t_1 = 0;
9056   goto __pyx_L0;
9057
9058   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9059   goto __pyx_L0;
9060   __pyx_L1_error:;
9061   __Pyx_XDECREF(__pyx_t_1);
9062   __Pyx_XDECREF(__pyx_t_2);
9063   __Pyx_AddTraceback("lxml.objectify.StringElement.__long__");
9064   __pyx_r = NULL;
9065   __pyx_L0:;
9066   __Pyx_XGIVEREF(__pyx_r);
9067   __Pyx_FinishRefcountContext();
9068   return __pyx_r;
9069 }
9070
9071 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":820
9072  *         return long(textOf(self._c_node))
9073  * 
9074  *     def __float__(self):             # <<<<<<<<<<<<<<
9075  *         return float(textOf(self._c_node))
9076  * 
9077  */
9078
9079 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___float__(PyObject *__pyx_v_self); /*proto*/
9080 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___float__(PyObject *__pyx_v_self) {
9081   PyObject *__pyx_r = NULL;
9082   PyObject *__pyx_t_1 = NULL;
9083   PyObject *__pyx_t_2 = NULL;
9084   __Pyx_SetupRefcountContext("__float__");
9085
9086   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":821
9087  * 
9088  *     def __float__(self):
9089  *         return float(textOf(self._c_node))             # <<<<<<<<<<<<<<
9090  * 
9091  *     def __complex__(self):
9092  */
9093   __Pyx_XDECREF(__pyx_r);
9094   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9095   __Pyx_GOTREF(__pyx_t_1);
9096   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9097   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
9098   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
9099   __Pyx_GIVEREF(__pyx_t_1);
9100   __pyx_t_1 = 0;
9101   __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyFloat_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9102   __Pyx_GOTREF(__pyx_t_1);
9103   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9104   __pyx_r = __pyx_t_1;
9105   __pyx_t_1 = 0;
9106   goto __pyx_L0;
9107
9108   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9109   goto __pyx_L0;
9110   __pyx_L1_error:;
9111   __Pyx_XDECREF(__pyx_t_1);
9112   __Pyx_XDECREF(__pyx_t_2);
9113   __Pyx_AddTraceback("lxml.objectify.StringElement.__float__");
9114   __pyx_r = NULL;
9115   __pyx_L0:;
9116   __Pyx_XGIVEREF(__pyx_r);
9117   __Pyx_FinishRefcountContext();
9118   return __pyx_r;
9119 }
9120
9121 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":823
9122  *         return float(textOf(self._c_node))
9123  * 
9124  *     def __complex__(self):             # <<<<<<<<<<<<<<
9125  *         return complex(textOf(self._c_node))
9126  * 
9127  */
9128
9129 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___complex__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
9130 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___complex__(PyObject *__pyx_v_self, PyObject *unused) {
9131   PyObject *__pyx_r = NULL;
9132   PyObject *__pyx_t_1 = NULL;
9133   PyObject *__pyx_t_2 = NULL;
9134   __Pyx_SetupRefcountContext("__complex__");
9135
9136   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":824
9137  * 
9138  *     def __complex__(self):
9139  *         return complex(textOf(self._c_node))             # <<<<<<<<<<<<<<
9140  * 
9141  * cdef class NoneElement(ObjectifiedDataElement):
9142  */
9143   __Pyx_XDECREF(__pyx_r);
9144   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9145   __Pyx_GOTREF(__pyx_t_1);
9146   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9147   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
9148   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
9149   __Pyx_GIVEREF(__pyx_t_1);
9150   __pyx_t_1 = 0;
9151   __pyx_t_1 = PyObject_Call(((PyObject*)&PyComplex_Type), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9152   __Pyx_GOTREF(__pyx_t_1);
9153   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9154   __pyx_r = __pyx_t_1;
9155   __pyx_t_1 = 0;
9156   goto __pyx_L0;
9157
9158   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9159   goto __pyx_L0;
9160   __pyx_L1_error:;
9161   __Pyx_XDECREF(__pyx_t_1);
9162   __Pyx_XDECREF(__pyx_t_2);
9163   __Pyx_AddTraceback("lxml.objectify.StringElement.__complex__");
9164   __pyx_r = NULL;
9165   __pyx_L0:;
9166   __Pyx_XGIVEREF(__pyx_r);
9167   __Pyx_FinishRefcountContext();
9168   return __pyx_r;
9169 }
9170
9171 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":827
9172  * 
9173  * cdef class NoneElement(ObjectifiedDataElement):
9174  *     def __str__(self):             # <<<<<<<<<<<<<<
9175  *         return u"None"
9176  * 
9177  */
9178
9179 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(PyObject *__pyx_v_self); /*proto*/
9180 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(PyObject *__pyx_v_self) {
9181   PyObject *__pyx_r = NULL;
9182   __Pyx_SetupRefcountContext("__str__");
9183
9184   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":828
9185  * cdef class NoneElement(ObjectifiedDataElement):
9186  *     def __str__(self):
9187  *         return u"None"             # <<<<<<<<<<<<<<
9188  * 
9189  *     def __repr__(self):
9190  */
9191   __Pyx_XDECREF(__pyx_r);
9192   __Pyx_INCREF(((PyObject *)__pyx_n_u_None));
9193   __pyx_r = ((PyObject *)__pyx_n_u_None);
9194   goto __pyx_L0;
9195
9196   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9197   __pyx_L0:;
9198   __Pyx_XGIVEREF(__pyx_r);
9199   __Pyx_FinishRefcountContext();
9200   return __pyx_r;
9201 }
9202
9203 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":830
9204  *         return u"None"
9205  * 
9206  *     def __repr__(self):             # <<<<<<<<<<<<<<
9207  *         return u"None"
9208  * 
9209  */
9210
9211 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___repr__(PyObject *__pyx_v_self); /*proto*/
9212 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___repr__(PyObject *__pyx_v_self) {
9213   PyObject *__pyx_r = NULL;
9214   __Pyx_SetupRefcountContext("__repr__");
9215
9216   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":831
9217  * 
9218  *     def __repr__(self):
9219  *         return u"None"             # <<<<<<<<<<<<<<
9220  * 
9221  *     def __nonzero__(self):
9222  */
9223   __Pyx_XDECREF(__pyx_r);
9224   __Pyx_INCREF(((PyObject *)__pyx_n_u_None));
9225   __pyx_r = ((PyObject *)__pyx_n_u_None);
9226   goto __pyx_L0;
9227
9228   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9229   __pyx_L0:;
9230   __Pyx_XGIVEREF(__pyx_r);
9231   __Pyx_FinishRefcountContext();
9232   return __pyx_r;
9233 }
9234
9235 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":833
9236  *         return u"None"
9237  * 
9238  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
9239  *         return False
9240  * 
9241  */
9242
9243 static int __pyx_pf_4lxml_9objectify_11NoneElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
9244 static int __pyx_pf_4lxml_9objectify_11NoneElement___nonzero__(PyObject *__pyx_v_self) {
9245   int __pyx_r;
9246   __Pyx_SetupRefcountContext("__nonzero__");
9247
9248   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":834
9249  * 
9250  *     def __nonzero__(self):
9251  *         return False             # <<<<<<<<<<<<<<
9252  * 
9253  *     def __richcmp__(self, other, int op):
9254  */
9255   __pyx_r = 0;
9256   goto __pyx_L0;
9257
9258   __pyx_r = 0;
9259   __pyx_L0:;
9260   __Pyx_FinishRefcountContext();
9261   return __pyx_r;
9262 }
9263
9264 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":836
9265  *         return False
9266  * 
9267  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
9268  *         if other is None or self is None:
9269  *             return python.PyObject_RichCompare(None, None, op)
9270  */
9271
9272 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
9273 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
9274   PyObject *__pyx_r = NULL;
9275   int __pyx_t_1;
9276   int __pyx_t_2;
9277   int __pyx_t_3;
9278   PyObject *__pyx_t_4 = NULL;
9279   __Pyx_SetupRefcountContext("__richcmp__");
9280   __Pyx_INCREF(__pyx_v_self);
9281   __Pyx_INCREF(__pyx_v_other);
9282
9283   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":837
9284  * 
9285  *     def __richcmp__(self, other, int op):
9286  *         if other is None or self is None:             # <<<<<<<<<<<<<<
9287  *             return python.PyObject_RichCompare(None, None, op)
9288  *         if isinstance(self, NoneElement):
9289  */
9290   __pyx_t_1 = (__pyx_v_other == Py_None);
9291   if (!__pyx_t_1) {
9292     __pyx_t_2 = (__pyx_v_self == Py_None);
9293     __pyx_t_3 = __pyx_t_2;
9294   } else {
9295     __pyx_t_3 = __pyx_t_1;
9296   }
9297   if (__pyx_t_3) {
9298
9299     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":838
9300  *     def __richcmp__(self, other, int op):
9301  *         if other is None or self is None:
9302  *             return python.PyObject_RichCompare(None, None, op)             # <<<<<<<<<<<<<<
9303  *         if isinstance(self, NoneElement):
9304  *             return python.PyObject_RichCompare(None, other, op)
9305  */
9306     __Pyx_XDECREF(__pyx_r);
9307     __pyx_t_4 = PyObject_RichCompare(Py_None, Py_None, __pyx_v_op); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9308     __Pyx_GOTREF(__pyx_t_4);
9309     __pyx_r = __pyx_t_4;
9310     __pyx_t_4 = 0;
9311     goto __pyx_L0;
9312     goto __pyx_L5;
9313   }
9314   __pyx_L5:;
9315
9316   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":839
9317  *         if other is None or self is None:
9318  *             return python.PyObject_RichCompare(None, None, op)
9319  *         if isinstance(self, NoneElement):             # <<<<<<<<<<<<<<
9320  *             return python.PyObject_RichCompare(None, other, op)
9321  *         else:
9322  */
9323   __pyx_t_3 = PyObject_TypeCheck(__pyx_v_self, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement))); 
9324   if (__pyx_t_3) {
9325
9326     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":840
9327  *             return python.PyObject_RichCompare(None, None, op)
9328  *         if isinstance(self, NoneElement):
9329  *             return python.PyObject_RichCompare(None, other, op)             # <<<<<<<<<<<<<<
9330  *         else:
9331  *             return python.PyObject_RichCompare(self, None, op)
9332  */
9333     __Pyx_XDECREF(__pyx_r);
9334     __pyx_t_4 = PyObject_RichCompare(Py_None, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9335     __Pyx_GOTREF(__pyx_t_4);
9336     __pyx_r = __pyx_t_4;
9337     __pyx_t_4 = 0;
9338     goto __pyx_L0;
9339     goto __pyx_L6;
9340   }
9341   /*else*/ {
9342
9343     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":842
9344  *             return python.PyObject_RichCompare(None, other, op)
9345  *         else:
9346  *             return python.PyObject_RichCompare(self, None, op)             # <<<<<<<<<<<<<<
9347  * 
9348  *     property pyval:
9349  */
9350     __Pyx_XDECREF(__pyx_r);
9351     __pyx_t_4 = PyObject_RichCompare(__pyx_v_self, Py_None, __pyx_v_op); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9352     __Pyx_GOTREF(__pyx_t_4);
9353     __pyx_r = __pyx_t_4;
9354     __pyx_t_4 = 0;
9355     goto __pyx_L0;
9356   }
9357   __pyx_L6:;
9358
9359   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9360   goto __pyx_L0;
9361   __pyx_L1_error:;
9362   __Pyx_XDECREF(__pyx_t_4);
9363   __Pyx_AddTraceback("lxml.objectify.NoneElement.__richcmp__");
9364   __pyx_r = NULL;
9365   __pyx_L0:;
9366   __Pyx_DECREF(__pyx_v_self);
9367   __Pyx_DECREF(__pyx_v_other);
9368   __Pyx_XGIVEREF(__pyx_r);
9369   __Pyx_FinishRefcountContext();
9370   return __pyx_r;
9371 }
9372
9373 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":845
9374  * 
9375  *     property pyval:
9376  *         def __get__(self):             # <<<<<<<<<<<<<<
9377  *             return None
9378  * 
9379  */
9380
9381 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
9382 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(PyObject *__pyx_v_self) {
9383   PyObject *__pyx_r = NULL;
9384   __Pyx_SetupRefcountContext("__get__");
9385
9386   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":846
9387  *     property pyval:
9388  *         def __get__(self):
9389  *             return None             # <<<<<<<<<<<<<<
9390  * 
9391  * cdef class BoolElement(IntElement):
9392  */
9393   __Pyx_XDECREF(__pyx_r);
9394   __Pyx_INCREF(Py_None);
9395   __pyx_r = Py_None;
9396   goto __pyx_L0;
9397
9398   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9399   __pyx_L0:;
9400   __Pyx_XGIVEREF(__pyx_r);
9401   __Pyx_FinishRefcountContext();
9402   return __pyx_r;
9403 }
9404
9405 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":854
9406  *     Python's bool type.
9407  *     """
9408  *     def _init(self):             # <<<<<<<<<<<<<<
9409  *         self._parse_value = __parseBool
9410  * 
9411  */
9412
9413 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
9414 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(PyObject *__pyx_v_self, PyObject *unused) {
9415   PyObject *__pyx_r = NULL;
9416   PyObject *__pyx_t_1 = NULL;
9417   __Pyx_SetupRefcountContext("_init");
9418
9419   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":855
9420  *     """
9421  *     def _init(self):
9422  *         self._parse_value = __parseBool             # <<<<<<<<<<<<<<
9423  * 
9424  *     def __nonzero__(self):
9425  */
9426   __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_ui___parseBool); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9427   __Pyx_GOTREF(__pyx_t_1);
9428   __Pyx_GIVEREF(__pyx_t_1);
9429   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base._parse_value);
9430   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base._parse_value);
9431   ((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base._parse_value = __pyx_t_1;
9432   __pyx_t_1 = 0;
9433
9434   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9435   goto __pyx_L0;
9436   __pyx_L1_error:;
9437   __Pyx_XDECREF(__pyx_t_1);
9438   __Pyx_AddTraceback("lxml.objectify.BoolElement._init");
9439   __pyx_r = NULL;
9440   __pyx_L0:;
9441   __Pyx_XGIVEREF(__pyx_r);
9442   __Pyx_FinishRefcountContext();
9443   return __pyx_r;
9444 }
9445
9446 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":857
9447  *         self._parse_value = __parseBool
9448  * 
9449  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
9450  *         return __parseBool(textOf(self._c_node))
9451  * 
9452  */
9453
9454 static int __pyx_pf_4lxml_9objectify_11BoolElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
9455 static int __pyx_pf_4lxml_9objectify_11BoolElement___nonzero__(PyObject *__pyx_v_self) {
9456   int __pyx_r;
9457   PyObject *__pyx_t_1 = NULL;
9458   PyObject *__pyx_t_2 = NULL;
9459   int __pyx_t_3;
9460   __Pyx_SetupRefcountContext("__nonzero__");
9461
9462   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":858
9463  * 
9464  *     def __nonzero__(self):
9465  *         return __parseBool(textOf(self._c_node))             # <<<<<<<<<<<<<<
9466  * 
9467  *     def __richcmp__(self, other, int op):
9468  */
9469   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9470   __Pyx_GOTREF(__pyx_t_1);
9471   __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9472   __Pyx_GOTREF(__pyx_t_2);
9473   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9474   __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9475   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9476   __pyx_r = __pyx_t_3;
9477   goto __pyx_L0;
9478
9479   __pyx_r = 0;
9480   goto __pyx_L0;
9481   __pyx_L1_error:;
9482   __Pyx_XDECREF(__pyx_t_1);
9483   __Pyx_XDECREF(__pyx_t_2);
9484   __Pyx_AddTraceback("lxml.objectify.BoolElement.__nonzero__");
9485   __pyx_r = -1;
9486   __pyx_L0:;
9487   __Pyx_FinishRefcountContext();
9488   return __pyx_r;
9489 }
9490
9491 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":860
9492  *         return __parseBool(textOf(self._c_node))
9493  * 
9494  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
9495  *         return _richcmpPyvals(self, other, op)
9496  * 
9497  */
9498
9499 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
9500 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
9501   PyObject *__pyx_r = NULL;
9502   PyObject *__pyx_t_1 = NULL;
9503   __Pyx_SetupRefcountContext("__richcmp__");
9504
9505   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":861
9506  * 
9507  *     def __richcmp__(self, other, int op):
9508  *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
9509  * 
9510  *     def __str__(self):
9511  */
9512   __Pyx_XDECREF(__pyx_r);
9513   __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(__pyx_v_self, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9514   __Pyx_GOTREF(__pyx_t_1);
9515   __pyx_r = __pyx_t_1;
9516   __pyx_t_1 = 0;
9517   goto __pyx_L0;
9518
9519   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9520   goto __pyx_L0;
9521   __pyx_L1_error:;
9522   __Pyx_XDECREF(__pyx_t_1);
9523   __Pyx_AddTraceback("lxml.objectify.BoolElement.__richcmp__");
9524   __pyx_r = NULL;
9525   __pyx_L0:;
9526   __Pyx_XGIVEREF(__pyx_r);
9527   __Pyx_FinishRefcountContext();
9528   return __pyx_r;
9529 }
9530
9531 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":863
9532  *         return _richcmpPyvals(self, other, op)
9533  * 
9534  *     def __str__(self):             # <<<<<<<<<<<<<<
9535  *         return unicode(__parseBool(textOf(self._c_node)))
9536  * 
9537  */
9538
9539 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___str__(PyObject *__pyx_v_self); /*proto*/
9540 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___str__(PyObject *__pyx_v_self) {
9541   PyObject *__pyx_r = NULL;
9542   PyObject *__pyx_t_1 = NULL;
9543   PyObject *__pyx_t_2 = NULL;
9544   __Pyx_SetupRefcountContext("__str__");
9545
9546   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":864
9547  * 
9548  *     def __str__(self):
9549  *         return unicode(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
9550  * 
9551  *     def __repr__(self):
9552  */
9553   __Pyx_XDECREF(__pyx_r);
9554   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9555   __Pyx_GOTREF(__pyx_t_1);
9556   __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9557   __Pyx_GOTREF(__pyx_t_2);
9558   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9559   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9560   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
9561   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
9562   __Pyx_GIVEREF(__pyx_t_2);
9563   __pyx_t_2 = 0;
9564   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9565   __Pyx_GOTREF(__pyx_t_2);
9566   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
9567   __pyx_r = __pyx_t_2;
9568   __pyx_t_2 = 0;
9569   goto __pyx_L0;
9570
9571   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9572   goto __pyx_L0;
9573   __pyx_L1_error:;
9574   __Pyx_XDECREF(__pyx_t_1);
9575   __Pyx_XDECREF(__pyx_t_2);
9576   __Pyx_AddTraceback("lxml.objectify.BoolElement.__str__");
9577   __pyx_r = NULL;
9578   __pyx_L0:;
9579   __Pyx_XGIVEREF(__pyx_r);
9580   __Pyx_FinishRefcountContext();
9581   return __pyx_r;
9582 }
9583
9584 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":866
9585  *         return unicode(__parseBool(textOf(self._c_node)))
9586  * 
9587  *     def __repr__(self):             # <<<<<<<<<<<<<<
9588  *         return repr(__parseBool(textOf(self._c_node)))
9589  * 
9590  */
9591
9592 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___repr__(PyObject *__pyx_v_self); /*proto*/
9593 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___repr__(PyObject *__pyx_v_self) {
9594   PyObject *__pyx_r = NULL;
9595   PyObject *__pyx_t_1 = NULL;
9596   PyObject *__pyx_t_2 = NULL;
9597   __Pyx_SetupRefcountContext("__repr__");
9598
9599   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":867
9600  * 
9601  *     def __repr__(self):
9602  *         return repr(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
9603  * 
9604  *     property pyval:
9605  */
9606   __Pyx_XDECREF(__pyx_r);
9607   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9608   __Pyx_GOTREF(__pyx_t_1);
9609   __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9610   __Pyx_GOTREF(__pyx_t_2);
9611   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9612   __pyx_t_1 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9613   __Pyx_GOTREF(__pyx_t_1);
9614   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9615   __pyx_r = __pyx_t_1;
9616   __pyx_t_1 = 0;
9617   goto __pyx_L0;
9618
9619   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9620   goto __pyx_L0;
9621   __pyx_L1_error:;
9622   __Pyx_XDECREF(__pyx_t_1);
9623   __Pyx_XDECREF(__pyx_t_2);
9624   __Pyx_AddTraceback("lxml.objectify.BoolElement.__repr__");
9625   __pyx_r = NULL;
9626   __pyx_L0:;
9627   __Pyx_XGIVEREF(__pyx_r);
9628   __Pyx_FinishRefcountContext();
9629   return __pyx_r;
9630 }
9631
9632 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":870
9633  * 
9634  *     property pyval:
9635  *         def __get__(self):             # <<<<<<<<<<<<<<
9636  *             return __parseBool(textOf(self._c_node))
9637  * 
9638  */
9639
9640 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
9641 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(PyObject *__pyx_v_self) {
9642   PyObject *__pyx_r = NULL;
9643   PyObject *__pyx_t_1 = NULL;
9644   PyObject *__pyx_t_2 = NULL;
9645   __Pyx_SetupRefcountContext("__get__");
9646
9647   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":871
9648  *     property pyval:
9649  *         def __get__(self):
9650  *             return __parseBool(textOf(self._c_node))             # <<<<<<<<<<<<<<
9651  * 
9652  * def __checkBool(s):
9653  */
9654   __Pyx_XDECREF(__pyx_r);
9655   __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9656   __Pyx_GOTREF(__pyx_t_1);
9657   __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9658   __Pyx_GOTREF(__pyx_t_2);
9659   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9660   __pyx_r = __pyx_t_2;
9661   __pyx_t_2 = 0;
9662   goto __pyx_L0;
9663
9664   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9665   goto __pyx_L0;
9666   __pyx_L1_error:;
9667   __Pyx_XDECREF(__pyx_t_1);
9668   __Pyx_XDECREF(__pyx_t_2);
9669   __Pyx_AddTraceback("lxml.objectify.BoolElement.pyval.__get__");
9670   __pyx_r = NULL;
9671   __pyx_L0:;
9672   __Pyx_XGIVEREF(__pyx_r);
9673   __Pyx_FinishRefcountContext();
9674   return __pyx_r;
9675 }
9676
9677 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":873
9678  *             return __parseBool(textOf(self._c_node))
9679  * 
9680  * def __checkBool(s):             # <<<<<<<<<<<<<<
9681  *     cdef int value = -1
9682  *     if s is not None:
9683  */
9684
9685 static PyObject *__pyx_pf_4lxml_9objectify___checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
9686 static PyObject *__pyx_pf_4lxml_9objectify___checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
9687   int __pyx_v_value;
9688   PyObject *__pyx_r = NULL;
9689   int __pyx_t_1;
9690   __Pyx_SetupRefcountContext("__checkBool");
9691   __pyx_self = __pyx_self;
9692   __Pyx_INCREF(__pyx_v_s);
9693
9694   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":874
9695  * 
9696  * def __checkBool(s):
9697  *     cdef int value = -1             # <<<<<<<<<<<<<<
9698  *     if s is not None:
9699  *         value = __parseBoolAsInt(s)
9700  */
9701   __pyx_v_value = -1;
9702
9703   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":875
9704  * def __checkBool(s):
9705  *     cdef int value = -1
9706  *     if s is not None:             # <<<<<<<<<<<<<<
9707  *         value = __parseBoolAsInt(s)
9708  *     if value == -1:
9709  */
9710   __pyx_t_1 = (__pyx_v_s != Py_None);
9711   if (__pyx_t_1) {
9712
9713     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":876
9714  *     cdef int value = -1
9715  *     if s is not None:
9716  *         value = __parseBoolAsInt(s)             # <<<<<<<<<<<<<<
9717  *     if value == -1:
9718  *         raise ValueError
9719  */
9720     __pyx_v_value = __pyx_f_4lxml_9objectify___parseBoolAsInt(__pyx_v_s);
9721     goto __pyx_L5;
9722   }
9723   __pyx_L5:;
9724
9725   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":877
9726  *     if s is not None:
9727  *         value = __parseBoolAsInt(s)
9728  *     if value == -1:             # <<<<<<<<<<<<<<
9729  *         raise ValueError
9730  * 
9731  */
9732   __pyx_t_1 = (__pyx_v_value == -1);
9733   if (__pyx_t_1) {
9734
9735     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":878
9736  *         value = __parseBoolAsInt(s)
9737  *     if value == -1:
9738  *         raise ValueError             # <<<<<<<<<<<<<<
9739  * 
9740  * cpdef __parseBool(s):
9741  */
9742     __Pyx_Raise(__pyx_builtin_ValueError, 0, 0);
9743     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9744     goto __pyx_L6;
9745   }
9746   __pyx_L6:;
9747
9748   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9749   goto __pyx_L0;
9750   __pyx_L1_error:;
9751   __Pyx_AddTraceback("lxml.objectify.__checkBool");
9752   __pyx_r = NULL;
9753   __pyx_L0:;
9754   __Pyx_DECREF(__pyx_v_s);
9755   __Pyx_XGIVEREF(__pyx_r);
9756   __Pyx_FinishRefcountContext();
9757   return __pyx_r;
9758 }
9759
9760 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":880
9761  *         raise ValueError
9762  * 
9763  * cpdef __parseBool(s):             # <<<<<<<<<<<<<<
9764  *     cdef int value
9765  *     if s is None:
9766  */
9767
9768 static PyObject *__pyx_pf_4lxml_9objectify___parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
9769 static  PyObject *__pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, int __pyx_skip_dispatch) {
9770   int __pyx_v_value;
9771   PyObject *__pyx_r = NULL;
9772   int __pyx_t_1;
9773   PyObject *__pyx_t_2 = NULL;
9774   __Pyx_SetupRefcountContext("__parseBool");
9775   __Pyx_INCREF(__pyx_v_s);
9776
9777   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":882
9778  * cpdef __parseBool(s):
9779  *     cdef int value
9780  *     if s is None:             # <<<<<<<<<<<<<<
9781  *         return False
9782  *     value = __parseBoolAsInt(s)
9783  */
9784   __pyx_t_1 = (__pyx_v_s == Py_None);
9785   if (__pyx_t_1) {
9786
9787     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":883
9788  *     cdef int value
9789  *     if s is None:
9790  *         return False             # <<<<<<<<<<<<<<
9791  *     value = __parseBoolAsInt(s)
9792  *     if value == -1:
9793  */
9794     __Pyx_XDECREF(__pyx_r);
9795     __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9796     __Pyx_GOTREF(__pyx_t_2);
9797     __pyx_r = __pyx_t_2;
9798     __pyx_t_2 = 0;
9799     goto __pyx_L0;
9800     goto __pyx_L3;
9801   }
9802   __pyx_L3:;
9803
9804   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":884
9805  *     if s is None:
9806  *         return False
9807  *     value = __parseBoolAsInt(s)             # <<<<<<<<<<<<<<
9808  *     if value == -1:
9809  *         raise ValueError, u"Invalid boolean value: '%s'" % s
9810  */
9811   __pyx_v_value = __pyx_f_4lxml_9objectify___parseBoolAsInt(__pyx_v_s);
9812
9813   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":885
9814  *         return False
9815  *     value = __parseBoolAsInt(s)
9816  *     if value == -1:             # <<<<<<<<<<<<<<
9817  *         raise ValueError, u"Invalid boolean value: '%s'" % s
9818  *     return <bint>value
9819  */
9820   __pyx_t_1 = (__pyx_v_value == -1);
9821   if (__pyx_t_1) {
9822
9823     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":886
9824  *     value = __parseBoolAsInt(s)
9825  *     if value == -1:
9826  *         raise ValueError, u"Invalid boolean value: '%s'" % s             # <<<<<<<<<<<<<<
9827  *     return <bint>value
9828  * 
9829  */
9830     __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_14), __pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9831     __Pyx_GOTREF(__pyx_t_2);
9832     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_2, 0);
9833     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9834     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9835     goto __pyx_L4;
9836   }
9837   __pyx_L4:;
9838
9839   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":887
9840  *     if value == -1:
9841  *         raise ValueError, u"Invalid boolean value: '%s'" % s
9842  *     return <bint>value             # <<<<<<<<<<<<<<
9843  * 
9844  * cdef inline int __parseBoolAsInt(text):
9845  */
9846   __Pyx_XDECREF(__pyx_r);
9847   __pyx_t_2 = __Pyx_PyBool_FromLong(((int)__pyx_v_value)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9848   __Pyx_GOTREF(__pyx_t_2);
9849   __pyx_r = __pyx_t_2;
9850   __pyx_t_2 = 0;
9851   goto __pyx_L0;
9852
9853   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9854   goto __pyx_L0;
9855   __pyx_L1_error:;
9856   __Pyx_XDECREF(__pyx_t_2);
9857   __Pyx_AddTraceback("lxml.objectify.__parseBool");
9858   __pyx_r = 0;
9859   __pyx_L0:;
9860   __Pyx_DECREF(__pyx_v_s);
9861   __Pyx_XGIVEREF(__pyx_r);
9862   __Pyx_FinishRefcountContext();
9863   return __pyx_r;
9864 }
9865
9866 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":880
9867  *         raise ValueError
9868  * 
9869  * cpdef __parseBool(s):             # <<<<<<<<<<<<<<
9870  *     cdef int value
9871  *     if s is None:
9872  */
9873
9874 static PyObject *__pyx_pf_4lxml_9objectify___parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
9875 static PyObject *__pyx_pf_4lxml_9objectify___parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
9876   PyObject *__pyx_r = NULL;
9877   PyObject *__pyx_t_1 = NULL;
9878   __Pyx_SetupRefcountContext("__parseBool");
9879   __pyx_self = __pyx_self;
9880   __Pyx_XDECREF(__pyx_r);
9881   __pyx_t_1 = __pyx_f_4lxml_9objectify___parseBool(__pyx_v_s, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9882   __Pyx_GOTREF(__pyx_t_1);
9883   __pyx_r = __pyx_t_1;
9884   __pyx_t_1 = 0;
9885   goto __pyx_L0;
9886
9887   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9888   goto __pyx_L0;
9889   __pyx_L1_error:;
9890   __Pyx_XDECREF(__pyx_t_1);
9891   __Pyx_AddTraceback("lxml.objectify.__parseBool");
9892   __pyx_r = NULL;
9893   __pyx_L0:;
9894   __Pyx_XGIVEREF(__pyx_r);
9895   __Pyx_FinishRefcountContext();
9896   return __pyx_r;
9897 }
9898
9899 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":889
9900  *     return <bint>value
9901  * 
9902  * cdef inline int __parseBoolAsInt(text):             # <<<<<<<<<<<<<<
9903  *     if text == u'false':
9904  *         return 0
9905  */
9906
9907 static INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__pyx_v_text) {
9908   int __pyx_r;
9909   PyObject *__pyx_t_1 = NULL;
9910   int __pyx_t_2;
9911   __Pyx_SetupRefcountContext("__parseBoolAsInt");
9912   __Pyx_INCREF(__pyx_v_text);
9913
9914   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":890
9915  * 
9916  * cdef inline int __parseBoolAsInt(text):
9917  *     if text == u'false':             # <<<<<<<<<<<<<<
9918  *         return 0
9919  *     elif text == u'true':
9920  */
9921   __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, ((PyObject *)__pyx_n_u_false), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9922   __Pyx_GOTREF(__pyx_t_1);
9923   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9924   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9925   if (__pyx_t_2) {
9926
9927     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":891
9928  * cdef inline int __parseBoolAsInt(text):
9929  *     if text == u'false':
9930  *         return 0             # <<<<<<<<<<<<<<
9931  *     elif text == u'true':
9932  *         return 1
9933  */
9934     __pyx_r = 0;
9935     goto __pyx_L0;
9936     goto __pyx_L3;
9937   }
9938
9939   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":892
9940  *     if text == u'false':
9941  *         return 0
9942  *     elif text == u'true':             # <<<<<<<<<<<<<<
9943  *         return 1
9944  *     elif text == u'0':
9945  */
9946   __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, ((PyObject *)__pyx_n_u_true), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9947   __Pyx_GOTREF(__pyx_t_1);
9948   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9949   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9950   if (__pyx_t_2) {
9951
9952     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":893
9953  *         return 0
9954  *     elif text == u'true':
9955  *         return 1             # <<<<<<<<<<<<<<
9956  *     elif text == u'0':
9957  *         return 0
9958  */
9959     __pyx_r = 1;
9960     goto __pyx_L0;
9961     goto __pyx_L3;
9962   }
9963
9964   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":894
9965  *     elif text == u'true':
9966  *         return 1
9967  *     elif text == u'0':             # <<<<<<<<<<<<<<
9968  *         return 0
9969  *     elif text == u'1':
9970  */
9971   __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, ((PyObject *)__pyx_kp_u_0), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9972   __Pyx_GOTREF(__pyx_t_1);
9973   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9974   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9975   if (__pyx_t_2) {
9976
9977     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":895
9978  *         return 1
9979  *     elif text == u'0':
9980  *         return 0             # <<<<<<<<<<<<<<
9981  *     elif text == u'1':
9982  *         return 1
9983  */
9984     __pyx_r = 0;
9985     goto __pyx_L0;
9986     goto __pyx_L3;
9987   }
9988
9989   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":896
9990  *     elif text == u'0':
9991  *         return 0
9992  *     elif text == u'1':             # <<<<<<<<<<<<<<
9993  *         return 1
9994  *     return -1
9995  */
9996   __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, ((PyObject *)__pyx_kp_u_15), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9997   __Pyx_GOTREF(__pyx_t_1);
9998   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9999   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10000   if (__pyx_t_2) {
10001
10002     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":897
10003  *         return 0
10004  *     elif text == u'1':
10005  *         return 1             # <<<<<<<<<<<<<<
10006  *     return -1
10007  * 
10008  */
10009     __pyx_r = 1;
10010     goto __pyx_L0;
10011     goto __pyx_L3;
10012   }
10013   __pyx_L3:;
10014
10015   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":898
10016  *     elif text == u'1':
10017  *         return 1
10018  *     return -1             # <<<<<<<<<<<<<<
10019  * 
10020  * cdef inline object _parseNumber(NumberElement element):
10021  */
10022   __pyx_r = -1;
10023   goto __pyx_L0;
10024
10025   __pyx_r = 0;
10026   goto __pyx_L0;
10027   __pyx_L1_error:;
10028   __Pyx_XDECREF(__pyx_t_1);
10029   __Pyx_WriteUnraisable("lxml.objectify.__parseBoolAsInt");
10030   __pyx_r = 0;
10031   __pyx_L0:;
10032   __Pyx_DECREF(__pyx_v_text);
10033   __Pyx_FinishRefcountContext();
10034   return __pyx_r;
10035 }
10036
10037 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":900
10038  *     return -1
10039  * 
10040  * cdef inline object _parseNumber(NumberElement element):             # <<<<<<<<<<<<<<
10041  *     return element._parse_value(textOf(element._c_node))
10042  * 
10043  */
10044
10045 static INLINE PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_element) {
10046   PyObject *__pyx_r = NULL;
10047   PyObject *__pyx_t_1 = NULL;
10048   PyObject *__pyx_t_2 = NULL;
10049   __Pyx_SetupRefcountContext("_parseNumber");
10050
10051   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":901
10052  * 
10053  * cdef inline object _parseNumber(NumberElement element):
10054  *     return element._parse_value(textOf(element._c_node))             # <<<<<<<<<<<<<<
10055  * 
10056  * cdef inline object _strValueOf(obj):
10057  */
10058   __Pyx_XDECREF(__pyx_r);
10059   __pyx_t_1 = textOf(__pyx_v_element->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10060   __Pyx_GOTREF(__pyx_t_1);
10061   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10062   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
10063   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
10064   __Pyx_GIVEREF(__pyx_t_1);
10065   __pyx_t_1 = 0;
10066   __pyx_t_1 = PyObject_Call(__pyx_v_element->_parse_value, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10067   __Pyx_GOTREF(__pyx_t_1);
10068   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
10069   __pyx_r = __pyx_t_1;
10070   __pyx_t_1 = 0;
10071   goto __pyx_L0;
10072
10073   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10074   goto __pyx_L0;
10075   __pyx_L1_error:;
10076   __Pyx_XDECREF(__pyx_t_1);
10077   __Pyx_XDECREF(__pyx_t_2);
10078   __Pyx_AddTraceback("lxml.objectify._parseNumber");
10079   __pyx_r = 0;
10080   __pyx_L0:;
10081   __Pyx_XGIVEREF(__pyx_r);
10082   __Pyx_FinishRefcountContext();
10083   return __pyx_r;
10084 }
10085
10086 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":903
10087  *     return element._parse_value(textOf(element._c_node))
10088  * 
10089  * cdef inline object _strValueOf(obj):             # <<<<<<<<<<<<<<
10090  *     if python._isString(obj):
10091  *         return obj
10092  */
10093
10094 static INLINE PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) {
10095   PyObject *__pyx_r = NULL;
10096   int __pyx_t_1;
10097   PyObject *__pyx_t_2 = NULL;
10098   PyObject *__pyx_t_3 = NULL;
10099   __Pyx_SetupRefcountContext("_strValueOf");
10100   __Pyx_INCREF(__pyx_v_obj);
10101
10102   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":904
10103  * 
10104  * cdef inline object _strValueOf(obj):
10105  *     if python._isString(obj):             # <<<<<<<<<<<<<<
10106  *         return obj
10107  *     if isinstance(obj, _Element):
10108  */
10109   __pyx_t_1 = _isString(__pyx_v_obj);
10110   if (__pyx_t_1) {
10111
10112     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":905
10113  * cdef inline object _strValueOf(obj):
10114  *     if python._isString(obj):
10115  *         return obj             # <<<<<<<<<<<<<<
10116  *     if isinstance(obj, _Element):
10117  *         return textOf((<_Element>obj)._c_node) or u''
10118  */
10119     __Pyx_XDECREF(__pyx_r);
10120     __Pyx_INCREF(__pyx_v_obj);
10121     __pyx_r = __pyx_v_obj;
10122     goto __pyx_L0;
10123     goto __pyx_L3;
10124   }
10125   __pyx_L3:;
10126
10127   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":906
10128  *     if python._isString(obj):
10129  *         return obj
10130  *     if isinstance(obj, _Element):             # <<<<<<<<<<<<<<
10131  *         return textOf((<_Element>obj)._c_node) or u''
10132  *     if obj is None:
10133  */
10134   __pyx_t_1 = PyObject_TypeCheck(__pyx_v_obj, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
10135   if (__pyx_t_1) {
10136
10137     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":907
10138  *         return obj
10139  *     if isinstance(obj, _Element):
10140  *         return textOf((<_Element>obj)._c_node) or u''             # <<<<<<<<<<<<<<
10141  *     if obj is None:
10142  *         return u''
10143  */
10144     __Pyx_XDECREF(__pyx_r);
10145     __pyx_t_2 = textOf(((struct LxmlElement *)__pyx_v_obj)->_c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10146     __Pyx_GOTREF(__pyx_t_2);
10147     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10148     if (!__pyx_t_1) {
10149       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10150       __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
10151       __pyx_t_3 = __pyx_kp_u_4;
10152     } else {
10153       __pyx_t_3 = __pyx_t_2;
10154       __pyx_t_2 = 0;
10155     }
10156     __pyx_r = __pyx_t_3;
10157     __pyx_t_3 = 0;
10158     goto __pyx_L0;
10159     goto __pyx_L4;
10160   }
10161   __pyx_L4:;
10162
10163   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":908
10164  *     if isinstance(obj, _Element):
10165  *         return textOf((<_Element>obj)._c_node) or u''
10166  *     if obj is None:             # <<<<<<<<<<<<<<
10167  *         return u''
10168  *     return unicode(obj)
10169  */
10170   __pyx_t_1 = (__pyx_v_obj == Py_None);
10171   if (__pyx_t_1) {
10172
10173     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":909
10174  *         return textOf((<_Element>obj)._c_node) or u''
10175  *     if obj is None:
10176  *         return u''             # <<<<<<<<<<<<<<
10177  *     return unicode(obj)
10178  * 
10179  */
10180     __Pyx_XDECREF(__pyx_r);
10181     __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
10182     __pyx_r = ((PyObject *)__pyx_kp_u_4);
10183     goto __pyx_L0;
10184     goto __pyx_L5;
10185   }
10186   __pyx_L5:;
10187
10188   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":910
10189  *     if obj is None:
10190  *         return u''
10191  *     return unicode(obj)             # <<<<<<<<<<<<<<
10192  * 
10193  * cdef inline object _numericValueOf(obj):
10194  */
10195   __Pyx_XDECREF(__pyx_r);
10196   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10197   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
10198   __Pyx_INCREF(__pyx_v_obj);
10199   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_obj);
10200   __Pyx_GIVEREF(__pyx_v_obj);
10201   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10202   __Pyx_GOTREF(__pyx_t_2);
10203   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
10204   __pyx_r = __pyx_t_2;
10205   __pyx_t_2 = 0;
10206   goto __pyx_L0;
10207
10208   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10209   goto __pyx_L0;
10210   __pyx_L1_error:;
10211   __Pyx_XDECREF(__pyx_t_2);
10212   __Pyx_XDECREF(__pyx_t_3);
10213   __Pyx_AddTraceback("lxml.objectify._strValueOf");
10214   __pyx_r = 0;
10215   __pyx_L0:;
10216   __Pyx_DECREF(__pyx_v_obj);
10217   __Pyx_XGIVEREF(__pyx_r);
10218   __Pyx_FinishRefcountContext();
10219   return __pyx_r;
10220 }
10221
10222 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":912
10223  *     return unicode(obj)
10224  * 
10225  * cdef inline object _numericValueOf(obj):             # <<<<<<<<<<<<<<
10226  *     if isinstance(obj, NumberElement):
10227  *         return _parseNumber(<NumberElement>obj)
10228  */
10229
10230 static INLINE PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) {
10231   PyObject *__pyx_r = NULL;
10232   int __pyx_t_1;
10233   PyObject *__pyx_t_2 = NULL;
10234   __Pyx_SetupRefcountContext("_numericValueOf");
10235   __Pyx_INCREF(__pyx_v_obj);
10236
10237   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":913
10238  * 
10239  * cdef inline object _numericValueOf(obj):
10240  *     if isinstance(obj, NumberElement):             # <<<<<<<<<<<<<<
10241  *         return _parseNumber(<NumberElement>obj)
10242  *     elif hasattr(obj, u'pyval'):
10243  */
10244   __pyx_t_1 = PyObject_TypeCheck(__pyx_v_obj, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NumberElement))); 
10245   if (__pyx_t_1) {
10246
10247     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":914
10248  * cdef inline object _numericValueOf(obj):
10249  *     if isinstance(obj, NumberElement):
10250  *         return _parseNumber(<NumberElement>obj)             # <<<<<<<<<<<<<<
10251  *     elif hasattr(obj, u'pyval'):
10252  *         # not always numeric, but Python will raise the right exception
10253  */
10254     __Pyx_XDECREF(__pyx_r);
10255     __pyx_t_2 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_obj)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10256     __Pyx_GOTREF(__pyx_t_2);
10257     __pyx_r = __pyx_t_2;
10258     __pyx_t_2 = 0;
10259     goto __pyx_L0;
10260     goto __pyx_L3;
10261   }
10262
10263   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":915
10264  *     if isinstance(obj, NumberElement):
10265  *         return _parseNumber(<NumberElement>obj)
10266  *     elif hasattr(obj, u'pyval'):             # <<<<<<<<<<<<<<
10267  *         # not always numeric, but Python will raise the right exception
10268  *         return obj.pyval
10269  */
10270   __pyx_t_1 = PyObject_HasAttr(__pyx_v_obj, ((PyObject *)__pyx_n_u_pyval)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10271   if (__pyx_t_1) {
10272
10273     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":917
10274  *     elif hasattr(obj, u'pyval'):
10275  *         # not always numeric, but Python will raise the right exception
10276  *         return obj.pyval             # <<<<<<<<<<<<<<
10277  *     return obj
10278  * 
10279  */
10280     __Pyx_XDECREF(__pyx_r);
10281     __pyx_t_2 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_ui_pyval); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10282     __Pyx_GOTREF(__pyx_t_2);
10283     __pyx_r = __pyx_t_2;
10284     __pyx_t_2 = 0;
10285     goto __pyx_L0;
10286     goto __pyx_L3;
10287   }
10288   __pyx_L3:;
10289
10290   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":918
10291  *         # not always numeric, but Python will raise the right exception
10292  *         return obj.pyval
10293  *     return obj             # <<<<<<<<<<<<<<
10294  * 
10295  * cdef inline _richcmpPyvals(left, right, int op):
10296  */
10297   __Pyx_XDECREF(__pyx_r);
10298   __Pyx_INCREF(__pyx_v_obj);
10299   __pyx_r = __pyx_v_obj;
10300   goto __pyx_L0;
10301
10302   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10303   goto __pyx_L0;
10304   __pyx_L1_error:;
10305   __Pyx_XDECREF(__pyx_t_2);
10306   __Pyx_AddTraceback("lxml.objectify._numericValueOf");
10307   __pyx_r = 0;
10308   __pyx_L0:;
10309   __Pyx_DECREF(__pyx_v_obj);
10310   __Pyx_XGIVEREF(__pyx_r);
10311   __Pyx_FinishRefcountContext();
10312   return __pyx_r;
10313 }
10314
10315 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":920
10316  *     return obj
10317  * 
10318  * cdef inline _richcmpPyvals(left, right, int op):             # <<<<<<<<<<<<<<
10319  *     left  = getattr3(left,  u'pyval', left)
10320  *     right = getattr3(right, u'pyval', right)
10321  */
10322
10323 static INLINE PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *__pyx_v_left, PyObject *__pyx_v_right, int __pyx_v_op) {
10324   PyObject *__pyx_r = NULL;
10325   PyObject *__pyx_t_1 = NULL;
10326   __Pyx_SetupRefcountContext("_richcmpPyvals");
10327   __Pyx_INCREF(__pyx_v_left);
10328   __Pyx_INCREF(__pyx_v_right);
10329
10330   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":921
10331  * 
10332  * cdef inline _richcmpPyvals(left, right, int op):
10333  *     left  = getattr3(left,  u'pyval', left)             # <<<<<<<<<<<<<<
10334  *     right = getattr3(right, u'pyval', right)
10335  *     return python.PyObject_RichCompare(left, right, op)
10336  */
10337   __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_left, ((PyObject *)__pyx_n_u_pyval), __pyx_v_left); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10338   __Pyx_GOTREF(__pyx_t_1);
10339   __Pyx_DECREF(__pyx_v_left);
10340   __pyx_v_left = __pyx_t_1;
10341   __pyx_t_1 = 0;
10342
10343   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":922
10344  * cdef inline _richcmpPyvals(left, right, int op):
10345  *     left  = getattr3(left,  u'pyval', left)
10346  *     right = getattr3(right, u'pyval', right)             # <<<<<<<<<<<<<<
10347  *     return python.PyObject_RichCompare(left, right, op)
10348  * 
10349  */
10350   __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_right, ((PyObject *)__pyx_n_u_pyval), __pyx_v_right); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10351   __Pyx_GOTREF(__pyx_t_1);
10352   __Pyx_DECREF(__pyx_v_right);
10353   __pyx_v_right = __pyx_t_1;
10354   __pyx_t_1 = 0;
10355
10356   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":923
10357  *     left  = getattr3(left,  u'pyval', left)
10358  *     right = getattr3(right, u'pyval', right)
10359  *     return python.PyObject_RichCompare(left, right, op)             # <<<<<<<<<<<<<<
10360  * 
10361  * 
10362  */
10363   __Pyx_XDECREF(__pyx_r);
10364   __pyx_t_1 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10365   __Pyx_GOTREF(__pyx_t_1);
10366   __pyx_r = __pyx_t_1;
10367   __pyx_t_1 = 0;
10368   goto __pyx_L0;
10369
10370   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10371   goto __pyx_L0;
10372   __pyx_L1_error:;
10373   __Pyx_XDECREF(__pyx_t_1);
10374   __Pyx_AddTraceback("lxml.objectify._richcmpPyvals");
10375   __pyx_r = 0;
10376   __pyx_L0:;
10377   __Pyx_DECREF(__pyx_v_left);
10378   __Pyx_DECREF(__pyx_v_right);
10379   __Pyx_XGIVEREF(__pyx_r);
10380   __Pyx_FinishRefcountContext();
10381   return __pyx_r;
10382 }
10383
10384 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":951
10385  *     cdef object _type
10386  *     cdef list _schema_types
10387  *     def __init__(self, name, type_check, type_class, stringify=None):             # <<<<<<<<<<<<<<
10388  *         if python.PyString_Check(name):
10389  *             name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)
10390  */
10391
10392 static int __pyx_pf_4lxml_9objectify_6PyType___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10393 static int __pyx_pf_4lxml_9objectify_6PyType___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10394   PyObject *__pyx_v_name = 0;
10395   PyObject *__pyx_v_type_check = 0;
10396   PyObject *__pyx_v_type_class = 0;
10397   PyObject *__pyx_v_stringify = 0;
10398   int __pyx_r;
10399   int __pyx_t_1;
10400   PyObject *__pyx_t_2 = NULL;
10401   int __pyx_t_3;
10402   int __pyx_t_4;
10403   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_name,&__pyx_n_ui_type_check,&__pyx_n_ui_type_class,&__pyx_n_ui_stringify,0};
10404   __Pyx_SetupRefcountContext("__init__");
10405   if (unlikely(__pyx_kwds)) {
10406     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
10407     PyObject* values[4] = {0,0,0,0};
10408     values[3] = ((PyObject *)Py_None);
10409     switch (PyTuple_GET_SIZE(__pyx_args)) {
10410       case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10411       case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10412       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10413       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10414       case  0: break;
10415       default: goto __pyx_L5_argtuple_error;
10416     }
10417     switch (PyTuple_GET_SIZE(__pyx_args)) {
10418       case  0:
10419       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_name);
10420       if (likely(values[0])) kw_args--;
10421       else goto __pyx_L5_argtuple_error;
10422       case  1:
10423       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_type_check);
10424       if (likely(values[1])) kw_args--;
10425       else {
10426         __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10427       }
10428       case  2:
10429       values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_type_class);
10430       if (likely(values[2])) kw_args--;
10431       else {
10432         __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10433       }
10434       case  3:
10435       if (kw_args > 1) {
10436         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_stringify);
10437         if (unlikely(value)) { values[3] = value; kw_args--; }
10438       }
10439     }
10440     if (unlikely(kw_args > 0)) {
10441       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10442     }
10443     __pyx_v_name = values[0];
10444     __pyx_v_type_check = values[1];
10445     __pyx_v_type_class = values[2];
10446     __pyx_v_stringify = values[3];
10447   } else {
10448     __pyx_v_stringify = ((PyObject *)Py_None);
10449     switch (PyTuple_GET_SIZE(__pyx_args)) {
10450       case  4:
10451       __pyx_v_stringify = PyTuple_GET_ITEM(__pyx_args, 3);
10452       case  3:
10453       __pyx_v_type_class = PyTuple_GET_ITEM(__pyx_args, 2);
10454       __pyx_v_type_check = PyTuple_GET_ITEM(__pyx_args, 1);
10455       __pyx_v_name = PyTuple_GET_ITEM(__pyx_args, 0);
10456       break;
10457       default: goto __pyx_L5_argtuple_error;
10458     }
10459   }
10460   goto __pyx_L4_argument_unpacking_done;
10461   __pyx_L5_argtuple_error:;
10462   __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10463   __pyx_L3_error:;
10464   __Pyx_AddTraceback("lxml.objectify.PyType.__init__");
10465   return -1;
10466   __pyx_L4_argument_unpacking_done:;
10467   __Pyx_INCREF((PyObject *)__pyx_v_self);
10468   __Pyx_INCREF(__pyx_v_name);
10469   __Pyx_INCREF(__pyx_v_type_check);
10470   __Pyx_INCREF(__pyx_v_type_class);
10471   __Pyx_INCREF(__pyx_v_stringify);
10472
10473   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":952
10474  *     cdef list _schema_types
10475  *     def __init__(self, name, type_check, type_class, stringify=None):
10476  *         if python.PyString_Check(name):             # <<<<<<<<<<<<<<
10477  *             name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)
10478  *         elif not python.PyUnicode_Check(name):
10479  */
10480   __pyx_t_1 = PyString_Check(__pyx_v_name);
10481   if (__pyx_t_1) {
10482
10483     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":953
10484  *     def __init__(self, name, type_check, type_class, stringify=None):
10485  *         if python.PyString_Check(name):
10486  *             name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)             # <<<<<<<<<<<<<<
10487  *         elif not python.PyUnicode_Check(name):
10488  *             raise TypeError, u"Type name must be a string"
10489  */
10490     __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_name, __pyx_k_ASCII, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10491     __Pyx_GOTREF(__pyx_t_2);
10492     __Pyx_DECREF(__pyx_v_name);
10493     __pyx_v_name = __pyx_t_2;
10494     __pyx_t_2 = 0;
10495     goto __pyx_L6;
10496   }
10497
10498   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":954
10499  *         if python.PyString_Check(name):
10500  *             name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)
10501  *         elif not python.PyUnicode_Check(name):             # <<<<<<<<<<<<<<
10502  *             raise TypeError, u"Type name must be a string"
10503  *         if type_check is not None and not callable(type_check):
10504  */
10505   __pyx_t_1 = (!PyUnicode_Check(__pyx_v_name));
10506   if (__pyx_t_1) {
10507
10508     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":955
10509  *             name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)
10510  *         elif not python.PyUnicode_Check(name):
10511  *             raise TypeError, u"Type name must be a string"             # <<<<<<<<<<<<<<
10512  *         if type_check is not None and not callable(type_check):
10513  *             raise TypeError, u"Type check function must be callable (or None)"
10514  */
10515     __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_16), 0);
10516     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10517     goto __pyx_L6;
10518   }
10519   __pyx_L6:;
10520
10521   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":956
10522  *         elif not python.PyUnicode_Check(name):
10523  *             raise TypeError, u"Type name must be a string"
10524  *         if type_check is not None and not callable(type_check):             # <<<<<<<<<<<<<<
10525  *             raise TypeError, u"Type check function must be callable (or None)"
10526  *         if name != TREE_PYTYPE_NAME and \
10527  */
10528   __pyx_t_1 = (__pyx_v_type_check != Py_None);
10529   if (__pyx_t_1) {
10530     __pyx_t_3 = (!PyCallable_Check(__pyx_v_type_check));
10531   } else {
10532     __pyx_t_3 = __pyx_t_1;
10533   }
10534   if (__pyx_t_3) {
10535
10536     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":957
10537  *             raise TypeError, u"Type name must be a string"
10538  *         if type_check is not None and not callable(type_check):
10539  *             raise TypeError, u"Type check function must be callable (or None)"             # <<<<<<<<<<<<<<
10540  *         if name != TREE_PYTYPE_NAME and \
10541  *                not issubclass(type_class, ObjectifiedDataElement):
10542  */
10543     __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_17), 0);
10544     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10545     goto __pyx_L7;
10546   }
10547   __pyx_L7:;
10548
10549   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":958
10550  *         if type_check is not None and not callable(type_check):
10551  *             raise TypeError, u"Type check function must be callable (or None)"
10552  *         if name != TREE_PYTYPE_NAME and \             # <<<<<<<<<<<<<<
10553  *                not issubclass(type_class, ObjectifiedDataElement):
10554  *             raise TypeError, \
10555  */
10556   __pyx_t_2 = PyObject_RichCompare(__pyx_v_name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10557   __Pyx_GOTREF(__pyx_t_2);
10558   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10559   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10560   if (__pyx_t_3) {
10561
10562     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":959
10563  *             raise TypeError, u"Type check function must be callable (or None)"
10564  *         if name != TREE_PYTYPE_NAME and \
10565  *                not issubclass(type_class, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
10566  *             raise TypeError, \
10567  *                 u"Data classes must inherit from ObjectifiedDataElement"
10568  */
10569     __pyx_t_1 = PyObject_IsSubclass(__pyx_v_type_class, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement))); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10570     __pyx_t_4 = (!__pyx_t_1);
10571     __pyx_t_1 = __pyx_t_4;
10572   } else {
10573     __pyx_t_1 = __pyx_t_3;
10574   }
10575   if (__pyx_t_1) {
10576
10577     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":960
10578  *         if name != TREE_PYTYPE_NAME and \
10579  *                not issubclass(type_class, ObjectifiedDataElement):
10580  *             raise TypeError, \             # <<<<<<<<<<<<<<
10581  *                 u"Data classes must inherit from ObjectifiedDataElement"
10582  *         self.name  = name
10583  */
10584     __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_18), 0);
10585     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10586     goto __pyx_L8;
10587   }
10588   __pyx_L8:;
10589
10590   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":962
10591  *             raise TypeError, \
10592  *                 u"Data classes must inherit from ObjectifiedDataElement"
10593  *         self.name  = name             # <<<<<<<<<<<<<<
10594  *         self._type = type_class
10595  *         self.type_check = type_check
10596  */
10597   __Pyx_INCREF(__pyx_v_name);
10598   __Pyx_GIVEREF(__pyx_v_name);
10599   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
10600   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
10601   ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name = __pyx_v_name;
10602
10603   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":963
10604  *                 u"Data classes must inherit from ObjectifiedDataElement"
10605  *         self.name  = name
10606  *         self._type = type_class             # <<<<<<<<<<<<<<
10607  *         self.type_check = type_check
10608  *         if stringify is None:
10609  */
10610   __Pyx_INCREF(__pyx_v_type_class);
10611   __Pyx_GIVEREF(__pyx_v_type_class);
10612   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type);
10613   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type);
10614   ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type = __pyx_v_type_class;
10615
10616   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":964
10617  *         self.name  = name
10618  *         self._type = type_class
10619  *         self.type_check = type_check             # <<<<<<<<<<<<<<
10620  *         if stringify is None:
10621  *             stringify = unicode
10622  */
10623   __Pyx_INCREF(__pyx_v_type_check);
10624   __Pyx_GIVEREF(__pyx_v_type_check);
10625   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
10626   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
10627   ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check = __pyx_v_type_check;
10628
10629   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":965
10630  *         self._type = type_class
10631  *         self.type_check = type_check
10632  *         if stringify is None:             # <<<<<<<<<<<<<<
10633  *             stringify = unicode
10634  *         self.stringify = stringify
10635  */
10636   __pyx_t_1 = (__pyx_v_stringify == Py_None);
10637   if (__pyx_t_1) {
10638
10639     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":966
10640  *         self.type_check = type_check
10641  *         if stringify is None:
10642  *             stringify = unicode             # <<<<<<<<<<<<<<
10643  *         self.stringify = stringify
10644  *         self._schema_types = []
10645  */
10646     __Pyx_INCREF(((PyObject *)((PyObject*)&PyUnicode_Type)));
10647     __Pyx_DECREF(__pyx_v_stringify);
10648     __pyx_v_stringify = ((PyObject *)((PyObject*)&PyUnicode_Type));
10649     goto __pyx_L9;
10650   }
10651   __pyx_L9:;
10652
10653   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":967
10654  *         if stringify is None:
10655  *             stringify = unicode
10656  *         self.stringify = stringify             # <<<<<<<<<<<<<<
10657  *         self._schema_types = []
10658  * 
10659  */
10660   __Pyx_INCREF(__pyx_v_stringify);
10661   __Pyx_GIVEREF(__pyx_v_stringify);
10662   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->stringify);
10663   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->stringify);
10664   ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->stringify = __pyx_v_stringify;
10665
10666   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":968
10667  *             stringify = unicode
10668  *         self.stringify = stringify
10669  *         self._schema_types = []             # <<<<<<<<<<<<<<
10670  * 
10671  *     def __repr__(self):
10672  */
10673   __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10674   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
10675   __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
10676   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types);
10677   __Pyx_DECREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types));
10678   ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types = __pyx_t_2;
10679   __pyx_t_2 = 0;
10680
10681   __pyx_r = 0;
10682   goto __pyx_L0;
10683   __pyx_L1_error:;
10684   __Pyx_XDECREF(__pyx_t_2);
10685   __Pyx_AddTraceback("lxml.objectify.PyType.__init__");
10686   __pyx_r = -1;
10687   __pyx_L0:;
10688   __Pyx_DECREF((PyObject *)__pyx_v_self);
10689   __Pyx_DECREF(__pyx_v_name);
10690   __Pyx_DECREF(__pyx_v_type_check);
10691   __Pyx_DECREF(__pyx_v_type_class);
10692   __Pyx_DECREF(__pyx_v_stringify);
10693   __Pyx_FinishRefcountContext();
10694   return __pyx_r;
10695 }
10696
10697 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":970
10698  *         self._schema_types = []
10699  * 
10700  *     def __repr__(self):             # <<<<<<<<<<<<<<
10701  *         return u"PyType(%s, %s)" % (self.name, self._type.__name__)
10702  * 
10703  */
10704
10705 static PyObject *__pyx_pf_4lxml_9objectify_6PyType___repr__(PyObject *__pyx_v_self); /*proto*/
10706 static PyObject *__pyx_pf_4lxml_9objectify_6PyType___repr__(PyObject *__pyx_v_self) {
10707   PyObject *__pyx_r = NULL;
10708   PyObject *__pyx_t_1 = NULL;
10709   PyObject *__pyx_t_2 = NULL;
10710   __Pyx_SetupRefcountContext("__repr__");
10711
10712   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":971
10713  * 
10714  *     def __repr__(self):
10715  *         return u"PyType(%s, %s)" % (self.name, self._type.__name__)             # <<<<<<<<<<<<<<
10716  * 
10717  *     def register(self, before=None, after=None):
10718  */
10719   __Pyx_XDECREF(__pyx_r);
10720   __pyx_t_1 = PyObject_GetAttr(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type, __pyx_n_ui___name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10721   __Pyx_GOTREF(__pyx_t_1);
10722   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10723   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
10724   __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
10725   PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
10726   __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
10727   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
10728   __Pyx_GIVEREF(__pyx_t_1);
10729   __pyx_t_1 = 0;
10730   __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_19), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10731   __Pyx_GOTREF(__pyx_t_1);
10732   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
10733   __pyx_r = __pyx_t_1;
10734   __pyx_t_1 = 0;
10735   goto __pyx_L0;
10736
10737   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10738   goto __pyx_L0;
10739   __pyx_L1_error:;
10740   __Pyx_XDECREF(__pyx_t_1);
10741   __Pyx_XDECREF(__pyx_t_2);
10742   __Pyx_AddTraceback("lxml.objectify.PyType.__repr__");
10743   __pyx_r = NULL;
10744   __pyx_L0:;
10745   __Pyx_XGIVEREF(__pyx_r);
10746   __Pyx_FinishRefcountContext();
10747   return __pyx_r;
10748 }
10749
10750 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":973
10751  *         return u"PyType(%s, %s)" % (self.name, self._type.__name__)
10752  * 
10753  *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<<
10754  *         u"""register(self, before=None, after=None)
10755  * 
10756  */
10757
10758 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10759 static char __pyx_doc_4lxml_9objectify_6PyType_register[] = "register(self, before=None, after=None)\n\n        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        ";
10760 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10761   PyObject *__pyx_v_before = 0;
10762   PyObject *__pyx_v_after = 0;
10763   PyObject *__pyx_v_item;
10764   PyObject *__pyx_v_entry;
10765   PyObject *__pyx_v_first_pos;
10766   PyObject *__pyx_v_last_pos;
10767   PyObject *__pyx_v_i;
10768   PyObject *__pyx_v_check;
10769   PyObject *__pyx_v_pytype;
10770   PyObject *__pyx_v_xs_type;
10771   PyObject *__pyx_r = NULL;
10772   PyObject *__pyx_t_1 = NULL;
10773   int __pyx_t_2;
10774   Py_ssize_t __pyx_t_3;
10775   PyObject *__pyx_t_4 = NULL;
10776   PyObject *__pyx_t_5 = NULL;
10777   PyObject *__pyx_t_6 = NULL;
10778   int __pyx_t_7;
10779   int __pyx_t_8;
10780   PyObject *__pyx_t_9 = NULL;
10781   PyObject *__pyx_t_10 = NULL;
10782   int __pyx_t_11;
10783   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_before,&__pyx_n_ui_after,0};
10784   __Pyx_SetupRefcountContext("register");
10785   if (unlikely(__pyx_kwds)) {
10786     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
10787     PyObject* values[2] = {0,0};
10788     values[0] = ((PyObject *)Py_None);
10789     values[1] = ((PyObject *)Py_None);
10790     switch (PyTuple_GET_SIZE(__pyx_args)) {
10791       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10792       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10793       case  0: break;
10794       default: goto __pyx_L5_argtuple_error;
10795     }
10796     switch (PyTuple_GET_SIZE(__pyx_args)) {
10797       case  0:
10798       if (kw_args > 1) {
10799         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_before);
10800         if (unlikely(value)) { values[0] = value; kw_args--; }
10801       }
10802       case  1:
10803       if (kw_args > 1) {
10804         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_after);
10805         if (unlikely(value)) { values[1] = value; kw_args--; }
10806       }
10807     }
10808     if (unlikely(kw_args > 0)) {
10809       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "register") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10810     }
10811     __pyx_v_before = values[0];
10812     __pyx_v_after = values[1];
10813   } else {
10814     __pyx_v_before = ((PyObject *)Py_None);
10815     __pyx_v_after = ((PyObject *)Py_None);
10816     switch (PyTuple_GET_SIZE(__pyx_args)) {
10817       case  2: __pyx_v_after = PyTuple_GET_ITEM(__pyx_args, 1);
10818       case  1: __pyx_v_before = PyTuple_GET_ITEM(__pyx_args, 0);
10819       case  0: break;
10820       default: goto __pyx_L5_argtuple_error;
10821     }
10822   }
10823   goto __pyx_L4_argument_unpacking_done;
10824   __pyx_L5_argtuple_error:;
10825   __Pyx_RaiseArgtupleInvalid("register", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10826   __pyx_L3_error:;
10827   __Pyx_AddTraceback("lxml.objectify.PyType.register");
10828   return NULL;
10829   __pyx_L4_argument_unpacking_done:;
10830   __Pyx_INCREF((PyObject *)__pyx_v_self);
10831   __Pyx_INCREF(__pyx_v_before);
10832   __Pyx_INCREF(__pyx_v_after);
10833   __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);
10834   __pyx_v_entry = Py_None; __Pyx_INCREF(Py_None);
10835   __pyx_v_first_pos = Py_None; __Pyx_INCREF(Py_None);
10836   __pyx_v_last_pos = Py_None; __Pyx_INCREF(Py_None);
10837   __pyx_v_i = Py_None; __Pyx_INCREF(Py_None);
10838   __pyx_v_check = Py_None; __Pyx_INCREF(Py_None);
10839   __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);
10840   __pyx_v_xs_type = Py_None; __Pyx_INCREF(Py_None);
10841
10842   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":983
10843  *         ignored.  Raises ValueError if the dependencies cannot be fulfilled.
10844  *         """
10845  *         if self.name == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
10846  *             raise ValueError, u"Cannot register tree type"
10847  *         if self.type_check is not None:
10848  */
10849   __pyx_t_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_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10850   __Pyx_GOTREF(__pyx_t_1);
10851   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10852   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10853   if (__pyx_t_2) {
10854
10855     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":984
10856  *         """
10857  *         if self.name == TREE_PYTYPE_NAME:
10858  *             raise ValueError, u"Cannot register tree type"             # <<<<<<<<<<<<<<
10859  *         if self.type_check is not None:
10860  *             for item in _TYPE_CHECKS:
10861  */
10862     __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_20), 0);
10863     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10864     goto __pyx_L6;
10865   }
10866   __pyx_L6:;
10867
10868   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":985
10869  *         if self.name == TREE_PYTYPE_NAME:
10870  *             raise ValueError, u"Cannot register tree type"
10871  *         if self.type_check is not None:             # <<<<<<<<<<<<<<
10872  *             for item in _TYPE_CHECKS:
10873  *                 if item[0] is self.type_check:
10874  */
10875   __pyx_t_2 = (((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check != Py_None);
10876   if (__pyx_t_2) {
10877
10878     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":986
10879  *             raise ValueError, u"Cannot register tree type"
10880  *         if self.type_check is not None:
10881  *             for item in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
10882  *                 if item[0] is self.type_check:
10883  *                     _TYPE_CHECKS.remove(item)
10884  */
10885     if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
10886       __pyx_t_3 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_1);
10887     } else {
10888       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10889     }
10890     for (;;) {
10891       if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
10892       __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
10893       __Pyx_DECREF(__pyx_v_item);
10894       __pyx_v_item = __pyx_t_4;
10895       __pyx_t_4 = 0;
10896
10897       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":987
10898  *         if self.type_check is not None:
10899  *             for item in _TYPE_CHECKS:
10900  *                 if item[0] is self.type_check:             # <<<<<<<<<<<<<<
10901  *                     _TYPE_CHECKS.remove(item)
10902  *                     break
10903  */
10904       __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_item, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10905       __Pyx_GOTREF(__pyx_t_4);
10906       __pyx_t_2 = (__pyx_t_4 == ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
10907       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10908       if (__pyx_t_2) {
10909
10910         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":988
10911  *             for item in _TYPE_CHECKS:
10912  *                 if item[0] is self.type_check:
10913  *                     _TYPE_CHECKS.remove(item)             # <<<<<<<<<<<<<<
10914  *                     break
10915  *             entry = (self.type_check, self)
10916  */
10917         __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_n_ui_remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10918         __Pyx_GOTREF(__pyx_t_4);
10919         __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10920         __Pyx_GOTREF(((PyObject *)__pyx_t_5));
10921         __Pyx_INCREF(__pyx_v_item);
10922         PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_item);
10923         __Pyx_GIVEREF(__pyx_v_item);
10924         __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10925         __Pyx_GOTREF(__pyx_t_6);
10926         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10927         __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
10928         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10929
10930         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":989
10931  *                 if item[0] is self.type_check:
10932  *                     _TYPE_CHECKS.remove(item)
10933  *                     break             # <<<<<<<<<<<<<<
10934  *             entry = (self.type_check, self)
10935  *             first_pos = 0
10936  */
10937         goto __pyx_L9_break;
10938         goto __pyx_L10;
10939       }
10940       __pyx_L10:;
10941     }
10942     __pyx_L9_break:;
10943     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10944
10945     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":990
10946  *                     _TYPE_CHECKS.remove(item)
10947  *                     break
10948  *             entry = (self.type_check, self)             # <<<<<<<<<<<<<<
10949  *             first_pos = 0
10950  *             last_pos = -1
10951  */
10952     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10953     __Pyx_GOTREF(((PyObject *)__pyx_t_1));
10954     __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
10955     PyTuple_SET_ITEM(__pyx_t_1, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
10956     __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
10957     __Pyx_INCREF(__pyx_v_self);
10958     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self);
10959     __Pyx_GIVEREF(__pyx_v_self);
10960     __Pyx_DECREF(__pyx_v_entry);
10961     __pyx_v_entry = ((PyObject *)__pyx_t_1);
10962     __pyx_t_1 = 0;
10963
10964     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":991
10965  *                     break
10966  *             entry = (self.type_check, self)
10967  *             first_pos = 0             # <<<<<<<<<<<<<<
10968  *             last_pos = -1
10969  *             if before or after:
10970  */
10971     __Pyx_INCREF(__pyx_int_0);
10972     __Pyx_DECREF(__pyx_v_first_pos);
10973     __pyx_v_first_pos = __pyx_int_0;
10974
10975     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":992
10976  *             entry = (self.type_check, self)
10977  *             first_pos = 0
10978  *             last_pos = -1             # <<<<<<<<<<<<<<
10979  *             if before or after:
10980  *                 if before is None:
10981  */
10982     __Pyx_INCREF(__pyx_int_neg_1);
10983     __Pyx_DECREF(__pyx_v_last_pos);
10984     __pyx_v_last_pos = __pyx_int_neg_1;
10985
10986     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":993
10987  *             first_pos = 0
10988  *             last_pos = -1
10989  *             if before or after:             # <<<<<<<<<<<<<<
10990  *                 if before is None:
10991  *                     before = ()
10992  */
10993     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_before); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10994     if (!__pyx_t_2) {
10995       __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_after); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10996       __pyx_t_8 = __pyx_t_7;
10997     } else {
10998       __pyx_t_8 = __pyx_t_2;
10999     }
11000     if (__pyx_t_8) {
11001
11002       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":994
11003  *             last_pos = -1
11004  *             if before or after:
11005  *                 if before is None:             # <<<<<<<<<<<<<<
11006  *                     before = ()
11007  *                 elif after is None:
11008  */
11009       __pyx_t_8 = (__pyx_v_before == Py_None);
11010       if (__pyx_t_8) {
11011
11012         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":995
11013  *             if before or after:
11014  *                 if before is None:
11015  *                     before = ()             # <<<<<<<<<<<<<<
11016  *                 elif after is None:
11017  *                     after = ()
11018  */
11019         __Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
11020         __Pyx_DECREF(__pyx_v_before);
11021         __pyx_v_before = ((PyObject *)__pyx_empty_tuple);
11022         goto __pyx_L12;
11023       }
11024
11025       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":996
11026  *                 if before is None:
11027  *                     before = ()
11028  *                 elif after is None:             # <<<<<<<<<<<<<<
11029  *                     after = ()
11030  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
11031  */
11032       __pyx_t_8 = (__pyx_v_after == Py_None);
11033       if (__pyx_t_8) {
11034
11035         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":997
11036  *                     before = ()
11037  *                 elif after is None:
11038  *                     after = ()             # <<<<<<<<<<<<<<
11039  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
11040  *                     if last_pos == -1 and pytype.name in before:
11041  */
11042         __Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
11043         __Pyx_DECREF(__pyx_v_after);
11044         __pyx_v_after = ((PyObject *)__pyx_empty_tuple);
11045         goto __pyx_L12;
11046       }
11047       __pyx_L12:;
11048
11049       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":998
11050  *                 elif after is None:
11051  *                     after = ()
11052  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<<
11053  *                     if last_pos == -1 and pytype.name in before:
11054  *                         last_pos = i
11055  */
11056       __Pyx_INCREF(__pyx_int_0);
11057       __pyx_t_1 = __pyx_int_0;
11058       if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
11059         __pyx_t_3 = 0; __pyx_t_6 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_6);
11060       } else {
11061         PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11062       }
11063       for (;;) {
11064         if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_6)) break;
11065         __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++;
11066         if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
11067           PyObject* tuple = __pyx_t_5;
11068           __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
11069           __pyx_t_9 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_9);
11070           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11071           __Pyx_DECREF(__pyx_v_check);
11072           __pyx_v_check = __pyx_t_4;
11073           __pyx_t_4 = 0;
11074           __Pyx_DECREF(__pyx_v_pytype);
11075           __pyx_v_pytype = __pyx_t_9;
11076           __pyx_t_9 = 0;
11077         } else {
11078           __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11079           __Pyx_GOTREF(__pyx_t_10);
11080           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11081           __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_10, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11082           __Pyx_GOTREF(__pyx_t_4);
11083           __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_10, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11084           __Pyx_GOTREF(__pyx_t_9);
11085           if (__Pyx_EndUnpack(__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11086           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11087           __Pyx_DECREF(__pyx_v_check);
11088           __pyx_v_check = __pyx_t_4;
11089           __pyx_t_4 = 0;
11090           __Pyx_DECREF(__pyx_v_pytype);
11091           __pyx_v_pytype = __pyx_t_9;
11092           __pyx_t_9 = 0;
11093         }
11094         __Pyx_INCREF(__pyx_t_1);
11095         __Pyx_DECREF(__pyx_v_i);
11096         __pyx_v_i = __pyx_t_1;
11097         __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11098         __Pyx_GOTREF(__pyx_t_5);
11099         __Pyx_DECREF(__pyx_t_1);
11100         __pyx_t_1 = __pyx_t_5;
11101         __pyx_t_5 = 0;
11102
11103         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":999
11104  *                     after = ()
11105  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
11106  *                     if last_pos == -1 and pytype.name in before:             # <<<<<<<<<<<<<<
11107  *                         last_pos = i
11108  *                     if pytype.name in after:
11109  */
11110         __pyx_t_5 = PyObject_RichCompare(__pyx_v_last_pos, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11111         __Pyx_GOTREF(__pyx_t_5);
11112         __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11113         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11114         if (__pyx_t_8) {
11115           __pyx_t_5 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11116           __Pyx_GOTREF(__pyx_t_5);
11117           __pyx_t_2 = (PySequence_Contains(__pyx_v_before, __pyx_t_5)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11118           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11119           __pyx_t_7 = __pyx_t_2;
11120         } else {
11121           __pyx_t_7 = __pyx_t_8;
11122         }
11123         if (__pyx_t_7) {
11124
11125           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1000
11126  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
11127  *                     if last_pos == -1 and pytype.name in before:
11128  *                         last_pos = i             # <<<<<<<<<<<<<<
11129  *                     if pytype.name in after:
11130  *                         first_pos = i+1
11131  */
11132           __Pyx_INCREF(__pyx_v_i);
11133           __Pyx_DECREF(__pyx_v_last_pos);
11134           __pyx_v_last_pos = __pyx_v_i;
11135           goto __pyx_L15;
11136         }
11137         __pyx_L15:;
11138
11139         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1001
11140  *                     if last_pos == -1 and pytype.name in before:
11141  *                         last_pos = i
11142  *                     if pytype.name in after:             # <<<<<<<<<<<<<<
11143  *                         first_pos = i+1
11144  *             if last_pos == -1:
11145  */
11146         __pyx_t_5 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11147         __Pyx_GOTREF(__pyx_t_5);
11148         __pyx_t_7 = (PySequence_Contains(__pyx_v_after, __pyx_t_5)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11149         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11150         if (__pyx_t_7) {
11151
11152           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1002
11153  *                         last_pos = i
11154  *                     if pytype.name in after:
11155  *                         first_pos = i+1             # <<<<<<<<<<<<<<
11156  *             if last_pos == -1:
11157  *                 _TYPE_CHECKS.append(entry)
11158  */
11159           __pyx_t_5 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11160           __Pyx_GOTREF(__pyx_t_5);
11161           __Pyx_DECREF(__pyx_v_first_pos);
11162           __pyx_v_first_pos = __pyx_t_5;
11163           __pyx_t_5 = 0;
11164           goto __pyx_L16;
11165         }
11166         __pyx_L16:;
11167       }
11168       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11169       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11170       goto __pyx_L11;
11171     }
11172     __pyx_L11:;
11173
11174     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1003
11175  *                     if pytype.name in after:
11176  *                         first_pos = i+1
11177  *             if last_pos == -1:             # <<<<<<<<<<<<<<
11178  *                 _TYPE_CHECKS.append(entry)
11179  *             elif first_pos > last_pos:
11180  */
11181     __pyx_t_1 = PyObject_RichCompare(__pyx_v_last_pos, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11182     __Pyx_GOTREF(__pyx_t_1);
11183     __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11184     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11185     if (__pyx_t_7) {
11186
11187       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1004
11188  *                         first_pos = i+1
11189  *             if last_pos == -1:
11190  *                 _TYPE_CHECKS.append(entry)             # <<<<<<<<<<<<<<
11191  *             elif first_pos > last_pos:
11192  *                 raise ValueError, u"inconsistent before/after dependencies"
11193  */
11194       if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
11195         PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
11196       }
11197       __pyx_t_11 = PyList_Append(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_v_entry); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11198       goto __pyx_L17;
11199     }
11200
11201     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1005
11202  *             if last_pos == -1:
11203  *                 _TYPE_CHECKS.append(entry)
11204  *             elif first_pos > last_pos:             # <<<<<<<<<<<<<<
11205  *                 raise ValueError, u"inconsistent before/after dependencies"
11206  *             else:
11207  */
11208     __pyx_t_1 = PyObject_RichCompare(__pyx_v_first_pos, __pyx_v_last_pos, Py_GT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11209     __Pyx_GOTREF(__pyx_t_1);
11210     __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11211     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11212     if (__pyx_t_7) {
11213
11214       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1006
11215  *                 _TYPE_CHECKS.append(entry)
11216  *             elif first_pos > last_pos:
11217  *                 raise ValueError, u"inconsistent before/after dependencies"             # <<<<<<<<<<<<<<
11218  *             else:
11219  *                 _TYPE_CHECKS.insert(last_pos, entry)
11220  */
11221       __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_21), 0);
11222       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11223       goto __pyx_L17;
11224     }
11225     /*else*/ {
11226
11227       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1008
11228  *                 raise ValueError, u"inconsistent before/after dependencies"
11229  *             else:
11230  *                 _TYPE_CHECKS.insert(last_pos, entry)             # <<<<<<<<<<<<<<
11231  * 
11232  *         _PYTYPE_DICT[self.name] = self
11233  */
11234       __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_last_pos); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11235       __pyx_t_11 = PyList_Insert(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_t_3, __pyx_v_entry); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11236     }
11237     __pyx_L17:;
11238     goto __pyx_L7;
11239   }
11240   __pyx_L7:;
11241
11242   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1010
11243  *                 _TYPE_CHECKS.insert(last_pos, entry)
11244  * 
11245  *         _PYTYPE_DICT[self.name] = self             # <<<<<<<<<<<<<<
11246  *         for xs_type in self._schema_types:
11247  *             _SCHEMA_TYPE_DICT[xs_type] = self
11248  */
11249   if (PyDict_SetItem(((PyObject *)__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 = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11250
11251   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1011
11252  * 
11253  *         _PYTYPE_DICT[self.name] = self
11254  *         for xs_type in self._schema_types:             # <<<<<<<<<<<<<<
11255  *             _SCHEMA_TYPE_DICT[xs_type] = self
11256  * 
11257  */
11258   if (likely(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types) != Py_None)) {
11259     __pyx_t_3 = 0; __pyx_t_1 = ((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types); __Pyx_INCREF(__pyx_t_1);
11260   } else {
11261     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11262   }
11263   for (;;) {
11264     if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
11265     __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++;
11266     __Pyx_DECREF(__pyx_v_xs_type);
11267     __pyx_v_xs_type = __pyx_t_6;
11268     __pyx_t_6 = 0;
11269
11270     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1012
11271  *         _PYTYPE_DICT[self.name] = self
11272  *         for xs_type in self._schema_types:
11273  *             _SCHEMA_TYPE_DICT[xs_type] = self             # <<<<<<<<<<<<<<
11274  * 
11275  *     def unregister(self):
11276  */
11277     if (PyDict_SetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_xs_type, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11278   }
11279   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11280
11281   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11282   goto __pyx_L0;
11283   __pyx_L1_error:;
11284   __Pyx_XDECREF(__pyx_t_1);
11285   __Pyx_XDECREF(__pyx_t_4);
11286   __Pyx_XDECREF(__pyx_t_5);
11287   __Pyx_XDECREF(__pyx_t_6);
11288   __Pyx_XDECREF(__pyx_t_9);
11289   __Pyx_XDECREF(__pyx_t_10);
11290   __Pyx_AddTraceback("lxml.objectify.PyType.register");
11291   __pyx_r = NULL;
11292   __pyx_L0:;
11293   __Pyx_DECREF(__pyx_v_item);
11294   __Pyx_DECREF(__pyx_v_entry);
11295   __Pyx_DECREF(__pyx_v_first_pos);
11296   __Pyx_DECREF(__pyx_v_last_pos);
11297   __Pyx_DECREF(__pyx_v_i);
11298   __Pyx_DECREF(__pyx_v_check);
11299   __Pyx_DECREF(__pyx_v_pytype);
11300   __Pyx_DECREF(__pyx_v_xs_type);
11301   __Pyx_DECREF((PyObject *)__pyx_v_self);
11302   __Pyx_DECREF(__pyx_v_before);
11303   __Pyx_DECREF(__pyx_v_after);
11304   __Pyx_XGIVEREF(__pyx_r);
11305   __Pyx_FinishRefcountContext();
11306   return __pyx_r;
11307 }
11308
11309 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1014
11310  *             _SCHEMA_TYPE_DICT[xs_type] = self
11311  * 
11312  *     def unregister(self):             # <<<<<<<<<<<<<<
11313  *         u"unregister(self)"
11314  *         if _PYTYPE_DICT.get(self.name) is self:
11315  */
11316
11317 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_unregister(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
11318 static char __pyx_doc_4lxml_9objectify_6PyType_unregister[] = "unregister(self)";
11319 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_unregister(PyObject *__pyx_v_self, PyObject *unused) {
11320   PyObject *__pyx_v_xs_type;
11321   PyObject *__pyx_v_pytype;
11322   PyObject *__pyx_r = NULL;
11323   PyObject *__pyx_t_1 = NULL;
11324   PyObject *__pyx_t_2 = NULL;
11325   PyObject *__pyx_t_3 = NULL;
11326   int __pyx_t_4;
11327   Py_ssize_t __pyx_t_5;
11328   PyObject *__pyx_t_6 = NULL;
11329   PyObject *__pyx_t_7 = NULL;
11330   int __pyx_t_8;
11331   __Pyx_SetupRefcountContext("unregister");
11332   __Pyx_INCREF((PyObject *)__pyx_v_self);
11333   __pyx_v_xs_type = Py_None; __Pyx_INCREF(Py_None);
11334   __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);
11335
11336   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1016
11337  *     def unregister(self):
11338  *         u"unregister(self)"
11339  *         if _PYTYPE_DICT.get(self.name) is self:             # <<<<<<<<<<<<<<
11340  *             del _PYTYPE_DICT[self.name]
11341  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
11342  */
11343   __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_n_ui_get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11344   __Pyx_GOTREF(__pyx_t_1);
11345   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11346   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
11347   __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
11348   PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
11349   __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
11350   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11351   __Pyx_GOTREF(__pyx_t_3);
11352   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11353   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
11354   __pyx_t_4 = (__pyx_t_3 == __pyx_v_self);
11355   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11356   if (__pyx_t_4) {
11357
11358     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1017
11359  *         u"unregister(self)"
11360  *         if _PYTYPE_DICT.get(self.name) is self:
11361  *             del _PYTYPE_DICT[self.name]             # <<<<<<<<<<<<<<
11362  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
11363  *             if pytype is self:
11364  */
11365     if (PyDict_DelItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11366     goto __pyx_L5;
11367   }
11368   __pyx_L5:;
11369
11370   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1018
11371  *         if _PYTYPE_DICT.get(self.name) is self:
11372  *             del _PYTYPE_DICT[self.name]
11373  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):             # <<<<<<<<<<<<<<
11374  *             if pytype is self:
11375  *                 del _SCHEMA_TYPE_DICT[xs_type]
11376  */
11377   __pyx_t_3 = PyDict_Items(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11378   __Pyx_GOTREF(__pyx_t_3);
11379   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11380   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
11381   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
11382   __Pyx_GIVEREF(__pyx_t_3);
11383   __pyx_t_3 = 0;
11384   __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyList_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11385   __Pyx_GOTREF(__pyx_t_3);
11386   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
11387   if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
11388     __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
11389   } else {
11390     __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11391     __Pyx_GOTREF(__pyx_t_2);
11392   }
11393   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11394   for (;;) {
11395     if (likely(PyList_CheckExact(__pyx_t_2))) {
11396       if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
11397       __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
11398     } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
11399       if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
11400       __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
11401     } else {
11402       __pyx_t_3 = PyIter_Next(__pyx_t_2);
11403       if (!__pyx_t_3) {
11404         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11405         break;
11406       }
11407       __Pyx_GOTREF(__pyx_t_3);
11408     }
11409     if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
11410       PyObject* tuple = __pyx_t_3;
11411       __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
11412       __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
11413       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11414       __Pyx_DECREF(__pyx_v_xs_type);
11415       __pyx_v_xs_type = __pyx_t_1;
11416       __pyx_t_1 = 0;
11417       __Pyx_DECREF(__pyx_v_pytype);
11418       __pyx_v_pytype = __pyx_t_6;
11419       __pyx_t_6 = 0;
11420     } else {
11421       __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11422       __Pyx_GOTREF(__pyx_t_7);
11423       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11424       __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11425       __Pyx_GOTREF(__pyx_t_1);
11426       __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11427       __Pyx_GOTREF(__pyx_t_6);
11428       if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11429       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11430       __Pyx_DECREF(__pyx_v_xs_type);
11431       __pyx_v_xs_type = __pyx_t_1;
11432       __pyx_t_1 = 0;
11433       __Pyx_DECREF(__pyx_v_pytype);
11434       __pyx_v_pytype = __pyx_t_6;
11435       __pyx_t_6 = 0;
11436     }
11437
11438     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1019
11439  *             del _PYTYPE_DICT[self.name]
11440  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
11441  *             if pytype is self:             # <<<<<<<<<<<<<<
11442  *                 del _SCHEMA_TYPE_DICT[xs_type]
11443  *         if self.type_check is None:
11444  */
11445     __pyx_t_4 = (__pyx_v_pytype == __pyx_v_self);
11446     if (__pyx_t_4) {
11447
11448       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1020
11449  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
11450  *             if pytype is self:
11451  *                 del _SCHEMA_TYPE_DICT[xs_type]             # <<<<<<<<<<<<<<
11452  *         if self.type_check is None:
11453  *             return
11454  */
11455       if (PyDict_DelItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_xs_type) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11456       goto __pyx_L8;
11457     }
11458     __pyx_L8:;
11459   }
11460   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11461
11462   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1021
11463  *             if pytype is self:
11464  *                 del _SCHEMA_TYPE_DICT[xs_type]
11465  *         if self.type_check is None:             # <<<<<<<<<<<<<<
11466  *             return
11467  *         try:
11468  */
11469   __pyx_t_4 = (((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check == Py_None);
11470   if (__pyx_t_4) {
11471
11472     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1022
11473  *                 del _SCHEMA_TYPE_DICT[xs_type]
11474  *         if self.type_check is None:
11475  *             return             # <<<<<<<<<<<<<<
11476  *         try:
11477  *             _TYPE_CHECKS.remove( (self.type_check, self) )
11478  */
11479     __Pyx_XDECREF(__pyx_r);
11480     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11481     goto __pyx_L0;
11482     goto __pyx_L9;
11483   }
11484   __pyx_L9:;
11485
11486   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1023
11487  *         if self.type_check is None:
11488  *             return
11489  *         try:             # <<<<<<<<<<<<<<
11490  *             _TYPE_CHECKS.remove( (self.type_check, self) )
11491  *         except ValueError:
11492  */
11493   {
11494     PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
11495     __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
11496     __Pyx_XGOTREF(__pyx_save_exc_type);
11497     __Pyx_XGOTREF(__pyx_save_exc_value);
11498     __Pyx_XGOTREF(__pyx_save_exc_tb);
11499     /*try:*/ {
11500
11501       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1024
11502  *             return
11503  *         try:
11504  *             _TYPE_CHECKS.remove( (self.type_check, self) )             # <<<<<<<<<<<<<<
11505  *         except ValueError:
11506  *             pass
11507  */
11508       __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_n_ui_remove); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
11509       __Pyx_GOTREF(__pyx_t_2);
11510       __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
11511       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
11512       __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
11513       PyTuple_SET_ITEM(__pyx_t_3, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
11514       __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
11515       __Pyx_INCREF(__pyx_v_self);
11516       PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
11517       __Pyx_GIVEREF(__pyx_v_self);
11518       __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
11519       __Pyx_GOTREF(((PyObject *)__pyx_t_6));
11520       PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_3));
11521       __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
11522       __pyx_t_3 = 0;
11523       __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
11524       __Pyx_GOTREF(__pyx_t_3);
11525       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11526       __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
11527       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11528     }
11529     __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
11530     __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
11531     __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
11532     goto __pyx_L17_try_end;
11533     __pyx_L10_error:;
11534     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11535     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11536     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11537     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11538     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11539
11540     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1025
11541  *         try:
11542  *             _TYPE_CHECKS.remove( (self.type_check, self) )
11543  *         except ValueError:             # <<<<<<<<<<<<<<
11544  *             pass
11545  * 
11546  */
11547     __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
11548     if (__pyx_t_8) {
11549       PyErr_Restore(0,0,0);
11550       goto __pyx_L11_exception_handled;
11551     }
11552     __Pyx_XDECREF(__pyx_save_exc_type);
11553     __Pyx_XDECREF(__pyx_save_exc_value);
11554     __Pyx_XDECREF(__pyx_save_exc_tb);
11555     goto __pyx_L1_error;
11556     __pyx_L11_exception_handled:;
11557     __Pyx_XGIVEREF(__pyx_save_exc_type);
11558     __Pyx_XGIVEREF(__pyx_save_exc_value);
11559     __Pyx_XGIVEREF(__pyx_save_exc_tb);
11560     __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
11561     __pyx_L17_try_end:;
11562   }
11563
11564   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11565   goto __pyx_L0;
11566   __pyx_L1_error:;
11567   __Pyx_XDECREF(__pyx_t_1);
11568   __Pyx_XDECREF(__pyx_t_2);
11569   __Pyx_XDECREF(__pyx_t_3);
11570   __Pyx_XDECREF(__pyx_t_6);
11571   __Pyx_XDECREF(__pyx_t_7);
11572   __Pyx_AddTraceback("lxml.objectify.PyType.unregister");
11573   __pyx_r = NULL;
11574   __pyx_L0:;
11575   __Pyx_DECREF(__pyx_v_xs_type);
11576   __Pyx_DECREF(__pyx_v_pytype);
11577   __Pyx_DECREF((PyObject *)__pyx_v_self);
11578   __Pyx_XGIVEREF(__pyx_r);
11579   __Pyx_FinishRefcountContext();
11580   return __pyx_r;
11581 }
11582
11583 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1033
11584  *         Note that this must be set before registering the type!
11585  *         """
11586  *         def __get__(self):             # <<<<<<<<<<<<<<
11587  *             return self._schema_types
11588  *         def __set__(self, types):
11589  */
11590
11591 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(PyObject *__pyx_v_self); /*proto*/
11592 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(PyObject *__pyx_v_self) {
11593   PyObject *__pyx_r = NULL;
11594   __Pyx_SetupRefcountContext("__get__");
11595
11596   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1034
11597  *         """
11598  *         def __get__(self):
11599  *             return self._schema_types             # <<<<<<<<<<<<<<
11600  *         def __set__(self, types):
11601  *             self._schema_types = list(map(unicode, types))
11602  */
11603   __Pyx_XDECREF(__pyx_r);
11604   __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types));
11605   __pyx_r = ((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types);
11606   goto __pyx_L0;
11607
11608   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11609   __pyx_L0:;
11610   __Pyx_XGIVEREF(__pyx_r);
11611   __Pyx_FinishRefcountContext();
11612   return __pyx_r;
11613 }
11614
11615 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1035
11616  *         def __get__(self):
11617  *             return self._schema_types
11618  *         def __set__(self, types):             # <<<<<<<<<<<<<<
11619  *             self._schema_types = list(map(unicode, types))
11620  * 
11621  */
11622
11623 static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types); /*proto*/
11624 static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types) {
11625   int __pyx_r;
11626   PyObject *__pyx_t_1 = NULL;
11627   PyObject *__pyx_t_2 = NULL;
11628   __Pyx_SetupRefcountContext("__set__");
11629
11630   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1036
11631  *             return self._schema_types
11632  *         def __set__(self, types):
11633  *             self._schema_types = list(map(unicode, types))             # <<<<<<<<<<<<<<
11634  * 
11635  * 
11636  */
11637   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11638   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
11639   __Pyx_INCREF(((PyObject *)((PyObject*)&PyUnicode_Type)));
11640   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)&PyUnicode_Type)));
11641   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyUnicode_Type)));
11642   __Pyx_INCREF(__pyx_v_types);
11643   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_types);
11644   __Pyx_GIVEREF(__pyx_v_types);
11645   __pyx_t_2 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11646   __Pyx_GOTREF(__pyx_t_2);
11647   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
11648   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11649   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
11650   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
11651   __Pyx_GIVEREF(__pyx_t_2);
11652   __pyx_t_2 = 0;
11653   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyList_Type)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11654   __Pyx_GOTREF(__pyx_t_2);
11655   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
11656   if (!(likely(PyList_CheckExact(__pyx_t_2)) || (__pyx_t_2) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected list, got %s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11657   __Pyx_GIVEREF(__pyx_t_2);
11658   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types);
11659   __Pyx_DECREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types));
11660   ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types = ((PyObject *)__pyx_t_2);
11661   __pyx_t_2 = 0;
11662
11663   __pyx_r = 0;
11664   goto __pyx_L0;
11665   __pyx_L1_error:;
11666   __Pyx_XDECREF(__pyx_t_1);
11667   __Pyx_XDECREF(__pyx_t_2);
11668   __Pyx_AddTraceback("lxml.objectify.PyType.xmlSchemaTypes.__set__");
11669   __pyx_r = -1;
11670   __pyx_L0:;
11671   __Pyx_FinishRefcountContext();
11672   return __pyx_r;
11673 }
11674
11675 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1048
11676  * _TYPE_CHECKS = []
11677  * 
11678  * cdef _lower_bool(b):             # <<<<<<<<<<<<<<
11679  *     if b:
11680  *         return u"true"
11681  */
11682
11683 static  PyObject *__pyx_f_4lxml_9objectify__lower_bool(PyObject *__pyx_v_b) {
11684   PyObject *__pyx_r = NULL;
11685   int __pyx_t_1;
11686   __Pyx_SetupRefcountContext("_lower_bool");
11687   __Pyx_INCREF(__pyx_v_b);
11688
11689   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1049
11690  * 
11691  * cdef _lower_bool(b):
11692  *     if b:             # <<<<<<<<<<<<<<
11693  *         return u"true"
11694  *     else:
11695  */
11696   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11697   if (__pyx_t_1) {
11698
11699     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1050
11700  * cdef _lower_bool(b):
11701  *     if b:
11702  *         return u"true"             # <<<<<<<<<<<<<<
11703  *     else:
11704  *         return u"false"
11705  */
11706     __Pyx_XDECREF(__pyx_r);
11707     __Pyx_INCREF(((PyObject *)__pyx_n_u_true));
11708     __pyx_r = ((PyObject *)__pyx_n_u_true);
11709     goto __pyx_L0;
11710     goto __pyx_L3;
11711   }
11712   /*else*/ {
11713
11714     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1052
11715  *         return u"true"
11716  *     else:
11717  *         return u"false"             # <<<<<<<<<<<<<<
11718  * 
11719  * def __lower_bool(b):
11720  */
11721     __Pyx_XDECREF(__pyx_r);
11722     __Pyx_INCREF(((PyObject *)__pyx_n_u_false));
11723     __pyx_r = ((PyObject *)__pyx_n_u_false);
11724     goto __pyx_L0;
11725   }
11726   __pyx_L3:;
11727
11728   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11729   goto __pyx_L0;
11730   __pyx_L1_error:;
11731   __Pyx_AddTraceback("lxml.objectify._lower_bool");
11732   __pyx_r = 0;
11733   __pyx_L0:;
11734   __Pyx_DECREF(__pyx_v_b);
11735   __Pyx_XGIVEREF(__pyx_r);
11736   __Pyx_FinishRefcountContext();
11737   return __pyx_r;
11738 }
11739
11740 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1054
11741  *         return u"false"
11742  * 
11743  * def __lower_bool(b):             # <<<<<<<<<<<<<<
11744  *     return _lower_bool(b)
11745  * 
11746  */
11747
11748 static PyObject *__pyx_pf_4lxml_9objectify___lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b); /*proto*/
11749 static PyObject *__pyx_pf_4lxml_9objectify___lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b) {
11750   PyObject *__pyx_r = NULL;
11751   PyObject *__pyx_t_1 = NULL;
11752   __Pyx_SetupRefcountContext("__lower_bool");
11753   __pyx_self = __pyx_self;
11754
11755   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1055
11756  * 
11757  * def __lower_bool(b):
11758  *     return _lower_bool(b)             # <<<<<<<<<<<<<<
11759  * 
11760  * cdef _pytypename(obj):
11761  */
11762   __Pyx_XDECREF(__pyx_r);
11763   __pyx_t_1 = __pyx_f_4lxml_9objectify__lower_bool(__pyx_v_b); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11764   __Pyx_GOTREF(__pyx_t_1);
11765   __pyx_r = __pyx_t_1;
11766   __pyx_t_1 = 0;
11767   goto __pyx_L0;
11768
11769   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11770   goto __pyx_L0;
11771   __pyx_L1_error:;
11772   __Pyx_XDECREF(__pyx_t_1);
11773   __Pyx_AddTraceback("lxml.objectify.__lower_bool");
11774   __pyx_r = NULL;
11775   __pyx_L0:;
11776   __Pyx_XGIVEREF(__pyx_r);
11777   __Pyx_FinishRefcountContext();
11778   return __pyx_r;
11779 }
11780
11781 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1057
11782  *     return _lower_bool(b)
11783  * 
11784  * cdef _pytypename(obj):             # <<<<<<<<<<<<<<
11785  *     if python._isString(obj):
11786  *         return u"str"
11787  */
11788
11789 static  PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *__pyx_v_obj) {
11790   PyObject *__pyx_r = NULL;
11791   int __pyx_t_1;
11792   PyObject *__pyx_t_2 = NULL;
11793   __Pyx_SetupRefcountContext("_pytypename");
11794   __Pyx_INCREF(__pyx_v_obj);
11795
11796   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1058
11797  * 
11798  * cdef _pytypename(obj):
11799  *     if python._isString(obj):             # <<<<<<<<<<<<<<
11800  *         return u"str"
11801  *     else:
11802  */
11803   __pyx_t_1 = _isString(__pyx_v_obj);
11804   if (__pyx_t_1) {
11805
11806     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1059
11807  * cdef _pytypename(obj):
11808  *     if python._isString(obj):
11809  *         return u"str"             # <<<<<<<<<<<<<<
11810  *     else:
11811  *         return _typename(obj)
11812  */
11813     __Pyx_XDECREF(__pyx_r);
11814     __Pyx_INCREF(((PyObject *)__pyx_n_u_str));
11815     __pyx_r = ((PyObject *)__pyx_n_u_str);
11816     goto __pyx_L0;
11817     goto __pyx_L3;
11818   }
11819   /*else*/ {
11820
11821     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1061
11822  *         return u"str"
11823  *     else:
11824  *         return _typename(obj)             # <<<<<<<<<<<<<<
11825  * 
11826  * def pytypename(obj):
11827  */
11828     __Pyx_XDECREF(__pyx_r);
11829     __pyx_t_2 = __pyx_f_4lxml_9objectify__typename(__pyx_v_obj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11830     __Pyx_GOTREF(__pyx_t_2);
11831     __pyx_r = __pyx_t_2;
11832     __pyx_t_2 = 0;
11833     goto __pyx_L0;
11834   }
11835   __pyx_L3:;
11836
11837   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11838   goto __pyx_L0;
11839   __pyx_L1_error:;
11840   __Pyx_XDECREF(__pyx_t_2);
11841   __Pyx_AddTraceback("lxml.objectify._pytypename");
11842   __pyx_r = 0;
11843   __pyx_L0:;
11844   __Pyx_DECREF(__pyx_v_obj);
11845   __Pyx_XGIVEREF(__pyx_r);
11846   __Pyx_FinishRefcountContext();
11847   return __pyx_r;
11848 }
11849
11850 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1063
11851  *         return _typename(obj)
11852  * 
11853  * def pytypename(obj):             # <<<<<<<<<<<<<<
11854  *     u"""pytypename(obj)
11855  * 
11856  */
11857
11858 static PyObject *__pyx_pf_4lxml_9objectify_pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11859 static char __pyx_doc_4lxml_9objectify_pytypename[] = "pytypename(obj)\n\n    Find the name of the corresponding PyType for a Python object.\n    ";
11860 static PyObject *__pyx_pf_4lxml_9objectify_pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11861   PyObject *__pyx_r = NULL;
11862   PyObject *__pyx_t_1 = NULL;
11863   __Pyx_SetupRefcountContext("pytypename");
11864   __pyx_self = __pyx_self;
11865
11866   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1068
11867  *     Find the name of the corresponding PyType for a Python object.
11868  *     """
11869  *     return _pytypename(obj)             # <<<<<<<<<<<<<<
11870  * 
11871  * cdef _registerPyTypes():
11872  */
11873   __Pyx_XDECREF(__pyx_r);
11874   __pyx_t_1 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v_obj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11875   __Pyx_GOTREF(__pyx_t_1);
11876   __pyx_r = __pyx_t_1;
11877   __pyx_t_1 = 0;
11878   goto __pyx_L0;
11879
11880   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11881   goto __pyx_L0;
11882   __pyx_L1_error:;
11883   __Pyx_XDECREF(__pyx_t_1);
11884   __Pyx_AddTraceback("lxml.objectify.pytypename");
11885   __pyx_r = NULL;
11886   __pyx_L0:;
11887   __Pyx_XGIVEREF(__pyx_r);
11888   __Pyx_FinishRefcountContext();
11889   return __pyx_r;
11890 }
11891
11892 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1070
11893  *     return _pytypename(obj)
11894  * 
11895  * cdef _registerPyTypes():             # <<<<<<<<<<<<<<
11896  *     pytype = PyType(u'int', int, IntElement)
11897  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",
11898  */
11899
11900 static  PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) {
11901   PyObject *__pyx_v_pytype;
11902   PyObject *__pyx_r = NULL;
11903   PyObject *__pyx_t_1 = NULL;
11904   PyObject *__pyx_t_2 = NULL;
11905   PyObject *__pyx_t_3 = NULL;
11906   __Pyx_SetupRefcountContext("_registerPyTypes");
11907   __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);
11908
11909   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1071
11910  * 
11911  * cdef _registerPyTypes():
11912  *     pytype = PyType(u'int', int, IntElement)             # <<<<<<<<<<<<<<
11913  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",
11914  *                              u"unsignedByte", u"nonPositiveInteger",
11915  */
11916   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11917   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
11918   __Pyx_INCREF(((PyObject *)__pyx_n_u_int));
11919   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_u_int));
11920   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_int));
11921   __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
11922   PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
11923   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
11924   __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
11925   PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
11926   __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
11927   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11928   __Pyx_GOTREF(__pyx_t_2);
11929   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
11930   __Pyx_DECREF(__pyx_v_pytype);
11931   __pyx_v_pytype = __pyx_t_2;
11932   __pyx_t_2 = 0;
11933
11934   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1072
11935  * cdef _registerPyTypes():
11936  *     pytype = PyType(u'int', int, IntElement)
11937  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",             # <<<<<<<<<<<<<<
11938  *                              u"unsignedByte", u"nonPositiveInteger",
11939  *                              u"negativeInteger", u"long", u"nonNegativeInteger",
11940  */
11941   __pyx_t_2 = PyTuple_New(13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11942   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
11943   __Pyx_INCREF(((PyObject *)__pyx_n_u_integer));
11944   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_u_integer));
11945   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_integer));
11946   __Pyx_INCREF(((PyObject *)__pyx_n_u_int));
11947   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_u_int));
11948   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_int));
11949   __Pyx_INCREF(((PyObject *)__pyx_n_u_short));
11950   PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_n_u_short));
11951   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_short));
11952   __Pyx_INCREF(((PyObject *)__pyx_n_u_byte));
11953   PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_u_byte));
11954   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_byte));
11955   __Pyx_INCREF(((PyObject *)__pyx_n_u_unsignedShort));
11956   PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_n_u_unsignedShort));
11957   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_unsignedShort));
11958   __Pyx_INCREF(((PyObject *)__pyx_n_u_unsignedByte));
11959   PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_n_u_unsignedByte));
11960   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_unsignedByte));
11961   __Pyx_INCREF(((PyObject *)__pyx_n_u_nonPositiveInteger));
11962   PyTuple_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_n_u_nonPositiveInteger));
11963   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_nonPositiveInteger));
11964   __Pyx_INCREF(((PyObject *)__pyx_n_u_negativeInteger));
11965   PyTuple_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_n_u_negativeInteger));
11966   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_negativeInteger));
11967   __Pyx_INCREF(((PyObject *)__pyx_n_u_long));
11968   PyTuple_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_n_u_long));
11969   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_long));
11970   __Pyx_INCREF(((PyObject *)__pyx_n_u_nonNegativeInteger));
11971   PyTuple_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_n_u_nonNegativeInteger));
11972   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_nonNegativeInteger));
11973   __Pyx_INCREF(((PyObject *)__pyx_n_u_unsignedLong));
11974   PyTuple_SET_ITEM(__pyx_t_2, 10, ((PyObject *)__pyx_n_u_unsignedLong));
11975   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_unsignedLong));
11976   __Pyx_INCREF(((PyObject *)__pyx_n_u_unsignedInt));
11977   PyTuple_SET_ITEM(__pyx_t_2, 11, ((PyObject *)__pyx_n_u_unsignedInt));
11978   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_unsignedInt));
11979   __Pyx_INCREF(((PyObject *)__pyx_n_u_positiveInteger));
11980   PyTuple_SET_ITEM(__pyx_t_2, 12, ((PyObject *)__pyx_n_u_positiveInteger));
11981   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_positiveInteger));
11982   if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_ui_xmlSchemaTypes, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11983   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
11984
11985   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1076
11986  *                              u"negativeInteger", u"long", u"nonNegativeInteger",
11987  *                              u"unsignedLong", u"unsignedInt", u"positiveInteger",)
11988  *     pytype.register()             # <<<<<<<<<<<<<<
11989  * 
11990  *     # 'long' type just for backwards compatibility
11991  */
11992   __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11993   __Pyx_GOTREF(__pyx_t_2);
11994   __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11995   __Pyx_GOTREF(__pyx_t_1);
11996   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11997   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11998
11999   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1079
12000  * 
12001  *     # 'long' type just for backwards compatibility
12002  *     pytype = PyType(u'long', None, IntElement)             # <<<<<<<<<<<<<<
12003  *     pytype.register()
12004  * 
12005  */
12006   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12007   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
12008   __Pyx_INCREF(((PyObject *)__pyx_n_u_long));
12009   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_u_long));
12010   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_long));
12011   __Pyx_INCREF(Py_None);
12012   PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
12013   __Pyx_GIVEREF(Py_None);
12014   __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
12015   PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
12016   __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
12017   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12018   __Pyx_GOTREF(__pyx_t_2);
12019   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
12020   __Pyx_DECREF(__pyx_v_pytype);
12021   __pyx_v_pytype = __pyx_t_2;
12022   __pyx_t_2 = 0;
12023
12024   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1080
12025  *     # 'long' type just for backwards compatibility
12026  *     pytype = PyType(u'long', None, IntElement)
12027  *     pytype.register()             # <<<<<<<<<<<<<<
12028  * 
12029  *     pytype = PyType(u'float', float, FloatElement)
12030  */
12031   __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12032   __Pyx_GOTREF(__pyx_t_2);
12033   __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12034   __Pyx_GOTREF(__pyx_t_1);
12035   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12036   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12037
12038   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1082
12039  *     pytype.register()
12040  * 
12041  *     pytype = PyType(u'float', float, FloatElement)             # <<<<<<<<<<<<<<
12042  *     pytype.xmlSchemaTypes = (u"double", u"float")
12043  *     pytype.register()
12044  */
12045   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12046   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
12047   __Pyx_INCREF(((PyObject *)__pyx_n_u_float));
12048   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_u_float));
12049   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_float));
12050   __Pyx_INCREF(((PyObject *)((PyObject*)&PyFloat_Type)));
12051   PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)((PyObject*)&PyFloat_Type)));
12052   __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyFloat_Type)));
12053   __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_FloatElement)));
12054   PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_FloatElement)));
12055   __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_FloatElement)));
12056   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12057   __Pyx_GOTREF(__pyx_t_2);
12058   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
12059   __Pyx_DECREF(__pyx_v_pytype);
12060   __pyx_v_pytype = __pyx_t_2;
12061   __pyx_t_2 = 0;
12062
12063   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1083
12064  * 
12065  *     pytype = PyType(u'float', float, FloatElement)
12066  *     pytype.xmlSchemaTypes = (u"double", u"float")             # <<<<<<<<<<<<<<
12067  *     pytype.register()
12068  * 
12069  */
12070   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12071   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
12072   __Pyx_INCREF(((PyObject *)__pyx_n_u_double));
12073   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_u_double));
12074   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_double));
12075   __Pyx_INCREF(((PyObject *)__pyx_n_u_float));
12076   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_u_float));
12077   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_float));
12078   if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_ui_xmlSchemaTypes, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12079   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
12080
12081   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1084
12082  *     pytype = PyType(u'float', float, FloatElement)
12083  *     pytype.xmlSchemaTypes = (u"double", u"float")
12084  *     pytype.register()             # <<<<<<<<<<<<<<
12085  * 
12086  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
12087  */
12088   __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12089   __Pyx_GOTREF(__pyx_t_2);
12090   __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12091   __Pyx_GOTREF(__pyx_t_1);
12092   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12093   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12094
12095   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1086
12096  *     pytype.register()
12097  * 
12098  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)             # <<<<<<<<<<<<<<
12099  *     pytype.xmlSchemaTypes = (u"boolean",)
12100  *     pytype.register()
12101  */
12102   __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_ui___checkBool); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12103   __Pyx_GOTREF(__pyx_t_1);
12104   __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_ui___lower_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12105   __Pyx_GOTREF(__pyx_t_2);
12106   __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12107   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
12108   __Pyx_INCREF(((PyObject *)__pyx_n_u_bool));
12109   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u_bool));
12110   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_bool));
12111   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
12112   __Pyx_GIVEREF(__pyx_t_1);
12113   __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement)));
12114   PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement)));
12115   __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement)));
12116   PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
12117   __Pyx_GIVEREF(__pyx_t_2);
12118   __pyx_t_1 = 0;
12119   __pyx_t_2 = 0;
12120   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12121   __Pyx_GOTREF(__pyx_t_2);
12122   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
12123   __Pyx_DECREF(__pyx_v_pytype);
12124   __pyx_v_pytype = __pyx_t_2;
12125   __pyx_t_2 = 0;
12126
12127   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1087
12128  * 
12129  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
12130  *     pytype.xmlSchemaTypes = (u"boolean",)             # <<<<<<<<<<<<<<
12131  *     pytype.register()
12132  * 
12133  */
12134   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12135   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
12136   __Pyx_INCREF(((PyObject *)__pyx_n_u_boolean));
12137   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_u_boolean));
12138   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_boolean));
12139   if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_ui_xmlSchemaTypes, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12140   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
12141
12142   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1088
12143  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
12144  *     pytype.xmlSchemaTypes = (u"boolean",)
12145  *     pytype.register()             # <<<<<<<<<<<<<<
12146  * 
12147  *     pytype = PyType(u'str', None, StringElement)
12148  */
12149   __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12150   __Pyx_GOTREF(__pyx_t_2);
12151   __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12152   __Pyx_GOTREF(__pyx_t_3);
12153   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12154   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12155
12156   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1090
12157  *     pytype.register()
12158  * 
12159  *     pytype = PyType(u'str', None, StringElement)             # <<<<<<<<<<<<<<
12160  *     pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",
12161  *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
12162  */
12163   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12164   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
12165   __Pyx_INCREF(((PyObject *)__pyx_n_u_str));
12166   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u_str));
12167   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_str));
12168   __Pyx_INCREF(Py_None);
12169   PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
12170   __Pyx_GIVEREF(Py_None);
12171   __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
12172   PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
12173   __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
12174   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12175   __Pyx_GOTREF(__pyx_t_2);
12176   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
12177   __Pyx_DECREF(__pyx_v_pytype);
12178   __pyx_v_pytype = __pyx_t_2;
12179   __pyx_t_2 = 0;
12180
12181   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1091
12182  * 
12183  *     pytype = PyType(u'str', None, StringElement)
12184  *     pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",             # <<<<<<<<<<<<<<
12185  *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
12186  *                              u"NMTOKEN", )
12187  */
12188   __pyx_t_2 = PyTuple_New(10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12189   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
12190   __Pyx_INCREF(((PyObject *)__pyx_n_u_string));
12191   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_u_string));
12192   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_string));
12193   __Pyx_INCREF(((PyObject *)__pyx_n_u_normalizedString));
12194   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_u_normalizedString));
12195   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_normalizedString));
12196   __Pyx_INCREF(((PyObject *)__pyx_n_u_token));
12197   PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_n_u_token));
12198   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_token));
12199   __Pyx_INCREF(((PyObject *)__pyx_n_u_language));
12200   PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_u_language));
12201   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_language));
12202   __Pyx_INCREF(((PyObject *)__pyx_n_u_Name));
12203   PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_n_u_Name));
12204   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_Name));
12205   __Pyx_INCREF(((PyObject *)__pyx_n_u_NCName));
12206   PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_n_u_NCName));
12207   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_NCName));
12208   __Pyx_INCREF(((PyObject *)__pyx_n_u_ID));
12209   PyTuple_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_n_u_ID));
12210   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_ID));
12211   __Pyx_INCREF(((PyObject *)__pyx_n_u_IDREF));
12212   PyTuple_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_n_u_IDREF));
12213   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_IDREF));
12214   __Pyx_INCREF(((PyObject *)__pyx_n_u_ENTITY));
12215   PyTuple_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_n_u_ENTITY));
12216   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_ENTITY));
12217   __Pyx_INCREF(((PyObject *)__pyx_n_u_NMTOKEN));
12218   PyTuple_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_n_u_NMTOKEN));
12219   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_NMTOKEN));
12220   if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_ui_xmlSchemaTypes, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12221   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
12222
12223   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1094
12224  *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
12225  *                              u"NMTOKEN", )
12226  *     pytype.register()             # <<<<<<<<<<<<<<
12227  * 
12228  *     # since lxml 2.0
12229  */
12230   __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12231   __Pyx_GOTREF(__pyx_t_2);
12232   __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12233   __Pyx_GOTREF(__pyx_t_3);
12234   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12235   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12236
12237   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1097
12238  * 
12239  *     # since lxml 2.0
12240  *     pytype = PyType(u'NoneType', None, NoneElement)             # <<<<<<<<<<<<<<
12241  *     pytype.register()
12242  * 
12243  */
12244   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12245   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
12246   __Pyx_INCREF(((PyObject *)__pyx_n_u_NoneType));
12247   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u_NoneType));
12248   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_NoneType));
12249   __Pyx_INCREF(Py_None);
12250   PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
12251   __Pyx_GIVEREF(Py_None);
12252   __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
12253   PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
12254   __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
12255   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12256   __Pyx_GOTREF(__pyx_t_2);
12257   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
12258   __Pyx_DECREF(__pyx_v_pytype);
12259   __pyx_v_pytype = __pyx_t_2;
12260   __pyx_t_2 = 0;
12261
12262   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1098
12263  *     # since lxml 2.0
12264  *     pytype = PyType(u'NoneType', None, NoneElement)
12265  *     pytype.register()             # <<<<<<<<<<<<<<
12266  * 
12267  *     # backwards compatibility
12268  */
12269   __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12270   __Pyx_GOTREF(__pyx_t_2);
12271   __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12272   __Pyx_GOTREF(__pyx_t_3);
12273   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12274   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12275
12276   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1101
12277  * 
12278  *     # backwards compatibility
12279  *     pytype = PyType(u'none', None, NoneElement)             # <<<<<<<<<<<<<<
12280  *     pytype.register()
12281  * 
12282  */
12283   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12284   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
12285   __Pyx_INCREF(((PyObject *)__pyx_n_u_none));
12286   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u_none));
12287   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_none));
12288   __Pyx_INCREF(Py_None);
12289   PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
12290   __Pyx_GIVEREF(Py_None);
12291   __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
12292   PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
12293   __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
12294   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12295   __Pyx_GOTREF(__pyx_t_2);
12296   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
12297   __Pyx_DECREF(__pyx_v_pytype);
12298   __pyx_v_pytype = __pyx_t_2;
12299   __pyx_t_2 = 0;
12300
12301   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1102
12302  *     # backwards compatibility
12303  *     pytype = PyType(u'none', None, NoneElement)
12304  *     pytype.register()             # <<<<<<<<<<<<<<
12305  * 
12306  * # non-registered PyType for inner tree elements
12307  */
12308   __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12309   __Pyx_GOTREF(__pyx_t_2);
12310   __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12311   __Pyx_GOTREF(__pyx_t_3);
12312   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12313   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12314
12315   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12316   goto __pyx_L0;
12317   __pyx_L1_error:;
12318   __Pyx_XDECREF(__pyx_t_1);
12319   __Pyx_XDECREF(__pyx_t_2);
12320   __Pyx_XDECREF(__pyx_t_3);
12321   __Pyx_AddTraceback("lxml.objectify._registerPyTypes");
12322   __pyx_r = 0;
12323   __pyx_L0:;
12324   __Pyx_DECREF(__pyx_v_pytype);
12325   __Pyx_XGIVEREF(__pyx_r);
12326   __Pyx_FinishRefcountContext();
12327   return __pyx_r;
12328 }
12329
12330 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1110
12331  * _registerPyTypes()
12332  * 
12333  * def getRegisteredTypes():             # <<<<<<<<<<<<<<
12334  *     u"""getRegisteredTypes()
12335  * 
12336  */
12337
12338 static PyObject *__pyx_pf_4lxml_9objectify_getRegisteredTypes(PyObject *__pyx_self, PyObject *unused); /*proto*/
12339 static char __pyx_doc_4lxml_9objectify_getRegisteredTypes[] = "getRegisteredTypes()\n\n    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    ";
12340 static PyObject *__pyx_pf_4lxml_9objectify_getRegisteredTypes(PyObject *__pyx_self, PyObject *unused) {
12341   PyObject *__pyx_v_types = 0;
12342   PyObject *__pyx_v_known = 0;
12343   PyObject *__pyx_v_check;
12344   PyObject *__pyx_v_pytype;
12345   PyObject *__pyx_v_name;
12346   PyObject *__pyx_r = NULL;
12347   PyObject *__pyx_t_1 = NULL;
12348   Py_ssize_t __pyx_t_2;
12349   PyObject *__pyx_t_3 = NULL;
12350   PyObject *__pyx_t_4 = NULL;
12351   PyObject *__pyx_t_5 = NULL;
12352   PyObject *__pyx_t_6 = NULL;
12353   int __pyx_t_7;
12354   int __pyx_t_8;
12355   __Pyx_SetupRefcountContext("getRegisteredTypes");
12356   __pyx_self = __pyx_self;
12357   __pyx_v_check = Py_None; __Pyx_INCREF(Py_None);
12358   __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);
12359   __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
12360
12361   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1125
12362  *     end of the type list.
12363  *     """
12364  *     cdef list types = []             # <<<<<<<<<<<<<<
12365  *     cdef set known = set()
12366  *     for check, pytype in _TYPE_CHECKS:
12367  */
12368   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12369   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
12370   __pyx_v_types = __pyx_t_1;
12371   __pyx_t_1 = 0;
12372
12373   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1126
12374  *     """
12375  *     cdef list types = []
12376  *     cdef set known = set()             # <<<<<<<<<<<<<<
12377  *     for check, pytype in _TYPE_CHECKS:
12378  *         name = pytype.name
12379  */
12380   __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12381   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
12382   __pyx_v_known = __pyx_t_1;
12383   __pyx_t_1 = 0;
12384
12385   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1127
12386  *     cdef list types = []
12387  *     cdef set known = set()
12388  *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
12389  *         name = pytype.name
12390  *         if name not in known:
12391  */
12392   if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
12393     __pyx_t_2 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_1);
12394   } else {
12395     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12396   }
12397   for (;;) {
12398     if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
12399     __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
12400     if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
12401       PyObject* tuple = __pyx_t_3;
12402       __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
12403       __pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5);
12404       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12405       __Pyx_DECREF(__pyx_v_check);
12406       __pyx_v_check = __pyx_t_4;
12407       __pyx_t_4 = 0;
12408       __Pyx_DECREF(__pyx_v_pytype);
12409       __pyx_v_pytype = __pyx_t_5;
12410       __pyx_t_5 = 0;
12411     } else {
12412       __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12413       __Pyx_GOTREF(__pyx_t_6);
12414       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12415       __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12416       __Pyx_GOTREF(__pyx_t_4);
12417       __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12418       __Pyx_GOTREF(__pyx_t_5);
12419       if (__Pyx_EndUnpack(__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12420       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12421       __Pyx_DECREF(__pyx_v_check);
12422       __pyx_v_check = __pyx_t_4;
12423       __pyx_t_4 = 0;
12424       __Pyx_DECREF(__pyx_v_pytype);
12425       __pyx_v_pytype = __pyx_t_5;
12426       __pyx_t_5 = 0;
12427     }
12428
12429     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1128
12430  *     cdef set known = set()
12431  *     for check, pytype in _TYPE_CHECKS:
12432  *         name = pytype.name             # <<<<<<<<<<<<<<
12433  *         if name not in known:
12434  *             known.add(name)
12435  */
12436     __pyx_t_3 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12437     __Pyx_GOTREF(__pyx_t_3);
12438     __Pyx_DECREF(__pyx_v_name);
12439     __pyx_v_name = __pyx_t_3;
12440     __pyx_t_3 = 0;
12441
12442     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1129
12443  *     for check, pytype in _TYPE_CHECKS:
12444  *         name = pytype.name
12445  *         if name not in known:             # <<<<<<<<<<<<<<
12446  *             known.add(name)
12447  *             types.append(pytype)
12448  */
12449     __pyx_t_7 = (!PySequence_Contains(((PyObject *)__pyx_v_known), __pyx_v_name)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12450     if (__pyx_t_7) {
12451
12452       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1130
12453  *         name = pytype.name
12454  *         if name not in known:
12455  *             known.add(name)             # <<<<<<<<<<<<<<
12456  *             types.append(pytype)
12457  *     for pytype in _PYTYPE_DICT.values():
12458  */
12459       __pyx_t_8 = PySet_Add(((PyObject *)__pyx_v_known), __pyx_v_name); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12460
12461       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1131
12462  *         if name not in known:
12463  *             known.add(name)
12464  *             types.append(pytype)             # <<<<<<<<<<<<<<
12465  *     for pytype in _PYTYPE_DICT.values():
12466  *         name = pytype.name
12467  */
12468       if (unlikely(__pyx_v_types == Py_None)) {
12469         PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
12470       }
12471       __pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_types), __pyx_v_pytype); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12472       goto __pyx_L7;
12473     }
12474     __pyx_L7:;
12475   }
12476   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12477
12478   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1132
12479  *             known.add(name)
12480  *             types.append(pytype)
12481  *     for pytype in _PYTYPE_DICT.values():             # <<<<<<<<<<<<<<
12482  *         name = pytype.name
12483  *         if name not in known:
12484  */
12485   __pyx_t_1 = PyDict_Values(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12486   __Pyx_GOTREF(__pyx_t_1);
12487   if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
12488     __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3);
12489   } else {
12490     __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12491     __Pyx_GOTREF(__pyx_t_3);
12492   }
12493   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12494   for (;;) {
12495     if (likely(PyList_CheckExact(__pyx_t_3))) {
12496       if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
12497       __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++;
12498     } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
12499       if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
12500       __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++;
12501     } else {
12502       __pyx_t_1 = PyIter_Next(__pyx_t_3);
12503       if (!__pyx_t_1) {
12504         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12505         break;
12506       }
12507       __Pyx_GOTREF(__pyx_t_1);
12508     }
12509     __Pyx_DECREF(__pyx_v_pytype);
12510     __pyx_v_pytype = __pyx_t_1;
12511     __pyx_t_1 = 0;
12512
12513     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1133
12514  *             types.append(pytype)
12515  *     for pytype in _PYTYPE_DICT.values():
12516  *         name = pytype.name             # <<<<<<<<<<<<<<
12517  *         if name not in known:
12518  *             known.add(name)
12519  */
12520     __pyx_t_1 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12521     __Pyx_GOTREF(__pyx_t_1);
12522     __Pyx_DECREF(__pyx_v_name);
12523     __pyx_v_name = __pyx_t_1;
12524     __pyx_t_1 = 0;
12525
12526     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1134
12527  *     for pytype in _PYTYPE_DICT.values():
12528  *         name = pytype.name
12529  *         if name not in known:             # <<<<<<<<<<<<<<
12530  *             known.add(name)
12531  *             types.append(pytype)
12532  */
12533     __pyx_t_7 = (!PySequence_Contains(((PyObject *)__pyx_v_known), __pyx_v_name)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12534     if (__pyx_t_7) {
12535
12536       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1135
12537  *         name = pytype.name
12538  *         if name not in known:
12539  *             known.add(name)             # <<<<<<<<<<<<<<
12540  *             types.append(pytype)
12541  *     return types
12542  */
12543       __pyx_t_8 = PySet_Add(((PyObject *)__pyx_v_known), __pyx_v_name); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12544
12545       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1136
12546  *         if name not in known:
12547  *             known.add(name)
12548  *             types.append(pytype)             # <<<<<<<<<<<<<<
12549  *     return types
12550  * 
12551  */
12552       if (unlikely(__pyx_v_types == Py_None)) {
12553         PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
12554       }
12555       __pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_types), __pyx_v_pytype); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12556       goto __pyx_L10;
12557     }
12558     __pyx_L10:;
12559   }
12560   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12561
12562   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1137
12563  *             known.add(name)
12564  *             types.append(pytype)
12565  *     return types             # <<<<<<<<<<<<<<
12566  * 
12567  * cdef PyType _guessPyType(value, PyType defaulttype):
12568  */
12569   __Pyx_XDECREF(__pyx_r);
12570   __Pyx_INCREF(((PyObject *)__pyx_v_types));
12571   __pyx_r = ((PyObject *)__pyx_v_types);
12572   goto __pyx_L0;
12573
12574   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12575   goto __pyx_L0;
12576   __pyx_L1_error:;
12577   __Pyx_XDECREF(__pyx_t_1);
12578   __Pyx_XDECREF(__pyx_t_3);
12579   __Pyx_XDECREF(__pyx_t_4);
12580   __Pyx_XDECREF(__pyx_t_5);
12581   __Pyx_XDECREF(__pyx_t_6);
12582   __Pyx_AddTraceback("lxml.objectify.getRegisteredTypes");
12583   __pyx_r = NULL;
12584   __pyx_L0:;
12585   __Pyx_XDECREF(__pyx_v_types);
12586   __Pyx_XDECREF(__pyx_v_known);
12587   __Pyx_DECREF(__pyx_v_check);
12588   __Pyx_DECREF(__pyx_v_pytype);
12589   __Pyx_DECREF(__pyx_v_name);
12590   __Pyx_XGIVEREF(__pyx_r);
12591   __Pyx_FinishRefcountContext();
12592   return __pyx_r;
12593 }
12594
12595 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1139
12596  *     return types
12597  * 
12598  * cdef PyType _guessPyType(value, PyType defaulttype):             # <<<<<<<<<<<<<<
12599  *     if value is None:
12600  *         return None
12601  */
12602
12603 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) {
12604   PyObject *__pyx_v_type_check;
12605   PyObject *__pyx_v_tested_pytype;
12606   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r = NULL;
12607   int __pyx_t_1;
12608   Py_ssize_t __pyx_t_2;
12609   PyObject *__pyx_t_3 = NULL;
12610   PyObject *__pyx_t_4 = NULL;
12611   PyObject *__pyx_t_5 = NULL;
12612   PyObject *__pyx_t_6 = NULL;
12613   PyObject *__pyx_t_7 = NULL;
12614   int __pyx_t_8;
12615   __Pyx_SetupRefcountContext("_guessPyType");
12616   __Pyx_INCREF(__pyx_v_value);
12617   __Pyx_INCREF((PyObject *)__pyx_v_defaulttype);
12618   __pyx_v_type_check = Py_None; __Pyx_INCREF(Py_None);
12619   __pyx_v_tested_pytype = Py_None; __Pyx_INCREF(Py_None);
12620
12621   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1140
12622  * 
12623  * cdef PyType _guessPyType(value, PyType defaulttype):
12624  *     if value is None:             # <<<<<<<<<<<<<<
12625  *         return None
12626  *     for type_check, tested_pytype in _TYPE_CHECKS:
12627  */
12628   __pyx_t_1 = (__pyx_v_value == Py_None);
12629   if (__pyx_t_1) {
12630
12631     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1141
12632  * cdef PyType _guessPyType(value, PyType defaulttype):
12633  *     if value is None:
12634  *         return None             # <<<<<<<<<<<<<<
12635  *     for type_check, tested_pytype in _TYPE_CHECKS:
12636  *         try:
12637  */
12638     __Pyx_XDECREF(((PyObject *)__pyx_r));
12639     __Pyx_INCREF(Py_None);
12640     __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
12641     goto __pyx_L0;
12642     goto __pyx_L3;
12643   }
12644   __pyx_L3:;
12645
12646   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1142
12647  *     if value is None:
12648  *         return None
12649  *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
12650  *         try:
12651  *             type_check(value)
12652  */
12653   if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
12654     __pyx_t_2 = 0; __pyx_t_3 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_3);
12655   } else {
12656     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12657   }
12658   for (;;) {
12659     if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
12660     __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
12661     if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
12662       PyObject* tuple = __pyx_t_4;
12663       __pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
12664       __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
12665       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12666       __Pyx_DECREF(__pyx_v_type_check);
12667       __pyx_v_type_check = __pyx_t_5;
12668       __pyx_t_5 = 0;
12669       __Pyx_DECREF(__pyx_v_tested_pytype);
12670       __pyx_v_tested_pytype = __pyx_t_6;
12671       __pyx_t_6 = 0;
12672     } else {
12673       __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12674       __Pyx_GOTREF(__pyx_t_7);
12675       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12676       __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12677       __Pyx_GOTREF(__pyx_t_5);
12678       __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12679       __Pyx_GOTREF(__pyx_t_6);
12680       if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12681       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12682       __Pyx_DECREF(__pyx_v_type_check);
12683       __pyx_v_type_check = __pyx_t_5;
12684       __pyx_t_5 = 0;
12685       __Pyx_DECREF(__pyx_v_tested_pytype);
12686       __pyx_v_tested_pytype = __pyx_t_6;
12687       __pyx_t_6 = 0;
12688     }
12689
12690     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1143
12691  *         return None
12692  *     for type_check, tested_pytype in _TYPE_CHECKS:
12693  *         try:             # <<<<<<<<<<<<<<
12694  *             type_check(value)
12695  *             return <PyType>tested_pytype
12696  */
12697     {
12698       PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
12699       __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
12700       __Pyx_XGOTREF(__pyx_save_exc_type);
12701       __Pyx_XGOTREF(__pyx_save_exc_value);
12702       __Pyx_XGOTREF(__pyx_save_exc_tb);
12703       /*try:*/ {
12704
12705         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1144
12706  *     for type_check, tested_pytype in _TYPE_CHECKS:
12707  *         try:
12708  *             type_check(value)             # <<<<<<<<<<<<<<
12709  *             return <PyType>tested_pytype
12710  *         except IGNORABLE_ERRORS:
12711  */
12712         __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
12713         __Pyx_GOTREF(((PyObject *)__pyx_t_4));
12714         __Pyx_INCREF(__pyx_v_value);
12715         PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
12716         __Pyx_GIVEREF(__pyx_v_value);
12717         __pyx_t_6 = PyObject_Call(__pyx_v_type_check, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
12718         __Pyx_GOTREF(__pyx_t_6);
12719         __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
12720         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12721
12722         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1145
12723  *         try:
12724  *             type_check(value)
12725  *             return <PyType>tested_pytype             # <<<<<<<<<<<<<<
12726  *         except IGNORABLE_ERRORS:
12727  *             # could not be parsed as the specififed type => ignore
12728  */
12729         __Pyx_XDECREF(((PyObject *)__pyx_r));
12730         __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_tested_pytype)));
12731         __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_tested_pytype);
12732         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12733         goto __pyx_L10_try_return;
12734       }
12735       __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
12736       __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
12737       __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
12738       goto __pyx_L13_try_end;
12739       __pyx_L10_try_return:;
12740       __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
12741       __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
12742       __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
12743       goto __pyx_L0;
12744       __pyx_L6_error:;
12745       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
12746       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12747       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12748       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12749
12750       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1146
12751  *             type_check(value)
12752  *             return <PyType>tested_pytype
12753  *         except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
12754  *             # could not be parsed as the specififed type => ignore
12755  *             pass
12756  */
12757       __pyx_t_8 = PyErr_ExceptionMatches(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
12758       if (__pyx_t_8) {
12759         PyErr_Restore(0,0,0);
12760         goto __pyx_L7_exception_handled;
12761       }
12762       __Pyx_XDECREF(__pyx_save_exc_type);
12763       __Pyx_XDECREF(__pyx_save_exc_value);
12764       __Pyx_XDECREF(__pyx_save_exc_tb);
12765       goto __pyx_L1_error;
12766       __pyx_L7_exception_handled:;
12767       __Pyx_XGIVEREF(__pyx_save_exc_type);
12768       __Pyx_XGIVEREF(__pyx_save_exc_value);
12769       __Pyx_XGIVEREF(__pyx_save_exc_tb);
12770       __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
12771       __pyx_L13_try_end:;
12772     }
12773   }
12774   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12775
12776   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1149
12777  *             # could not be parsed as the specififed type => ignore
12778  *             pass
12779  *     return defaulttype             # <<<<<<<<<<<<<<
12780  * 
12781  * cdef object _guessElementClass(tree.xmlNode* c_node):
12782  */
12783   __Pyx_XDECREF(((PyObject *)__pyx_r));
12784   __Pyx_INCREF(((PyObject *)__pyx_v_defaulttype));
12785   __pyx_r = __pyx_v_defaulttype;
12786   goto __pyx_L0;
12787
12788   __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
12789   goto __pyx_L0;
12790   __pyx_L1_error:;
12791   __Pyx_XDECREF(__pyx_t_3);
12792   __Pyx_XDECREF(__pyx_t_4);
12793   __Pyx_XDECREF(__pyx_t_5);
12794   __Pyx_XDECREF(__pyx_t_6);
12795   __Pyx_XDECREF(__pyx_t_7);
12796   __Pyx_AddTraceback("lxml.objectify._guessPyType");
12797   __pyx_r = 0;
12798   __pyx_L0:;
12799   __Pyx_DECREF(__pyx_v_type_check);
12800   __Pyx_DECREF(__pyx_v_tested_pytype);
12801   __Pyx_DECREF(__pyx_v_value);
12802   __Pyx_DECREF((PyObject *)__pyx_v_defaulttype);
12803   __Pyx_XGIVEREF((PyObject *)__pyx_r);
12804   __Pyx_FinishRefcountContext();
12805   return __pyx_r;
12806 }
12807
12808 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1151
12809  *     return defaulttype
12810  * 
12811  * cdef object _guessElementClass(tree.xmlNode* c_node):             # <<<<<<<<<<<<<<
12812  *     value = textOf(c_node)
12813  *     if value is None:
12814  */
12815
12816 static  PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_node) {
12817   PyObject *__pyx_v_value;
12818   PyObject *__pyx_v_type_check;
12819   PyObject *__pyx_v_pytype;
12820   PyObject *__pyx_r = NULL;
12821   PyObject *__pyx_t_1 = NULL;
12822   int __pyx_t_2;
12823   Py_ssize_t __pyx_t_3;
12824   PyObject *__pyx_t_4 = NULL;
12825   PyObject *__pyx_t_5 = NULL;
12826   PyObject *__pyx_t_6 = NULL;
12827   PyObject *__pyx_t_7 = NULL;
12828   int __pyx_t_8;
12829   __Pyx_SetupRefcountContext("_guessElementClass");
12830   __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
12831   __pyx_v_type_check = Py_None; __Pyx_INCREF(Py_None);
12832   __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);
12833
12834   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1152
12835  * 
12836  * cdef object _guessElementClass(tree.xmlNode* c_node):
12837  *     value = textOf(c_node)             # <<<<<<<<<<<<<<
12838  *     if value is None:
12839  *         return None
12840  */
12841   __pyx_t_1 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12842   __Pyx_GOTREF(__pyx_t_1);
12843   __Pyx_DECREF(__pyx_v_value);
12844   __pyx_v_value = __pyx_t_1;
12845   __pyx_t_1 = 0;
12846
12847   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1153
12848  * cdef object _guessElementClass(tree.xmlNode* c_node):
12849  *     value = textOf(c_node)
12850  *     if value is None:             # <<<<<<<<<<<<<<
12851  *         return None
12852  *     if value == u'':
12853  */
12854   __pyx_t_2 = (__pyx_v_value == Py_None);
12855   if (__pyx_t_2) {
12856
12857     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1154
12858  *     value = textOf(c_node)
12859  *     if value is None:
12860  *         return None             # <<<<<<<<<<<<<<
12861  *     if value == u'':
12862  *         return StringElement
12863  */
12864     __Pyx_XDECREF(__pyx_r);
12865     __Pyx_INCREF(Py_None);
12866     __pyx_r = Py_None;
12867     goto __pyx_L0;
12868     goto __pyx_L3;
12869   }
12870   __pyx_L3:;
12871
12872   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1155
12873  *     if value is None:
12874  *         return None
12875  *     if value == u'':             # <<<<<<<<<<<<<<
12876  *         return StringElement
12877  * 
12878  */
12879   __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_u_4), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12880   __Pyx_GOTREF(__pyx_t_1);
12881   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12882   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12883   if (__pyx_t_2) {
12884
12885     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1156
12886  *         return None
12887  *     if value == u'':
12888  *         return StringElement             # <<<<<<<<<<<<<<
12889  * 
12890  *     for type_check, pytype in _TYPE_CHECKS:
12891  */
12892     __Pyx_XDECREF(__pyx_r);
12893     __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
12894     __pyx_r = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement));
12895     goto __pyx_L0;
12896     goto __pyx_L4;
12897   }
12898   __pyx_L4:;
12899
12900   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1158
12901  *         return StringElement
12902  * 
12903  *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
12904  *         try:
12905  *             type_check(value)
12906  */
12907   if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
12908     __pyx_t_3 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_1);
12909   } else {
12910     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12911   }
12912   for (;;) {
12913     if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
12914     __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
12915     if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
12916       PyObject* tuple = __pyx_t_4;
12917       __pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
12918       __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
12919       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12920       __Pyx_DECREF(__pyx_v_type_check);
12921       __pyx_v_type_check = __pyx_t_5;
12922       __pyx_t_5 = 0;
12923       __Pyx_DECREF(__pyx_v_pytype);
12924       __pyx_v_pytype = __pyx_t_6;
12925       __pyx_t_6 = 0;
12926     } else {
12927       __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12928       __Pyx_GOTREF(__pyx_t_7);
12929       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12930       __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12931       __Pyx_GOTREF(__pyx_t_5);
12932       __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12933       __Pyx_GOTREF(__pyx_t_6);
12934       if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12935       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12936       __Pyx_DECREF(__pyx_v_type_check);
12937       __pyx_v_type_check = __pyx_t_5;
12938       __pyx_t_5 = 0;
12939       __Pyx_DECREF(__pyx_v_pytype);
12940       __pyx_v_pytype = __pyx_t_6;
12941       __pyx_t_6 = 0;
12942     }
12943
12944     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1159
12945  * 
12946  *     for type_check, pytype in _TYPE_CHECKS:
12947  *         try:             # <<<<<<<<<<<<<<
12948  *             type_check(value)
12949  *             return (<PyType>pytype)._type
12950  */
12951     {
12952       PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
12953       __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
12954       __Pyx_XGOTREF(__pyx_save_exc_type);
12955       __Pyx_XGOTREF(__pyx_save_exc_value);
12956       __Pyx_XGOTREF(__pyx_save_exc_tb);
12957       /*try:*/ {
12958
12959         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1160
12960  *     for type_check, pytype in _TYPE_CHECKS:
12961  *         try:
12962  *             type_check(value)             # <<<<<<<<<<<<<<
12963  *             return (<PyType>pytype)._type
12964  *         except IGNORABLE_ERRORS:
12965  */
12966         __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
12967         __Pyx_GOTREF(((PyObject *)__pyx_t_4));
12968         __Pyx_INCREF(__pyx_v_value);
12969         PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
12970         __Pyx_GIVEREF(__pyx_v_value);
12971         __pyx_t_6 = PyObject_Call(__pyx_v_type_check, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
12972         __Pyx_GOTREF(__pyx_t_6);
12973         __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
12974         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12975
12976         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1161
12977  *         try:
12978  *             type_check(value)
12979  *             return (<PyType>pytype)._type             # <<<<<<<<<<<<<<
12980  *         except IGNORABLE_ERRORS:
12981  *             pass
12982  */
12983         __Pyx_XDECREF(__pyx_r);
12984         __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->_type);
12985         __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->_type;
12986         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12987         goto __pyx_L11_try_return;
12988       }
12989       __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
12990       __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
12991       __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
12992       goto __pyx_L14_try_end;
12993       __pyx_L11_try_return:;
12994       __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
12995       __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
12996       __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
12997       goto __pyx_L0;
12998       __pyx_L7_error:;
12999       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13000       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13001       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13002       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13003
13004       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1162
13005  *             type_check(value)
13006  *             return (<PyType>pytype)._type
13007  *         except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
13008  *             pass
13009  *     return None
13010  */
13011       __pyx_t_8 = PyErr_ExceptionMatches(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
13012       if (__pyx_t_8) {
13013         PyErr_Restore(0,0,0);
13014         goto __pyx_L8_exception_handled;
13015       }
13016       __Pyx_XDECREF(__pyx_save_exc_type);
13017       __Pyx_XDECREF(__pyx_save_exc_value);
13018       __Pyx_XDECREF(__pyx_save_exc_tb);
13019       goto __pyx_L1_error;
13020       __pyx_L8_exception_handled:;
13021       __Pyx_XGIVEREF(__pyx_save_exc_type);
13022       __Pyx_XGIVEREF(__pyx_save_exc_value);
13023       __Pyx_XGIVEREF(__pyx_save_exc_tb);
13024       __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
13025       __pyx_L14_try_end:;
13026     }
13027   }
13028   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13029
13030   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1164
13031  *         except IGNORABLE_ERRORS:
13032  *             pass
13033  *     return None             # <<<<<<<<<<<<<<
13034  * 
13035  * ################################################################################
13036  */
13037   __Pyx_XDECREF(__pyx_r);
13038   __Pyx_INCREF(Py_None);
13039   __pyx_r = Py_None;
13040   goto __pyx_L0;
13041
13042   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13043   goto __pyx_L0;
13044   __pyx_L1_error:;
13045   __Pyx_XDECREF(__pyx_t_1);
13046   __Pyx_XDECREF(__pyx_t_4);
13047   __Pyx_XDECREF(__pyx_t_5);
13048   __Pyx_XDECREF(__pyx_t_6);
13049   __Pyx_XDECREF(__pyx_t_7);
13050   __Pyx_AddTraceback("lxml.objectify._guessElementClass");
13051   __pyx_r = 0;
13052   __pyx_L0:;
13053   __Pyx_DECREF(__pyx_v_value);
13054   __Pyx_DECREF(__pyx_v_type_check);
13055   __Pyx_DECREF(__pyx_v_pytype);
13056   __Pyx_XGIVEREF(__pyx_r);
13057   __Pyx_FinishRefcountContext();
13058   return __pyx_r;
13059 }
13060
13061 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1175
13062  *     cdef bint _annotate
13063  * 
13064  *     def __call__(self, *children, **attrib):             # <<<<<<<<<<<<<<
13065  *         u"__call__(self, *children, **attrib)"
13066  *         cdef _ObjectifyElementMakerCaller elementMaker
13067  */
13068
13069 static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13070 static char __pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__[] = "__call__(self, *children, **attrib)";
13071 static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13072   PyObject *__pyx_v_children = 0;
13073   PyObject *__pyx_v_attrib = 0;
13074   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_elementMaker;
13075   PyObject *__pyx_v_pytype;
13076   struct LxmlElement *__pyx_v_element;
13077   struct LxmlElement *__pyx_v_childElement;
13078   int __pyx_v_has_children;
13079   int __pyx_v_has_string_value;
13080   PyObject *__pyx_v_pytype_name;
13081   PyObject *__pyx_v_child;
13082   PyObject *__pyx_r = NULL;
13083   int __pyx_t_1;
13084   PyObject *__pyx_t_2 = NULL;
13085   PyObject *__pyx_t_3 = NULL;
13086   Py_ssize_t __pyx_t_4;
13087   int __pyx_t_5;
13088   PyObject *__pyx_t_6 = NULL;
13089   __Pyx_SetupRefcountContext("__call__");
13090   if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 1))) return NULL;
13091   __pyx_v_attrib = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
13092   if (unlikely(!__pyx_v_attrib)) return NULL;
13093   __Pyx_GOTREF(__pyx_v_attrib);
13094   __Pyx_INCREF(__pyx_args);
13095   __pyx_v_children = __pyx_args;
13096   __Pyx_INCREF((PyObject *)__pyx_v_self);
13097   __pyx_v_elementMaker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)Py_None); __Pyx_INCREF(Py_None);
13098   __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
13099   __pyx_v_childElement = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
13100   __pyx_v_pytype_name = Py_None; __Pyx_INCREF(Py_None);
13101   __pyx_v_child = Py_None; __Pyx_INCREF(Py_None);
13102
13103   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1183
13104  *         cdef bint has_children
13105  *         cdef bint has_string_value
13106  *         if self._element_factory is None:             # <<<<<<<<<<<<<<
13107  *             element = _makeElement(self._tag, None, attrib, self._nsmap)
13108  *         else:
13109  */
13110   __pyx_t_1 = (((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_element_factory == Py_None);
13111   if (__pyx_t_1) {
13112
13113     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1184
13114  *         cdef bint has_string_value
13115  *         if self._element_factory is None:
13116  *             element = _makeElement(self._tag, None, attrib, self._nsmap)             # <<<<<<<<<<<<<<
13117  *         else:
13118  *             element = self._element_factory(self._tag, attrib, self._nsmap)
13119  */
13120     __pyx_t_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_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13121     __Pyx_GOTREF(__pyx_t_2);
13122     __Pyx_DECREF(((PyObject *)__pyx_v_element));
13123     __pyx_v_element = ((struct LxmlElement *)__pyx_t_2);
13124     __pyx_t_2 = 0;
13125     goto __pyx_L5;
13126   }
13127   /*else*/ {
13128
13129     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1186
13130  *             element = _makeElement(self._tag, None, attrib, self._nsmap)
13131  *         else:
13132  *             element = self._element_factory(self._tag, attrib, self._nsmap)             # <<<<<<<<<<<<<<
13133  * 
13134  *         pytype_name = None
13135  */
13136     __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13137     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
13138     __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag);
13139     PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag);
13140     __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag);
13141     __Pyx_INCREF(__pyx_v_attrib);
13142     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_attrib);
13143     __Pyx_GIVEREF(__pyx_v_attrib);
13144     __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap);
13145     PyTuple_SET_ITEM(__pyx_t_2, 2, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap);
13146     __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap);
13147     __pyx_t_3 = PyObject_Call(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_element_factory, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13148     __Pyx_GOTREF(__pyx_t_3);
13149     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
13150     if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13151     __Pyx_DECREF(((PyObject *)__pyx_v_element));
13152     __pyx_v_element = ((struct LxmlElement *)__pyx_t_3);
13153     __pyx_t_3 = 0;
13154   }
13155   __pyx_L5:;
13156
13157   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1188
13158  *             element = self._element_factory(self._tag, attrib, self._nsmap)
13159  * 
13160  *         pytype_name = None             # <<<<<<<<<<<<<<
13161  *         has_children = 0
13162  *         has_string_value = 0
13163  */
13164   __Pyx_INCREF(Py_None);
13165   __Pyx_DECREF(__pyx_v_pytype_name);
13166   __pyx_v_pytype_name = Py_None;
13167
13168   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1189
13169  * 
13170  *         pytype_name = None
13171  *         has_children = 0             # <<<<<<<<<<<<<<
13172  *         has_string_value = 0
13173  *         for child in children:
13174  */
13175   __pyx_v_has_children = 0;
13176
13177   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1190
13178  *         pytype_name = None
13179  *         has_children = 0
13180  *         has_string_value = 0             # <<<<<<<<<<<<<<
13181  *         for child in children:
13182  *             if child is None:
13183  */
13184   __pyx_v_has_string_value = 0;
13185
13186   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1191
13187  *         has_children = 0
13188  *         has_string_value = 0
13189  *         for child in children:             # <<<<<<<<<<<<<<
13190  *             if child is None:
13191  *                 if python.PyTuple_GET_SIZE(children) == 1:
13192  */
13193   if (PyList_CheckExact(__pyx_v_children) || PyTuple_CheckExact(__pyx_v_children)) {
13194     __pyx_t_4 = 0; __pyx_t_3 = __pyx_v_children; __Pyx_INCREF(__pyx_t_3);
13195   } else {
13196     __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_children); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13197     __Pyx_GOTREF(__pyx_t_3);
13198   }
13199   for (;;) {
13200     if (likely(PyList_CheckExact(__pyx_t_3))) {
13201       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
13202       __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
13203     } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
13204       if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
13205       __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
13206     } else {
13207       __pyx_t_2 = PyIter_Next(__pyx_t_3);
13208       if (!__pyx_t_2) {
13209         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13210         break;
13211       }
13212       __Pyx_GOTREF(__pyx_t_2);
13213     }
13214     __Pyx_DECREF(__pyx_v_child);
13215     __pyx_v_child = __pyx_t_2;
13216     __pyx_t_2 = 0;
13217
13218     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1192
13219  *         has_string_value = 0
13220  *         for child in children:
13221  *             if child is None:             # <<<<<<<<<<<<<<
13222  *                 if python.PyTuple_GET_SIZE(children) == 1:
13223  *                     cetree.setAttributeValue(
13224  */
13225     __pyx_t_1 = (__pyx_v_child == Py_None);
13226     if (__pyx_t_1) {
13227
13228       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1193
13229  *         for child in children:
13230  *             if child is None:
13231  *                 if python.PyTuple_GET_SIZE(children) == 1:             # <<<<<<<<<<<<<<
13232  *                     cetree.setAttributeValue(
13233  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
13234  */
13235       __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v_children) == 1);
13236       if (__pyx_t_1) {
13237
13238         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1195
13239  *                 if python.PyTuple_GET_SIZE(children) == 1:
13240  *                     cetree.setAttributeValue(
13241  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")             # <<<<<<<<<<<<<<
13242  *             elif python._isString(child):
13243  *                 _add_text(element, child)
13244  */
13245         __pyx_t_5 = setAttributeValue(__pyx_v_element, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, ((PyObject *)__pyx_n_u_true)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13246         goto __pyx_L9;
13247       }
13248       __pyx_L9:;
13249       goto __pyx_L8;
13250     }
13251
13252     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1196
13253  *                     cetree.setAttributeValue(
13254  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
13255  *             elif python._isString(child):             # <<<<<<<<<<<<<<
13256  *                 _add_text(element, child)
13257  *                 has_string_value = 1
13258  */
13259     __pyx_t_1 = _isString(__pyx_v_child);
13260     if (__pyx_t_1) {
13261
13262       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1197
13263  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
13264  *             elif python._isString(child):
13265  *                 _add_text(element, child)             # <<<<<<<<<<<<<<
13266  *                 has_string_value = 1
13267  *             elif isinstance(child, _Element):
13268  */
13269       __pyx_t_2 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13270       __Pyx_GOTREF(__pyx_t_2);
13271       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13272
13273       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1198
13274  *             elif python._isString(child):
13275  *                 _add_text(element, child)
13276  *                 has_string_value = 1             # <<<<<<<<<<<<<<
13277  *             elif isinstance(child, _Element):
13278  *                 cetree.appendChild(element, <_Element>child)
13279  */
13280       __pyx_v_has_string_value = 1;
13281       goto __pyx_L8;
13282     }
13283
13284     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1199
13285  *                 _add_text(element, child)
13286  *                 has_string_value = 1
13287  *             elif isinstance(child, _Element):             # <<<<<<<<<<<<<<
13288  *                 cetree.appendChild(element, <_Element>child)
13289  *                 has_children = 1
13290  */
13291     __pyx_t_1 = PyObject_TypeCheck(__pyx_v_child, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element))); 
13292     if (__pyx_t_1) {
13293
13294       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1200
13295  *                 has_string_value = 1
13296  *             elif isinstance(child, _Element):
13297  *                 cetree.appendChild(element, <_Element>child)             # <<<<<<<<<<<<<<
13298  *                 has_children = 1
13299  *             elif isinstance(child, _ObjectifyElementMakerCaller):
13300  */
13301       appendChild(__pyx_v_element, ((struct LxmlElement *)__pyx_v_child));
13302
13303       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1201
13304  *             elif isinstance(child, _Element):
13305  *                 cetree.appendChild(element, <_Element>child)
13306  *                 has_children = 1             # <<<<<<<<<<<<<<
13307  *             elif isinstance(child, _ObjectifyElementMakerCaller):
13308  *                 elementMaker = <_ObjectifyElementMakerCaller>child
13309  */
13310       __pyx_v_has_children = 1;
13311       goto __pyx_L8;
13312     }
13313
13314     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1202
13315  *                 cetree.appendChild(element, <_Element>child)
13316  *                 has_children = 1
13317  *             elif isinstance(child, _ObjectifyElementMakerCaller):             # <<<<<<<<<<<<<<
13318  *                 elementMaker = <_ObjectifyElementMakerCaller>child
13319  *                 if elementMaker._element_factory is None:
13320  */
13321     __pyx_t_1 = PyObject_TypeCheck(__pyx_v_child, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller))); 
13322     if (__pyx_t_1) {
13323
13324       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1203
13325  *                 has_children = 1
13326  *             elif isinstance(child, _ObjectifyElementMakerCaller):
13327  *                 elementMaker = <_ObjectifyElementMakerCaller>child             # <<<<<<<<<<<<<<
13328  *                 if elementMaker._element_factory is None:
13329  *                     cetree.makeSubElement(element, elementMaker._tag,
13330  */
13331       __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_child)));
13332       __Pyx_DECREF(((PyObject *)__pyx_v_elementMaker));
13333       __pyx_v_elementMaker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_child);
13334
13335       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1204
13336  *             elif isinstance(child, _ObjectifyElementMakerCaller):
13337  *                 elementMaker = <_ObjectifyElementMakerCaller>child
13338  *                 if elementMaker._element_factory is None:             # <<<<<<<<<<<<<<
13339  *                     cetree.makeSubElement(element, elementMaker._tag,
13340  *                                           None, None, None, None)
13341  */
13342       __pyx_t_1 = (__pyx_v_elementMaker->_element_factory == Py_None);
13343       if (__pyx_t_1) {
13344
13345         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1206
13346  *                 if elementMaker._element_factory is None:
13347  *                     cetree.makeSubElement(element, elementMaker._tag,
13348  *                                           None, None, None, None)             # <<<<<<<<<<<<<<
13349  *                 else:
13350  *                     childElement = elementMaker._element_factory(
13351  */
13352         __pyx_t_2 = ((PyObject *)makeSubElement(__pyx_v_element, __pyx_v_elementMaker->_tag, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13353         __Pyx_GOTREF(__pyx_t_2);
13354         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13355         goto __pyx_L10;
13356       }
13357       /*else*/ {
13358
13359         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1209
13360  *                 else:
13361  *                     childElement = elementMaker._element_factory(
13362  *                         elementMaker._tag)             # <<<<<<<<<<<<<<
13363  *                     cetree.appendChild(element, childElement)
13364  *                 has_children = 1
13365  */
13366         __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13367         __Pyx_GOTREF(((PyObject *)__pyx_t_2));
13368         __Pyx_INCREF(__pyx_v_elementMaker->_tag);
13369         PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_elementMaker->_tag);
13370         __Pyx_GIVEREF(__pyx_v_elementMaker->_tag);
13371         __pyx_t_6 = PyObject_Call(__pyx_v_elementMaker->_element_factory, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13372         __Pyx_GOTREF(__pyx_t_6);
13373         __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
13374         if (!(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13375         __Pyx_DECREF(((PyObject *)__pyx_v_childElement));
13376         __pyx_v_childElement = ((struct LxmlElement *)__pyx_t_6);
13377         __pyx_t_6 = 0;
13378
13379         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1210
13380  *                     childElement = elementMaker._element_factory(
13381  *                         elementMaker._tag)
13382  *                     cetree.appendChild(element, childElement)             # <<<<<<<<<<<<<<
13383  *                 has_children = 1
13384  *             else:
13385  */
13386         appendChild(__pyx_v_element, __pyx_v_childElement);
13387       }
13388       __pyx_L10:;
13389
13390       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1211
13391  *                         elementMaker._tag)
13392  *                     cetree.appendChild(element, childElement)
13393  *                 has_children = 1             # <<<<<<<<<<<<<<
13394  *             else:
13395  *                 if pytype_name is not None:
13396  */
13397       __pyx_v_has_children = 1;
13398       goto __pyx_L8;
13399     }
13400     /*else*/ {
13401
13402       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1213
13403  *                 has_children = 1
13404  *             else:
13405  *                 if pytype_name is not None:             # <<<<<<<<<<<<<<
13406  *                     # concatenation always makes the result a string
13407  *                     has_string_value = 1
13408  */
13409       __pyx_t_1 = (__pyx_v_pytype_name != Py_None);
13410       if (__pyx_t_1) {
13411
13412         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1215
13413  *                 if pytype_name is not None:
13414  *                     # concatenation always makes the result a string
13415  *                     has_string_value = 1             # <<<<<<<<<<<<<<
13416  *                 pytype_name = _typename(child)
13417  *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
13418  */
13419         __pyx_v_has_string_value = 1;
13420         goto __pyx_L11;
13421       }
13422       __pyx_L11:;
13423
13424       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1216
13425  *                     # concatenation always makes the result a string
13426  *                     has_string_value = 1
13427  *                 pytype_name = _typename(child)             # <<<<<<<<<<<<<<
13428  *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
13429  *                 if pytype is not NULL:
13430  */
13431       __pyx_t_6 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13432       __Pyx_GOTREF(__pyx_t_6);
13433       __Pyx_DECREF(__pyx_v_pytype_name);
13434       __pyx_v_pytype_name = __pyx_t_6;
13435       __pyx_t_6 = 0;
13436
13437       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1217
13438  *                     has_string_value = 1
13439  *                 pytype_name = _typename(child)
13440  *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)             # <<<<<<<<<<<<<<
13441  *                 if pytype is not NULL:
13442  *                     _add_text(element, (<PyType>pytype).stringify(child))
13443  */
13444       __pyx_v_pytype = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_pytype_name);
13445
13446       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1218
13447  *                 pytype_name = _typename(child)
13448  *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
13449  *                 if pytype is not NULL:             # <<<<<<<<<<<<<<
13450  *                     _add_text(element, (<PyType>pytype).stringify(child))
13451  *                 else:
13452  */
13453       __pyx_t_1 = (__pyx_v_pytype != NULL);
13454       if (__pyx_t_1) {
13455
13456         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1219
13457  *                 pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
13458  *                 if pytype is not NULL:
13459  *                     _add_text(element, (<PyType>pytype).stringify(child))             # <<<<<<<<<<<<<<
13460  *                 else:
13461  *                     has_string_value = 1
13462  */
13463         __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13464         __Pyx_GOTREF(((PyObject *)__pyx_t_6));
13465         __Pyx_INCREF(__pyx_v_child);
13466         PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_child);
13467         __Pyx_GIVEREF(__pyx_v_child);
13468         __pyx_t_2 = PyObject_Call(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->stringify, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13469         __Pyx_GOTREF(__pyx_t_2);
13470         __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
13471         __pyx_t_6 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13472         __Pyx_GOTREF(__pyx_t_6);
13473         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13474         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13475         goto __pyx_L12;
13476       }
13477       /*else*/ {
13478
13479         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1221
13480  *                     _add_text(element, (<PyType>pytype).stringify(child))
13481  *                 else:
13482  *                     has_string_value = 1             # <<<<<<<<<<<<<<
13483  *                     child = unicode(child)
13484  *                     _add_text(element, child)
13485  */
13486         __pyx_v_has_string_value = 1;
13487
13488         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1222
13489  *                 else:
13490  *                     has_string_value = 1
13491  *                     child = unicode(child)             # <<<<<<<<<<<<<<
13492  *                     _add_text(element, child)
13493  * 
13494  */
13495         __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13496         __Pyx_GOTREF(((PyObject *)__pyx_t_6));
13497         __Pyx_INCREF(__pyx_v_child);
13498         PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_child);
13499         __Pyx_GIVEREF(__pyx_v_child);
13500         __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13501         __Pyx_GOTREF(__pyx_t_2);
13502         __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
13503         __Pyx_DECREF(__pyx_v_child);
13504         __pyx_v_child = __pyx_t_2;
13505         __pyx_t_2 = 0;
13506
13507         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1223
13508  *                     has_string_value = 1
13509  *                     child = unicode(child)
13510  *                     _add_text(element, child)             # <<<<<<<<<<<<<<
13511  * 
13512  *         if self._annotate and not has_children:
13513  */
13514         __pyx_t_2 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13515         __Pyx_GOTREF(__pyx_t_2);
13516         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13517       }
13518       __pyx_L12:;
13519     }
13520     __pyx_L8:;
13521   }
13522   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13523
13524   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1225
13525  *                     _add_text(element, child)
13526  * 
13527  *         if self._annotate and not has_children:             # <<<<<<<<<<<<<<
13528  *             if has_string_value:
13529  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
13530  */
13531   if (((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_annotate) {
13532     __pyx_t_1 = (!__pyx_v_has_children);
13533   } else {
13534     __pyx_t_1 = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_annotate;
13535   }
13536   if (__pyx_t_1) {
13537
13538     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1226
13539  * 
13540  *         if self._annotate and not has_children:
13541  *             if has_string_value:             # <<<<<<<<<<<<<<
13542  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
13543  *             elif pytype_name is not None:
13544  */
13545     __pyx_t_1 = __pyx_v_has_string_value;
13546     if (__pyx_t_1) {
13547
13548       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1227
13549  *         if self._annotate and not has_children:
13550  *             if has_string_value:
13551  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")             # <<<<<<<<<<<<<<
13552  *             elif pytype_name is not None:
13553  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
13554  */
13555       __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13556       __Pyx_GOTREF(__pyx_t_3);
13557       __pyx_t_5 = setAttributeValue(__pyx_v_element, __pyx_t_3, ((PyObject *)__pyx_n_u_str)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13558       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13559       goto __pyx_L14;
13560     }
13561
13562     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1228
13563  *             if has_string_value:
13564  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
13565  *             elif pytype_name is not None:             # <<<<<<<<<<<<<<
13566  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
13567  * 
13568  */
13569     __pyx_t_1 = (__pyx_v_pytype_name != Py_None);
13570     if (__pyx_t_1) {
13571
13572       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1229
13573  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
13574  *             elif pytype_name is not None:
13575  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<<
13576  * 
13577  *         return element
13578  */
13579       __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13580       __Pyx_GOTREF(__pyx_t_3);
13581       __pyx_t_5 = setAttributeValue(__pyx_v_element, __pyx_t_3, __pyx_v_pytype_name); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13582       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13583       goto __pyx_L14;
13584     }
13585     __pyx_L14:;
13586     goto __pyx_L13;
13587   }
13588   __pyx_L13:;
13589
13590   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1231
13591  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
13592  * 
13593  *         return element             # <<<<<<<<<<<<<<
13594  * 
13595  * cdef _add_text(_Element elem, text):
13596  */
13597   __Pyx_XDECREF(__pyx_r);
13598   __Pyx_INCREF(((PyObject *)__pyx_v_element));
13599   __pyx_r = ((PyObject *)__pyx_v_element);
13600   goto __pyx_L0;
13601
13602   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13603   goto __pyx_L0;
13604   __pyx_L1_error:;
13605   __Pyx_XDECREF(__pyx_t_2);
13606   __Pyx_XDECREF(__pyx_t_3);
13607   __Pyx_XDECREF(__pyx_t_6);
13608   __Pyx_AddTraceback("lxml.objectify._ObjectifyElementMakerCaller.__call__");
13609   __pyx_r = NULL;
13610   __pyx_L0:;
13611   __Pyx_DECREF(__pyx_v_children);
13612   __Pyx_DECREF(__pyx_v_attrib);
13613   __Pyx_DECREF((PyObject *)__pyx_v_elementMaker);
13614   __Pyx_DECREF((PyObject *)__pyx_v_element);
13615   __Pyx_DECREF((PyObject *)__pyx_v_childElement);
13616   __Pyx_DECREF(__pyx_v_pytype_name);
13617   __Pyx_DECREF(__pyx_v_child);
13618   __Pyx_DECREF((PyObject *)__pyx_v_self);
13619   __Pyx_XGIVEREF(__pyx_r);
13620   __Pyx_FinishRefcountContext();
13621   return __pyx_r;
13622 }
13623
13624 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1233
13625  *         return element
13626  * 
13627  * cdef _add_text(_Element elem, text):             # <<<<<<<<<<<<<<
13628  *     # add text to the tree in construction, either as element text or
13629  *     # tail text, depending on the current tree state
13630  */
13631
13632 static  PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_elem, PyObject *__pyx_v_text) {
13633   xmlNode *__pyx_v_c_child;
13634   PyObject *__pyx_v_old;
13635   PyObject *__pyx_r = NULL;
13636   int __pyx_t_1;
13637   PyObject *__pyx_t_2 = NULL;
13638   int __pyx_t_3;
13639   __Pyx_SetupRefcountContext("_add_text");
13640   __Pyx_INCREF((PyObject *)__pyx_v_elem);
13641   __Pyx_INCREF(__pyx_v_text);
13642   __pyx_v_old = Py_None; __Pyx_INCREF(Py_None);
13643
13644   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1237
13645  *     # tail text, depending on the current tree state
13646  *     cdef tree.xmlNode* c_child
13647  *     c_child = cetree.findChildBackwards(elem._c_node, 0)             # <<<<<<<<<<<<<<
13648  *     if c_child is not NULL:
13649  *         old = cetree.tailOf(c_child)
13650  */
13651   __pyx_v_c_child = findChildBackwards(__pyx_v_elem->_c_node, 0);
13652
13653   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1238
13654  *     cdef tree.xmlNode* c_child
13655  *     c_child = cetree.findChildBackwards(elem._c_node, 0)
13656  *     if c_child is not NULL:             # <<<<<<<<<<<<<<
13657  *         old = cetree.tailOf(c_child)
13658  *         if old is not None:
13659  */
13660   __pyx_t_1 = (__pyx_v_c_child != NULL);
13661   if (__pyx_t_1) {
13662
13663     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1239
13664  *     c_child = cetree.findChildBackwards(elem._c_node, 0)
13665  *     if c_child is not NULL:
13666  *         old = cetree.tailOf(c_child)             # <<<<<<<<<<<<<<
13667  *         if old is not None:
13668  *             text = old + text
13669  */
13670     __pyx_t_2 = tailOf(__pyx_v_c_child); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13671     __Pyx_GOTREF(__pyx_t_2);
13672     __Pyx_DECREF(__pyx_v_old);
13673     __pyx_v_old = __pyx_t_2;
13674     __pyx_t_2 = 0;
13675
13676     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1240
13677  *     if c_child is not NULL:
13678  *         old = cetree.tailOf(c_child)
13679  *         if old is not None:             # <<<<<<<<<<<<<<
13680  *             text = old + text
13681  *         cetree.setTailText(c_child, text)
13682  */
13683     __pyx_t_1 = (__pyx_v_old != Py_None);
13684     if (__pyx_t_1) {
13685
13686       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1241
13687  *         old = cetree.tailOf(c_child)
13688  *         if old is not None:
13689  *             text = old + text             # <<<<<<<<<<<<<<
13690  *         cetree.setTailText(c_child, text)
13691  *     else:
13692  */
13693       __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13694       __Pyx_GOTREF(__pyx_t_2);
13695       __Pyx_DECREF(__pyx_v_text);
13696       __pyx_v_text = __pyx_t_2;
13697       __pyx_t_2 = 0;
13698       goto __pyx_L4;
13699     }
13700     __pyx_L4:;
13701
13702     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1242
13703  *         if old is not None:
13704  *             text = old + text
13705  *         cetree.setTailText(c_child, text)             # <<<<<<<<<<<<<<
13706  *     else:
13707  *         old = cetree.textOf(elem._c_node)
13708  */
13709     __pyx_t_3 = setTailText(__pyx_v_c_child, __pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13710     goto __pyx_L3;
13711   }
13712   /*else*/ {
13713
13714     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1244
13715  *         cetree.setTailText(c_child, text)
13716  *     else:
13717  *         old = cetree.textOf(elem._c_node)             # <<<<<<<<<<<<<<
13718  *         if old is not None:
13719  *             text = old + text
13720  */
13721     __pyx_t_2 = textOf(__pyx_v_elem->_c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13722     __Pyx_GOTREF(__pyx_t_2);
13723     __Pyx_DECREF(__pyx_v_old);
13724     __pyx_v_old = __pyx_t_2;
13725     __pyx_t_2 = 0;
13726
13727     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1245
13728  *     else:
13729  *         old = cetree.textOf(elem._c_node)
13730  *         if old is not None:             # <<<<<<<<<<<<<<
13731  *             text = old + text
13732  *         cetree.setNodeText(elem._c_node, text)
13733  */
13734     __pyx_t_1 = (__pyx_v_old != Py_None);
13735     if (__pyx_t_1) {
13736
13737       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1246
13738  *         old = cetree.textOf(elem._c_node)
13739  *         if old is not None:
13740  *             text = old + text             # <<<<<<<<<<<<<<
13741  *         cetree.setNodeText(elem._c_node, text)
13742  * 
13743  */
13744       __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13745       __Pyx_GOTREF(__pyx_t_2);
13746       __Pyx_DECREF(__pyx_v_text);
13747       __pyx_v_text = __pyx_t_2;
13748       __pyx_t_2 = 0;
13749       goto __pyx_L5;
13750     }
13751     __pyx_L5:;
13752
13753     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1247
13754  *         if old is not None:
13755  *             text = old + text
13756  *         cetree.setNodeText(elem._c_node, text)             # <<<<<<<<<<<<<<
13757  * 
13758  * cdef extern from "etree_defs.h":
13759  */
13760     __pyx_t_3 = setNodeText(__pyx_v_elem->_c_node, __pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13761   }
13762   __pyx_L3:;
13763
13764   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13765   goto __pyx_L0;
13766   __pyx_L1_error:;
13767   __Pyx_XDECREF(__pyx_t_2);
13768   __Pyx_AddTraceback("lxml.objectify._add_text");
13769   __pyx_r = 0;
13770   __pyx_L0:;
13771   __Pyx_DECREF(__pyx_v_old);
13772   __Pyx_DECREF((PyObject *)__pyx_v_elem);
13773   __Pyx_DECREF(__pyx_v_text);
13774   __Pyx_XGIVEREF(__pyx_r);
13775   __Pyx_FinishRefcountContext();
13776   return __pyx_r;
13777 }
13778
13779 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1273
13780  *     cdef object _nsmap
13781  *     cdef bint _annotate
13782  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
13783  *                  makeelement=None):
13784  *         if nsmap is None:
13785  */
13786
13787 static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13788 static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13789   PyObject *__pyx_v_namespace = 0;
13790   PyObject *__pyx_v_nsmap = 0;
13791   PyObject *__pyx_v_annotate = 0;
13792   PyObject *__pyx_v_makeelement = 0;
13793   int __pyx_r;
13794   int __pyx_t_1;
13795   PyObject *__pyx_t_2 = NULL;
13796   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_namespace,&__pyx_n_ui_nsmap,&__pyx_n_ui_annotate,&__pyx_n_ui_makeelement,0};
13797   __Pyx_SetupRefcountContext("__init__");
13798   if (unlikely(__pyx_kwds)) {
13799
13800     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1274
13801  *     cdef bint _annotate
13802  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
13803  *                  makeelement=None):             # <<<<<<<<<<<<<<
13804  *         if nsmap is None:
13805  *             if annotate:
13806  */
13807     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
13808     PyObject* values[4] = {0,0,0,0};
13809     values[0] = ((PyObject *)Py_None);
13810     values[1] = ((PyObject *)Py_None);
13811     values[2] = __pyx_k_22;
13812     values[3] = ((PyObject *)Py_None);
13813     switch (PyTuple_GET_SIZE(__pyx_args)) {
13814       case  0: break;
13815       default: goto __pyx_L5_argtuple_error;
13816     }
13817     while (kw_args > 0) {
13818       PyObject* value;
13819       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_namespace);
13820       if (value) { values[0] = value; if (!(--kw_args)) break; }
13821       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_nsmap);
13822       if (value) { values[1] = value; if (!(--kw_args)) break; }
13823       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_annotate);
13824       if (value) { values[2] = value; if (!(--kw_args)) break; }
13825       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_makeelement);
13826       if (value) { values[3] = value; if (!(--kw_args)) break; }
13827       break;
13828     }
13829     if (unlikely(kw_args > 0)) {
13830       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13831     }
13832     __pyx_v_namespace = values[0];
13833     __pyx_v_nsmap = values[1];
13834     __pyx_v_annotate = values[2];
13835     __pyx_v_makeelement = values[3];
13836   } else if (PyTuple_GET_SIZE(__pyx_args) != 0) {
13837     goto __pyx_L5_argtuple_error;
13838   } else {
13839
13840     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1273
13841  *     cdef object _nsmap
13842  *     cdef bint _annotate
13843  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
13844  *                  makeelement=None):
13845  *         if nsmap is None:
13846  */
13847     __pyx_v_namespace = ((PyObject *)Py_None);
13848     __pyx_v_nsmap = ((PyObject *)Py_None);
13849     __pyx_v_annotate = __pyx_k_22;
13850
13851     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1274
13852  *     cdef bint _annotate
13853  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
13854  *                  makeelement=None):             # <<<<<<<<<<<<<<
13855  *         if nsmap is None:
13856  *             if annotate:
13857  */
13858     __pyx_v_makeelement = ((PyObject *)Py_None);
13859   }
13860   goto __pyx_L4_argument_unpacking_done;
13861   __pyx_L5_argtuple_error:;
13862   __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13863   __pyx_L3_error:;
13864   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__");
13865   return -1;
13866   __pyx_L4_argument_unpacking_done:;
13867   __Pyx_INCREF((PyObject *)__pyx_v_self);
13868   __Pyx_INCREF(__pyx_v_namespace);
13869   __Pyx_INCREF(__pyx_v_nsmap);
13870   __Pyx_INCREF(__pyx_v_annotate);
13871   __Pyx_INCREF(__pyx_v_makeelement);
13872
13873   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1275
13874  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
13875  *                  makeelement=None):
13876  *         if nsmap is None:             # <<<<<<<<<<<<<<
13877  *             if annotate:
13878  *                 nsmap = _DEFAULT_NSMAP
13879  */
13880   __pyx_t_1 = (__pyx_v_nsmap == Py_None);
13881   if (__pyx_t_1) {
13882
13883     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1276
13884  *                  makeelement=None):
13885  *         if nsmap is None:
13886  *             if annotate:             # <<<<<<<<<<<<<<
13887  *                 nsmap = _DEFAULT_NSMAP
13888  *             else:
13889  */
13890     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13891     if (__pyx_t_1) {
13892
13893       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1277
13894  *         if nsmap is None:
13895  *             if annotate:
13896  *                 nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<<
13897  *             else:
13898  *                 nsmap = {}
13899  */
13900       __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
13901       __Pyx_DECREF(__pyx_v_nsmap);
13902       __pyx_v_nsmap = ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
13903       goto __pyx_L7;
13904     }
13905     /*else*/ {
13906
13907       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1279
13908  *                 nsmap = _DEFAULT_NSMAP
13909  *             else:
13910  *                 nsmap = {}             # <<<<<<<<<<<<<<
13911  *         self._nsmap = nsmap
13912  *         if namespace is None:
13913  */
13914       __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13915       __Pyx_GOTREF(((PyObject *)__pyx_t_2));
13916       __Pyx_DECREF(__pyx_v_nsmap);
13917       __pyx_v_nsmap = ((PyObject *)__pyx_t_2);
13918       __pyx_t_2 = 0;
13919     }
13920     __pyx_L7:;
13921     goto __pyx_L6;
13922   }
13923   __pyx_L6:;
13924
13925   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1280
13926  *             else:
13927  *                 nsmap = {}
13928  *         self._nsmap = nsmap             # <<<<<<<<<<<<<<
13929  *         if namespace is None:
13930  *             self._namespace = None
13931  */
13932   __Pyx_INCREF(__pyx_v_nsmap);
13933   __Pyx_GIVEREF(__pyx_v_nsmap);
13934   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
13935   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
13936   ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap = __pyx_v_nsmap;
13937
13938   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1281
13939  *                 nsmap = {}
13940  *         self._nsmap = nsmap
13941  *         if namespace is None:             # <<<<<<<<<<<<<<
13942  *             self._namespace = None
13943  *         else:
13944  */
13945   __pyx_t_1 = (__pyx_v_namespace == Py_None);
13946   if (__pyx_t_1) {
13947
13948     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1282
13949  *         self._nsmap = nsmap
13950  *         if namespace is None:
13951  *             self._namespace = None             # <<<<<<<<<<<<<<
13952  *         else:
13953  *             self._namespace = u"{%s}" % namespace
13954  */
13955     __Pyx_INCREF(Py_None);
13956     __Pyx_GIVEREF(Py_None);
13957     __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
13958     __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
13959     ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace = Py_None;
13960     goto __pyx_L8;
13961   }
13962   /*else*/ {
13963
13964     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1284
13965  *             self._namespace = None
13966  *         else:
13967  *             self._namespace = u"{%s}" % namespace             # <<<<<<<<<<<<<<
13968  *         self._annotate = annotate
13969  *         if makeelement is not None:
13970  */
13971     __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_23), __pyx_v_namespace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13972     __Pyx_GOTREF(__pyx_t_2);
13973     __Pyx_GIVEREF(__pyx_t_2);
13974     __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
13975     __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
13976     ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace = __pyx_t_2;
13977     __pyx_t_2 = 0;
13978   }
13979   __pyx_L8:;
13980
13981   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1285
13982  *         else:
13983  *             self._namespace = u"{%s}" % namespace
13984  *         self._annotate = annotate             # <<<<<<<<<<<<<<
13985  *         if makeelement is not None:
13986  *             assert callable(makeelement)
13987  */
13988   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely((__pyx_t_1 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13989   ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_annotate = __pyx_t_1;
13990
13991   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1286
13992  *             self._namespace = u"{%s}" % namespace
13993  *         self._annotate = annotate
13994  *         if makeelement is not None:             # <<<<<<<<<<<<<<
13995  *             assert callable(makeelement)
13996  *             self._makeelement = makeelement
13997  */
13998   __pyx_t_1 = (__pyx_v_makeelement != Py_None);
13999   if (__pyx_t_1) {
14000
14001     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1287
14002  *         self._annotate = annotate
14003  *         if makeelement is not None:
14004  *             assert callable(makeelement)             # <<<<<<<<<<<<<<
14005  *             self._makeelement = makeelement
14006  *         else:
14007  */
14008     #ifndef PYREX_WITHOUT_ASSERTIONS
14009     if (unlikely(!PyCallable_Check(__pyx_v_makeelement))) {
14010       PyErr_SetNone(PyExc_AssertionError);
14011       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14012     }
14013     #endif
14014
14015     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1288
14016  *         if makeelement is not None:
14017  *             assert callable(makeelement)
14018  *             self._makeelement = makeelement             # <<<<<<<<<<<<<<
14019  *         else:
14020  *             self._makeelement = None
14021  */
14022     __Pyx_INCREF(__pyx_v_makeelement);
14023     __Pyx_GIVEREF(__pyx_v_makeelement);
14024     __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
14025     __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
14026     ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement = __pyx_v_makeelement;
14027     goto __pyx_L9;
14028   }
14029   /*else*/ {
14030
14031     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1290
14032  *             self._makeelement = makeelement
14033  *         else:
14034  *             self._makeelement = None             # <<<<<<<<<<<<<<
14035  * 
14036  *     def __getattr__(self, tag):
14037  */
14038     __Pyx_INCREF(Py_None);
14039     __Pyx_GIVEREF(Py_None);
14040     __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
14041     __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
14042     ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement = Py_None;
14043   }
14044   __pyx_L9:;
14045
14046   __pyx_r = 0;
14047   goto __pyx_L0;
14048   __pyx_L1_error:;
14049   __Pyx_XDECREF(__pyx_t_2);
14050   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__");
14051   __pyx_r = -1;
14052   __pyx_L0:;
14053   __Pyx_DECREF((PyObject *)__pyx_v_self);
14054   __Pyx_DECREF(__pyx_v_namespace);
14055   __Pyx_DECREF(__pyx_v_nsmap);
14056   __Pyx_DECREF(__pyx_v_annotate);
14057   __Pyx_DECREF(__pyx_v_makeelement);
14058   __Pyx_FinishRefcountContext();
14059   return __pyx_r;
14060 }
14061
14062 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1292
14063  *             self._makeelement = None
14064  * 
14065  *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
14066  *         cdef _ObjectifyElementMakerCaller element_maker
14067  *         if is_special_method(tag):
14068  */
14069
14070 static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
14071 static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
14072   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_element_maker;
14073   PyObject *__pyx_r = NULL;
14074   PyObject *__pyx_t_1 = NULL;
14075   PyObject *__pyx_t_2 = NULL;
14076   int __pyx_t_3;
14077   PyObject *__pyx_t_4 = NULL;
14078   int __pyx_t_5;
14079   int __pyx_t_6;
14080   __Pyx_SetupRefcountContext("__getattr__");
14081   __Pyx_INCREF((PyObject *)__pyx_v_self);
14082   __Pyx_INCREF(__pyx_v_tag);
14083   __pyx_v_element_maker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)Py_None); __Pyx_INCREF(Py_None);
14084
14085   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1294
14086  *     def __getattr__(self, tag):
14087  *         cdef _ObjectifyElementMakerCaller element_maker
14088  *         if is_special_method(tag):             # <<<<<<<<<<<<<<
14089  *             return object.__getattr__(self, tag)
14090  *         if self._namespace is not None and tag[0] != u"{":
14091  */
14092   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14093   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
14094   __Pyx_INCREF(__pyx_v_tag);
14095   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag);
14096   __Pyx_GIVEREF(__pyx_v_tag);
14097   __pyx_t_2 = PyObject_Call(__pyx_v_4lxml_9objectify_is_special_method, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14098   __Pyx_GOTREF(__pyx_t_2);
14099   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
14100   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14101   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14102   if (__pyx_t_3) {
14103
14104     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1295
14105  *         cdef _ObjectifyElementMakerCaller element_maker
14106  *         if is_special_method(tag):
14107  *             return object.__getattr__(self, tag)             # <<<<<<<<<<<<<<
14108  *         if self._namespace is not None and tag[0] != u"{":
14109  *             tag = self._namespace + tag
14110  */
14111     __Pyx_XDECREF(__pyx_r);
14112     __pyx_t_2 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_ui___getattr__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14113     __Pyx_GOTREF(__pyx_t_2);
14114     __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14115     __Pyx_GOTREF(((PyObject *)__pyx_t_1));
14116     __Pyx_INCREF(__pyx_v_self);
14117     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
14118     __Pyx_GIVEREF(__pyx_v_self);
14119     __Pyx_INCREF(__pyx_v_tag);
14120     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_tag);
14121     __Pyx_GIVEREF(__pyx_v_tag);
14122     __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14123     __Pyx_GOTREF(__pyx_t_4);
14124     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14125     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
14126     __pyx_r = __pyx_t_4;
14127     __pyx_t_4 = 0;
14128     goto __pyx_L0;
14129     goto __pyx_L5;
14130   }
14131   __pyx_L5:;
14132
14133   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1296
14134  *         if is_special_method(tag):
14135  *             return object.__getattr__(self, tag)
14136  *         if self._namespace is not None and tag[0] != u"{":             # <<<<<<<<<<<<<<
14137  *             tag = self._namespace + tag
14138  *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
14139  */
14140   __pyx_t_3 = (((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace != Py_None);
14141   if (__pyx_t_3) {
14142     __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_tag, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14143     __Pyx_GOTREF(__pyx_t_4);
14144     __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_kp_u_24), Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14145     __Pyx_GOTREF(__pyx_t_1);
14146     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14147     __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14148     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14149     __pyx_t_6 = __pyx_t_5;
14150   } else {
14151     __pyx_t_6 = __pyx_t_3;
14152   }
14153   if (__pyx_t_6) {
14154
14155     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1297
14156  *             return object.__getattr__(self, tag)
14157  *         if self._namespace is not None and tag[0] != u"{":
14158  *             tag = self._namespace + tag             # <<<<<<<<<<<<<<
14159  *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
14160  *         element_maker._tag = tag
14161  */
14162     __pyx_t_1 = PyNumber_Add(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14163     __Pyx_GOTREF(__pyx_t_1);
14164     __Pyx_DECREF(__pyx_v_tag);
14165     __pyx_v_tag = __pyx_t_1;
14166     __pyx_t_1 = 0;
14167     goto __pyx_L6;
14168   }
14169   __pyx_L6:;
14170
14171   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1298
14172  *         if self._namespace is not None and tag[0] != u"{":
14173  *             tag = self._namespace + tag
14174  *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)             # <<<<<<<<<<<<<<
14175  *         element_maker._tag = tag
14176  *         element_maker._nsmap = self._nsmap
14177  */
14178   __pyx_t_1 = ((PyObject *)PY_NEW(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14179   __Pyx_GOTREF(__pyx_t_1);
14180   __Pyx_DECREF(((PyObject *)__pyx_v_element_maker));
14181   __pyx_v_element_maker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_t_1);
14182   __pyx_t_1 = 0;
14183
14184   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1299
14185  *             tag = self._namespace + tag
14186  *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
14187  *         element_maker._tag = tag             # <<<<<<<<<<<<<<
14188  *         element_maker._nsmap = self._nsmap
14189  *         element_maker._annotate = self._annotate
14190  */
14191   __Pyx_INCREF(__pyx_v_tag);
14192   __Pyx_GIVEREF(__pyx_v_tag);
14193   __Pyx_GOTREF(__pyx_v_element_maker->_tag);
14194   __Pyx_DECREF(__pyx_v_element_maker->_tag);
14195   __pyx_v_element_maker->_tag = __pyx_v_tag;
14196
14197   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1300
14198  *         element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
14199  *         element_maker._tag = tag
14200  *         element_maker._nsmap = self._nsmap             # <<<<<<<<<<<<<<
14201  *         element_maker._annotate = self._annotate
14202  *         element_maker._element_factory = self._makeelement
14203  */
14204   __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
14205   __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
14206   __Pyx_GOTREF(__pyx_v_element_maker->_nsmap);
14207   __Pyx_DECREF(__pyx_v_element_maker->_nsmap);
14208   __pyx_v_element_maker->_nsmap = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap;
14209
14210   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1301
14211  *         element_maker._tag = tag
14212  *         element_maker._nsmap = self._nsmap
14213  *         element_maker._annotate = self._annotate             # <<<<<<<<<<<<<<
14214  *         element_maker._element_factory = self._makeelement
14215  *         return element_maker
14216  */
14217   __pyx_v_element_maker->_annotate = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_annotate;
14218
14219   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1302
14220  *         element_maker._nsmap = self._nsmap
14221  *         element_maker._annotate = self._annotate
14222  *         element_maker._element_factory = self._makeelement             # <<<<<<<<<<<<<<
14223  *         return element_maker
14224  * 
14225  */
14226   __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
14227   __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
14228   __Pyx_GOTREF(__pyx_v_element_maker->_element_factory);
14229   __Pyx_DECREF(__pyx_v_element_maker->_element_factory);
14230   __pyx_v_element_maker->_element_factory = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement;
14231
14232   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1303
14233  *         element_maker._annotate = self._annotate
14234  *         element_maker._element_factory = self._makeelement
14235  *         return element_maker             # <<<<<<<<<<<<<<
14236  * 
14237  * ################################################################################
14238  */
14239   __Pyx_XDECREF(__pyx_r);
14240   __Pyx_INCREF(((PyObject *)__pyx_v_element_maker));
14241   __pyx_r = ((PyObject *)__pyx_v_element_maker);
14242   goto __pyx_L0;
14243
14244   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14245   goto __pyx_L0;
14246   __pyx_L1_error:;
14247   __Pyx_XDECREF(__pyx_t_1);
14248   __Pyx_XDECREF(__pyx_t_2);
14249   __Pyx_XDECREF(__pyx_t_4);
14250   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__getattr__");
14251   __pyx_r = NULL;
14252   __pyx_L0:;
14253   __Pyx_DECREF((PyObject *)__pyx_v_element_maker);
14254   __Pyx_DECREF((PyObject *)__pyx_v_self);
14255   __Pyx_DECREF(__pyx_v_tag);
14256   __Pyx_XGIVEREF(__pyx_r);
14257   __Pyx_FinishRefcountContext();
14258   return __pyx_r;
14259 }
14260
14261 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1311
14262  * __RECURSIVE_STR = 0 # default: off
14263  * 
14264  * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
14265  *     u"""enable_recursive_str(on=True)
14266  * 
14267  */
14268
14269 static PyObject *__pyx_pf_4lxml_9objectify_enable_recursive_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14270 static char __pyx_doc_4lxml_9objectify_enable_recursive_str[] = "enable_recursive_str(on=True)\n\n    Enable a recursively generated tree representation for str(element),\n    based on objectify.dump(element).\n    ";
14271 static PyObject *__pyx_pf_4lxml_9objectify_enable_recursive_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14272   PyObject *__pyx_v_on = 0;
14273   PyObject *__pyx_r = NULL;
14274   int __pyx_t_1;
14275   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_on,0};
14276   __Pyx_SetupRefcountContext("enable_recursive_str");
14277   __pyx_self = __pyx_self;
14278   if (unlikely(__pyx_kwds)) {
14279     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
14280     PyObject* values[1] = {0};
14281     values[0] = __pyx_k_25;
14282     switch (PyTuple_GET_SIZE(__pyx_args)) {
14283       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14284       case  0: break;
14285       default: goto __pyx_L5_argtuple_error;
14286     }
14287     switch (PyTuple_GET_SIZE(__pyx_args)) {
14288       case  0:
14289       if (kw_args > 0) {
14290         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_on);
14291         if (unlikely(value)) { values[0] = value; kw_args--; }
14292       }
14293     }
14294     if (unlikely(kw_args > 0)) {
14295       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "enable_recursive_str") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14296     }
14297     __pyx_v_on = values[0];
14298   } else {
14299     __pyx_v_on = __pyx_k_25;
14300     switch (PyTuple_GET_SIZE(__pyx_args)) {
14301       case  1: __pyx_v_on = PyTuple_GET_ITEM(__pyx_args, 0);
14302       case  0: break;
14303       default: goto __pyx_L5_argtuple_error;
14304     }
14305   }
14306   goto __pyx_L4_argument_unpacking_done;
14307   __pyx_L5_argtuple_error:;
14308   __Pyx_RaiseArgtupleInvalid("enable_recursive_str", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14309   __pyx_L3_error:;
14310   __Pyx_AddTraceback("lxml.objectify.enable_recursive_str");
14311   return NULL;
14312   __pyx_L4_argument_unpacking_done:;
14313
14314   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1318
14315  *     """
14316  *     global __RECURSIVE_STR
14317  *     __RECURSIVE_STR = on             # <<<<<<<<<<<<<<
14318  * 
14319  * def dump(_Element element not None):
14320  */
14321   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_on); if (unlikely((__pyx_t_1 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14322   __pyx_v_4lxml_9objectify___RECURSIVE_STR = __pyx_t_1;
14323
14324   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14325   goto __pyx_L0;
14326   __pyx_L1_error:;
14327   __Pyx_AddTraceback("lxml.objectify.enable_recursive_str");
14328   __pyx_r = NULL;
14329   __pyx_L0:;
14330   __Pyx_XGIVEREF(__pyx_r);
14331   __Pyx_FinishRefcountContext();
14332   return __pyx_r;
14333 }
14334
14335 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1320
14336  *     __RECURSIVE_STR = on
14337  * 
14338  * def dump(_Element element not None):             # <<<<<<<<<<<<<<
14339  *     u"""dump(_Element element not None)
14340  * 
14341  */
14342
14343 static PyObject *__pyx_pf_4lxml_9objectify_dump(PyObject *__pyx_self, PyObject *__pyx_v_element); /*proto*/
14344 static char __pyx_doc_4lxml_9objectify_dump[] = "dump(_Element element not None)\n\n    Return a recursively generated string representation of an element.\n    ";
14345 static PyObject *__pyx_pf_4lxml_9objectify_dump(PyObject *__pyx_self, PyObject *__pyx_v_element) {
14346   PyObject *__pyx_r = NULL;
14347   PyObject *__pyx_t_1 = NULL;
14348   __Pyx_SetupRefcountContext("dump");
14349   __pyx_self = __pyx_self;
14350   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_11etreepublic__Element, 0, "element", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14351
14352   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1325
14353  *     Return a recursively generated string representation of an element.
14354  *     """
14355  *     return _dump(element, 0)             # <<<<<<<<<<<<<<
14356  * 
14357  * cdef object _dump(_Element element, int indent):
14358  */
14359   __Pyx_XDECREF(__pyx_r);
14360   __pyx_t_1 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_element), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14361   __Pyx_GOTREF(__pyx_t_1);
14362   __pyx_r = __pyx_t_1;
14363   __pyx_t_1 = 0;
14364   goto __pyx_L0;
14365
14366   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14367   goto __pyx_L0;
14368   __pyx_L1_error:;
14369   __Pyx_XDECREF(__pyx_t_1);
14370   __Pyx_AddTraceback("lxml.objectify.dump");
14371   __pyx_r = NULL;
14372   __pyx_L0:;
14373   __Pyx_XGIVEREF(__pyx_r);
14374   __Pyx_FinishRefcountContext();
14375   return __pyx_r;
14376 }
14377
14378 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1327
14379  *     return _dump(element, 0)
14380  * 
14381  * cdef object _dump(_Element element, int indent):             # <<<<<<<<<<<<<<
14382  *     indentstr = u"    " * indent
14383  *     if isinstance(element, ObjectifiedDataElement):
14384  */
14385
14386 static  PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_element, int __pyx_v_indent) {
14387   PyObject *__pyx_v_indentstr;
14388   PyObject *__pyx_v_value;
14389   PyObject *__pyx_v_result;
14390   PyObject *__pyx_v_xsi_ns;
14391   PyObject *__pyx_v_pytype_ns;
14392   PyObject *__pyx_v_name;
14393   PyObject *__pyx_v_child;
14394   PyObject *__pyx_r = NULL;
14395   PyObject *__pyx_t_1 = NULL;
14396   PyObject *__pyx_t_2 = NULL;
14397   int __pyx_t_3;
14398   int __pyx_t_4;
14399   PyObject *__pyx_t_5 = NULL;
14400   Py_ssize_t __pyx_t_6;
14401   PyObject *__pyx_t_7 = NULL;
14402   PyObject *__pyx_t_8 = NULL;
14403   __Pyx_SetupRefcountContext("_dump");
14404   __Pyx_INCREF((PyObject *)__pyx_v_element);
14405   __pyx_v_indentstr = Py_None; __Pyx_INCREF(Py_None);
14406   __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
14407   __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
14408   __pyx_v_xsi_ns = Py_None; __Pyx_INCREF(Py_None);
14409   __pyx_v_pytype_ns = Py_None; __Pyx_INCREF(Py_None);
14410   __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
14411   __pyx_v_child = Py_None; __Pyx_INCREF(Py_None);
14412
14413   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1328
14414  * 
14415  * cdef object _dump(_Element element, int indent):
14416  *     indentstr = u"    " * indent             # <<<<<<<<<<<<<<
14417  *     if isinstance(element, ObjectifiedDataElement):
14418  *         value = repr(element)
14419  */
14420   __pyx_t_1 = PyInt_FromLong(__pyx_v_indent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14421   __Pyx_GOTREF(__pyx_t_1);
14422   __pyx_t_2 = PyNumber_Multiply(((PyObject *)__pyx_kp_u_26), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14423   __Pyx_GOTREF(__pyx_t_2);
14424   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14425   __Pyx_DECREF(__pyx_v_indentstr);
14426   __pyx_v_indentstr = __pyx_t_2;
14427   __pyx_t_2 = 0;
14428
14429   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1329
14430  * cdef object _dump(_Element element, int indent):
14431  *     indentstr = u"    " * indent
14432  *     if isinstance(element, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
14433  *         value = repr(element)
14434  *     else:
14435  */
14436   __pyx_t_3 = PyObject_TypeCheck(((PyObject *)__pyx_v_element), ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement))); 
14437   if (__pyx_t_3) {
14438
14439     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1330
14440  *     indentstr = u"    " * indent
14441  *     if isinstance(element, ObjectifiedDataElement):
14442  *         value = repr(element)             # <<<<<<<<<<<<<<
14443  *     else:
14444  *         value = textOf(element._c_node)
14445  */
14446     __pyx_t_2 = PyObject_Repr(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14447     __Pyx_GOTREF(__pyx_t_2);
14448     __Pyx_DECREF(__pyx_v_value);
14449     __pyx_v_value = __pyx_t_2;
14450     __pyx_t_2 = 0;
14451     goto __pyx_L3;
14452   }
14453   /*else*/ {
14454
14455     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1332
14456  *         value = repr(element)
14457  *     else:
14458  *         value = textOf(element._c_node)             # <<<<<<<<<<<<<<
14459  *         if value is not None:
14460  *             if not value.strip():
14461  */
14462     __pyx_t_2 = textOf(__pyx_v_element->_c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14463     __Pyx_GOTREF(__pyx_t_2);
14464     __Pyx_DECREF(__pyx_v_value);
14465     __pyx_v_value = __pyx_t_2;
14466     __pyx_t_2 = 0;
14467
14468     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1333
14469  *     else:
14470  *         value = textOf(element._c_node)
14471  *         if value is not None:             # <<<<<<<<<<<<<<
14472  *             if not value.strip():
14473  *                 value = None
14474  */
14475     __pyx_t_3 = (__pyx_v_value != Py_None);
14476     if (__pyx_t_3) {
14477
14478       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1334
14479  *         value = textOf(element._c_node)
14480  *         if value is not None:
14481  *             if not value.strip():             # <<<<<<<<<<<<<<
14482  *                 value = None
14483  *             else:
14484  */
14485       __pyx_t_2 = PyObject_GetAttr(__pyx_v_value, __pyx_n_ui_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14486       __Pyx_GOTREF(__pyx_t_2);
14487       __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14488       __Pyx_GOTREF(__pyx_t_1);
14489       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14490       __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14491       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14492       __pyx_t_4 = (!__pyx_t_3);
14493       if (__pyx_t_4) {
14494
14495         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1335
14496  *         if value is not None:
14497  *             if not value.strip():
14498  *                 value = None             # <<<<<<<<<<<<<<
14499  *             else:
14500  *                 value = repr(value)
14501  */
14502         __Pyx_INCREF(Py_None);
14503         __Pyx_DECREF(__pyx_v_value);
14504         __pyx_v_value = Py_None;
14505         goto __pyx_L5;
14506       }
14507       /*else*/ {
14508
14509         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1337
14510  *                 value = None
14511  *             else:
14512  *                 value = repr(value)             # <<<<<<<<<<<<<<
14513  *     result = u"%s%s = %s [%s]\n" % (indentstr, element.tag,
14514  *                                     value, _typename(element))
14515  */
14516         __pyx_t_1 = PyObject_Repr(__pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14517         __Pyx_GOTREF(__pyx_t_1);
14518         __Pyx_DECREF(__pyx_v_value);
14519         __pyx_v_value = __pyx_t_1;
14520         __pyx_t_1 = 0;
14521       }
14522       __pyx_L5:;
14523       goto __pyx_L4;
14524     }
14525     __pyx_L4:;
14526   }
14527   __pyx_L3:;
14528
14529   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1338
14530  *             else:
14531  *                 value = repr(value)
14532  *     result = u"%s%s = %s [%s]\n" % (indentstr, element.tag,             # <<<<<<<<<<<<<<
14533  *                                     value, _typename(element))
14534  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
14535  */
14536   __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_ui_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14537   __Pyx_GOTREF(__pyx_t_1);
14538
14539   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1339
14540  *                 value = repr(value)
14541  *     result = u"%s%s = %s [%s]\n" % (indentstr, element.tag,
14542  *                                     value, _typename(element))             # <<<<<<<<<<<<<<
14543  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
14544  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
14545  */
14546   __pyx_t_2 = __pyx_f_4lxml_9objectify__typename(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14547   __Pyx_GOTREF(__pyx_t_2);
14548   __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14549   __Pyx_GOTREF(((PyObject *)__pyx_t_5));
14550   __Pyx_INCREF(__pyx_v_indentstr);
14551   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_indentstr);
14552   __Pyx_GIVEREF(__pyx_v_indentstr);
14553   PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
14554   __Pyx_GIVEREF(__pyx_t_1);
14555   __Pyx_INCREF(__pyx_v_value);
14556   PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_value);
14557   __Pyx_GIVEREF(__pyx_v_value);
14558   PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_2);
14559   __Pyx_GIVEREF(__pyx_t_2);
14560   __pyx_t_1 = 0;
14561   __pyx_t_2 = 0;
14562   __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_27), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14563   __Pyx_GOTREF(__pyx_t_2);
14564   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
14565   __Pyx_DECREF(__pyx_v_result);
14566   __pyx_v_result = __pyx_t_2;
14567   __pyx_t_2 = 0;
14568
14569   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1340
14570  *     result = u"%s%s = %s [%s]\n" % (indentstr, element.tag,
14571  *                                     value, _typename(element))
14572  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
14573  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
14574  *     for name, value in cetree.iterattributes(element, 3):
14575  */
14576   __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_23), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14577   __Pyx_GOTREF(__pyx_t_2);
14578   __Pyx_DECREF(__pyx_v_xsi_ns);
14579   __pyx_v_xsi_ns = __pyx_t_2;
14580   __pyx_t_2 = 0;
14581
14582   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1341
14583  *                                     value, _typename(element))
14584  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
14585  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE             # <<<<<<<<<<<<<<
14586  *     for name, value in cetree.iterattributes(element, 3):
14587  *         if u'{' in name:
14588  */
14589   __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_23), __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14590   __Pyx_GOTREF(__pyx_t_2);
14591   __Pyx_DECREF(__pyx_v_pytype_ns);
14592   __pyx_v_pytype_ns = __pyx_t_2;
14593   __pyx_t_2 = 0;
14594
14595   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1342
14596  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
14597  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
14598  *     for name, value in cetree.iterattributes(element, 3):             # <<<<<<<<<<<<<<
14599  *         if u'{' in name:
14600  *             if name == PYTYPE_ATTRIBUTE:
14601  */
14602   __pyx_t_2 = iterattributes(__pyx_v_element, 3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14603   __Pyx_GOTREF(__pyx_t_2);
14604   if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
14605     __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5);
14606   } else {
14607     __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14608     __Pyx_GOTREF(__pyx_t_5);
14609   }
14610   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14611   for (;;) {
14612     if (likely(PyList_CheckExact(__pyx_t_5))) {
14613       if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
14614       __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
14615     } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
14616       if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
14617       __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
14618     } else {
14619       __pyx_t_2 = PyIter_Next(__pyx_t_5);
14620       if (!__pyx_t_2) {
14621         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14622         break;
14623       }
14624       __Pyx_GOTREF(__pyx_t_2);
14625     }
14626     if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
14627       PyObject* tuple = __pyx_t_2;
14628       __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
14629       __pyx_t_7 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_7);
14630       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14631       __Pyx_DECREF(__pyx_v_name);
14632       __pyx_v_name = __pyx_t_1;
14633       __pyx_t_1 = 0;
14634       __Pyx_DECREF(__pyx_v_value);
14635       __pyx_v_value = __pyx_t_7;
14636       __pyx_t_7 = 0;
14637     } else {
14638       __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14639       __Pyx_GOTREF(__pyx_t_8);
14640       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14641       __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_8, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14642       __Pyx_GOTREF(__pyx_t_1);
14643       __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_8, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14644       __Pyx_GOTREF(__pyx_t_7);
14645       if (__Pyx_EndUnpack(__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14646       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14647       __Pyx_DECREF(__pyx_v_name);
14648       __pyx_v_name = __pyx_t_1;
14649       __pyx_t_1 = 0;
14650       __Pyx_DECREF(__pyx_v_value);
14651       __pyx_v_value = __pyx_t_7;
14652       __pyx_t_7 = 0;
14653     }
14654
14655     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1343
14656  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
14657  *     for name, value in cetree.iterattributes(element, 3):
14658  *         if u'{' in name:             # <<<<<<<<<<<<<<
14659  *             if name == PYTYPE_ATTRIBUTE:
14660  *                 if value == TREE_PYTYPE_NAME:
14661  */
14662     __pyx_t_4 = (PySequence_Contains(__pyx_v_name, ((PyObject *)__pyx_kp_u_24))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14663     if (__pyx_t_4) {
14664
14665       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1344
14666  *     for name, value in cetree.iterattributes(element, 3):
14667  *         if u'{' in name:
14668  *             if name == PYTYPE_ATTRIBUTE:             # <<<<<<<<<<<<<<
14669  *                 if value == TREE_PYTYPE_NAME:
14670  *                     continue
14671  */
14672       __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14673       __Pyx_GOTREF(__pyx_t_2);
14674       __pyx_t_7 = PyObject_RichCompare(__pyx_v_name, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14675       __Pyx_GOTREF(__pyx_t_7);
14676       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14677       __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14678       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14679       if (__pyx_t_4) {
14680
14681         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1345
14682  *         if u'{' in name:
14683  *             if name == PYTYPE_ATTRIBUTE:
14684  *                 if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
14685  *                     continue
14686  *                 else:
14687  */
14688         __pyx_t_7 = PyObject_RichCompare(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14689         __Pyx_GOTREF(__pyx_t_7);
14690         __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14691         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14692         if (__pyx_t_4) {
14693
14694           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1346
14695  *             if name == PYTYPE_ATTRIBUTE:
14696  *                 if value == TREE_PYTYPE_NAME:
14697  *                     continue             # <<<<<<<<<<<<<<
14698  *                 else:
14699  *                     name = name.replace(pytype_ns, u'py:')
14700  */
14701           goto __pyx_L6_continue;
14702           goto __pyx_L10;
14703         }
14704         /*else*/ {
14705
14706           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1348
14707  *                     continue
14708  *                 else:
14709  *                     name = name.replace(pytype_ns, u'py:')             # <<<<<<<<<<<<<<
14710  *             name = name.replace(xsi_ns, u'xsi:')
14711  *         result = result + u"%s  * %s = %r\n" % (indentstr, name, value)
14712  */
14713           __pyx_t_7 = PyObject_GetAttr(__pyx_v_name, __pyx_n_ui_replace); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14714           __Pyx_GOTREF(__pyx_t_7);
14715           __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14716           __Pyx_GOTREF(((PyObject *)__pyx_t_2));
14717           __Pyx_INCREF(__pyx_v_pytype_ns);
14718           PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_pytype_ns);
14719           __Pyx_GIVEREF(__pyx_v_pytype_ns);
14720           __Pyx_INCREF(((PyObject *)__pyx_kp_u_28));
14721           PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_u_28));
14722           __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_28));
14723           __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14724           __Pyx_GOTREF(__pyx_t_1);
14725           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14726           __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
14727           __Pyx_DECREF(__pyx_v_name);
14728           __pyx_v_name = __pyx_t_1;
14729           __pyx_t_1 = 0;
14730         }
14731         __pyx_L10:;
14732         goto __pyx_L9;
14733       }
14734       __pyx_L9:;
14735
14736       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1349
14737  *                 else:
14738  *                     name = name.replace(pytype_ns, u'py:')
14739  *             name = name.replace(xsi_ns, u'xsi:')             # <<<<<<<<<<<<<<
14740  *         result = result + u"%s  * %s = %r\n" % (indentstr, name, value)
14741  * 
14742  */
14743       __pyx_t_1 = PyObject_GetAttr(__pyx_v_name, __pyx_n_ui_replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14744       __Pyx_GOTREF(__pyx_t_1);
14745       __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14746       __Pyx_GOTREF(((PyObject *)__pyx_t_2));
14747       __Pyx_INCREF(__pyx_v_xsi_ns);
14748       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_xsi_ns);
14749       __Pyx_GIVEREF(__pyx_v_xsi_ns);
14750       __Pyx_INCREF(((PyObject *)__pyx_kp_u_29));
14751       PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_u_29));
14752       __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_29));
14753       __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14754       __Pyx_GOTREF(__pyx_t_7);
14755       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14756       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
14757       __Pyx_DECREF(__pyx_v_name);
14758       __pyx_v_name = __pyx_t_7;
14759       __pyx_t_7 = 0;
14760       goto __pyx_L8;
14761     }
14762     __pyx_L8:;
14763
14764     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1350
14765  *                     name = name.replace(pytype_ns, u'py:')
14766  *             name = name.replace(xsi_ns, u'xsi:')
14767  *         result = result + u"%s  * %s = %r\n" % (indentstr, name, value)             # <<<<<<<<<<<<<<
14768  * 
14769  *     indent = indent + 1
14770  */
14771     __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14772     __Pyx_GOTREF(((PyObject *)__pyx_t_7));
14773     __Pyx_INCREF(__pyx_v_indentstr);
14774     PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_indentstr);
14775     __Pyx_GIVEREF(__pyx_v_indentstr);
14776     __Pyx_INCREF(__pyx_v_name);
14777     PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_name);
14778     __Pyx_GIVEREF(__pyx_v_name);
14779     __Pyx_INCREF(__pyx_v_value);
14780     PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_value);
14781     __Pyx_GIVEREF(__pyx_v_value);
14782     __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_30), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14783     __Pyx_GOTREF(__pyx_t_2);
14784     __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
14785     __pyx_t_7 = PyNumber_Add(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14786     __Pyx_GOTREF(__pyx_t_7);
14787     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14788     __Pyx_DECREF(__pyx_v_result);
14789     __pyx_v_result = __pyx_t_7;
14790     __pyx_t_7 = 0;
14791     __pyx_L6_continue:;
14792   }
14793   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14794
14795   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1352
14796  *         result = result + u"%s  * %s = %r\n" % (indentstr, name, value)
14797  * 
14798  *     indent = indent + 1             # <<<<<<<<<<<<<<
14799  *     for child in element.iterchildren():
14800  *         result = result + _dump(child, indent)
14801  */
14802   __pyx_v_indent = (__pyx_v_indent + 1);
14803
14804   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1353
14805  * 
14806  *     indent = indent + 1
14807  *     for child in element.iterchildren():             # <<<<<<<<<<<<<<
14808  *         result = result + _dump(child, indent)
14809  *     if indent == 1:
14810  */
14811   __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_ui_iterchildren); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14812   __Pyx_GOTREF(__pyx_t_5);
14813   __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14814   __Pyx_GOTREF(__pyx_t_7);
14815   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14816   if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
14817     __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_7; __Pyx_INCREF(__pyx_t_5);
14818   } else {
14819     __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14820     __Pyx_GOTREF(__pyx_t_5);
14821   }
14822   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14823   for (;;) {
14824     if (likely(PyList_CheckExact(__pyx_t_5))) {
14825       if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
14826       __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++;
14827     } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
14828       if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
14829       __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++;
14830     } else {
14831       __pyx_t_7 = PyIter_Next(__pyx_t_5);
14832       if (!__pyx_t_7) {
14833         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14834         break;
14835       }
14836       __Pyx_GOTREF(__pyx_t_7);
14837     }
14838     __Pyx_DECREF(__pyx_v_child);
14839     __pyx_v_child = __pyx_t_7;
14840     __pyx_t_7 = 0;
14841
14842     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1354
14843  *     indent = indent + 1
14844  *     for child in element.iterchildren():
14845  *         result = result + _dump(child, indent)             # <<<<<<<<<<<<<<
14846  *     if indent == 1:
14847  *         return result[:-1] # strip last '\n'
14848  */
14849     if (!(__Pyx_TypeTest(__pyx_v_child, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14850     __pyx_t_7 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_child), __pyx_v_indent); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14851     __Pyx_GOTREF(__pyx_t_7);
14852     __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14853     __Pyx_GOTREF(__pyx_t_2);
14854     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14855     __Pyx_DECREF(__pyx_v_result);
14856     __pyx_v_result = __pyx_t_2;
14857     __pyx_t_2 = 0;
14858   }
14859   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14860
14861   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1355
14862  *     for child in element.iterchildren():
14863  *         result = result + _dump(child, indent)
14864  *     if indent == 1:             # <<<<<<<<<<<<<<
14865  *         return result[:-1] # strip last '\n'
14866  *     else:
14867  */
14868   __pyx_t_4 = (__pyx_v_indent == 1);
14869   if (__pyx_t_4) {
14870
14871     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1356
14872  *         result = result + _dump(child, indent)
14873  *     if indent == 1:
14874  *         return result[:-1] # strip last '\n'             # <<<<<<<<<<<<<<
14875  *     else:
14876  *         return result
14877  */
14878     __Pyx_XDECREF(__pyx_r);
14879     __pyx_t_5 = PySequence_GetSlice(__pyx_v_result, 0, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14880     __Pyx_GOTREF(__pyx_t_5);
14881     __pyx_r = __pyx_t_5;
14882     __pyx_t_5 = 0;
14883     goto __pyx_L0;
14884     goto __pyx_L13;
14885   }
14886   /*else*/ {
14887
14888     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1358
14889  *         return result[:-1] # strip last '\n'
14890  *     else:
14891  *         return result             # <<<<<<<<<<<<<<
14892  * 
14893  * 
14894  */
14895     __Pyx_XDECREF(__pyx_r);
14896     __Pyx_INCREF(__pyx_v_result);
14897     __pyx_r = __pyx_v_result;
14898     goto __pyx_L0;
14899   }
14900   __pyx_L13:;
14901
14902   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14903   goto __pyx_L0;
14904   __pyx_L1_error:;
14905   __Pyx_XDECREF(__pyx_t_1);
14906   __Pyx_XDECREF(__pyx_t_2);
14907   __Pyx_XDECREF(__pyx_t_5);
14908   __Pyx_XDECREF(__pyx_t_7);
14909   __Pyx_XDECREF(__pyx_t_8);
14910   __Pyx_AddTraceback("lxml.objectify._dump");
14911   __pyx_r = 0;
14912   __pyx_L0:;
14913   __Pyx_DECREF(__pyx_v_indentstr);
14914   __Pyx_DECREF(__pyx_v_value);
14915   __Pyx_DECREF(__pyx_v_result);
14916   __Pyx_DECREF(__pyx_v_xsi_ns);
14917   __Pyx_DECREF(__pyx_v_pytype_ns);
14918   __Pyx_DECREF(__pyx_v_name);
14919   __Pyx_DECREF(__pyx_v_child);
14920   __Pyx_DECREF((PyObject *)__pyx_v_element);
14921   __Pyx_XGIVEREF(__pyx_r);
14922   __Pyx_FinishRefcountContext();
14923   return __pyx_r;
14924 }
14925
14926 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1364
14927  * # Pickle support
14928  * 
14929  * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
14930  *     return etree.ElementTree(fromstring(data))
14931  * 
14932  */
14933
14934 static PyObject *__pyx_pf_4lxml_9objectify___unpickleElementTree(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
14935 static PyObject *__pyx_pf_4lxml_9objectify___unpickleElementTree(PyObject *__pyx_self, PyObject *__pyx_v_data) {
14936   PyObject *__pyx_r = NULL;
14937   PyObject *__pyx_t_1 = NULL;
14938   PyObject *__pyx_t_2 = NULL;
14939   PyObject *__pyx_t_3 = NULL;
14940   PyObject *__pyx_t_4 = NULL;
14941   __Pyx_SetupRefcountContext("__unpickleElementTree");
14942   __pyx_self = __pyx_self;
14943
14944   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1365
14945  * 
14946  * def __unpickleElementTree(data):
14947  *     return etree.ElementTree(fromstring(data))             # <<<<<<<<<<<<<<
14948  * 
14949  * cdef _setupPickle(elementReduceFunction, elementTreeReduceFunction):
14950  */
14951   __Pyx_XDECREF(__pyx_r);
14952   __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_ElementTree); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14953   __Pyx_GOTREF(__pyx_t_1);
14954   __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_ui_fromstring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14955   __Pyx_GOTREF(__pyx_t_2);
14956   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14957   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
14958   __Pyx_INCREF(__pyx_v_data);
14959   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
14960   __Pyx_GIVEREF(__pyx_v_data);
14961   __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14962   __Pyx_GOTREF(__pyx_t_4);
14963   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14964   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
14965   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14966   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
14967   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
14968   __Pyx_GIVEREF(__pyx_t_4);
14969   __pyx_t_4 = 0;
14970   __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14971   __Pyx_GOTREF(__pyx_t_4);
14972   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14973   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
14974   __pyx_r = __pyx_t_4;
14975   __pyx_t_4 = 0;
14976   goto __pyx_L0;
14977
14978   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14979   goto __pyx_L0;
14980   __pyx_L1_error:;
14981   __Pyx_XDECREF(__pyx_t_1);
14982   __Pyx_XDECREF(__pyx_t_2);
14983   __Pyx_XDECREF(__pyx_t_3);
14984   __Pyx_XDECREF(__pyx_t_4);
14985   __Pyx_AddTraceback("lxml.objectify.__unpickleElementTree");
14986   __pyx_r = NULL;
14987   __pyx_L0:;
14988   __Pyx_XGIVEREF(__pyx_r);
14989   __Pyx_FinishRefcountContext();
14990   return __pyx_r;
14991 }
14992
14993 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1367
14994  *     return etree.ElementTree(fromstring(data))
14995  * 
14996  * cdef _setupPickle(elementReduceFunction, elementTreeReduceFunction):             # <<<<<<<<<<<<<<
14997  *     if python.IS_PYTHON3:
14998  *         import copyreg
14999  */
15000
15001 static  PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_elementReduceFunction, PyObject *__pyx_v_elementTreeReduceFunction) {
15002   PyObject *__pyx_v_copyreg;
15003   PyObject *__pyx_r = NULL;
15004   int __pyx_t_1;
15005   PyObject *__pyx_t_2 = NULL;
15006   PyObject *__pyx_t_3 = NULL;
15007   PyObject *__pyx_t_4 = NULL;
15008   PyObject *__pyx_t_5 = NULL;
15009   __Pyx_SetupRefcountContext("_setupPickle");
15010   __Pyx_INCREF(__pyx_v_elementReduceFunction);
15011   __Pyx_INCREF(__pyx_v_elementTreeReduceFunction);
15012   __pyx_v_copyreg = Py_None; __Pyx_INCREF(Py_None);
15013
15014   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1368
15015  * 
15016  * cdef _setupPickle(elementReduceFunction, elementTreeReduceFunction):
15017  *     if python.IS_PYTHON3:             # <<<<<<<<<<<<<<
15018  *         import copyreg
15019  *     else:
15020  */
15021   __pyx_t_1 = IS_PYTHON3;
15022   if (__pyx_t_1) {
15023
15024     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1369
15025  * cdef _setupPickle(elementReduceFunction, elementTreeReduceFunction):
15026  *     if python.IS_PYTHON3:
15027  *         import copyreg             # <<<<<<<<<<<<<<
15028  *     else:
15029  *         import copy_reg as copyreg
15030  */
15031     __pyx_t_2 = __Pyx_Import(__pyx_n_ui_copyreg, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15032     __Pyx_GOTREF(__pyx_t_2);
15033     __Pyx_DECREF(__pyx_v_copyreg);
15034     __pyx_v_copyreg = __pyx_t_2;
15035     __pyx_t_2 = 0;
15036     goto __pyx_L3;
15037   }
15038   /*else*/ {
15039
15040     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1371
15041  *         import copyreg
15042  *     else:
15043  *         import copy_reg as copyreg             # <<<<<<<<<<<<<<
15044  *     copyreg.constructor(fromstring)
15045  *     copyreg.constructor(__unpickleElementTree)
15046  */
15047     __pyx_t_2 = __Pyx_Import(__pyx_n_ui_copy_reg, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15048     __Pyx_GOTREF(__pyx_t_2);
15049     __Pyx_DECREF(__pyx_v_copyreg);
15050     __pyx_v_copyreg = __pyx_t_2;
15051     __pyx_t_2 = 0;
15052   }
15053   __pyx_L3:;
15054
15055   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1372
15056  *     else:
15057  *         import copy_reg as copyreg
15058  *     copyreg.constructor(fromstring)             # <<<<<<<<<<<<<<
15059  *     copyreg.constructor(__unpickleElementTree)
15060  *     copyreg.pickle(ObjectifiedElement,
15061  */
15062   __pyx_t_2 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_n_ui_constructor); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15063   __Pyx_GOTREF(__pyx_t_2);
15064   __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_ui_fromstring); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15065   __Pyx_GOTREF(__pyx_t_3);
15066   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15067   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
15068   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
15069   __Pyx_GIVEREF(__pyx_t_3);
15070   __pyx_t_3 = 0;
15071   __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15072   __Pyx_GOTREF(__pyx_t_3);
15073   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15074   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
15075   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15076
15077   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1373
15078  *         import copy_reg as copyreg
15079  *     copyreg.constructor(fromstring)
15080  *     copyreg.constructor(__unpickleElementTree)             # <<<<<<<<<<<<<<
15081  *     copyreg.pickle(ObjectifiedElement,
15082  *                    elementReduceFunction, fromstring)
15083  */
15084   __pyx_t_3 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_n_ui_constructor); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15085   __Pyx_GOTREF(__pyx_t_3);
15086   __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_ui_31); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15087   __Pyx_GOTREF(__pyx_t_4);
15088   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15089   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
15090   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
15091   __Pyx_GIVEREF(__pyx_t_4);
15092   __pyx_t_4 = 0;
15093   __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15094   __Pyx_GOTREF(__pyx_t_4);
15095   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15096   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
15097   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15098
15099   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1374
15100  *     copyreg.constructor(fromstring)
15101  *     copyreg.constructor(__unpickleElementTree)
15102  *     copyreg.pickle(ObjectifiedElement,             # <<<<<<<<<<<<<<
15103  *                    elementReduceFunction, fromstring)
15104  *     copyreg.pickle(etree._ElementTree,
15105  */
15106   __pyx_t_4 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_n_ui_pickle); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15107   __Pyx_GOTREF(__pyx_t_4);
15108
15109   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1375
15110  *     copyreg.constructor(__unpickleElementTree)
15111  *     copyreg.pickle(ObjectifiedElement,
15112  *                    elementReduceFunction, fromstring)             # <<<<<<<<<<<<<<
15113  *     copyreg.pickle(etree._ElementTree,
15114  *                    elementTreeReduceFunction, __unpickleElementTree)
15115  */
15116   __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_ui_fromstring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15117   __Pyx_GOTREF(__pyx_t_2);
15118   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15119   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
15120   __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
15121   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
15122   __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
15123   __Pyx_INCREF(__pyx_v_elementReduceFunction);
15124   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_elementReduceFunction);
15125   __Pyx_GIVEREF(__pyx_v_elementReduceFunction);
15126   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
15127   __Pyx_GIVEREF(__pyx_t_2);
15128   __pyx_t_2 = 0;
15129   __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15130   __Pyx_GOTREF(__pyx_t_2);
15131   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15132   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
15133   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15134
15135   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1376
15136  *     copyreg.pickle(ObjectifiedElement,
15137  *                    elementReduceFunction, fromstring)
15138  *     copyreg.pickle(etree._ElementTree,             # <<<<<<<<<<<<<<
15139  *                    elementTreeReduceFunction, __unpickleElementTree)
15140  * 
15141  */
15142   __pyx_t_2 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_n_ui_pickle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15143   __Pyx_GOTREF(__pyx_t_2);
15144   __pyx_t_3 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui__ElementTree); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15145   __Pyx_GOTREF(__pyx_t_3);
15146
15147   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1377
15148  *                    elementReduceFunction, fromstring)
15149  *     copyreg.pickle(etree._ElementTree,
15150  *                    elementTreeReduceFunction, __unpickleElementTree)             # <<<<<<<<<<<<<<
15151  * 
15152  * def pickleReduceElement(obj):
15153  */
15154   __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_ui_31); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15155   __Pyx_GOTREF(__pyx_t_4);
15156   __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15157   __Pyx_GOTREF(((PyObject *)__pyx_t_5));
15158   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
15159   __Pyx_GIVEREF(__pyx_t_3);
15160   __Pyx_INCREF(__pyx_v_elementTreeReduceFunction);
15161   PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_elementTreeReduceFunction);
15162   __Pyx_GIVEREF(__pyx_v_elementTreeReduceFunction);
15163   PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
15164   __Pyx_GIVEREF(__pyx_t_4);
15165   __pyx_t_3 = 0;
15166   __pyx_t_4 = 0;
15167   __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15168   __Pyx_GOTREF(__pyx_t_4);
15169   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15170   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
15171   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15172
15173   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15174   goto __pyx_L0;
15175   __pyx_L1_error:;
15176   __Pyx_XDECREF(__pyx_t_2);
15177   __Pyx_XDECREF(__pyx_t_3);
15178   __Pyx_XDECREF(__pyx_t_4);
15179   __Pyx_XDECREF(__pyx_t_5);
15180   __Pyx_AddTraceback("lxml.objectify._setupPickle");
15181   __pyx_r = 0;
15182   __pyx_L0:;
15183   __Pyx_DECREF(__pyx_v_copyreg);
15184   __Pyx_DECREF(__pyx_v_elementReduceFunction);
15185   __Pyx_DECREF(__pyx_v_elementTreeReduceFunction);
15186   __Pyx_XGIVEREF(__pyx_r);
15187   __Pyx_FinishRefcountContext();
15188   return __pyx_r;
15189 }
15190
15191 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1379
15192  *                    elementTreeReduceFunction, __unpickleElementTree)
15193  * 
15194  * def pickleReduceElement(obj):             # <<<<<<<<<<<<<<
15195  *     return (fromstring, (etree.tostring(obj),))
15196  * 
15197  */
15198
15199 static PyObject *__pyx_pf_4lxml_9objectify_pickleReduceElement(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15200 static PyObject *__pyx_pf_4lxml_9objectify_pickleReduceElement(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15201   PyObject *__pyx_r = NULL;
15202   PyObject *__pyx_t_1 = NULL;
15203   PyObject *__pyx_t_2 = NULL;
15204   PyObject *__pyx_t_3 = NULL;
15205   PyObject *__pyx_t_4 = NULL;
15206   __Pyx_SetupRefcountContext("pickleReduceElement");
15207   __pyx_self = __pyx_self;
15208
15209   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1380
15210  * 
15211  * def pickleReduceElement(obj):
15212  *     return (fromstring, (etree.tostring(obj),))             # <<<<<<<<<<<<<<
15213  * 
15214  * def pickleReduceElementTree(obj):
15215  */
15216   __Pyx_XDECREF(__pyx_r);
15217   __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_ui_fromstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15218   __Pyx_GOTREF(__pyx_t_1);
15219   __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_tostring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15220   __Pyx_GOTREF(__pyx_t_2);
15221   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15222   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
15223   __Pyx_INCREF(__pyx_v_obj);
15224   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_obj);
15225   __Pyx_GIVEREF(__pyx_v_obj);
15226   __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15227   __Pyx_GOTREF(__pyx_t_4);
15228   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15229   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
15230   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15231   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
15232   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
15233   __Pyx_GIVEREF(__pyx_t_4);
15234   __pyx_t_4 = 0;
15235   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15236   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
15237   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
15238   __Pyx_GIVEREF(__pyx_t_1);
15239   PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_3));
15240   __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
15241   __pyx_t_1 = 0;
15242   __pyx_t_3 = 0;
15243   __pyx_r = ((PyObject *)__pyx_t_4);
15244   __pyx_t_4 = 0;
15245   goto __pyx_L0;
15246
15247   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15248   goto __pyx_L0;
15249   __pyx_L1_error:;
15250   __Pyx_XDECREF(__pyx_t_1);
15251   __Pyx_XDECREF(__pyx_t_2);
15252   __Pyx_XDECREF(__pyx_t_3);
15253   __Pyx_XDECREF(__pyx_t_4);
15254   __Pyx_AddTraceback("lxml.objectify.pickleReduceElement");
15255   __pyx_r = NULL;
15256   __pyx_L0:;
15257   __Pyx_XGIVEREF(__pyx_r);
15258   __Pyx_FinishRefcountContext();
15259   return __pyx_r;
15260 }
15261
15262 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1382
15263  *     return (fromstring, (etree.tostring(obj),))
15264  * 
15265  * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
15266  *     return (__unpickleElementTree, (etree.tostring(obj),))
15267  * 
15268  */
15269
15270 static PyObject *__pyx_pf_4lxml_9objectify_pickleReduceElementTree(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15271 static PyObject *__pyx_pf_4lxml_9objectify_pickleReduceElementTree(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15272   PyObject *__pyx_r = NULL;
15273   PyObject *__pyx_t_1 = NULL;
15274   PyObject *__pyx_t_2 = NULL;
15275   PyObject *__pyx_t_3 = NULL;
15276   PyObject *__pyx_t_4 = NULL;
15277   __Pyx_SetupRefcountContext("pickleReduceElementTree");
15278   __pyx_self = __pyx_self;
15279
15280   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1383
15281  * 
15282  * def pickleReduceElementTree(obj):
15283  *     return (__unpickleElementTree, (etree.tostring(obj),))             # <<<<<<<<<<<<<<
15284  * 
15285  * _setupPickle(pickleReduceElement, pickleReduceElementTree)
15286  */
15287   __Pyx_XDECREF(__pyx_r);
15288   __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_ui_31); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15289   __Pyx_GOTREF(__pyx_t_1);
15290   __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_tostring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15291   __Pyx_GOTREF(__pyx_t_2);
15292   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15293   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
15294   __Pyx_INCREF(__pyx_v_obj);
15295   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_obj);
15296   __Pyx_GIVEREF(__pyx_v_obj);
15297   __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15298   __Pyx_GOTREF(__pyx_t_4);
15299   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15300   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
15301   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15302   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
15303   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
15304   __Pyx_GIVEREF(__pyx_t_4);
15305   __pyx_t_4 = 0;
15306   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15307   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
15308   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
15309   __Pyx_GIVEREF(__pyx_t_1);
15310   PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_3));
15311   __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
15312   __pyx_t_1 = 0;
15313   __pyx_t_3 = 0;
15314   __pyx_r = ((PyObject *)__pyx_t_4);
15315   __pyx_t_4 = 0;
15316   goto __pyx_L0;
15317
15318   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15319   goto __pyx_L0;
15320   __pyx_L1_error:;
15321   __Pyx_XDECREF(__pyx_t_1);
15322   __Pyx_XDECREF(__pyx_t_2);
15323   __Pyx_XDECREF(__pyx_t_3);
15324   __Pyx_XDECREF(__pyx_t_4);
15325   __Pyx_AddTraceback("lxml.objectify.pickleReduceElementTree");
15326   __pyx_r = NULL;
15327   __pyx_L0:;
15328   __Pyx_XGIVEREF(__pyx_r);
15329   __Pyx_FinishRefcountContext();
15330   return __pyx_r;
15331 }
15332
15333 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1397
15334  *     cdef object empty_data_class
15335  *     cdef object tree_class
15336  *     def __init__(self, tree_class=None, empty_data_class=None):             # <<<<<<<<<<<<<<
15337  *         u"""Lookup mechanism for objectify.
15338  * 
15339  */
15340
15341 static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15342 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        ";
15343 static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15344   PyObject *__pyx_v_tree_class = 0;
15345   PyObject *__pyx_v_empty_data_class = 0;
15346   int __pyx_r;
15347   int __pyx_t_1;
15348   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_tree_class,&__pyx_n_ui_empty_data_class,0};
15349   __Pyx_SetupRefcountContext("__init__");
15350   if (unlikely(__pyx_kwds)) {
15351     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
15352     PyObject* values[2] = {0,0};
15353     values[0] = ((PyObject *)Py_None);
15354     values[1] = ((PyObject *)Py_None);
15355     switch (PyTuple_GET_SIZE(__pyx_args)) {
15356       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15357       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15358       case  0: break;
15359       default: goto __pyx_L5_argtuple_error;
15360     }
15361     switch (PyTuple_GET_SIZE(__pyx_args)) {
15362       case  0:
15363       if (kw_args > 1) {
15364         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_tree_class);
15365         if (unlikely(value)) { values[0] = value; kw_args--; }
15366       }
15367       case  1:
15368       if (kw_args > 1) {
15369         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_empty_data_class);
15370         if (unlikely(value)) { values[1] = value; kw_args--; }
15371       }
15372     }
15373     if (unlikely(kw_args > 0)) {
15374       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15375     }
15376     __pyx_v_tree_class = values[0];
15377     __pyx_v_empty_data_class = values[1];
15378   } else {
15379     __pyx_v_tree_class = ((PyObject *)Py_None);
15380     __pyx_v_empty_data_class = ((PyObject *)Py_None);
15381     switch (PyTuple_GET_SIZE(__pyx_args)) {
15382       case  2: __pyx_v_empty_data_class = PyTuple_GET_ITEM(__pyx_args, 1);
15383       case  1: __pyx_v_tree_class = PyTuple_GET_ITEM(__pyx_args, 0);
15384       case  0: break;
15385       default: goto __pyx_L5_argtuple_error;
15386     }
15387   }
15388   goto __pyx_L4_argument_unpacking_done;
15389   __pyx_L5_argtuple_error:;
15390   __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15391   __pyx_L3_error:;
15392   __Pyx_AddTraceback("lxml.objectify.ObjectifyElementClassLookup.__init__");
15393   return -1;
15394   __pyx_L4_argument_unpacking_done:;
15395   __Pyx_INCREF((PyObject *)__pyx_v_self);
15396   __Pyx_INCREF(__pyx_v_tree_class);
15397   __Pyx_INCREF(__pyx_v_empty_data_class);
15398
15399   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1406
15400  *         empty data elements (defauls to StringElement).
15401  *         """
15402  *         self._lookup_function = _lookupElementClass             # <<<<<<<<<<<<<<
15403  *         if tree_class is None:
15404  *             tree_class = ObjectifiedElement
15405  */
15406   ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->__pyx_base._lookup_function = __pyx_f_4lxml_9objectify__lookupElementClass;
15407
15408   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1407
15409  *         """
15410  *         self._lookup_function = _lookupElementClass
15411  *         if tree_class is None:             # <<<<<<<<<<<<<<
15412  *             tree_class = ObjectifiedElement
15413  *         self.tree_class = tree_class
15414  */
15415   __pyx_t_1 = (__pyx_v_tree_class == Py_None);
15416   if (__pyx_t_1) {
15417
15418     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1408
15419  *         self._lookup_function = _lookupElementClass
15420  *         if tree_class is None:
15421  *             tree_class = ObjectifiedElement             # <<<<<<<<<<<<<<
15422  *         self.tree_class = tree_class
15423  *         if empty_data_class is None:
15424  */
15425     __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
15426     __Pyx_DECREF(__pyx_v_tree_class);
15427     __pyx_v_tree_class = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
15428     goto __pyx_L6;
15429   }
15430   __pyx_L6:;
15431
15432   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1409
15433  *         if tree_class is None:
15434  *             tree_class = ObjectifiedElement
15435  *         self.tree_class = tree_class             # <<<<<<<<<<<<<<
15436  *         if empty_data_class is None:
15437  *             empty_data_class = StringElement
15438  */
15439   __Pyx_INCREF(__pyx_v_tree_class);
15440   __Pyx_GIVEREF(__pyx_v_tree_class);
15441   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->tree_class);
15442   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->tree_class);
15443   ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->tree_class = __pyx_v_tree_class;
15444
15445   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1410
15446  *             tree_class = ObjectifiedElement
15447  *         self.tree_class = tree_class
15448  *         if empty_data_class is None:             # <<<<<<<<<<<<<<
15449  *             empty_data_class = StringElement
15450  *         self.empty_data_class = empty_data_class
15451  */
15452   __pyx_t_1 = (__pyx_v_empty_data_class == Py_None);
15453   if (__pyx_t_1) {
15454
15455     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1411
15456  *         self.tree_class = tree_class
15457  *         if empty_data_class is None:
15458  *             empty_data_class = StringElement             # <<<<<<<<<<<<<<
15459  *         self.empty_data_class = empty_data_class
15460  * 
15461  */
15462     __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
15463     __Pyx_DECREF(__pyx_v_empty_data_class);
15464     __pyx_v_empty_data_class = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement));
15465     goto __pyx_L7;
15466   }
15467   __pyx_L7:;
15468
15469   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1412
15470  *         if empty_data_class is None:
15471  *             empty_data_class = StringElement
15472  *         self.empty_data_class = empty_data_class             # <<<<<<<<<<<<<<
15473  * 
15474  * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):
15475  */
15476   __Pyx_INCREF(__pyx_v_empty_data_class);
15477   __Pyx_GIVEREF(__pyx_v_empty_data_class);
15478   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->empty_data_class);
15479   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->empty_data_class);
15480   ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->empty_data_class = __pyx_v_empty_data_class;
15481
15482   __pyx_r = 0;
15483   __Pyx_DECREF((PyObject *)__pyx_v_self);
15484   __Pyx_DECREF(__pyx_v_tree_class);
15485   __Pyx_DECREF(__pyx_v_empty_data_class);
15486   __Pyx_FinishRefcountContext();
15487   return __pyx_r;
15488 }
15489
15490 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1414
15491  *         self.empty_data_class = empty_data_class
15492  * 
15493  * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):             # <<<<<<<<<<<<<<
15494  *     cdef ObjectifyElementClassLookup lookup
15495  *     cdef python.PyObject* dict_result
15496  */
15497
15498 static  PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_state, struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_node) {
15499   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *__pyx_v_lookup;
15500   PyObject *__pyx_v_dict_result;
15501   PyObject *__pyx_v_value;
15502   PyObject *__pyx_v_prefix;
15503   PyObject *__pyx_v_el_class;
15504   PyObject *__pyx_r = NULL;
15505   int __pyx_t_1;
15506   PyObject *__pyx_t_2 = NULL;
15507   PyObject *__pyx_t_3 = NULL;
15508   int __pyx_t_4;
15509   PyObject *__pyx_t_5 = NULL;
15510   PyObject *__pyx_t_6 = NULL;
15511   __Pyx_SetupRefcountContext("_lookupElementClass");
15512   __Pyx_INCREF(__pyx_v_state);
15513   __Pyx_INCREF((PyObject *)__pyx_v_doc);
15514   __pyx_v_lookup = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)Py_None); __Pyx_INCREF(Py_None);
15515   __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
15516   __pyx_v_prefix = Py_None; __Pyx_INCREF(Py_None);
15517   __pyx_v_el_class = Py_None; __Pyx_INCREF(Py_None);
15518
15519   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1417
15520  *     cdef ObjectifyElementClassLookup lookup
15521  *     cdef python.PyObject* dict_result
15522  *     lookup = <ObjectifyElementClassLookup>state             # <<<<<<<<<<<<<<
15523  *     # if element has children => no data class
15524  *     if cetree.hasChild(c_node):
15525  */
15526   __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_state)));
15527   __Pyx_DECREF(((PyObject *)__pyx_v_lookup));
15528   __pyx_v_lookup = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_state);
15529
15530   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1419
15531  *     lookup = <ObjectifyElementClassLookup>state
15532  *     # if element has children => no data class
15533  *     if cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
15534  *         return lookup.tree_class
15535  * 
15536  */
15537   __pyx_t_1 = hasChild(__pyx_v_c_node);
15538   if (__pyx_t_1) {
15539
15540     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1420
15541  *     # if element has children => no data class
15542  *     if cetree.hasChild(c_node):
15543  *         return lookup.tree_class             # <<<<<<<<<<<<<<
15544  * 
15545  *     # if element is defined as xsi:nil, return NoneElement class
15546  */
15547     __Pyx_XDECREF(__pyx_r);
15548     __Pyx_INCREF(__pyx_v_lookup->tree_class);
15549     __pyx_r = __pyx_v_lookup->tree_class;
15550     goto __pyx_L0;
15551     goto __pyx_L3;
15552   }
15553   __pyx_L3:;
15554
15555   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1424
15556  *     # if element is defined as xsi:nil, return NoneElement class
15557  *     if u"true" == cetree.attributeValueFromNsName(
15558  *         c_node, _XML_SCHEMA_INSTANCE_NS, "nil"):             # <<<<<<<<<<<<<<
15559  *         return NoneElement
15560  * 
15561  */
15562   __pyx_t_2 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_nil); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15563   __Pyx_GOTREF(__pyx_t_2);
15564   __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_n_u_true), __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15565   __Pyx_GOTREF(__pyx_t_3);
15566   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15567   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15568   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15569   if (__pyx_t_1) {
15570
15571     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1425
15572  *     if u"true" == cetree.attributeValueFromNsName(
15573  *         c_node, _XML_SCHEMA_INSTANCE_NS, "nil"):
15574  *         return NoneElement             # <<<<<<<<<<<<<<
15575  * 
15576  *     # check for Python type hint
15577  */
15578     __Pyx_XDECREF(__pyx_r);
15579     __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
15580     __pyx_r = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement));
15581     goto __pyx_L0;
15582     goto __pyx_L4;
15583   }
15584   __pyx_L4:;
15585
15586   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1429
15587  *     # check for Python type hint
15588  *     value = cetree.attributeValueFromNsName(
15589  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
15590  *     if value is not None:
15591  *         if value == TREE_PYTYPE_NAME:
15592  */
15593   __pyx_t_3 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15594   __Pyx_GOTREF(__pyx_t_3);
15595   __Pyx_DECREF(__pyx_v_value);
15596   __pyx_v_value = __pyx_t_3;
15597   __pyx_t_3 = 0;
15598
15599   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1430
15600  *     value = cetree.attributeValueFromNsName(
15601  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
15602  *     if value is not None:             # <<<<<<<<<<<<<<
15603  *         if value == TREE_PYTYPE_NAME:
15604  *             return lookup.tree_class
15605  */
15606   __pyx_t_1 = (__pyx_v_value != Py_None);
15607   if (__pyx_t_1) {
15608
15609     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1431
15610  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
15611  *     if value is not None:
15612  *         if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
15613  *             return lookup.tree_class
15614  *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
15615  */
15616     __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15617     __Pyx_GOTREF(__pyx_t_3);
15618     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15619     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15620     if (__pyx_t_1) {
15621
15622       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1432
15623  *     if value is not None:
15624  *         if value == TREE_PYTYPE_NAME:
15625  *             return lookup.tree_class             # <<<<<<<<<<<<<<
15626  *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
15627  *         if dict_result is not NULL:
15628  */
15629       __Pyx_XDECREF(__pyx_r);
15630       __Pyx_INCREF(__pyx_v_lookup->tree_class);
15631       __pyx_r = __pyx_v_lookup->tree_class;
15632       goto __pyx_L0;
15633       goto __pyx_L6;
15634     }
15635     __pyx_L6:;
15636
15637     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1433
15638  *         if value == TREE_PYTYPE_NAME:
15639  *             return lookup.tree_class
15640  *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)             # <<<<<<<<<<<<<<
15641  *         if dict_result is not NULL:
15642  *             return (<PyType>dict_result)._type
15643  */
15644     __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_value);
15645
15646     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1434
15647  *             return lookup.tree_class
15648  *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
15649  *         if dict_result is not NULL:             # <<<<<<<<<<<<<<
15650  *             return (<PyType>dict_result)._type
15651  *         # unknown 'pyval' => try to figure it out ourself, just go on
15652  */
15653     __pyx_t_1 = (__pyx_v_dict_result != NULL);
15654     if (__pyx_t_1) {
15655
15656       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1435
15657  *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
15658  *         if dict_result is not NULL:
15659  *             return (<PyType>dict_result)._type             # <<<<<<<<<<<<<<
15660  *         # unknown 'pyval' => try to figure it out ourself, just go on
15661  * 
15662  */
15663       __Pyx_XDECREF(__pyx_r);
15664       __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->_type);
15665       __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->_type;
15666       goto __pyx_L0;
15667       goto __pyx_L7;
15668     }
15669     __pyx_L7:;
15670     goto __pyx_L5;
15671   }
15672   __pyx_L5:;
15673
15674   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1440
15675  *     # check for XML Schema type hint
15676  *     value = cetree.attributeValueFromNsName(
15677  *         c_node, _XML_SCHEMA_INSTANCE_NS, "type")             # <<<<<<<<<<<<<<
15678  * 
15679  *     if value is not None:
15680  */
15681   __pyx_t_3 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15682   __Pyx_GOTREF(__pyx_t_3);
15683   __Pyx_DECREF(__pyx_v_value);
15684   __pyx_v_value = __pyx_t_3;
15685   __pyx_t_3 = 0;
15686
15687   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1442
15688  *         c_node, _XML_SCHEMA_INSTANCE_NS, "type")
15689  * 
15690  *     if value is not None:             # <<<<<<<<<<<<<<
15691  *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15692  *         if dict_result is NULL and u':' in value:
15693  */
15694   __pyx_t_1 = (__pyx_v_value != Py_None);
15695   if (__pyx_t_1) {
15696
15697     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1443
15698  * 
15699  *     if value is not None:
15700  *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)             # <<<<<<<<<<<<<<
15701  *         if dict_result is NULL and u':' in value:
15702  *             prefix, value = value.split(u':', 1)
15703  */
15704     __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_value);
15705
15706     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1444
15707  *     if value is not None:
15708  *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15709  *         if dict_result is NULL and u':' in value:             # <<<<<<<<<<<<<<
15710  *             prefix, value = value.split(u':', 1)
15711  *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15712  */
15713     if ((__pyx_v_dict_result == NULL)) {
15714       __pyx_t_1 = (PySequence_Contains(__pyx_v_value, ((PyObject *)__pyx_kp_u_32))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15715       __pyx_t_4 = __pyx_t_1;
15716     } else {
15717       __pyx_t_4 = (__pyx_v_dict_result == NULL);
15718     }
15719     if (__pyx_t_4) {
15720
15721       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1445
15722  *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15723  *         if dict_result is NULL and u':' in value:
15724  *             prefix, value = value.split(u':', 1)             # <<<<<<<<<<<<<<
15725  *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15726  *         if dict_result is not NULL:
15727  */
15728       __pyx_t_3 = PyObject_GetAttr(__pyx_v_value, __pyx_n_ui_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15729       __Pyx_GOTREF(__pyx_t_3);
15730       __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15731       __Pyx_GOTREF(((PyObject *)__pyx_t_2));
15732       __Pyx_INCREF(((PyObject *)__pyx_kp_u_32));
15733       PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_u_32));
15734       __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_32));
15735       __Pyx_INCREF(__pyx_int_1);
15736       PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
15737       __Pyx_GIVEREF(__pyx_int_1);
15738       __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15739       __Pyx_GOTREF(__pyx_t_5);
15740       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15741       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
15742       if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
15743         PyObject* tuple = __pyx_t_5;
15744         __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
15745         __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
15746         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15747         __Pyx_DECREF(__pyx_v_prefix);
15748         __pyx_v_prefix = __pyx_t_2;
15749         __pyx_t_2 = 0;
15750         __Pyx_DECREF(__pyx_v_value);
15751         __pyx_v_value = __pyx_t_3;
15752         __pyx_t_3 = 0;
15753       } else {
15754         __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15755         __Pyx_GOTREF(__pyx_t_6);
15756         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15757         __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15758         __Pyx_GOTREF(__pyx_t_2);
15759         __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15760         __Pyx_GOTREF(__pyx_t_3);
15761         if (__Pyx_EndUnpack(__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15762         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15763         __Pyx_DECREF(__pyx_v_prefix);
15764         __pyx_v_prefix = __pyx_t_2;
15765         __pyx_t_2 = 0;
15766         __Pyx_DECREF(__pyx_v_value);
15767         __pyx_v_value = __pyx_t_3;
15768         __pyx_t_3 = 0;
15769       }
15770
15771       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1446
15772  *         if dict_result is NULL and u':' in value:
15773  *             prefix, value = value.split(u':', 1)
15774  *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)             # <<<<<<<<<<<<<<
15775  *         if dict_result is not NULL:
15776  *             return (<PyType>dict_result)._type
15777  */
15778       __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_value);
15779       goto __pyx_L9;
15780     }
15781     __pyx_L9:;
15782
15783     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1447
15784  *             prefix, value = value.split(u':', 1)
15785  *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15786  *         if dict_result is not NULL:             # <<<<<<<<<<<<<<
15787  *             return (<PyType>dict_result)._type
15788  * 
15789  */
15790     __pyx_t_4 = (__pyx_v_dict_result != NULL);
15791     if (__pyx_t_4) {
15792
15793       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1448
15794  *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15795  *         if dict_result is not NULL:
15796  *             return (<PyType>dict_result)._type             # <<<<<<<<<<<<<<
15797  * 
15798  *     # otherwise determine class based on text content type
15799  */
15800       __Pyx_XDECREF(__pyx_r);
15801       __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->_type);
15802       __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->_type;
15803       goto __pyx_L0;
15804       goto __pyx_L10;
15805     }
15806     __pyx_L10:;
15807     goto __pyx_L8;
15808   }
15809   __pyx_L8:;
15810
15811   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1451
15812  * 
15813  *     # otherwise determine class based on text content type
15814  *     el_class = _guessElementClass(c_node)             # <<<<<<<<<<<<<<
15815  *     if el_class is not None:
15816  *         return el_class
15817  */
15818   __pyx_t_5 = __pyx_f_4lxml_9objectify__guessElementClass(__pyx_v_c_node); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15819   __Pyx_GOTREF(__pyx_t_5);
15820   __Pyx_DECREF(__pyx_v_el_class);
15821   __pyx_v_el_class = __pyx_t_5;
15822   __pyx_t_5 = 0;
15823
15824   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1452
15825  *     # otherwise determine class based on text content type
15826  *     el_class = _guessElementClass(c_node)
15827  *     if el_class is not None:             # <<<<<<<<<<<<<<
15828  *         return el_class
15829  * 
15830  */
15831   __pyx_t_4 = (__pyx_v_el_class != Py_None);
15832   if (__pyx_t_4) {
15833
15834     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1453
15835  *     el_class = _guessElementClass(c_node)
15836  *     if el_class is not None:
15837  *         return el_class             # <<<<<<<<<<<<<<
15838  * 
15839  *     # if element is a root node => default to tree node
15840  */
15841     __Pyx_XDECREF(__pyx_r);
15842     __Pyx_INCREF(__pyx_v_el_class);
15843     __pyx_r = __pyx_v_el_class;
15844     goto __pyx_L0;
15845     goto __pyx_L11;
15846   }
15847   __pyx_L11:;
15848
15849   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1456
15850  * 
15851  *     # if element is a root node => default to tree node
15852  *     if c_node.parent is NULL or not tree._isElement(c_node.parent):             # <<<<<<<<<<<<<<
15853  *         return lookup.tree_class
15854  * 
15855  */
15856   if (!(__pyx_v_c_node->parent == NULL)) {
15857     __pyx_t_4 = (!_isElement(__pyx_v_c_node->parent));
15858   } else {
15859     __pyx_t_4 = (__pyx_v_c_node->parent == NULL);
15860   }
15861   if (__pyx_t_4) {
15862
15863     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1457
15864  *     # if element is a root node => default to tree node
15865  *     if c_node.parent is NULL or not tree._isElement(c_node.parent):
15866  *         return lookup.tree_class             # <<<<<<<<<<<<<<
15867  * 
15868  *     return lookup.empty_data_class
15869  */
15870     __Pyx_XDECREF(__pyx_r);
15871     __Pyx_INCREF(__pyx_v_lookup->tree_class);
15872     __pyx_r = __pyx_v_lookup->tree_class;
15873     goto __pyx_L0;
15874     goto __pyx_L12;
15875   }
15876   __pyx_L12:;
15877
15878   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1459
15879  *         return lookup.tree_class
15880  * 
15881  *     return lookup.empty_data_class             # <<<<<<<<<<<<<<
15882  * 
15883  * 
15884  */
15885   __Pyx_XDECREF(__pyx_r);
15886   __Pyx_INCREF(__pyx_v_lookup->empty_data_class);
15887   __pyx_r = __pyx_v_lookup->empty_data_class;
15888   goto __pyx_L0;
15889
15890   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15891   goto __pyx_L0;
15892   __pyx_L1_error:;
15893   __Pyx_XDECREF(__pyx_t_2);
15894   __Pyx_XDECREF(__pyx_t_3);
15895   __Pyx_XDECREF(__pyx_t_5);
15896   __Pyx_XDECREF(__pyx_t_6);
15897   __Pyx_AddTraceback("lxml.objectify._lookupElementClass");
15898   __pyx_r = 0;
15899   __pyx_L0:;
15900   __Pyx_DECREF((PyObject *)__pyx_v_lookup);
15901   __Pyx_DECREF(__pyx_v_value);
15902   __Pyx_DECREF(__pyx_v_prefix);
15903   __Pyx_DECREF(__pyx_v_el_class);
15904   __Pyx_DECREF(__pyx_v_state);
15905   __Pyx_DECREF((PyObject *)__pyx_v_doc);
15906   __Pyx_XGIVEREF(__pyx_r);
15907   __Pyx_FinishRefcountContext();
15908   return __pyx_r;
15909 }
15910
15911 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1465
15912  * # Type annotations
15913  * 
15914  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):             # <<<<<<<<<<<<<<
15915  *     if pytype is None:
15916  *         return None
15917  */
15918
15919 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) {
15920   PyObject *__pyx_v_value;
15921   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r = NULL;
15922   int __pyx_t_1;
15923   PyObject *__pyx_t_2 = NULL;
15924   PyObject *__pyx_t_3 = NULL;
15925   int __pyx_t_4;
15926   __Pyx_SetupRefcountContext("_check_type");
15927   __Pyx_INCREF((PyObject *)__pyx_v_pytype);
15928   __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
15929
15930   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1466
15931  * 
15932  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
15933  *     if pytype is None:             # <<<<<<<<<<<<<<
15934  *         return None
15935  *     value = textOf(c_node)
15936  */
15937   __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
15938   if (__pyx_t_1) {
15939
15940     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1467
15941  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
15942  *     if pytype is None:
15943  *         return None             # <<<<<<<<<<<<<<
15944  *     value = textOf(c_node)
15945  *     try:
15946  */
15947     __Pyx_XDECREF(((PyObject *)__pyx_r));
15948     __Pyx_INCREF(Py_None);
15949     __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
15950     goto __pyx_L0;
15951     goto __pyx_L3;
15952   }
15953   __pyx_L3:;
15954
15955   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1468
15956  *     if pytype is None:
15957  *         return None
15958  *     value = textOf(c_node)             # <<<<<<<<<<<<<<
15959  *     try:
15960  *         pytype.type_check(value)
15961  */
15962   __pyx_t_2 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15963   __Pyx_GOTREF(__pyx_t_2);
15964   __Pyx_DECREF(__pyx_v_value);
15965   __pyx_v_value = __pyx_t_2;
15966   __pyx_t_2 = 0;
15967
15968   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1469
15969  *         return None
15970  *     value = textOf(c_node)
15971  *     try:             # <<<<<<<<<<<<<<
15972  *         pytype.type_check(value)
15973  *         return pytype
15974  */
15975   {
15976     PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
15977     __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
15978     __Pyx_XGOTREF(__pyx_save_exc_type);
15979     __Pyx_XGOTREF(__pyx_save_exc_value);
15980     __Pyx_XGOTREF(__pyx_save_exc_tb);
15981     /*try:*/ {
15982
15983       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1470
15984  *     value = textOf(c_node)
15985  *     try:
15986  *         pytype.type_check(value)             # <<<<<<<<<<<<<<
15987  *         return pytype
15988  *     except IGNORABLE_ERRORS:
15989  */
15990       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15991       __Pyx_GOTREF(((PyObject *)__pyx_t_2));
15992       __Pyx_INCREF(__pyx_v_value);
15993       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
15994       __Pyx_GIVEREF(__pyx_v_value);
15995       __pyx_t_3 = PyObject_Call(__pyx_v_pytype->type_check, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15996       __Pyx_GOTREF(__pyx_t_3);
15997       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
15998       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15999
16000       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1471
16001  *     try:
16002  *         pytype.type_check(value)
16003  *         return pytype             # <<<<<<<<<<<<<<
16004  *     except IGNORABLE_ERRORS:
16005  *         # could not be parsed as the specified type => ignore
16006  */
16007       __Pyx_XDECREF(((PyObject *)__pyx_r));
16008       __Pyx_INCREF(((PyObject *)__pyx_v_pytype));
16009       __pyx_r = __pyx_v_pytype;
16010       goto __pyx_L8_try_return;
16011     }
16012     __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
16013     __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
16014     __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
16015     goto __pyx_L11_try_end;
16016     __pyx_L8_try_return:;
16017     __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
16018     __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
16019     __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
16020     goto __pyx_L0;
16021     __pyx_L4_error:;
16022     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16023     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16024
16025     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1472
16026  *         pytype.type_check(value)
16027  *         return pytype
16028  *     except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
16029  *         # could not be parsed as the specified type => ignore
16030  *         pass
16031  */
16032     __pyx_t_4 = PyErr_ExceptionMatches(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
16033     if (__pyx_t_4) {
16034       PyErr_Restore(0,0,0);
16035       goto __pyx_L5_exception_handled;
16036     }
16037     __Pyx_XDECREF(__pyx_save_exc_type);
16038     __Pyx_XDECREF(__pyx_save_exc_value);
16039     __Pyx_XDECREF(__pyx_save_exc_tb);
16040     goto __pyx_L1_error;
16041     __pyx_L5_exception_handled:;
16042     __Pyx_XGIVEREF(__pyx_save_exc_type);
16043     __Pyx_XGIVEREF(__pyx_save_exc_value);
16044     __Pyx_XGIVEREF(__pyx_save_exc_tb);
16045     __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
16046     __pyx_L11_try_end:;
16047   }
16048
16049   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1475
16050  *         # could not be parsed as the specified type => ignore
16051  *         pass
16052  *     return None             # <<<<<<<<<<<<<<
16053  * 
16054  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,
16055  */
16056   __Pyx_XDECREF(((PyObject *)__pyx_r));
16057   __Pyx_INCREF(Py_None);
16058   __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
16059   goto __pyx_L0;
16060
16061   __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
16062   goto __pyx_L0;
16063   __pyx_L1_error:;
16064   __Pyx_XDECREF(__pyx_t_2);
16065   __Pyx_XDECREF(__pyx_t_3);
16066   __Pyx_AddTraceback("lxml.objectify._check_type");
16067   __pyx_r = 0;
16068   __pyx_L0:;
16069   __Pyx_DECREF(__pyx_v_value);
16070   __Pyx_DECREF((PyObject *)__pyx_v_pytype);
16071   __Pyx_XGIVEREF((PyObject *)__pyx_r);
16072   __Pyx_FinishRefcountContext();
16073   return __pyx_r;
16074 }
16075
16076 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1477
16077  *     return None
16078  * 
16079  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
16080  *              empty_pytype=None):
16081  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
16082  */
16083
16084 static PyObject *__pyx_pf_4lxml_9objectify_pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16085 static char __pyx_doc_4lxml_9objectify_pyannotate[] = "pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)\n\n    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    ";
16086 static PyObject *__pyx_pf_4lxml_9objectify_pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16087   PyObject *__pyx_v_element_or_tree = 0;
16088   PyObject *__pyx_v_ignore_old = 0;
16089   PyObject *__pyx_v_ignore_xsi = 0;
16090   PyObject *__pyx_v_empty_pytype = 0;
16091   struct LxmlElement *__pyx_v_element;
16092   PyObject *__pyx_r = NULL;
16093   PyObject *__pyx_t_1 = NULL;
16094   int __pyx_t_2;
16095   int __pyx_t_3;
16096   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_element_or_tree,&__pyx_n_ui_ignore_old,&__pyx_n_ui_ignore_xsi,&__pyx_n_ui_empty_pytype,0};
16097   __Pyx_SetupRefcountContext("pyannotate");
16098   __pyx_self = __pyx_self;
16099   if (unlikely(__pyx_kwds)) {
16100
16101     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1478
16102  * 
16103  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,
16104  *              empty_pytype=None):             # <<<<<<<<<<<<<<
16105  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
16106  * 
16107  */
16108     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
16109     PyObject* values[4] = {0,0,0,0};
16110     values[1] = __pyx_k_33;
16111     values[2] = __pyx_k_34;
16112     values[3] = ((PyObject *)Py_None);
16113     switch (PyTuple_GET_SIZE(__pyx_args)) {
16114       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16115       case  0: break;
16116       default: goto __pyx_L5_argtuple_error;
16117     }
16118     switch (PyTuple_GET_SIZE(__pyx_args)) {
16119       case  0:
16120       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_element_or_tree);
16121       if (likely(values[0])) kw_args--;
16122       else goto __pyx_L5_argtuple_error;
16123     }
16124     while (kw_args > 0) {
16125       PyObject* value;
16126       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_ignore_old);
16127       if (value) { values[1] = value; if (!(--kw_args)) break; }
16128       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_ignore_xsi);
16129       if (value) { values[2] = value; if (!(--kw_args)) break; }
16130       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_empty_pytype);
16131       if (value) { values[3] = value; if (!(--kw_args)) break; }
16132       break;
16133     }
16134     if (unlikely(kw_args > 0)) {
16135       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "pyannotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16136     }
16137     __pyx_v_element_or_tree = values[0];
16138     __pyx_v_ignore_old = values[1];
16139     __pyx_v_ignore_xsi = values[2];
16140     __pyx_v_empty_pytype = values[3];
16141   } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
16142     goto __pyx_L5_argtuple_error;
16143   } else {
16144     __pyx_v_element_or_tree = PyTuple_GET_ITEM(__pyx_args, 0);
16145     __pyx_v_ignore_old = __pyx_k_33;
16146     __pyx_v_ignore_xsi = __pyx_k_34;
16147     __pyx_v_empty_pytype = ((PyObject *)Py_None);
16148   }
16149   goto __pyx_L4_argument_unpacking_done;
16150   __pyx_L5_argtuple_error:;
16151   __Pyx_RaiseArgtupleInvalid("pyannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16152   __pyx_L3_error:;
16153   __Pyx_AddTraceback("lxml.objectify.pyannotate");
16154   return NULL;
16155   __pyx_L4_argument_unpacking_done:;
16156   __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
16157
16158   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1497
16159  *     """
16160  *     cdef _Element  element
16161  *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<<
16162  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
16163  * 
16164  */
16165   __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16166   __Pyx_GOTREF(__pyx_t_1);
16167   __Pyx_DECREF(((PyObject *)__pyx_v_element));
16168   __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
16169   __pyx_t_1 = 0;
16170
16171   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1498
16172  *     cdef _Element  element
16173  *     element = cetree.rootNodeOrRaise(element_or_tree)
16174  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)             # <<<<<<<<<<<<<<
16175  * 
16176  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
16177  */
16178   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_2 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16179   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_3 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16180   __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 0, 1, __pyx_t_2, __pyx_t_3, Py_None, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16181   __Pyx_GOTREF(__pyx_t_1);
16182   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16183
16184   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16185   goto __pyx_L0;
16186   __pyx_L1_error:;
16187   __Pyx_XDECREF(__pyx_t_1);
16188   __Pyx_AddTraceback("lxml.objectify.pyannotate");
16189   __pyx_r = NULL;
16190   __pyx_L0:;
16191   __Pyx_DECREF((PyObject *)__pyx_v_element);
16192   __Pyx_XGIVEREF(__pyx_r);
16193   __Pyx_FinishRefcountContext();
16194   return __pyx_r;
16195 }
16196
16197 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1500
16198  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
16199  * 
16200  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
16201  *                 empty_type=None):
16202  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
16203  */
16204
16205 static PyObject *__pyx_pf_4lxml_9objectify_xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16206 static char __pyx_doc_4lxml_9objectify_xsiannotate[] = "xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)\n\n    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    ";
16207 static PyObject *__pyx_pf_4lxml_9objectify_xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16208   PyObject *__pyx_v_element_or_tree = 0;
16209   PyObject *__pyx_v_ignore_old = 0;
16210   PyObject *__pyx_v_ignore_pytype = 0;
16211   PyObject *__pyx_v_empty_type = 0;
16212   struct LxmlElement *__pyx_v_element;
16213   PyObject *__pyx_r = NULL;
16214   PyObject *__pyx_t_1 = NULL;
16215   int __pyx_t_2;
16216   int __pyx_t_3;
16217   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_element_or_tree,&__pyx_n_ui_ignore_old,&__pyx_n_ui_ignore_pytype,&__pyx_n_ui_empty_type,0};
16218   __Pyx_SetupRefcountContext("xsiannotate");
16219   __pyx_self = __pyx_self;
16220   if (unlikely(__pyx_kwds)) {
16221
16222     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1501
16223  * 
16224  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
16225  *                 empty_type=None):             # <<<<<<<<<<<<<<
16226  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
16227  * 
16228  */
16229     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
16230     PyObject* values[4] = {0,0,0,0};
16231     values[1] = __pyx_k_35;
16232     values[2] = __pyx_k_36;
16233     values[3] = ((PyObject *)Py_None);
16234     switch (PyTuple_GET_SIZE(__pyx_args)) {
16235       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16236       case  0: break;
16237       default: goto __pyx_L5_argtuple_error;
16238     }
16239     switch (PyTuple_GET_SIZE(__pyx_args)) {
16240       case  0:
16241       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_element_or_tree);
16242       if (likely(values[0])) kw_args--;
16243       else goto __pyx_L5_argtuple_error;
16244     }
16245     while (kw_args > 0) {
16246       PyObject* value;
16247       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_ignore_old);
16248       if (value) { values[1] = value; if (!(--kw_args)) break; }
16249       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_ignore_pytype);
16250       if (value) { values[2] = value; if (!(--kw_args)) break; }
16251       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_empty_type);
16252       if (value) { values[3] = value; if (!(--kw_args)) break; }
16253       break;
16254     }
16255     if (unlikely(kw_args > 0)) {
16256       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "xsiannotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16257     }
16258     __pyx_v_element_or_tree = values[0];
16259     __pyx_v_ignore_old = values[1];
16260     __pyx_v_ignore_pytype = values[2];
16261     __pyx_v_empty_type = values[3];
16262   } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
16263     goto __pyx_L5_argtuple_error;
16264   } else {
16265     __pyx_v_element_or_tree = PyTuple_GET_ITEM(__pyx_args, 0);
16266     __pyx_v_ignore_old = __pyx_k_35;
16267     __pyx_v_ignore_pytype = __pyx_k_36;
16268     __pyx_v_empty_type = ((PyObject *)Py_None);
16269   }
16270   goto __pyx_L4_argument_unpacking_done;
16271   __pyx_L5_argtuple_error:;
16272   __Pyx_RaiseArgtupleInvalid("xsiannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16273   __pyx_L3_error:;
16274   __Pyx_AddTraceback("lxml.objectify.xsiannotate");
16275   return NULL;
16276   __pyx_L4_argument_unpacking_done:;
16277   __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
16278
16279   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1525
16280  *     """
16281  *     cdef _Element  element
16282  *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<<
16283  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
16284  * 
16285  */
16286   __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16287   __Pyx_GOTREF(__pyx_t_1);
16288   __Pyx_DECREF(((PyObject *)__pyx_v_element));
16289   __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
16290   __pyx_t_1 = 0;
16291
16292   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1526
16293  *     cdef _Element  element
16294  *     element = cetree.rootNodeOrRaise(element_or_tree)
16295  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)             # <<<<<<<<<<<<<<
16296  * 
16297  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
16298  */
16299   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_2 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16300   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_pytype); if (unlikely((__pyx_t_3 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16301   __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 1, 0, __pyx_t_2, __pyx_t_3, __pyx_v_empty_type, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16302   __Pyx_GOTREF(__pyx_t_1);
16303   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16304
16305   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16306   goto __pyx_L0;
16307   __pyx_L1_error:;
16308   __Pyx_XDECREF(__pyx_t_1);
16309   __Pyx_AddTraceback("lxml.objectify.xsiannotate");
16310   __pyx_r = NULL;
16311   __pyx_L0:;
16312   __Pyx_DECREF((PyObject *)__pyx_v_element);
16313   __Pyx_XGIVEREF(__pyx_r);
16314   __Pyx_FinishRefcountContext();
16315   return __pyx_r;
16316 }
16317
16318 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1528
16319  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
16320  * 
16321  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
16322  *              empty_pytype=None, empty_type=None, annotate_xsi=0,
16323  *              annotate_pytype=1):
16324  */
16325
16326 static PyObject *__pyx_pf_4lxml_9objectify_annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16327 static char __pyx_doc_4lxml_9objectify_annotate[] = "annotate(element_or_tree, ignore_old=True, ignore_xsi=False, empty_pytype=None, empty_type=None, annotate_xsi=0, annotate_pytype=1)\n\n    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    ";
16328 static PyObject *__pyx_pf_4lxml_9objectify_annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16329   PyObject *__pyx_v_element_or_tree = 0;
16330   PyObject *__pyx_v_ignore_old = 0;
16331   PyObject *__pyx_v_ignore_xsi = 0;
16332   PyObject *__pyx_v_empty_pytype = 0;
16333   PyObject *__pyx_v_empty_type = 0;
16334   PyObject *__pyx_v_annotate_xsi = 0;
16335   PyObject *__pyx_v_annotate_pytype = 0;
16336   struct LxmlElement *__pyx_v_element;
16337   PyObject *__pyx_r = NULL;
16338   PyObject *__pyx_t_1 = NULL;
16339   int __pyx_t_2;
16340   int __pyx_t_3;
16341   int __pyx_t_4;
16342   int __pyx_t_5;
16343   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_element_or_tree,&__pyx_n_ui_ignore_old,&__pyx_n_ui_ignore_xsi,&__pyx_n_ui_empty_pytype,&__pyx_n_ui_empty_type,&__pyx_n_ui_annotate_xsi,&__pyx_n_ui_annotate_pytype,0};
16344   __Pyx_SetupRefcountContext("annotate");
16345   __pyx_self = __pyx_self;
16346   if (unlikely(__pyx_kwds)) {
16347
16348     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1529
16349  * 
16350  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
16351  *              empty_pytype=None, empty_type=None, annotate_xsi=0,             # <<<<<<<<<<<<<<
16352  *              annotate_pytype=1):
16353  *     u"""annotate(element_or_tree, ignore_old=True, ignore_xsi=False, empty_pytype=None, empty_type=None, annotate_xsi=0, annotate_pytype=1)
16354  */
16355     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
16356     PyObject* values[7] = {0,0,0,0,0,0,0};
16357     values[1] = __pyx_k_37;
16358     values[2] = __pyx_k_38;
16359     values[3] = ((PyObject *)Py_None);
16360     values[4] = ((PyObject *)Py_None);
16361     values[5] = ((PyObject *)__pyx_int_0);
16362     values[6] = ((PyObject *)__pyx_int_1);
16363     switch (PyTuple_GET_SIZE(__pyx_args)) {
16364       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16365       case  0: break;
16366       default: goto __pyx_L5_argtuple_error;
16367     }
16368     switch (PyTuple_GET_SIZE(__pyx_args)) {
16369       case  0:
16370       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_element_or_tree);
16371       if (likely(values[0])) kw_args--;
16372       else goto __pyx_L5_argtuple_error;
16373     }
16374     while (kw_args > 0) {
16375       PyObject* value;
16376       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_ignore_old);
16377       if (value) { values[1] = value; if (!(--kw_args)) break; }
16378       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_ignore_xsi);
16379       if (value) { values[2] = value; if (!(--kw_args)) break; }
16380       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_empty_pytype);
16381       if (value) { values[3] = value; if (!(--kw_args)) break; }
16382       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_empty_type);
16383       if (value) { values[4] = value; if (!(--kw_args)) break; }
16384       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_annotate_xsi);
16385       if (value) { values[5] = value; if (!(--kw_args)) break; }
16386       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_annotate_pytype);
16387       if (value) { values[6] = value; if (!(--kw_args)) break; }
16388       break;
16389     }
16390     if (unlikely(kw_args > 0)) {
16391       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "annotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16392     }
16393     __pyx_v_element_or_tree = values[0];
16394     __pyx_v_ignore_old = values[1];
16395     __pyx_v_ignore_xsi = values[2];
16396     __pyx_v_empty_pytype = values[3];
16397     __pyx_v_empty_type = values[4];
16398     __pyx_v_annotate_xsi = values[5];
16399     __pyx_v_annotate_pytype = values[6];
16400   } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
16401     goto __pyx_L5_argtuple_error;
16402   } else {
16403     __pyx_v_element_or_tree = PyTuple_GET_ITEM(__pyx_args, 0);
16404     __pyx_v_ignore_old = __pyx_k_37;
16405     __pyx_v_ignore_xsi = __pyx_k_38;
16406     __pyx_v_empty_pytype = ((PyObject *)Py_None);
16407     __pyx_v_empty_type = ((PyObject *)Py_None);
16408     __pyx_v_annotate_xsi = ((PyObject *)__pyx_int_0);
16409     __pyx_v_annotate_pytype = ((PyObject *)__pyx_int_1);
16410   }
16411   goto __pyx_L4_argument_unpacking_done;
16412   __pyx_L5_argtuple_error:;
16413   __Pyx_RaiseArgtupleInvalid("annotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16414   __pyx_L3_error:;
16415   __Pyx_AddTraceback("lxml.objectify.annotate");
16416   return NULL;
16417   __pyx_L4_argument_unpacking_done:;
16418   __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
16419
16420   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1562
16421  *     """
16422  *     cdef _Element  element
16423  *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<<
16424  *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,
16425  *               ignore_old, empty_type, empty_pytype)
16426  */
16427   __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16428   __Pyx_GOTREF(__pyx_t_1);
16429   __Pyx_DECREF(((PyObject *)__pyx_v_element));
16430   __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
16431   __pyx_t_1 = 0;
16432
16433   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1563
16434  *     cdef _Element  element
16435  *     element = cetree.rootNodeOrRaise(element_or_tree)
16436  *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,             # <<<<<<<<<<<<<<
16437  *               ignore_old, empty_type, empty_pytype)
16438  * 
16439  */
16440   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_xsi); if (unlikely((__pyx_t_2 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16441   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_pytype); if (unlikely((__pyx_t_3 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16442   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_4 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16443
16444   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1564
16445  *     element = cetree.rootNodeOrRaise(element_or_tree)
16446  *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,
16447  *               ignore_old, empty_type, empty_pytype)             # <<<<<<<<<<<<<<
16448  * 
16449  * 
16450  */
16451   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_5 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16452   __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_v_empty_type, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16453   __Pyx_GOTREF(__pyx_t_1);
16454   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16455
16456   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16457   goto __pyx_L0;
16458   __pyx_L1_error:;
16459   __Pyx_XDECREF(__pyx_t_1);
16460   __Pyx_AddTraceback("lxml.objectify.annotate");
16461   __pyx_r = NULL;
16462   __pyx_L0:;
16463   __Pyx_DECREF((PyObject *)__pyx_v_element);
16464   __Pyx_XGIVEREF(__pyx_r);
16465   __Pyx_FinishRefcountContext();
16466   return __pyx_r;
16467 }
16468
16469 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1567
16470  * 
16471  * 
16472  * cdef _annotate(_Element element, bint annotate_xsi, bint annotate_pytype,             # <<<<<<<<<<<<<<
16473  *                bint ignore_xsi, bint ignore_pytype,
16474  *                empty_type_name, empty_pytype_name):
16475  */
16476
16477 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) {
16478   struct LxmlDocument *__pyx_v_doc;
16479   xmlNode *__pyx_v_c_node;
16480   xmlNs *__pyx_v_c_ns;
16481   PyObject *__pyx_v_dict_result;
16482   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype;
16483   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_empty_pytype;
16484   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_StrType;
16485   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_NoneType;
16486   PyObject *__pyx_v_typename;
16487   PyObject *__pyx_v_value;
16488   PyObject *__pyx_v_istree;
16489   PyObject *__pyx_v_prefix;
16490   PyObject *__pyx_v_old_pytypename;
16491   PyObject *__pyx_v_typename_utf8;
16492   PyObject *__pyx_v_name;
16493   PyObject *__pyx_v_pytype_name;
16494   PyObject *__pyx_r = NULL;
16495   int __pyx_t_1;
16496   PyObject *__pyx_t_2 = NULL;
16497   PyObject *__pyx_t_3 = NULL;
16498   PyObject *__pyx_t_4 = NULL;
16499   int __pyx_t_5;
16500   PyObject *__pyx_t_6 = NULL;
16501   int __pyx_t_7;
16502   __Pyx_SetupRefcountContext("_annotate");
16503   __Pyx_INCREF((PyObject *)__pyx_v_element);
16504   __Pyx_INCREF(__pyx_v_empty_type_name);
16505   __Pyx_INCREF(__pyx_v_empty_pytype_name);
16506   __pyx_v_doc = ((struct LxmlDocument *)Py_None); __Pyx_INCREF(Py_None);
16507   __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
16508   __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
16509   __pyx_v_StrType = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
16510   __pyx_v_NoneType = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
16511   __pyx_v_typename = Py_None; __Pyx_INCREF(Py_None);
16512   __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
16513   __pyx_v_istree = Py_None; __Pyx_INCREF(Py_None);
16514   __pyx_v_prefix = Py_None; __Pyx_INCREF(Py_None);
16515   __pyx_v_old_pytypename = Py_None; __Pyx_INCREF(Py_None);
16516   __pyx_v_typename_utf8 = Py_None; __Pyx_INCREF(Py_None);
16517   __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
16518   __pyx_v_pytype_name = Py_None; __Pyx_INCREF(Py_None);
16519
16520   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1576
16521  *     cdef PyType pytype, empty_pytype, StrType, NoneType
16522  * 
16523  *     if not annotate_xsi and not annotate_pytype:             # <<<<<<<<<<<<<<
16524  *         return
16525  * 
16526  */
16527   if ((!__pyx_v_annotate_xsi)) {
16528     __pyx_t_1 = (!__pyx_v_annotate_pytype);
16529   } else {
16530     __pyx_t_1 = (!__pyx_v_annotate_xsi);
16531   }
16532   if (__pyx_t_1) {
16533
16534     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1577
16535  * 
16536  *     if not annotate_xsi and not annotate_pytype:
16537  *         return             # <<<<<<<<<<<<<<
16538  * 
16539  *     doc = element._doc
16540  */
16541     __Pyx_XDECREF(__pyx_r);
16542     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16543     goto __pyx_L0;
16544     goto __pyx_L3;
16545   }
16546   __pyx_L3:;
16547
16548   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1579
16549  *         return
16550  * 
16551  *     doc = element._doc             # <<<<<<<<<<<<<<
16552  * 
16553  *     if empty_type_name is not None:
16554  */
16555   __Pyx_INCREF(((PyObject *)__pyx_v_element->_doc));
16556   __Pyx_DECREF(((PyObject *)__pyx_v_doc));
16557   __pyx_v_doc = __pyx_v_element->_doc;
16558
16559   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1581
16560  *     doc = element._doc
16561  * 
16562  *     if empty_type_name is not None:             # <<<<<<<<<<<<<<
16563  *         if python.PyString_Check(empty_type_name):
16564  *             empty_type_name = python.PyUnicode_FromEncodedObject(
16565  */
16566   __pyx_t_1 = (__pyx_v_empty_type_name != Py_None);
16567   if (__pyx_t_1) {
16568
16569     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1582
16570  * 
16571  *     if empty_type_name is not None:
16572  *         if python.PyString_Check(empty_type_name):             # <<<<<<<<<<<<<<
16573  *             empty_type_name = python.PyUnicode_FromEncodedObject(
16574  *                 empty_type_name, "ASCII", NULL)
16575  */
16576     __pyx_t_1 = PyString_Check(__pyx_v_empty_type_name);
16577     if (__pyx_t_1) {
16578
16579       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1584
16580  *         if python.PyString_Check(empty_type_name):
16581  *             empty_type_name = python.PyUnicode_FromEncodedObject(
16582  *                 empty_type_name, "ASCII", NULL)             # <<<<<<<<<<<<<<
16583  *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
16584  *     elif empty_pytype_name is not None:
16585  */
16586       __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_empty_type_name, __pyx_k_ASCII, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16587       __Pyx_GOTREF(__pyx_t_2);
16588       __Pyx_DECREF(__pyx_v_empty_type_name);
16589       __pyx_v_empty_type_name = __pyx_t_2;
16590       __pyx_t_2 = 0;
16591       goto __pyx_L5;
16592     }
16593     __pyx_L5:;
16594
16595     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1585
16596  *             empty_type_name = python.PyUnicode_FromEncodedObject(
16597  *                 empty_type_name, "ASCII", NULL)
16598  *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)             # <<<<<<<<<<<<<<
16599  *     elif empty_pytype_name is not None:
16600  *         if python.PyString_Check(empty_pytype_name):
16601  */
16602     __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_empty_type_name);
16603     goto __pyx_L4;
16604   }
16605
16606   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1586
16607  *                 empty_type_name, "ASCII", NULL)
16608  *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
16609  *     elif empty_pytype_name is not None:             # <<<<<<<<<<<<<<
16610  *         if python.PyString_Check(empty_pytype_name):
16611  *             empty_pytype_name = python.PyUnicode_FromEncodedObject(
16612  */
16613   __pyx_t_1 = (__pyx_v_empty_pytype_name != Py_None);
16614   if (__pyx_t_1) {
16615
16616     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1587
16617  *         dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
16618  *     elif empty_pytype_name is not None:
16619  *         if python.PyString_Check(empty_pytype_name):             # <<<<<<<<<<<<<<
16620  *             empty_pytype_name = python.PyUnicode_FromEncodedObject(
16621  *                 empty_pytype_name, "ASCII", NULL)
16622  */
16623     __pyx_t_1 = PyString_Check(__pyx_v_empty_pytype_name);
16624     if (__pyx_t_1) {
16625
16626       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1589
16627  *         if python.PyString_Check(empty_pytype_name):
16628  *             empty_pytype_name = python.PyUnicode_FromEncodedObject(
16629  *                 empty_pytype_name, "ASCII", NULL)             # <<<<<<<<<<<<<<
16630  *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)
16631  *     else:
16632  */
16633       __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_empty_pytype_name, __pyx_k_ASCII, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16634       __Pyx_GOTREF(__pyx_t_2);
16635       __Pyx_DECREF(__pyx_v_empty_pytype_name);
16636       __pyx_v_empty_pytype_name = __pyx_t_2;
16637       __pyx_t_2 = 0;
16638       goto __pyx_L6;
16639     }
16640     __pyx_L6:;
16641
16642     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1590
16643  *             empty_pytype_name = python.PyUnicode_FromEncodedObject(
16644  *                 empty_pytype_name, "ASCII", NULL)
16645  *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)             # <<<<<<<<<<<<<<
16646  *     else:
16647  *         dict_result = NULL
16648  */
16649     __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_empty_pytype_name);
16650     goto __pyx_L4;
16651   }
16652   /*else*/ {
16653
16654     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1592
16655  *         dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)
16656  *     else:
16657  *         dict_result = NULL             # <<<<<<<<<<<<<<
16658  *     if dict_result is not NULL:
16659  *         empty_pytype = <PyType>dict_result
16660  */
16661     __pyx_v_dict_result = NULL;
16662   }
16663   __pyx_L4:;
16664
16665   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1593
16666  *     else:
16667  *         dict_result = NULL
16668  *     if dict_result is not NULL:             # <<<<<<<<<<<<<<
16669  *         empty_pytype = <PyType>dict_result
16670  *     else:
16671  */
16672   __pyx_t_1 = (__pyx_v_dict_result != NULL);
16673   if (__pyx_t_1) {
16674
16675     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1594
16676  *         dict_result = NULL
16677  *     if dict_result is not NULL:
16678  *         empty_pytype = <PyType>dict_result             # <<<<<<<<<<<<<<
16679  *     else:
16680  *         empty_pytype = None
16681  */
16682     __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)));
16683     __Pyx_DECREF(((PyObject *)__pyx_v_empty_pytype));
16684     __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result);
16685     goto __pyx_L7;
16686   }
16687   /*else*/ {
16688
16689     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1596
16690  *         empty_pytype = <PyType>dict_result
16691  *     else:
16692  *         empty_pytype = None             # <<<<<<<<<<<<<<
16693  * 
16694  *     StrType  = _PYTYPE_DICT.get(u'str')
16695  */
16696     __Pyx_INCREF(Py_None);
16697     __Pyx_DECREF(((PyObject *)__pyx_v_empty_pytype));
16698     __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
16699   }
16700   __pyx_L7:;
16701
16702   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1598
16703  *         empty_pytype = None
16704  * 
16705  *     StrType  = _PYTYPE_DICT.get(u'str')             # <<<<<<<<<<<<<<
16706  *     NoneType = _PYTYPE_DICT.get(u'NoneType')
16707  *     c_node = element._c_node
16708  */
16709   __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_n_ui_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16710   __Pyx_GOTREF(__pyx_t_2);
16711   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16712   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
16713   __Pyx_INCREF(((PyObject *)__pyx_n_u_str));
16714   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u_str));
16715   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_str));
16716   __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16717   __Pyx_GOTREF(__pyx_t_4);
16718   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16719   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
16720   if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_9objectify_PyType))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16721   __Pyx_DECREF(((PyObject *)__pyx_v_StrType));
16722   __pyx_v_StrType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
16723   __pyx_t_4 = 0;
16724
16725   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1599
16726  * 
16727  *     StrType  = _PYTYPE_DICT.get(u'str')
16728  *     NoneType = _PYTYPE_DICT.get(u'NoneType')             # <<<<<<<<<<<<<<
16729  *     c_node = element._c_node
16730  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
16731  */
16732   __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_n_ui_get); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16733   __Pyx_GOTREF(__pyx_t_4);
16734   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16735   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
16736   __Pyx_INCREF(((PyObject *)__pyx_n_u_NoneType));
16737   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u_NoneType));
16738   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_NoneType));
16739   __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16740   __Pyx_GOTREF(__pyx_t_2);
16741   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16742   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
16743   if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_9objectify_PyType))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16744   __Pyx_DECREF(((PyObject *)__pyx_v_NoneType));
16745   __pyx_v_NoneType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
16746   __pyx_t_2 = 0;
16747
16748   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1600
16749  *     StrType  = _PYTYPE_DICT.get(u'str')
16750  *     NoneType = _PYTYPE_DICT.get(u'NoneType')
16751  *     c_node = element._c_node             # <<<<<<<<<<<<<<
16752  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
16753  *     if c_node.type == tree.XML_ELEMENT_NODE:
16754  */
16755   __pyx_v_c_node = __pyx_v_element->_c_node;
16756
16757   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1601
16758  *     NoneType = _PYTYPE_DICT.get(u'NoneType')
16759  *     c_node = element._c_node
16760  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)             # <<<<<<<<<<<<<<
16761  *     if c_node.type == tree.XML_ELEMENT_NODE:
16762  *         typename = None
16763  */
16764   BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node, __pyx_v_c_node, 1);
16765
16766   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1602
16767  *     c_node = element._c_node
16768  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
16769  *     if c_node.type == tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<<
16770  *         typename = None
16771  *         pytype = None
16772  */
16773   __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
16774   if (__pyx_t_1) {
16775
16776     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1603
16777  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
16778  *     if c_node.type == tree.XML_ELEMENT_NODE:
16779  *         typename = None             # <<<<<<<<<<<<<<
16780  *         pytype = None
16781  *         value  = None
16782  */
16783     __Pyx_INCREF(Py_None);
16784     __Pyx_DECREF(__pyx_v_typename);
16785     __pyx_v_typename = Py_None;
16786
16787     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1604
16788  *     if c_node.type == tree.XML_ELEMENT_NODE:
16789  *         typename = None
16790  *         pytype = None             # <<<<<<<<<<<<<<
16791  *         value  = None
16792  *         istree = 0
16793  */
16794     __Pyx_INCREF(Py_None);
16795     __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
16796     __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
16797
16798     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1605
16799  *         typename = None
16800  *         pytype = None
16801  *         value  = None             # <<<<<<<<<<<<<<
16802  *         istree = 0
16803  *         # if element is defined as xsi:nil, represent it as None
16804  */
16805     __Pyx_INCREF(Py_None);
16806     __Pyx_DECREF(__pyx_v_value);
16807     __pyx_v_value = Py_None;
16808
16809     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1606
16810  *         pytype = None
16811  *         value  = None
16812  *         istree = 0             # <<<<<<<<<<<<<<
16813  *         # if element is defined as xsi:nil, represent it as None
16814  *         if cetree.attributeValueFromNsName(
16815  */
16816     __Pyx_INCREF(__pyx_int_0);
16817     __Pyx_DECREF(__pyx_v_istree);
16818     __pyx_v_istree = __pyx_int_0;
16819
16820     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1609
16821  *         # if element is defined as xsi:nil, represent it as None
16822  *         if cetree.attributeValueFromNsName(
16823  *             c_node, _XML_SCHEMA_INSTANCE_NS, "nil") == u"true":             # <<<<<<<<<<<<<<
16824  *             pytype = NoneType
16825  * 
16826  */
16827     __pyx_t_2 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_nil); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16828     __Pyx_GOTREF(__pyx_t_2);
16829     __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_u_true), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16830     __Pyx_GOTREF(__pyx_t_3);
16831     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16832     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16833     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16834     if (__pyx_t_1) {
16835
16836       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1610
16837  *         if cetree.attributeValueFromNsName(
16838  *             c_node, _XML_SCHEMA_INSTANCE_NS, "nil") == u"true":
16839  *             pytype = NoneType             # <<<<<<<<<<<<<<
16840  * 
16841  *         if  pytype is None and not ignore_xsi:
16842  */
16843       __Pyx_INCREF(((PyObject *)__pyx_v_NoneType));
16844       __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
16845       __pyx_v_pytype = __pyx_v_NoneType;
16846       goto __pyx_L9;
16847     }
16848     __pyx_L9:;
16849
16850     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1612
16851  *             pytype = NoneType
16852  * 
16853  *         if  pytype is None and not ignore_xsi:             # <<<<<<<<<<<<<<
16854  *             # check that old xsi type value is valid
16855  *             typename = cetree.attributeValueFromNsName(
16856  */
16857     __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
16858     if (__pyx_t_1) {
16859       __pyx_t_5 = (!__pyx_v_ignore_xsi);
16860     } else {
16861       __pyx_t_5 = __pyx_t_1;
16862     }
16863     if (__pyx_t_5) {
16864
16865       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1615
16866  *             # check that old xsi type value is valid
16867  *             typename = cetree.attributeValueFromNsName(
16868  *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")             # <<<<<<<<<<<<<<
16869  *             if typename is not None:
16870  *                 dict_result = python.PyDict_GetItem(
16871  */
16872       __pyx_t_3 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16873       __Pyx_GOTREF(__pyx_t_3);
16874       __Pyx_DECREF(__pyx_v_typename);
16875       __pyx_v_typename = __pyx_t_3;
16876       __pyx_t_3 = 0;
16877
16878       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1616
16879  *             typename = cetree.attributeValueFromNsName(
16880  *                 c_node, _XML_SCHEMA_INSTANCE_NS, "type")
16881  *             if typename is not None:             # <<<<<<<<<<<<<<
16882  *                 dict_result = python.PyDict_GetItem(
16883  *                     _SCHEMA_TYPE_DICT, typename)
16884  */
16885       __pyx_t_5 = (__pyx_v_typename != Py_None);
16886       if (__pyx_t_5) {
16887
16888         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1618
16889  *             if typename is not None:
16890  *                 dict_result = python.PyDict_GetItem(
16891  *                     _SCHEMA_TYPE_DICT, typename)             # <<<<<<<<<<<<<<
16892  *                 if dict_result is NULL and u':' in typename:
16893  *                     prefix, typename = typename.split(u':', 1)
16894  */
16895         __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_typename);
16896
16897         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1619
16898  *                 dict_result = python.PyDict_GetItem(
16899  *                     _SCHEMA_TYPE_DICT, typename)
16900  *                 if dict_result is NULL and u':' in typename:             # <<<<<<<<<<<<<<
16901  *                     prefix, typename = typename.split(u':', 1)
16902  *                     dict_result = python.PyDict_GetItem(
16903  */
16904         if ((__pyx_v_dict_result == NULL)) {
16905           __pyx_t_5 = (PySequence_Contains(__pyx_v_typename, ((PyObject *)__pyx_kp_u_32))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16906           __pyx_t_1 = __pyx_t_5;
16907         } else {
16908           __pyx_t_1 = (__pyx_v_dict_result == NULL);
16909         }
16910         if (__pyx_t_1) {
16911
16912           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1620
16913  *                     _SCHEMA_TYPE_DICT, typename)
16914  *                 if dict_result is NULL and u':' in typename:
16915  *                     prefix, typename = typename.split(u':', 1)             # <<<<<<<<<<<<<<
16916  *                     dict_result = python.PyDict_GetItem(
16917  *                         _SCHEMA_TYPE_DICT, typename)
16918  */
16919           __pyx_t_3 = PyObject_GetAttr(__pyx_v_typename, __pyx_n_ui_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16920           __Pyx_GOTREF(__pyx_t_3);
16921           __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16922           __Pyx_GOTREF(((PyObject *)__pyx_t_2));
16923           __Pyx_INCREF(((PyObject *)__pyx_kp_u_32));
16924           PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_u_32));
16925           __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_32));
16926           __Pyx_INCREF(__pyx_int_1);
16927           PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
16928           __Pyx_GIVEREF(__pyx_int_1);
16929           __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16930           __Pyx_GOTREF(__pyx_t_4);
16931           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16932           __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
16933           if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
16934             PyObject* tuple = __pyx_t_4;
16935             __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
16936             __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
16937             __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16938             __Pyx_DECREF(__pyx_v_prefix);
16939             __pyx_v_prefix = __pyx_t_2;
16940             __pyx_t_2 = 0;
16941             __Pyx_DECREF(__pyx_v_typename);
16942             __pyx_v_typename = __pyx_t_3;
16943             __pyx_t_3 = 0;
16944           } else {
16945             __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16946             __Pyx_GOTREF(__pyx_t_6);
16947             __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16948             __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16949             __Pyx_GOTREF(__pyx_t_2);
16950             __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16951             __Pyx_GOTREF(__pyx_t_3);
16952             if (__Pyx_EndUnpack(__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16953             __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16954             __Pyx_DECREF(__pyx_v_prefix);
16955             __pyx_v_prefix = __pyx_t_2;
16956             __pyx_t_2 = 0;
16957             __Pyx_DECREF(__pyx_v_typename);
16958             __pyx_v_typename = __pyx_t_3;
16959             __pyx_t_3 = 0;
16960           }
16961
16962           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1622
16963  *                     prefix, typename = typename.split(u':', 1)
16964  *                     dict_result = python.PyDict_GetItem(
16965  *                         _SCHEMA_TYPE_DICT, typename)             # <<<<<<<<<<<<<<
16966  *                 if dict_result is not NULL:
16967  *                     pytype = <PyType>dict_result
16968  */
16969           __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_typename);
16970           goto __pyx_L12;
16971         }
16972         __pyx_L12:;
16973
16974         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1623
16975  *                     dict_result = python.PyDict_GetItem(
16976  *                         _SCHEMA_TYPE_DICT, typename)
16977  *                 if dict_result is not NULL:             # <<<<<<<<<<<<<<
16978  *                     pytype = <PyType>dict_result
16979  *                     if pytype is not StrType:
16980  */
16981         __pyx_t_1 = (__pyx_v_dict_result != NULL);
16982         if (__pyx_t_1) {
16983
16984           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1624
16985  *                         _SCHEMA_TYPE_DICT, typename)
16986  *                 if dict_result is not NULL:
16987  *                     pytype = <PyType>dict_result             # <<<<<<<<<<<<<<
16988  *                     if pytype is not StrType:
16989  *                         # StrType does not have a typecheck but is the default
16990  */
16991           __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)));
16992           __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
16993           __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result);
16994
16995           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1625
16996  *                 if dict_result is not NULL:
16997  *                     pytype = <PyType>dict_result
16998  *                     if pytype is not StrType:             # <<<<<<<<<<<<<<
16999  *                         # StrType does not have a typecheck but is the default
17000  *                         # anyway, so just accept it if given as type
17001  */
17002           __pyx_t_1 = (__pyx_v_pytype != __pyx_v_StrType);
17003           if (__pyx_t_1) {
17004
17005             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1629
17006  *                         # anyway, so just accept it if given as type
17007  *                         # information
17008  *                         pytype = _check_type(c_node, pytype)             # <<<<<<<<<<<<<<
17009  *                         if pytype is None:
17010  *                             typename = None
17011  */
17012             __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17013             __Pyx_GOTREF(__pyx_t_4);
17014             __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17015             __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
17016             __pyx_t_4 = 0;
17017
17018             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1630
17019  *                         # information
17020  *                         pytype = _check_type(c_node, pytype)
17021  *                         if pytype is None:             # <<<<<<<<<<<<<<
17022  *                             typename = None
17023  * 
17024  */
17025             __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
17026             if (__pyx_t_1) {
17027
17028               /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1631
17029  *                         pytype = _check_type(c_node, pytype)
17030  *                         if pytype is None:
17031  *                             typename = None             # <<<<<<<<<<<<<<
17032  * 
17033  *         if pytype is None and not ignore_pytype:
17034  */
17035               __Pyx_INCREF(Py_None);
17036               __Pyx_DECREF(__pyx_v_typename);
17037               __pyx_v_typename = Py_None;
17038               goto __pyx_L15;
17039             }
17040             __pyx_L15:;
17041             goto __pyx_L14;
17042           }
17043           __pyx_L14:;
17044           goto __pyx_L13;
17045         }
17046         __pyx_L13:;
17047         goto __pyx_L11;
17048       }
17049       __pyx_L11:;
17050       goto __pyx_L10;
17051     }
17052     __pyx_L10:;
17053
17054     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1633
17055  *                             typename = None
17056  * 
17057  *         if pytype is None and not ignore_pytype:             # <<<<<<<<<<<<<<
17058  *             # check that old pytype value is valid
17059  *             old_pytypename = cetree.attributeValueFromNsName(
17060  */
17061     __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
17062     if (__pyx_t_1) {
17063       __pyx_t_5 = (!__pyx_v_ignore_pytype);
17064     } else {
17065       __pyx_t_5 = __pyx_t_1;
17066     }
17067     if (__pyx_t_5) {
17068
17069       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1636
17070  *             # check that old pytype value is valid
17071  *             old_pytypename = cetree.attributeValueFromNsName(
17072  *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
17073  *             if old_pytypename is not None:
17074  *                 if old_pytypename == TREE_PYTYPE_NAME:
17075  */
17076       __pyx_t_4 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17077       __Pyx_GOTREF(__pyx_t_4);
17078       __Pyx_DECREF(__pyx_v_old_pytypename);
17079       __pyx_v_old_pytypename = __pyx_t_4;
17080       __pyx_t_4 = 0;
17081
17082       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1637
17083  *             old_pytypename = cetree.attributeValueFromNsName(
17084  *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
17085  *             if old_pytypename is not None:             # <<<<<<<<<<<<<<
17086  *                 if old_pytypename == TREE_PYTYPE_NAME:
17087  *                     if not cetree.hasChild(c_node):
17088  */
17089       __pyx_t_5 = (__pyx_v_old_pytypename != Py_None);
17090       if (__pyx_t_5) {
17091
17092         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1638
17093  *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
17094  *             if old_pytypename is not None:
17095  *                 if old_pytypename == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
17096  *                     if not cetree.hasChild(c_node):
17097  *                         # only case where we should keep it,
17098  */
17099         __pyx_t_4 = PyObject_RichCompare(__pyx_v_old_pytypename, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17100         __Pyx_GOTREF(__pyx_t_4);
17101         __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17102         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17103         if (__pyx_t_5) {
17104
17105           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1639
17106  *             if old_pytypename is not None:
17107  *                 if old_pytypename == TREE_PYTYPE_NAME:
17108  *                     if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
17109  *                         # only case where we should keep it,
17110  *                         # everything else is clear enough
17111  */
17112           __pyx_t_5 = (!hasChild(__pyx_v_c_node));
17113           if (__pyx_t_5) {
17114
17115             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1642
17116  *                         # only case where we should keep it,
17117  *                         # everything else is clear enough
17118  *                         pytype = TREE_PYTYPE             # <<<<<<<<<<<<<<
17119  *                 else:
17120  *                     if old_pytypename == u'none':
17121  */
17122             __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
17123             __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17124             __pyx_v_pytype = __pyx_v_4lxml_9objectify_TREE_PYTYPE;
17125             goto __pyx_L19;
17126           }
17127           __pyx_L19:;
17128           goto __pyx_L18;
17129         }
17130         /*else*/ {
17131
17132           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1644
17133  *                         pytype = TREE_PYTYPE
17134  *                 else:
17135  *                     if old_pytypename == u'none':             # <<<<<<<<<<<<<<
17136  *                         # transition from lxml 1.x
17137  *                         old_pytypename = u"NoneType"
17138  */
17139           __pyx_t_4 = PyObject_RichCompare(__pyx_v_old_pytypename, ((PyObject *)__pyx_n_u_none), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17140           __Pyx_GOTREF(__pyx_t_4);
17141           __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17142           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17143           if (__pyx_t_5) {
17144
17145             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1646
17146  *                     if old_pytypename == u'none':
17147  *                         # transition from lxml 1.x
17148  *                         old_pytypename = u"NoneType"             # <<<<<<<<<<<<<<
17149  *                     dict_result = python.PyDict_GetItem(
17150  *                         _PYTYPE_DICT, old_pytypename)
17151  */
17152             __Pyx_INCREF(((PyObject *)__pyx_n_u_NoneType));
17153             __Pyx_DECREF(__pyx_v_old_pytypename);
17154             __pyx_v_old_pytypename = ((PyObject *)__pyx_n_u_NoneType);
17155             goto __pyx_L20;
17156           }
17157           __pyx_L20:;
17158
17159           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1648
17160  *                         old_pytypename = u"NoneType"
17161  *                     dict_result = python.PyDict_GetItem(
17162  *                         _PYTYPE_DICT, old_pytypename)             # <<<<<<<<<<<<<<
17163  *                     if dict_result is not NULL:
17164  *                         pytype = <PyType>dict_result
17165  */
17166           __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_old_pytypename);
17167
17168           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1649
17169  *                     dict_result = python.PyDict_GetItem(
17170  *                         _PYTYPE_DICT, old_pytypename)
17171  *                     if dict_result is not NULL:             # <<<<<<<<<<<<<<
17172  *                         pytype = <PyType>dict_result
17173  *                         if pytype is not StrType:
17174  */
17175           __pyx_t_5 = (__pyx_v_dict_result != NULL);
17176           if (__pyx_t_5) {
17177
17178             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1650
17179  *                         _PYTYPE_DICT, old_pytypename)
17180  *                     if dict_result is not NULL:
17181  *                         pytype = <PyType>dict_result             # <<<<<<<<<<<<<<
17182  *                         if pytype is not StrType:
17183  *                             # StrType does not have a typecheck but is the
17184  */
17185             __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)));
17186             __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17187             __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result);
17188
17189             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1651
17190  *                     if dict_result is not NULL:
17191  *                         pytype = <PyType>dict_result
17192  *                         if pytype is not StrType:             # <<<<<<<<<<<<<<
17193  *                             # StrType does not have a typecheck but is the
17194  *                             # default anyway, so just accept it if given as
17195  */
17196             __pyx_t_5 = (__pyx_v_pytype != __pyx_v_StrType);
17197             if (__pyx_t_5) {
17198
17199               /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1655
17200  *                             # default anyway, so just accept it if given as
17201  *                             # type information
17202  *                             pytype = _check_type(c_node, pytype)             # <<<<<<<<<<<<<<
17203  * 
17204  *         if pytype is None:
17205  */
17206               __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17207               __Pyx_GOTREF(__pyx_t_4);
17208               __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17209               __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
17210               __pyx_t_4 = 0;
17211               goto __pyx_L22;
17212             }
17213             __pyx_L22:;
17214             goto __pyx_L21;
17215           }
17216           __pyx_L21:;
17217         }
17218         __pyx_L18:;
17219         goto __pyx_L17;
17220       }
17221       __pyx_L17:;
17222       goto __pyx_L16;
17223     }
17224     __pyx_L16:;
17225
17226     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1657
17227  *                             pytype = _check_type(c_node, pytype)
17228  * 
17229  *         if pytype is None:             # <<<<<<<<<<<<<<
17230  *             # try to guess type
17231  *             if not cetree.hasChild(c_node):
17232  */
17233     __pyx_t_5 = (((PyObject *)__pyx_v_pytype) == Py_None);
17234     if (__pyx_t_5) {
17235
17236       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1659
17237  *         if pytype is None:
17238  *             # try to guess type
17239  *             if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
17240  *                 # element has no children => data class
17241  *                 pytype = _guessPyType(textOf(c_node), StrType)
17242  */
17243       __pyx_t_5 = (!hasChild(__pyx_v_c_node));
17244       if (__pyx_t_5) {
17245
17246         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1661
17247  *             if not cetree.hasChild(c_node):
17248  *                 # element has no children => data class
17249  *                 pytype = _guessPyType(textOf(c_node), StrType)             # <<<<<<<<<<<<<<
17250  *             else:
17251  *                 istree = 1
17252  */
17253         __pyx_t_4 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17254         __Pyx_GOTREF(__pyx_t_4);
17255         __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_9objectify__guessPyType(__pyx_t_4, __pyx_v_StrType)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17256         __Pyx_GOTREF(__pyx_t_3);
17257         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17258         __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17259         __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3);
17260         __pyx_t_3 = 0;
17261         goto __pyx_L24;
17262       }
17263       /*else*/ {
17264
17265         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1663
17266  *                 pytype = _guessPyType(textOf(c_node), StrType)
17267  *             else:
17268  *                 istree = 1             # <<<<<<<<<<<<<<
17269  * 
17270  *         if pytype is None:
17271  */
17272         __Pyx_INCREF(__pyx_int_1);
17273         __Pyx_DECREF(__pyx_v_istree);
17274         __pyx_v_istree = __pyx_int_1;
17275       }
17276       __pyx_L24:;
17277       goto __pyx_L23;
17278     }
17279     __pyx_L23:;
17280
17281     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1665
17282  *                 istree = 1
17283  * 
17284  *         if pytype is None:             # <<<<<<<<<<<<<<
17285  *             # use default type for empty elements
17286  *             if cetree.hasText(c_node):
17287  */
17288     __pyx_t_5 = (((PyObject *)__pyx_v_pytype) == Py_None);
17289     if (__pyx_t_5) {
17290
17291       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1667
17292  *         if pytype is None:
17293  *             # use default type for empty elements
17294  *             if cetree.hasText(c_node):             # <<<<<<<<<<<<<<
17295  *                 pytype = StrType
17296  *             else:
17297  */
17298       __pyx_t_5 = hasText(__pyx_v_c_node);
17299       if (__pyx_t_5) {
17300
17301         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1668
17302  *             # use default type for empty elements
17303  *             if cetree.hasText(c_node):
17304  *                 pytype = StrType             # <<<<<<<<<<<<<<
17305  *             else:
17306  *                 pytype = empty_pytype
17307  */
17308         __Pyx_INCREF(((PyObject *)__pyx_v_StrType));
17309         __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17310         __pyx_v_pytype = __pyx_v_StrType;
17311         goto __pyx_L26;
17312       }
17313       /*else*/ {
17314
17315         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1670
17316  *                 pytype = StrType
17317  *             else:
17318  *                 pytype = empty_pytype             # <<<<<<<<<<<<<<
17319  *                 if typename is None:
17320  *                     typename = empty_type_name
17321  */
17322         __Pyx_INCREF(((PyObject *)__pyx_v_empty_pytype));
17323         __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17324         __pyx_v_pytype = __pyx_v_empty_pytype;
17325
17326         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1671
17327  *             else:
17328  *                 pytype = empty_pytype
17329  *                 if typename is None:             # <<<<<<<<<<<<<<
17330  *                     typename = empty_type_name
17331  * 
17332  */
17333         __pyx_t_5 = (__pyx_v_typename == Py_None);
17334         if (__pyx_t_5) {
17335
17336           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1672
17337  *                 pytype = empty_pytype
17338  *                 if typename is None:
17339  *                     typename = empty_type_name             # <<<<<<<<<<<<<<
17340  * 
17341  *         if pytype is not None:
17342  */
17343           __Pyx_INCREF(__pyx_v_empty_type_name);
17344           __Pyx_DECREF(__pyx_v_typename);
17345           __pyx_v_typename = __pyx_v_empty_type_name;
17346           goto __pyx_L27;
17347         }
17348         __pyx_L27:;
17349       }
17350       __pyx_L26:;
17351       goto __pyx_L25;
17352     }
17353     __pyx_L25:;
17354
17355     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1674
17356  *                     typename = empty_type_name
17357  * 
17358  *         if pytype is not None:             # <<<<<<<<<<<<<<
17359  *             if typename is None:
17360  *                 if not istree:
17361  */
17362     __pyx_t_5 = (((PyObject *)__pyx_v_pytype) != Py_None);
17363     if (__pyx_t_5) {
17364
17365       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1675
17366  * 
17367  *         if pytype is not None:
17368  *             if typename is None:             # <<<<<<<<<<<<<<
17369  *                 if not istree:
17370  *                     if python.PyList_GET_SIZE(pytype._schema_types) > 0:
17371  */
17372       __pyx_t_5 = (__pyx_v_typename == Py_None);
17373       if (__pyx_t_5) {
17374
17375         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1676
17376  *         if pytype is not None:
17377  *             if typename is None:
17378  *                 if not istree:             # <<<<<<<<<<<<<<
17379  *                     if python.PyList_GET_SIZE(pytype._schema_types) > 0:
17380  *                         # pytype->xsi:type is a 1:n mapping
17381  */
17382         __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_istree); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17383         __pyx_t_1 = (!__pyx_t_5);
17384         if (__pyx_t_1) {
17385
17386           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1677
17387  *             if typename is None:
17388  *                 if not istree:
17389  *                     if python.PyList_GET_SIZE(pytype._schema_types) > 0:             # <<<<<<<<<<<<<<
17390  *                         # pytype->xsi:type is a 1:n mapping
17391  *                         # simply take the first
17392  */
17393           __pyx_t_1 = (PyList_GET_SIZE(((PyObject *)__pyx_v_pytype->_schema_types)) > 0);
17394           if (__pyx_t_1) {
17395
17396             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1680
17397  *                         # pytype->xsi:type is a 1:n mapping
17398  *                         # simply take the first
17399  *                         typename = pytype._schema_types[0]             # <<<<<<<<<<<<<<
17400  *             elif typename not in pytype._schema_types:
17401  *                 typename = pytype._schema_types[0]
17402  */
17403             __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_pytype->_schema_types), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17404             __Pyx_GOTREF(__pyx_t_3);
17405             __Pyx_DECREF(__pyx_v_typename);
17406             __pyx_v_typename = __pyx_t_3;
17407             __pyx_t_3 = 0;
17408             goto __pyx_L31;
17409           }
17410           __pyx_L31:;
17411           goto __pyx_L30;
17412         }
17413         __pyx_L30:;
17414         goto __pyx_L29;
17415       }
17416
17417       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1681
17418  *                         # simply take the first
17419  *                         typename = pytype._schema_types[0]
17420  *             elif typename not in pytype._schema_types:             # <<<<<<<<<<<<<<
17421  *                 typename = pytype._schema_types[0]
17422  * 
17423  */
17424       __pyx_t_1 = (!PySequence_Contains(((PyObject *)__pyx_v_pytype->_schema_types), __pyx_v_typename)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17425       if (__pyx_t_1) {
17426
17427         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1682
17428  *                         typename = pytype._schema_types[0]
17429  *             elif typename not in pytype._schema_types:
17430  *                 typename = pytype._schema_types[0]             # <<<<<<<<<<<<<<
17431  * 
17432  *         if annotate_xsi:
17433  */
17434         __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_pytype->_schema_types), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17435         __Pyx_GOTREF(__pyx_t_3);
17436         __Pyx_DECREF(__pyx_v_typename);
17437         __pyx_v_typename = __pyx_t_3;
17438         __pyx_t_3 = 0;
17439         goto __pyx_L29;
17440       }
17441       __pyx_L29:;
17442       goto __pyx_L28;
17443     }
17444     __pyx_L28:;
17445
17446     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1684
17447  *                 typename = pytype._schema_types[0]
17448  * 
17449  *         if annotate_xsi:             # <<<<<<<<<<<<<<
17450  *             if typename is None or istree:
17451  *                 cetree.delAttributeFromNsName(
17452  */
17453     __pyx_t_1 = __pyx_v_annotate_xsi;
17454     if (__pyx_t_1) {
17455
17456       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1685
17457  * 
17458  *         if annotate_xsi:
17459  *             if typename is None or istree:             # <<<<<<<<<<<<<<
17460  *                 cetree.delAttributeFromNsName(
17461  *                     c_node, _XML_SCHEMA_INSTANCE_NS, "type")
17462  */
17463       __pyx_t_1 = (__pyx_v_typename == Py_None);
17464       if (!__pyx_t_1) {
17465         __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_istree); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17466         __pyx_t_7 = __pyx_t_5;
17467       } else {
17468         __pyx_t_7 = __pyx_t_1;
17469       }
17470       if (__pyx_t_7) {
17471
17472         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1687
17473  *             if typename is None or istree:
17474  *                 cetree.delAttributeFromNsName(
17475  *                     c_node, _XML_SCHEMA_INSTANCE_NS, "type")             # <<<<<<<<<<<<<<
17476  *             else:
17477  *                 # update or create attribute
17478  */
17479         delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_type);
17480         goto __pyx_L33;
17481       }
17482       /*else*/ {
17483
17484         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1690
17485  *             else:
17486  *                 # update or create attribute
17487  *                 typename_utf8 = cetree.utf8(typename)             # <<<<<<<<<<<<<<
17488  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
17489  *                     doc, c_node, _XML_SCHEMA_NS, 'xsd')
17490  */
17491         __pyx_t_3 = utf8(__pyx_v_typename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17492         __Pyx_GOTREF(__pyx_t_3);
17493         __Pyx_DECREF(__pyx_v_typename_utf8);
17494         __pyx_v_typename_utf8 = __pyx_t_3;
17495         __pyx_t_3 = 0;
17496
17497         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1692
17498  *                 typename_utf8 = cetree.utf8(typename)
17499  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
17500  *                     doc, c_node, _XML_SCHEMA_NS, 'xsd')             # <<<<<<<<<<<<<<
17501  *                 if c_ns is not NULL:
17502  *                     if ':' in typename_utf8:
17503  */
17504         __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_NS, __pyx_k_xsd);
17505
17506         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1693
17507  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
17508  *                     doc, c_node, _XML_SCHEMA_NS, 'xsd')
17509  *                 if c_ns is not NULL:             # <<<<<<<<<<<<<<
17510  *                     if ':' in typename_utf8:
17511  *                         prefix, name = typename_utf8.split(':', 1)
17512  */
17513         __pyx_t_7 = (__pyx_v_c_ns != NULL);
17514         if (__pyx_t_7) {
17515
17516           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1694
17517  *                     doc, c_node, _XML_SCHEMA_NS, 'xsd')
17518  *                 if c_ns is not NULL:
17519  *                     if ':' in typename_utf8:             # <<<<<<<<<<<<<<
17520  *                         prefix, name = typename_utf8.split(':', 1)
17521  *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
17522  */
17523           __pyx_t_7 = (PySequence_Contains(__pyx_v_typename_utf8, ((PyObject *)__pyx_kp_b_32))); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17524           if (__pyx_t_7) {
17525
17526             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1695
17527  *                 if c_ns is not NULL:
17528  *                     if ':' in typename_utf8:
17529  *                         prefix, name = typename_utf8.split(':', 1)             # <<<<<<<<<<<<<<
17530  *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
17531  *                             typename_utf8 = name
17532  */
17533             __pyx_t_3 = PyObject_GetAttr(__pyx_v_typename_utf8, __pyx_n_ui_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17534             __Pyx_GOTREF(__pyx_t_3);
17535             __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17536             __Pyx_GOTREF(((PyObject *)__pyx_t_4));
17537             __Pyx_INCREF(((PyObject *)__pyx_kp_b_32));
17538             PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_b_32));
17539             __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_32));
17540             __Pyx_INCREF(__pyx_int_1);
17541             PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
17542             __Pyx_GIVEREF(__pyx_int_1);
17543             __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17544             __Pyx_GOTREF(__pyx_t_2);
17545             __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17546             __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
17547             if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
17548               PyObject* tuple = __pyx_t_2;
17549               __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
17550               __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
17551               __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17552               __Pyx_DECREF(__pyx_v_prefix);
17553               __pyx_v_prefix = __pyx_t_4;
17554               __pyx_t_4 = 0;
17555               __Pyx_DECREF(__pyx_v_name);
17556               __pyx_v_name = __pyx_t_3;
17557               __pyx_t_3 = 0;
17558             } else {
17559               __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17560               __Pyx_GOTREF(__pyx_t_6);
17561               __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17562               __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17563               __Pyx_GOTREF(__pyx_t_4);
17564               __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17565               __Pyx_GOTREF(__pyx_t_3);
17566               if (__Pyx_EndUnpack(__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17567               __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17568               __Pyx_DECREF(__pyx_v_prefix);
17569               __pyx_v_prefix = __pyx_t_4;
17570               __pyx_t_4 = 0;
17571               __Pyx_DECREF(__pyx_v_name);
17572               __pyx_v_name = __pyx_t_3;
17573               __pyx_t_3 = 0;
17574             }
17575
17576             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1696
17577  *                     if ':' in typename_utf8:
17578  *                         prefix, name = typename_utf8.split(':', 1)
17579  *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':             # <<<<<<<<<<<<<<
17580  *                             typename_utf8 = name
17581  *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
17582  */
17583             if (!(__pyx_v_c_ns->prefix == NULL)) {
17584               __pyx_t_7 = ((__pyx_v_c_ns->prefix[0]) == '\x00');
17585             } else {
17586               __pyx_t_7 = (__pyx_v_c_ns->prefix == NULL);
17587             }
17588             if (__pyx_t_7) {
17589
17590               /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1697
17591  *                         prefix, name = typename_utf8.split(':', 1)
17592  *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
17593  *                             typename_utf8 = name             # <<<<<<<<<<<<<<
17594  *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
17595  *                             prefix = c_ns.prefix
17596  */
17597               __Pyx_INCREF(__pyx_v_name);
17598               __Pyx_DECREF(__pyx_v_typename_utf8);
17599               __pyx_v_typename_utf8 = __pyx_v_name;
17600               goto __pyx_L36;
17601             }
17602
17603             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1698
17604  *                         if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
17605  *                             typename_utf8 = name
17606  *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:             # <<<<<<<<<<<<<<
17607  *                             prefix = c_ns.prefix
17608  *                             typename_utf8 = prefix + ':' + name
17609  */
17610             __pyx_t_7 = (strcmp(PyString_AS_STRING(__pyx_v_prefix), __pyx_v_c_ns->prefix) != 0);
17611             if (__pyx_t_7) {
17612
17613               /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1699
17614  *                             typename_utf8 = name
17615  *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
17616  *                             prefix = c_ns.prefix             # <<<<<<<<<<<<<<
17617  *                             typename_utf8 = prefix + ':' + name
17618  *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
17619  */
17620               __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_c_ns->prefix); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17621               __Pyx_GOTREF(__pyx_t_2);
17622               __Pyx_DECREF(__pyx_v_prefix);
17623               __pyx_v_prefix = __pyx_t_2;
17624               __pyx_t_2 = 0;
17625
17626               /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1700
17627  *                         elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
17628  *                             prefix = c_ns.prefix
17629  *                             typename_utf8 = prefix + ':' + name             # <<<<<<<<<<<<<<
17630  *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
17631  *                         prefix = c_ns.prefix
17632  */
17633               __pyx_t_2 = PyNumber_Add(__pyx_v_prefix, ((PyObject *)__pyx_kp_b_32)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17634               __Pyx_GOTREF(__pyx_t_2);
17635               __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17636               __Pyx_GOTREF(__pyx_t_3);
17637               __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17638               __Pyx_DECREF(__pyx_v_typename_utf8);
17639               __pyx_v_typename_utf8 = __pyx_t_3;
17640               __pyx_t_3 = 0;
17641               goto __pyx_L36;
17642             }
17643             __pyx_L36:;
17644             goto __pyx_L35;
17645           }
17646
17647           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1701
17648  *                             prefix = c_ns.prefix
17649  *                             typename_utf8 = prefix + ':' + name
17650  *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':             # <<<<<<<<<<<<<<
17651  *                         prefix = c_ns.prefix
17652  *                         typename_utf8 = prefix + ':' + typename_utf8
17653  */
17654           if (!(__pyx_v_c_ns->prefix != NULL)) {
17655             __pyx_t_7 = ((__pyx_v_c_ns->prefix[0]) != '\x00');
17656           } else {
17657             __pyx_t_7 = (__pyx_v_c_ns->prefix != NULL);
17658           }
17659           if (__pyx_t_7) {
17660
17661             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1702
17662  *                             typename_utf8 = prefix + ':' + name
17663  *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
17664  *                         prefix = c_ns.prefix             # <<<<<<<<<<<<<<
17665  *                         typename_utf8 = prefix + ':' + typename_utf8
17666  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
17667  */
17668             __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_c_ns->prefix); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17669             __Pyx_GOTREF(__pyx_t_3);
17670             __Pyx_DECREF(__pyx_v_prefix);
17671             __pyx_v_prefix = __pyx_t_3;
17672             __pyx_t_3 = 0;
17673
17674             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1703
17675  *                     elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
17676  *                         prefix = c_ns.prefix
17677  *                         typename_utf8 = prefix + ':' + typename_utf8             # <<<<<<<<<<<<<<
17678  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
17679  *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
17680  */
17681             __pyx_t_3 = PyNumber_Add(__pyx_v_prefix, ((PyObject *)__pyx_kp_b_32)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17682             __Pyx_GOTREF(__pyx_t_3);
17683             __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_typename_utf8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17684             __Pyx_GOTREF(__pyx_t_2);
17685             __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17686             __Pyx_DECREF(__pyx_v_typename_utf8);
17687             __pyx_v_typename_utf8 = __pyx_t_2;
17688             __pyx_t_2 = 0;
17689             goto __pyx_L35;
17690           }
17691           __pyx_L35:;
17692           goto __pyx_L34;
17693         }
17694         __pyx_L34:;
17695
17696         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1705
17697  *                         typename_utf8 = prefix + ':' + typename_utf8
17698  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
17699  *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')             # <<<<<<<<<<<<<<
17700  *                 tree.xmlSetNsProp(c_node, c_ns, "type", _cstr(typename_utf8))
17701  * 
17702  */
17703         __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_xsi);
17704
17705         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1706
17706  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
17707  *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
17708  *                 tree.xmlSetNsProp(c_node, c_ns, "type", _cstr(typename_utf8))             # <<<<<<<<<<<<<<
17709  * 
17710  *         if annotate_pytype:
17711  */
17712         xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, __pyx_k_type, PyString_AS_STRING(__pyx_v_typename_utf8));
17713       }
17714       __pyx_L33:;
17715       goto __pyx_L32;
17716     }
17717     __pyx_L32:;
17718
17719     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1708
17720  *                 tree.xmlSetNsProp(c_node, c_ns, "type", _cstr(typename_utf8))
17721  * 
17722  *         if annotate_pytype:             # <<<<<<<<<<<<<<
17723  *             if pytype is None:
17724  *                 # delete attribute if it exists
17725  */
17726     __pyx_t_7 = __pyx_v_annotate_pytype;
17727     if (__pyx_t_7) {
17728
17729       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1709
17730  * 
17731  *         if annotate_pytype:
17732  *             if pytype is None:             # <<<<<<<<<<<<<<
17733  *                 # delete attribute if it exists
17734  *                 cetree.delAttributeFromNsName(
17735  */
17736       __pyx_t_7 = (((PyObject *)__pyx_v_pytype) == Py_None);
17737       if (__pyx_t_7) {
17738
17739         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1712
17740  *                 # delete attribute if it exists
17741  *                 cetree.delAttributeFromNsName(
17742  *                     c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
17743  *             else:
17744  *                 # update or create attribute
17745  */
17746         delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME);
17747         goto __pyx_L38;
17748       }
17749       /*else*/ {
17750
17751         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1716
17752  *                 # update or create attribute
17753  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
17754  *                     doc, c_node, _PYTYPE_NAMESPACE, 'py')             # <<<<<<<<<<<<<<
17755  *                 pytype_name = cetree.utf8(pytype.name)
17756  *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
17757  */
17758         __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_k_py);
17759
17760         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1717
17761  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
17762  *                     doc, c_node, _PYTYPE_NAMESPACE, 'py')
17763  *                 pytype_name = cetree.utf8(pytype.name)             # <<<<<<<<<<<<<<
17764  *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
17765  *                                   _cstr(pytype_name))
17766  */
17767         __pyx_t_2 = utf8(__pyx_v_pytype->name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17768         __Pyx_GOTREF(__pyx_t_2);
17769         __Pyx_DECREF(__pyx_v_pytype_name);
17770         __pyx_v_pytype_name = __pyx_t_2;
17771         __pyx_t_2 = 0;
17772
17773         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1719
17774  *                 pytype_name = cetree.utf8(pytype.name)
17775  *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
17776  *                                   _cstr(pytype_name))             # <<<<<<<<<<<<<<
17777  *                 if pytype is NoneType:
17778  *                     c_ns = cetree.findOrBuildNodeNsPrefix(
17779  */
17780         xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME, PyString_AS_STRING(__pyx_v_pytype_name));
17781
17782         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1720
17783  *                 tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
17784  *                                   _cstr(pytype_name))
17785  *                 if pytype is NoneType:             # <<<<<<<<<<<<<<
17786  *                     c_ns = cetree.findOrBuildNodeNsPrefix(
17787  *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
17788  */
17789         __pyx_t_7 = (__pyx_v_pytype == __pyx_v_NoneType);
17790         if (__pyx_t_7) {
17791
17792           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1722
17793  *                 if pytype is NoneType:
17794  *                     c_ns = cetree.findOrBuildNodeNsPrefix(
17795  *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')             # <<<<<<<<<<<<<<
17796  *                     tree.xmlSetNsProp(c_node, c_ns, "nil", "true")
17797  *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
17798  */
17799           __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_xsi);
17800
17801           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1723
17802  *                     c_ns = cetree.findOrBuildNodeNsPrefix(
17803  *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
17804  *                     tree.xmlSetNsProp(c_node, c_ns, "nil", "true")             # <<<<<<<<<<<<<<
17805  *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
17806  * 
17807  */
17808           xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, __pyx_k_nil, __pyx_k_true);
17809           goto __pyx_L39;
17810         }
17811         __pyx_L39:;
17812       }
17813       __pyx_L38:;
17814       goto __pyx_L37;
17815     }
17816     __pyx_L37:;
17817     goto __pyx_L8;
17818   }
17819   __pyx_L8:;
17820
17821   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1724
17822  *                         doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
17823  *                     tree.xmlSetNsProp(c_node, c_ns, "nil", "true")
17824  *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)             # <<<<<<<<<<<<<<
17825  * 
17826  * cdef object _strip_attributes = etree.strip_attributes
17827  */
17828   END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node);
17829
17830   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17831   goto __pyx_L0;
17832   __pyx_L1_error:;
17833   __Pyx_XDECREF(__pyx_t_2);
17834   __Pyx_XDECREF(__pyx_t_3);
17835   __Pyx_XDECREF(__pyx_t_4);
17836   __Pyx_XDECREF(__pyx_t_6);
17837   __Pyx_AddTraceback("lxml.objectify._annotate");
17838   __pyx_r = 0;
17839   __pyx_L0:;
17840   __Pyx_DECREF((PyObject *)__pyx_v_doc);
17841   __Pyx_DECREF((PyObject *)__pyx_v_pytype);
17842   __Pyx_DECREF((PyObject *)__pyx_v_empty_pytype);
17843   __Pyx_DECREF((PyObject *)__pyx_v_StrType);
17844   __Pyx_DECREF((PyObject *)__pyx_v_NoneType);
17845   __Pyx_DECREF(__pyx_v_typename);
17846   __Pyx_DECREF(__pyx_v_value);
17847   __Pyx_DECREF(__pyx_v_istree);
17848   __Pyx_DECREF(__pyx_v_prefix);
17849   __Pyx_DECREF(__pyx_v_old_pytypename);
17850   __Pyx_DECREF(__pyx_v_typename_utf8);
17851   __Pyx_DECREF(__pyx_v_name);
17852   __Pyx_DECREF(__pyx_v_pytype_name);
17853   __Pyx_DECREF((PyObject *)__pyx_v_element);
17854   __Pyx_DECREF(__pyx_v_empty_type_name);
17855   __Pyx_DECREF(__pyx_v_empty_pytype_name);
17856   __Pyx_XGIVEREF(__pyx_r);
17857   __Pyx_FinishRefcountContext();
17858   return __pyx_r;
17859 }
17860
17861 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1728
17862  * cdef object _strip_attributes = etree.strip_attributes
17863  * 
17864  * def deannotate(element_or_tree, *, pytype=True, xsi=True, xsi_nil=False):             # <<<<<<<<<<<<<<
17865  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False)
17866  * 
17867  */
17868
17869 static PyObject *__pyx_pf_4lxml_9objectify_deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17870 static char __pyx_doc_4lxml_9objectify_deannotate[] = "deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False)\n\n    Recursively de-annotate the elements of an XML tree by removing 'py:pytype'\n    and/or 'xsi:type' attributes and/or 'xsi:nil' attributes.\n\n    If the 'pytype' keyword argument is True (the default), 'py:pytype'\n    attributes will be removed. If the 'xsi' keyword argument is True (the \n    default), 'xsi:type' attributes will be removed.\n    If the 'xsi_nil' keyword argument is True (default: False), 'xsi:nil'\n    attributes will be removed.\n\n    Note that this does not touch the namespace declarations.  If you\n    want to remove unused namespace declarations from the tree, use\n    ``lxml.etree.cleanup_namespaces()``.\n    ";
17871 static PyObject *__pyx_pf_4lxml_9objectify_deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17872   PyObject *__pyx_v_element_or_tree = 0;
17873   PyObject *__pyx_v_pytype = 0;
17874   PyObject *__pyx_v_xsi = 0;
17875   PyObject *__pyx_v_xsi_nil = 0;
17876   PyObject *__pyx_v_attribute_names = 0;
17877   PyObject *__pyx_r = NULL;
17878   PyObject *__pyx_t_1 = NULL;
17879   int __pyx_t_2;
17880   int __pyx_t_3;
17881   PyObject *__pyx_t_4 = NULL;
17882   PyObject *__pyx_t_5 = NULL;
17883   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_element_or_tree,&__pyx_n_ui_pytype,&__pyx_n_ui_xsi,&__pyx_n_ui_xsi_nil,0};
17884   __Pyx_SetupRefcountContext("deannotate");
17885   __pyx_self = __pyx_self;
17886   if (unlikely(__pyx_kwds)) {
17887     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
17888     PyObject* values[4] = {0,0,0,0};
17889     values[1] = __pyx_k_39;
17890     values[2] = __pyx_k_40;
17891     values[3] = __pyx_k_41;
17892     switch (PyTuple_GET_SIZE(__pyx_args)) {
17893       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17894       case  0: break;
17895       default: goto __pyx_L5_argtuple_error;
17896     }
17897     switch (PyTuple_GET_SIZE(__pyx_args)) {
17898       case  0:
17899       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_element_or_tree);
17900       if (likely(values[0])) kw_args--;
17901       else goto __pyx_L5_argtuple_error;
17902     }
17903     while (kw_args > 0) {
17904       PyObject* value;
17905       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_pytype);
17906       if (value) { values[1] = value; if (!(--kw_args)) break; }
17907       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_xsi);
17908       if (value) { values[2] = value; if (!(--kw_args)) break; }
17909       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_xsi_nil);
17910       if (value) { values[3] = value; if (!(--kw_args)) break; }
17911       break;
17912     }
17913     if (unlikely(kw_args > 0)) {
17914       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "deannotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
17915     }
17916     __pyx_v_element_or_tree = values[0];
17917     __pyx_v_pytype = values[1];
17918     __pyx_v_xsi = values[2];
17919     __pyx_v_xsi_nil = values[3];
17920   } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
17921     goto __pyx_L5_argtuple_error;
17922   } else {
17923     __pyx_v_element_or_tree = PyTuple_GET_ITEM(__pyx_args, 0);
17924     __pyx_v_pytype = __pyx_k_39;
17925     __pyx_v_xsi = __pyx_k_40;
17926     __pyx_v_xsi_nil = __pyx_k_41;
17927   }
17928   goto __pyx_L4_argument_unpacking_done;
17929   __pyx_L5_argtuple_error:;
17930   __Pyx_RaiseArgtupleInvalid("deannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
17931   __pyx_L3_error:;
17932   __Pyx_AddTraceback("lxml.objectify.deannotate");
17933   return NULL;
17934   __pyx_L4_argument_unpacking_done:;
17935   __Pyx_INCREF(__pyx_v_element_or_tree);
17936   __Pyx_INCREF(__pyx_v_pytype);
17937   __Pyx_INCREF(__pyx_v_xsi);
17938   __Pyx_INCREF(__pyx_v_xsi_nil);
17939
17940   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1744
17941  *     ``lxml.etree.cleanup_namespaces()``.
17942  *     """
17943  *     cdef list attribute_names = []             # <<<<<<<<<<<<<<
17944  * 
17945  *     if pytype:
17946  */
17947   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17948   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
17949   __pyx_v_attribute_names = __pyx_t_1;
17950   __pyx_t_1 = 0;
17951
17952   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1746
17953  *     cdef list attribute_names = []
17954  * 
17955  *     if pytype:             # <<<<<<<<<<<<<<
17956  *         attribute_names.append(PYTYPE_ATTRIBUTE)
17957  *     if xsi:
17958  */
17959   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_pytype); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17960   if (__pyx_t_2) {
17961
17962     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1747
17963  * 
17964  *     if pytype:
17965  *         attribute_names.append(PYTYPE_ATTRIBUTE)             # <<<<<<<<<<<<<<
17966  *     if xsi:
17967  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
17968  */
17969     if (unlikely(__pyx_v_attribute_names == Py_None)) {
17970       PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
17971     }
17972     __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17973     __Pyx_GOTREF(__pyx_t_1);
17974     __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_attribute_names), __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17975     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17976     goto __pyx_L6;
17977   }
17978   __pyx_L6:;
17979
17980   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1748
17981  *     if pytype:
17982  *         attribute_names.append(PYTYPE_ATTRIBUTE)
17983  *     if xsi:             # <<<<<<<<<<<<<<
17984  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
17985  *     if xsi_nil:
17986  */
17987   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xsi); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17988   if (__pyx_t_2) {
17989
17990     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1749
17991  *         attribute_names.append(PYTYPE_ATTRIBUTE)
17992  *     if xsi:
17993  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)             # <<<<<<<<<<<<<<
17994  *     if xsi_nil:
17995  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
17996  */
17997     if (unlikely(__pyx_v_attribute_names == Py_None)) {
17998       PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
17999     }
18000     __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_attribute_names), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18001     goto __pyx_L7;
18002   }
18003   __pyx_L7:;
18004
18005   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1750
18006  *     if xsi:
18007  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
18008  *     if xsi_nil:             # <<<<<<<<<<<<<<
18009  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
18010  * 
18011  */
18012   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xsi_nil); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18013   if (__pyx_t_2) {
18014
18015     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1751
18016  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
18017  *     if xsi_nil:
18018  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)             # <<<<<<<<<<<<<<
18019  * 
18020  *     _strip_attributes(element_or_tree, *attribute_names)
18021  */
18022     if (unlikely(__pyx_v_attribute_names == Py_None)) {
18023       PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
18024     }
18025     __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_attribute_names), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18026     goto __pyx_L8;
18027   }
18028   __pyx_L8:;
18029
18030   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1753
18031  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
18032  * 
18033  *     _strip_attributes(element_or_tree, *attribute_names)             # <<<<<<<<<<<<<<
18034  * 
18035  * ################################################################################
18036  */
18037   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18038   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
18039   __Pyx_INCREF(__pyx_v_element_or_tree);
18040   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_element_or_tree);
18041   __Pyx_GIVEREF(__pyx_v_element_or_tree);
18042   __pyx_t_4 = PySequence_Tuple(((PyObject *)__pyx_v_attribute_names)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18043   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
18044   __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18045   __Pyx_GOTREF(__pyx_t_5);
18046   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
18047   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
18048   __pyx_t_4 = PyObject_Call(__pyx_v_4lxml_9objectify__strip_attributes, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18049   __Pyx_GOTREF(__pyx_t_4);
18050   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18051   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18052
18053   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18054   goto __pyx_L0;
18055   __pyx_L1_error:;
18056   __Pyx_XDECREF(__pyx_t_1);
18057   __Pyx_XDECREF(__pyx_t_4);
18058   __Pyx_XDECREF(__pyx_t_5);
18059   __Pyx_AddTraceback("lxml.objectify.deannotate");
18060   __pyx_r = NULL;
18061   __pyx_L0:;
18062   __Pyx_XDECREF(__pyx_v_attribute_names);
18063   __Pyx_DECREF(__pyx_v_element_or_tree);
18064   __Pyx_DECREF(__pyx_v_pytype);
18065   __Pyx_DECREF(__pyx_v_xsi);
18066   __Pyx_DECREF(__pyx_v_xsi_nil);
18067   __Pyx_XGIVEREF(__pyx_r);
18068   __Pyx_FinishRefcountContext();
18069   return __pyx_r;
18070 }
18071
18072 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1765
18073  * objectify_parser = __DEFAULT_PARSER
18074  * 
18075  * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
18076  *     u"""set_default_parser(new_parser = None)
18077  * 
18078  */
18079
18080 static PyObject *__pyx_pf_4lxml_9objectify_set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18081 static char __pyx_doc_4lxml_9objectify_set_default_parser[] = "set_default_parser(new_parser = None)\n\n    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    ";
18082 static PyObject *__pyx_pf_4lxml_9objectify_set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18083   PyObject *__pyx_v_new_parser = 0;
18084   PyObject *__pyx_r = NULL;
18085   int __pyx_t_1;
18086   PyObject *__pyx_t_2 = NULL;
18087   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_new_parser,0};
18088   __Pyx_SetupRefcountContext("set_default_parser");
18089   __pyx_self = __pyx_self;
18090   if (unlikely(__pyx_kwds)) {
18091     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
18092     PyObject* values[1] = {0};
18093     values[0] = ((PyObject *)Py_None);
18094     switch (PyTuple_GET_SIZE(__pyx_args)) {
18095       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18096       case  0: break;
18097       default: goto __pyx_L5_argtuple_error;
18098     }
18099     switch (PyTuple_GET_SIZE(__pyx_args)) {
18100       case  0:
18101       if (kw_args > 0) {
18102         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_new_parser);
18103         if (unlikely(value)) { values[0] = value; kw_args--; }
18104       }
18105     }
18106     if (unlikely(kw_args > 0)) {
18107       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "set_default_parser") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18108     }
18109     __pyx_v_new_parser = values[0];
18110   } else {
18111     __pyx_v_new_parser = ((PyObject *)Py_None);
18112     switch (PyTuple_GET_SIZE(__pyx_args)) {
18113       case  1: __pyx_v_new_parser = PyTuple_GET_ITEM(__pyx_args, 0);
18114       case  0: break;
18115       default: goto __pyx_L5_argtuple_error;
18116     }
18117   }
18118   goto __pyx_L4_argument_unpacking_done;
18119   __pyx_L5_argtuple_error:;
18120   __Pyx_RaiseArgtupleInvalid("set_default_parser", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18121   __pyx_L3_error:;
18122   __Pyx_AddTraceback("lxml.objectify.set_default_parser");
18123   return NULL;
18124   __pyx_L4_argument_unpacking_done:;
18125   __Pyx_INCREF(__pyx_v_new_parser);
18126
18127   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1776
18128  *     """
18129  *     global objectify_parser
18130  *     if new_parser is None:             # <<<<<<<<<<<<<<
18131  *         objectify_parser = __DEFAULT_PARSER
18132  *     elif isinstance(new_parser, etree.XMLParser):
18133  */
18134   __pyx_t_1 = (__pyx_v_new_parser == Py_None);
18135   if (__pyx_t_1) {
18136
18137     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1777
18138  *     global objectify_parser
18139  *     if new_parser is None:
18140  *         objectify_parser = __DEFAULT_PARSER             # <<<<<<<<<<<<<<
18141  *     elif isinstance(new_parser, etree.XMLParser):
18142  *         objectify_parser = new_parser
18143  */
18144     __Pyx_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
18145     __Pyx_GOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
18146     __Pyx_DECREF(__pyx_v_4lxml_9objectify_objectify_parser);
18147     __Pyx_GIVEREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
18148     __pyx_v_4lxml_9objectify_objectify_parser = __pyx_v_4lxml_9objectify___DEFAULT_PARSER;
18149     goto __pyx_L6;
18150   }
18151
18152   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1778
18153  *     if new_parser is None:
18154  *         objectify_parser = __DEFAULT_PARSER
18155  *     elif isinstance(new_parser, etree.XMLParser):             # <<<<<<<<<<<<<<
18156  *         objectify_parser = new_parser
18157  *     else:
18158  */
18159   __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_XMLParser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18160   __Pyx_GOTREF(__pyx_t_2);
18161   __pyx_t_1 = PyObject_IsInstance(__pyx_v_new_parser, __pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18162   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18163   if (__pyx_t_1) {
18164
18165     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1779
18166  *         objectify_parser = __DEFAULT_PARSER
18167  *     elif isinstance(new_parser, etree.XMLParser):
18168  *         objectify_parser = new_parser             # <<<<<<<<<<<<<<
18169  *     else:
18170  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
18171  */
18172     __Pyx_INCREF(__pyx_v_new_parser);
18173     __Pyx_GOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
18174     __Pyx_DECREF(__pyx_v_4lxml_9objectify_objectify_parser);
18175     __Pyx_GIVEREF(__pyx_v_new_parser);
18176     __pyx_v_4lxml_9objectify_objectify_parser = __pyx_v_new_parser;
18177     goto __pyx_L6;
18178   }
18179   /*else*/ {
18180
18181     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1781
18182  *         objectify_parser = new_parser
18183  *     else:
18184  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"             # <<<<<<<<<<<<<<
18185  * 
18186  * def makeparser(**kw):
18187  */
18188     __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_42), 0);
18189     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18190   }
18191   __pyx_L6:;
18192
18193   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18194   goto __pyx_L0;
18195   __pyx_L1_error:;
18196   __Pyx_XDECREF(__pyx_t_2);
18197   __Pyx_AddTraceback("lxml.objectify.set_default_parser");
18198   __pyx_r = NULL;
18199   __pyx_L0:;
18200   __Pyx_DECREF(__pyx_v_new_parser);
18201   __Pyx_XGIVEREF(__pyx_r);
18202   __Pyx_FinishRefcountContext();
18203   return __pyx_r;
18204 }
18205
18206 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1783
18207  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
18208  * 
18209  * def makeparser(**kw):             # <<<<<<<<<<<<<<
18210  *     u"""makeparser(remove_blank_text=True, **kw)
18211  * 
18212  */
18213
18214 static PyObject *__pyx_pf_4lxml_9objectify_makeparser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18215 static char __pyx_doc_4lxml_9objectify_makeparser[] = "makeparser(remove_blank_text=True, **kw)\n\n    Create a new XML parser for objectify trees.\n\n    You can pass all keyword arguments that are supported by\n    ``etree.XMLParser()``.  Note that this parser defaults to removing\n    blank text.  You can disable this by passing the\n    ``remove_blank_text`` boolean keyword option yourself.\n    ";
18216 static PyObject *__pyx_pf_4lxml_9objectify_makeparser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18217   PyObject *__pyx_v_kw = 0;
18218   PyObject *__pyx_v_remove_blank_text;
18219   PyObject *__pyx_v_parser;
18220   PyObject *__pyx_r = NULL;
18221   int __pyx_t_1;
18222   PyObject *__pyx_t_2 = NULL;
18223   PyObject *__pyx_t_3 = NULL;
18224   PyObject *__pyx_t_4 = NULL;
18225   __Pyx_SetupRefcountContext("makeparser");
18226   __pyx_self = __pyx_self;
18227   if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
18228     __Pyx_RaiseArgtupleInvalid("makeparser", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
18229   if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "makeparser", 1))) return NULL;
18230   __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
18231   if (unlikely(!__pyx_v_kw)) return NULL;
18232   __Pyx_GOTREF(__pyx_v_kw);
18233   __pyx_v_remove_blank_text = Py_None; __Pyx_INCREF(Py_None);
18234   __pyx_v_parser = Py_None; __Pyx_INCREF(Py_None);
18235
18236   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1793
18237  *     ``remove_blank_text`` boolean keyword option yourself.
18238  *     """
18239  *     if python.IS_PYTHON3:             # <<<<<<<<<<<<<<
18240  *         remove_blank_text = u'remove_blank_text'
18241  *     else:
18242  */
18243   __pyx_t_1 = IS_PYTHON3;
18244   if (__pyx_t_1) {
18245
18246     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1794
18247  *     """
18248  *     if python.IS_PYTHON3:
18249  *         remove_blank_text = u'remove_blank_text'             # <<<<<<<<<<<<<<
18250  *     else:
18251  *         remove_blank_text = 'remove_blank_text'
18252  */
18253     __Pyx_INCREF(((PyObject *)__pyx_n_u_remove_blank_text));
18254     __Pyx_DECREF(__pyx_v_remove_blank_text);
18255     __pyx_v_remove_blank_text = ((PyObject *)__pyx_n_u_remove_blank_text);
18256     goto __pyx_L5;
18257   }
18258   /*else*/ {
18259
18260     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1796
18261  *         remove_blank_text = u'remove_blank_text'
18262  *     else:
18263  *         remove_blank_text = 'remove_blank_text'             # <<<<<<<<<<<<<<
18264  *     if remove_blank_text not in kw:
18265  *         kw[remove_blank_text] = True
18266  */
18267     __Pyx_INCREF(((PyObject *)__pyx_n_b_remove_blank_text));
18268     __Pyx_DECREF(__pyx_v_remove_blank_text);
18269     __pyx_v_remove_blank_text = ((PyObject *)__pyx_n_b_remove_blank_text);
18270   }
18271   __pyx_L5:;
18272
18273   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1797
18274  *     else:
18275  *         remove_blank_text = 'remove_blank_text'
18276  *     if remove_blank_text not in kw:             # <<<<<<<<<<<<<<
18277  *         kw[remove_blank_text] = True
18278  *     parser = etree.XMLParser(**kw)
18279  */
18280   __pyx_t_1 = (!PySequence_Contains(__pyx_v_kw, __pyx_v_remove_blank_text)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18281   if (__pyx_t_1) {
18282
18283     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1798
18284  *         remove_blank_text = 'remove_blank_text'
18285  *     if remove_blank_text not in kw:
18286  *         kw[remove_blank_text] = True             # <<<<<<<<<<<<<<
18287  *     parser = etree.XMLParser(**kw)
18288  *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )
18289  */
18290     __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18291     __Pyx_GOTREF(__pyx_t_2);
18292     if (PyObject_SetItem(__pyx_v_kw, __pyx_v_remove_blank_text, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18293     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18294     goto __pyx_L6;
18295   }
18296   __pyx_L6:;
18297
18298   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1799
18299  *     if remove_blank_text not in kw:
18300  *         kw[remove_blank_text] = True
18301  *     parser = etree.XMLParser(**kw)             # <<<<<<<<<<<<<<
18302  *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )
18303  *     return parser
18304  */
18305   __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_XMLParser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18306   __Pyx_GOTREF(__pyx_t_2);
18307   __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), __pyx_v_kw); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18308   __Pyx_GOTREF(__pyx_t_3);
18309   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18310   __Pyx_DECREF(__pyx_v_parser);
18311   __pyx_v_parser = __pyx_t_3;
18312   __pyx_t_3 = 0;
18313
18314   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1800
18315  *         kw[remove_blank_text] = True
18316  *     parser = etree.XMLParser(**kw)
18317  *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )             # <<<<<<<<<<<<<<
18318  *     return parser
18319  * 
18320  */
18321   __pyx_t_3 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_ui_43); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18322   __Pyx_GOTREF(__pyx_t_3);
18323   __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18324   __Pyx_GOTREF(__pyx_t_2);
18325   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18326   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
18327   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
18328   __Pyx_GIVEREF(__pyx_t_2);
18329   __pyx_t_2 = 0;
18330   __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18331   __Pyx_GOTREF(__pyx_t_2);
18332   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18333   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
18334   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18335
18336   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1801
18337  *     parser = etree.XMLParser(**kw)
18338  *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )
18339  *     return parser             # <<<<<<<<<<<<<<
18340  * 
18341  * cdef _Element _makeElement(tag, text, attrib, nsmap):
18342  */
18343   __Pyx_XDECREF(__pyx_r);
18344   __Pyx_INCREF(__pyx_v_parser);
18345   __pyx_r = __pyx_v_parser;
18346   goto __pyx_L0;
18347
18348   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18349   goto __pyx_L0;
18350   __pyx_L1_error:;
18351   __Pyx_XDECREF(__pyx_t_2);
18352   __Pyx_XDECREF(__pyx_t_3);
18353   __Pyx_XDECREF(__pyx_t_4);
18354   __Pyx_AddTraceback("lxml.objectify.makeparser");
18355   __pyx_r = NULL;
18356   __pyx_L0:;
18357   __Pyx_DECREF(__pyx_v_kw);
18358   __Pyx_DECREF(__pyx_v_remove_blank_text);
18359   __Pyx_DECREF(__pyx_v_parser);
18360   __Pyx_XGIVEREF(__pyx_r);
18361   __Pyx_FinishRefcountContext();
18362   return __pyx_r;
18363 }
18364
18365 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1803
18366  *     return parser
18367  * 
18368  * cdef _Element _makeElement(tag, text, attrib, nsmap):             # <<<<<<<<<<<<<<
18369  *     return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)
18370  * 
18371  */
18372
18373 static  struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *__pyx_v_tag, PyObject *__pyx_v_text, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap) {
18374   struct LxmlElement *__pyx_r = NULL;
18375   PyObject *__pyx_t_1 = NULL;
18376   __Pyx_SetupRefcountContext("_makeElement");
18377
18378   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1804
18379  * 
18380  * cdef _Element _makeElement(tag, text, attrib, nsmap):
18381  *     return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)             # <<<<<<<<<<<<<<
18382  * 
18383  * ################################################################################
18384  */
18385   __Pyx_XDECREF(((PyObject *)__pyx_r));
18386   __pyx_t_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_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18387   __Pyx_GOTREF(__pyx_t_1);
18388   __pyx_r = ((struct LxmlElement *)__pyx_t_1);
18389   __pyx_t_1 = 0;
18390   goto __pyx_L0;
18391
18392   __pyx_r = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
18393   goto __pyx_L0;
18394   __pyx_L1_error:;
18395   __Pyx_XDECREF(__pyx_t_1);
18396   __Pyx_AddTraceback("lxml.objectify._makeElement");
18397   __pyx_r = 0;
18398   __pyx_L0:;
18399   __Pyx_XGIVEREF((PyObject *)__pyx_r);
18400   __Pyx_FinishRefcountContext();
18401   return __pyx_r;
18402 }
18403
18404 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1812
18405  * _fromstring = etree.fromstring
18406  * 
18407  * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
18408  *     u"""fromstring(xml, parser=None, base_url=None)
18409  * 
18410  */
18411
18412 static PyObject *__pyx_pf_4lxml_9objectify_fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18413 static char __pyx_doc_4lxml_9objectify_fromstring[] = "fromstring(xml, parser=None, base_url=None)\n\n    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\n    The ``base_url`` keyword argument allows to set the original base URL of\n    the document to support relative Paths when looking up external entities\n    (DTD, XInclude, ...).\n    ";
18414 static PyObject *__pyx_pf_4lxml_9objectify_fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18415   PyObject *__pyx_v_xml = 0;
18416   PyObject *__pyx_v_parser = 0;
18417   PyObject *__pyx_v_base_url = 0;
18418   PyObject *__pyx_r = NULL;
18419   int __pyx_t_1;
18420   PyObject *__pyx_t_2 = NULL;
18421   PyObject *__pyx_t_3 = NULL;
18422   PyObject *__pyx_t_4 = NULL;
18423   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_xml,&__pyx_n_ui_parser,&__pyx_n_ui_base_url,0};
18424   __Pyx_SetupRefcountContext("fromstring");
18425   __pyx_self = __pyx_self;
18426   if (unlikely(__pyx_kwds)) {
18427     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
18428     PyObject* values[3] = {0,0,0};
18429     values[1] = ((PyObject *)Py_None);
18430     values[2] = ((PyObject *)Py_None);
18431     switch (PyTuple_GET_SIZE(__pyx_args)) {
18432       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18433       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18434       case  0: break;
18435       default: goto __pyx_L5_argtuple_error;
18436     }
18437     switch (PyTuple_GET_SIZE(__pyx_args)) {
18438       case  0:
18439       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_xml);
18440       if (likely(values[0])) kw_args--;
18441       else goto __pyx_L5_argtuple_error;
18442       case  1:
18443       if (kw_args > 0) {
18444         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_parser);
18445         if (unlikely(value)) { values[1] = value; kw_args--; }
18446       }
18447     }
18448     while (kw_args > 0) {
18449       PyObject* value;
18450       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_base_url);
18451       if (value) { values[2] = value; if (!(--kw_args)) break; }
18452       break;
18453     }
18454     if (unlikely(kw_args > 0)) {
18455       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "fromstring") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18456     }
18457     __pyx_v_xml = values[0];
18458     __pyx_v_parser = values[1];
18459     __pyx_v_base_url = values[2];
18460   } else {
18461     __pyx_v_parser = ((PyObject *)Py_None);
18462     __pyx_v_base_url = ((PyObject *)Py_None);
18463     switch (PyTuple_GET_SIZE(__pyx_args)) {
18464       case  2: __pyx_v_parser = PyTuple_GET_ITEM(__pyx_args, 1);
18465       case  1: __pyx_v_xml = PyTuple_GET_ITEM(__pyx_args, 0);
18466       break;
18467       default: goto __pyx_L5_argtuple_error;
18468     }
18469   }
18470   goto __pyx_L4_argument_unpacking_done;
18471   __pyx_L5_argtuple_error:;
18472   __Pyx_RaiseArgtupleInvalid("fromstring", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18473   __pyx_L3_error:;
18474   __Pyx_AddTraceback("lxml.objectify.fromstring");
18475   return NULL;
18476   __pyx_L4_argument_unpacking_done:;
18477   __Pyx_INCREF(__pyx_v_xml);
18478   __Pyx_INCREF(__pyx_v_parser);
18479   __Pyx_INCREF(__pyx_v_base_url);
18480
18481   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1824
18482  *     (DTD, XInclude, ...).
18483  *     """
18484  *     if parser is None:             # <<<<<<<<<<<<<<
18485  *         parser = objectify_parser
18486  *     return _fromstring(xml, parser, base_url=base_url)
18487  */
18488   __pyx_t_1 = (__pyx_v_parser == Py_None);
18489   if (__pyx_t_1) {
18490
18491     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1825
18492  *     """
18493  *     if parser is None:
18494  *         parser = objectify_parser             # <<<<<<<<<<<<<<
18495  *     return _fromstring(xml, parser, base_url=base_url)
18496  * 
18497  */
18498     __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
18499     __Pyx_DECREF(__pyx_v_parser);
18500     __pyx_v_parser = __pyx_v_4lxml_9objectify_objectify_parser;
18501     goto __pyx_L6;
18502   }
18503   __pyx_L6:;
18504
18505   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1826
18506  *     if parser is None:
18507  *         parser = objectify_parser
18508  *     return _fromstring(xml, parser, base_url=base_url)             # <<<<<<<<<<<<<<
18509  * 
18510  * def XML(xml, parser=None, *, base_url=None):
18511  */
18512   __Pyx_XDECREF(__pyx_r);
18513   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18514   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
18515   __Pyx_INCREF(__pyx_v_xml);
18516   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_xml);
18517   __Pyx_GIVEREF(__pyx_v_xml);
18518   __Pyx_INCREF(__pyx_v_parser);
18519   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_parser);
18520   __Pyx_GIVEREF(__pyx_v_parser);
18521   __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18522   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
18523   if (PyDict_SetItem(__pyx_t_3, __pyx_n_ui_base_url, __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18524   __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_v_4lxml_9objectify__fromstring, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18525   __Pyx_GOTREF(__pyx_t_4);
18526   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
18527   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
18528   __pyx_r = __pyx_t_4;
18529   __pyx_t_4 = 0;
18530   goto __pyx_L0;
18531
18532   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18533   goto __pyx_L0;
18534   __pyx_L1_error:;
18535   __Pyx_XDECREF(__pyx_t_2);
18536   __Pyx_XDECREF(__pyx_t_3);
18537   __Pyx_XDECREF(__pyx_t_4);
18538   __Pyx_AddTraceback("lxml.objectify.fromstring");
18539   __pyx_r = NULL;
18540   __pyx_L0:;
18541   __Pyx_DECREF(__pyx_v_xml);
18542   __Pyx_DECREF(__pyx_v_parser);
18543   __Pyx_DECREF(__pyx_v_base_url);
18544   __Pyx_XGIVEREF(__pyx_r);
18545   __Pyx_FinishRefcountContext();
18546   return __pyx_r;
18547 }
18548
18549 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1828
18550  *     return _fromstring(xml, parser, base_url=base_url)
18551  * 
18552  * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
18553  *     u"""XML(xml, parser=None, base_url=None)
18554  * 
18555  */
18556
18557 static PyObject *__pyx_pf_4lxml_9objectify_XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18558 static char __pyx_doc_4lxml_9objectify_XML[] = "XML(xml, parser=None, base_url=None)\n\n    Objectify specific version of the lxml.etree XML() literal factory\n    that uses the objectify parser.\n\n    You can pass a different parser as second argument.\n\n    The ``base_url`` keyword argument allows to set the original base URL of\n    the document to support relative Paths when looking up external entities\n    (DTD, XInclude, ...).\n    ";
18559 static PyObject *__pyx_pf_4lxml_9objectify_XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18560   PyObject *__pyx_v_xml = 0;
18561   PyObject *__pyx_v_parser = 0;
18562   PyObject *__pyx_v_base_url = 0;
18563   PyObject *__pyx_r = NULL;
18564   int __pyx_t_1;
18565   PyObject *__pyx_t_2 = NULL;
18566   PyObject *__pyx_t_3 = NULL;
18567   PyObject *__pyx_t_4 = NULL;
18568   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_xml,&__pyx_n_ui_parser,&__pyx_n_ui_base_url,0};
18569   __Pyx_SetupRefcountContext("XML");
18570   __pyx_self = __pyx_self;
18571   if (unlikely(__pyx_kwds)) {
18572     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
18573     PyObject* values[3] = {0,0,0};
18574     values[1] = ((PyObject *)Py_None);
18575     values[2] = ((PyObject *)Py_None);
18576     switch (PyTuple_GET_SIZE(__pyx_args)) {
18577       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18578       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18579       case  0: break;
18580       default: goto __pyx_L5_argtuple_error;
18581     }
18582     switch (PyTuple_GET_SIZE(__pyx_args)) {
18583       case  0:
18584       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_xml);
18585       if (likely(values[0])) kw_args--;
18586       else goto __pyx_L5_argtuple_error;
18587       case  1:
18588       if (kw_args > 0) {
18589         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_parser);
18590         if (unlikely(value)) { values[1] = value; kw_args--; }
18591       }
18592     }
18593     while (kw_args > 0) {
18594       PyObject* value;
18595       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_base_url);
18596       if (value) { values[2] = value; if (!(--kw_args)) break; }
18597       break;
18598     }
18599     if (unlikely(kw_args > 0)) {
18600       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "XML") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18601     }
18602     __pyx_v_xml = values[0];
18603     __pyx_v_parser = values[1];
18604     __pyx_v_base_url = values[2];
18605   } else {
18606     __pyx_v_parser = ((PyObject *)Py_None);
18607     __pyx_v_base_url = ((PyObject *)Py_None);
18608     switch (PyTuple_GET_SIZE(__pyx_args)) {
18609       case  2: __pyx_v_parser = PyTuple_GET_ITEM(__pyx_args, 1);
18610       case  1: __pyx_v_xml = PyTuple_GET_ITEM(__pyx_args, 0);
18611       break;
18612       default: goto __pyx_L5_argtuple_error;
18613     }
18614   }
18615   goto __pyx_L4_argument_unpacking_done;
18616   __pyx_L5_argtuple_error:;
18617   __Pyx_RaiseArgtupleInvalid("XML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18618   __pyx_L3_error:;
18619   __Pyx_AddTraceback("lxml.objectify.XML");
18620   return NULL;
18621   __pyx_L4_argument_unpacking_done:;
18622   __Pyx_INCREF(__pyx_v_xml);
18623   __Pyx_INCREF(__pyx_v_parser);
18624   __Pyx_INCREF(__pyx_v_base_url);
18625
18626   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1840
18627  *     (DTD, XInclude, ...).
18628  *     """
18629  *     if parser is None:             # <<<<<<<<<<<<<<
18630  *         parser = objectify_parser
18631  *     return _fromstring(xml, parser, base_url=base_url)
18632  */
18633   __pyx_t_1 = (__pyx_v_parser == Py_None);
18634   if (__pyx_t_1) {
18635
18636     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1841
18637  *     """
18638  *     if parser is None:
18639  *         parser = objectify_parser             # <<<<<<<<<<<<<<
18640  *     return _fromstring(xml, parser, base_url=base_url)
18641  * 
18642  */
18643     __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
18644     __Pyx_DECREF(__pyx_v_parser);
18645     __pyx_v_parser = __pyx_v_4lxml_9objectify_objectify_parser;
18646     goto __pyx_L6;
18647   }
18648   __pyx_L6:;
18649
18650   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1842
18651  *     if parser is None:
18652  *         parser = objectify_parser
18653  *     return _fromstring(xml, parser, base_url=base_url)             # <<<<<<<<<<<<<<
18654  * 
18655  * cdef object _parse
18656  */
18657   __Pyx_XDECREF(__pyx_r);
18658   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18659   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
18660   __Pyx_INCREF(__pyx_v_xml);
18661   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_xml);
18662   __Pyx_GIVEREF(__pyx_v_xml);
18663   __Pyx_INCREF(__pyx_v_parser);
18664   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_parser);
18665   __Pyx_GIVEREF(__pyx_v_parser);
18666   __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18667   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
18668   if (PyDict_SetItem(__pyx_t_3, __pyx_n_ui_base_url, __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18669   __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_v_4lxml_9objectify__fromstring, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18670   __Pyx_GOTREF(__pyx_t_4);
18671   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
18672   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
18673   __pyx_r = __pyx_t_4;
18674   __pyx_t_4 = 0;
18675   goto __pyx_L0;
18676
18677   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18678   goto __pyx_L0;
18679   __pyx_L1_error:;
18680   __Pyx_XDECREF(__pyx_t_2);
18681   __Pyx_XDECREF(__pyx_t_3);
18682   __Pyx_XDECREF(__pyx_t_4);
18683   __Pyx_AddTraceback("lxml.objectify.XML");
18684   __pyx_r = NULL;
18685   __pyx_L0:;
18686   __Pyx_DECREF(__pyx_v_xml);
18687   __Pyx_DECREF(__pyx_v_parser);
18688   __Pyx_DECREF(__pyx_v_base_url);
18689   __Pyx_XGIVEREF(__pyx_r);
18690   __Pyx_FinishRefcountContext();
18691   return __pyx_r;
18692 }
18693
18694 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1847
18695  * _parse = etree.parse
18696  * 
18697  * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
18698  *     u"""parse(f, parser=None, base_url=None)
18699  * 
18700  */
18701
18702 static PyObject *__pyx_pf_4lxml_9objectify_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18703 static char __pyx_doc_4lxml_9objectify_parse[] = "parse(f, parser=None, base_url=None)\n\n    Parse a file or file-like object with the objectify parser.\n\n    You can pass a different parser as second argument.\n\n    The ``base_url`` keyword allows setting a URL for the document\n    when parsing from a file-like object.  This is needed when looking\n    up external entities (DTD, XInclude, ...) with relative paths.\n    ";
18704 static PyObject *__pyx_pf_4lxml_9objectify_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18705   PyObject *__pyx_v_f = 0;
18706   PyObject *__pyx_v_parser = 0;
18707   PyObject *__pyx_v_base_url = 0;
18708   PyObject *__pyx_r = NULL;
18709   int __pyx_t_1;
18710   PyObject *__pyx_t_2 = NULL;
18711   PyObject *__pyx_t_3 = NULL;
18712   PyObject *__pyx_t_4 = NULL;
18713   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_f,&__pyx_n_ui_parser,&__pyx_n_ui_base_url,0};
18714   __Pyx_SetupRefcountContext("parse");
18715   __pyx_self = __pyx_self;
18716   if (unlikely(__pyx_kwds)) {
18717     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
18718     PyObject* values[3] = {0,0,0};
18719     values[1] = ((PyObject *)Py_None);
18720     values[2] = ((PyObject *)Py_None);
18721     switch (PyTuple_GET_SIZE(__pyx_args)) {
18722       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18723       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18724       case  0: break;
18725       default: goto __pyx_L5_argtuple_error;
18726     }
18727     switch (PyTuple_GET_SIZE(__pyx_args)) {
18728       case  0:
18729       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_f);
18730       if (likely(values[0])) kw_args--;
18731       else goto __pyx_L5_argtuple_error;
18732       case  1:
18733       if (kw_args > 0) {
18734         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_parser);
18735         if (unlikely(value)) { values[1] = value; kw_args--; }
18736       }
18737     }
18738     while (kw_args > 0) {
18739       PyObject* value;
18740       value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_base_url);
18741       if (value) { values[2] = value; if (!(--kw_args)) break; }
18742       break;
18743     }
18744     if (unlikely(kw_args > 0)) {
18745       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "parse") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1847; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18746     }
18747     __pyx_v_f = values[0];
18748     __pyx_v_parser = values[1];
18749     __pyx_v_base_url = values[2];
18750   } else {
18751     __pyx_v_parser = ((PyObject *)Py_None);
18752     __pyx_v_base_url = ((PyObject *)Py_None);
18753     switch (PyTuple_GET_SIZE(__pyx_args)) {
18754       case  2: __pyx_v_parser = PyTuple_GET_ITEM(__pyx_args, 1);
18755       case  1: __pyx_v_f = PyTuple_GET_ITEM(__pyx_args, 0);
18756       break;
18757       default: goto __pyx_L5_argtuple_error;
18758     }
18759   }
18760   goto __pyx_L4_argument_unpacking_done;
18761   __pyx_L5_argtuple_error:;
18762   __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1847; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18763   __pyx_L3_error:;
18764   __Pyx_AddTraceback("lxml.objectify.parse");
18765   return NULL;
18766   __pyx_L4_argument_unpacking_done:;
18767   __Pyx_INCREF(__pyx_v_f);
18768   __Pyx_INCREF(__pyx_v_parser);
18769   __Pyx_INCREF(__pyx_v_base_url);
18770
18771   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1858
18772  *     up external entities (DTD, XInclude, ...) with relative paths.
18773  *     """
18774  *     if parser is None:             # <<<<<<<<<<<<<<
18775  *         parser = objectify_parser
18776  *     return _parse(f, parser, base_url=base_url)
18777  */
18778   __pyx_t_1 = (__pyx_v_parser == Py_None);
18779   if (__pyx_t_1) {
18780
18781     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1859
18782  *     """
18783  *     if parser is None:
18784  *         parser = objectify_parser             # <<<<<<<<<<<<<<
18785  *     return _parse(f, parser, base_url=base_url)
18786  * 
18787  */
18788     __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
18789     __Pyx_DECREF(__pyx_v_parser);
18790     __pyx_v_parser = __pyx_v_4lxml_9objectify_objectify_parser;
18791     goto __pyx_L6;
18792   }
18793   __pyx_L6:;
18794
18795   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1860
18796  *     if parser is None:
18797  *         parser = objectify_parser
18798  *     return _parse(f, parser, base_url=base_url)             # <<<<<<<<<<<<<<
18799  * 
18800  * cdef dict _DEFAULT_NSMAP
18801  */
18802   __Pyx_XDECREF(__pyx_r);
18803   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18804   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
18805   __Pyx_INCREF(__pyx_v_f);
18806   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_f);
18807   __Pyx_GIVEREF(__pyx_v_f);
18808   __Pyx_INCREF(__pyx_v_parser);
18809   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_parser);
18810   __Pyx_GIVEREF(__pyx_v_parser);
18811   __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18812   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
18813   if (PyDict_SetItem(__pyx_t_3, __pyx_n_ui_base_url, __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18814   __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_v_4lxml_9objectify__parse, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18815   __Pyx_GOTREF(__pyx_t_4);
18816   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
18817   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
18818   __pyx_r = __pyx_t_4;
18819   __pyx_t_4 = 0;
18820   goto __pyx_L0;
18821
18822   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18823   goto __pyx_L0;
18824   __pyx_L1_error:;
18825   __Pyx_XDECREF(__pyx_t_2);
18826   __Pyx_XDECREF(__pyx_t_3);
18827   __Pyx_XDECREF(__pyx_t_4);
18828   __Pyx_AddTraceback("lxml.objectify.parse");
18829   __pyx_r = NULL;
18830   __pyx_L0:;
18831   __Pyx_DECREF(__pyx_v_f);
18832   __Pyx_DECREF(__pyx_v_parser);
18833   __Pyx_DECREF(__pyx_v_base_url);
18834   __Pyx_XGIVEREF(__pyx_r);
18835   __Pyx_FinishRefcountContext();
18836   return __pyx_r;
18837 }
18838
18839 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1869
18840  * E = ElementMaker()
18841  * 
18842  * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
18843  *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
18844  * 
18845  */
18846
18847 static PyObject *__pyx_pf_4lxml_9objectify_Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18848 static char __pyx_doc_4lxml_9objectify_Element[] = "Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)\n\n    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    ";
18849 static PyObject *__pyx_pf_4lxml_9objectify_Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18850   PyObject *__pyx_v__tag = 0;
18851   PyObject *__pyx_v_attrib = 0;
18852   PyObject *__pyx_v_nsmap = 0;
18853   PyObject *__pyx_v__pytype = 0;
18854   PyObject *__pyx_v__attributes = 0;
18855   PyObject *__pyx_r = NULL;
18856   int __pyx_t_1;
18857   Py_ssize_t __pyx_t_2;
18858   PyObject *__pyx_t_3 = NULL;
18859   PyObject *__pyx_t_4 = NULL;
18860   PyObject *__pyx_t_5 = NULL;
18861   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui__tag,&__pyx_n_ui_attrib,&__pyx_n_ui_nsmap,&__pyx_n_ui__pytype,0};
18862   __Pyx_SetupRefcountContext("Element");
18863   __pyx_self = __pyx_self;
18864   __pyx_v__attributes = PyDict_New(); if (unlikely(!__pyx_v__attributes)) return NULL;
18865   __Pyx_GOTREF(__pyx_v__attributes);
18866   if (unlikely(__pyx_kwds)) {
18867     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
18868     PyObject* values[4] = {0,0,0,0};
18869     values[1] = ((PyObject *)Py_None);
18870     values[2] = ((PyObject *)Py_None);
18871     values[3] = ((PyObject *)Py_None);
18872     switch (PyTuple_GET_SIZE(__pyx_args)) {
18873       case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18874       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18875       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18876       case  0: break;
18877       default: goto __pyx_L5_argtuple_error;
18878     }
18879     switch (PyTuple_GET_SIZE(__pyx_args)) {
18880       case  0:
18881       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui__tag);
18882       if (likely(values[0])) kw_args--;
18883       else goto __pyx_L5_argtuple_error;
18884       case  1:
18885       if (kw_args > 0) {
18886         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_attrib);
18887         if (unlikely(value)) { values[1] = value; kw_args--; }
18888       }
18889       case  2:
18890       if (kw_args > 0) {
18891         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_nsmap);
18892         if (unlikely(value)) { values[2] = value; kw_args--; }
18893       }
18894     }
18895     if (unlikely(kw_args > 0)) {
18896       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, PyTuple_GET_SIZE(__pyx_args), "Element") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18897     }
18898     __pyx_v__tag = values[0];
18899     __pyx_v_attrib = values[1];
18900     __pyx_v_nsmap = values[2];
18901     __pyx_v__pytype = values[3];
18902   } else {
18903     __pyx_v_attrib = ((PyObject *)Py_None);
18904     __pyx_v_nsmap = ((PyObject *)Py_None);
18905     __pyx_v__pytype = ((PyObject *)Py_None);
18906     switch (PyTuple_GET_SIZE(__pyx_args)) {
18907       case  3: __pyx_v_nsmap = PyTuple_GET_ITEM(__pyx_args, 2);
18908       case  2: __pyx_v_attrib = PyTuple_GET_ITEM(__pyx_args, 1);
18909       case  1: __pyx_v__tag = PyTuple_GET_ITEM(__pyx_args, 0);
18910       break;
18911       default: goto __pyx_L5_argtuple_error;
18912     }
18913   }
18914   goto __pyx_L4_argument_unpacking_done;
18915   __pyx_L5_argtuple_error:;
18916   __Pyx_RaiseArgtupleInvalid("Element", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18917   __pyx_L3_error:;
18918   __Pyx_DECREF(__pyx_v__attributes);
18919   __Pyx_AddTraceback("lxml.objectify.Element");
18920   return NULL;
18921   __pyx_L4_argument_unpacking_done:;
18922   __Pyx_INCREF(__pyx_v__tag);
18923   __Pyx_INCREF(__pyx_v_attrib);
18924   __Pyx_INCREF(__pyx_v_nsmap);
18925   __Pyx_INCREF(__pyx_v__pytype);
18926
18927   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1877
18928  *     NOTE: requires parser based element class lookup activated in lxml.etree!
18929  *     """
18930  *     if attrib is not None:             # <<<<<<<<<<<<<<
18931  *         if python.PyDict_Size(_attributes):
18932  *             attrib.update(_attributes)
18933  */
18934   __pyx_t_1 = (__pyx_v_attrib != Py_None);
18935   if (__pyx_t_1) {
18936
18937     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1878
18938  *     """
18939  *     if attrib is not None:
18940  *         if python.PyDict_Size(_attributes):             # <<<<<<<<<<<<<<
18941  *             attrib.update(_attributes)
18942  *         _attributes = attrib
18943  */
18944     __pyx_t_2 = PyDict_Size(__pyx_v__attributes);
18945     if (__pyx_t_2) {
18946
18947       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1879
18948  *     if attrib is not None:
18949  *         if python.PyDict_Size(_attributes):
18950  *             attrib.update(_attributes)             # <<<<<<<<<<<<<<
18951  *         _attributes = attrib
18952  *     if _pytype is None:
18953  */
18954       __pyx_t_3 = PyObject_GetAttr(__pyx_v_attrib, __pyx_n_ui_update); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18955       __Pyx_GOTREF(__pyx_t_3);
18956       __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18957       __Pyx_GOTREF(((PyObject *)__pyx_t_4));
18958       __Pyx_INCREF(__pyx_v__attributes);
18959       PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__attributes);
18960       __Pyx_GIVEREF(__pyx_v__attributes);
18961       __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18962       __Pyx_GOTREF(__pyx_t_5);
18963       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18964       __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
18965       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18966       goto __pyx_L7;
18967     }
18968     __pyx_L7:;
18969
18970     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1880
18971  *         if python.PyDict_Size(_attributes):
18972  *             attrib.update(_attributes)
18973  *         _attributes = attrib             # <<<<<<<<<<<<<<
18974  *     if _pytype is None:
18975  *         _pytype = TREE_PYTYPE_NAME
18976  */
18977     __Pyx_INCREF(__pyx_v_attrib);
18978     __Pyx_DECREF(__pyx_v__attributes);
18979     __pyx_v__attributes = __pyx_v_attrib;
18980     goto __pyx_L6;
18981   }
18982   __pyx_L6:;
18983
18984   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1881
18985  *             attrib.update(_attributes)
18986  *         _attributes = attrib
18987  *     if _pytype is None:             # <<<<<<<<<<<<<<
18988  *         _pytype = TREE_PYTYPE_NAME
18989  *     if nsmap is None:
18990  */
18991   __pyx_t_1 = (__pyx_v__pytype == Py_None);
18992   if (__pyx_t_1) {
18993
18994     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1882
18995  *         _attributes = attrib
18996  *     if _pytype is None:
18997  *         _pytype = TREE_PYTYPE_NAME             # <<<<<<<<<<<<<<
18998  *     if nsmap is None:
18999  *         nsmap = _DEFAULT_NSMAP
19000  */
19001     __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
19002     __Pyx_DECREF(__pyx_v__pytype);
19003     __pyx_v__pytype = __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME;
19004     goto __pyx_L8;
19005   }
19006   __pyx_L8:;
19007
19008   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1883
19009  *     if _pytype is None:
19010  *         _pytype = TREE_PYTYPE_NAME
19011  *     if nsmap is None:             # <<<<<<<<<<<<<<
19012  *         nsmap = _DEFAULT_NSMAP
19013  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
19014  */
19015   __pyx_t_1 = (__pyx_v_nsmap == Py_None);
19016   if (__pyx_t_1) {
19017
19018     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1884
19019  *         _pytype = TREE_PYTYPE_NAME
19020  *     if nsmap is None:
19021  *         nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<<
19022  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
19023  *     return _makeElement(_tag, None, _attributes, nsmap)
19024  */
19025     __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
19026     __Pyx_DECREF(__pyx_v_nsmap);
19027     __pyx_v_nsmap = ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
19028     goto __pyx_L9;
19029   }
19030   __pyx_L9:;
19031
19032   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1885
19033  *     if nsmap is None:
19034  *         nsmap = _DEFAULT_NSMAP
19035  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype             # <<<<<<<<<<<<<<
19036  *     return _makeElement(_tag, None, _attributes, nsmap)
19037  * 
19038  */
19039   __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19040   __Pyx_GOTREF(__pyx_t_5);
19041   if (PyObject_SetItem(__pyx_v__attributes, __pyx_t_5, __pyx_v__pytype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19042   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19043
19044   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1886
19045  *         nsmap = _DEFAULT_NSMAP
19046  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
19047  *     return _makeElement(_tag, None, _attributes, nsmap)             # <<<<<<<<<<<<<<
19048  * 
19049  * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,
19050  */
19051   __Pyx_XDECREF(__pyx_r);
19052   __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_v__tag, Py_None, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19053   __Pyx_GOTREF(__pyx_t_5);
19054   __pyx_r = __pyx_t_5;
19055   __pyx_t_5 = 0;
19056   goto __pyx_L0;
19057
19058   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19059   goto __pyx_L0;
19060   __pyx_L1_error:;
19061   __Pyx_XDECREF(__pyx_t_3);
19062   __Pyx_XDECREF(__pyx_t_4);
19063   __Pyx_XDECREF(__pyx_t_5);
19064   __Pyx_AddTraceback("lxml.objectify.Element");
19065   __pyx_r = NULL;
19066   __pyx_L0:;
19067   __Pyx_DECREF(__pyx_v__attributes);
19068   __Pyx_DECREF(__pyx_v__tag);
19069   __Pyx_DECREF(__pyx_v_attrib);
19070   __Pyx_DECREF(__pyx_v_nsmap);
19071   __Pyx_DECREF(__pyx_v__pytype);
19072   __Pyx_XGIVEREF(__pyx_r);
19073   __Pyx_FinishRefcountContext();
19074   return __pyx_r;
19075 }
19076
19077 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1888
19078  *     return _makeElement(_tag, None, _attributes, nsmap)
19079  * 
19080  * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<<
19081  *                 **_attributes):
19082  *     u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
19083  */
19084
19085 static PyObject *__pyx_pf_4lxml_9objectify_DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19086 static char __pyx_doc_4lxml_9objectify_DataElement[] = "DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)\n\n    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    ";
19087 static PyObject *__pyx_pf_4lxml_9objectify_DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19088   PyObject *__pyx_v__value = 0;
19089   PyObject *__pyx_v_attrib = 0;
19090   PyObject *__pyx_v_nsmap = 0;
19091   PyObject *__pyx_v__pytype = 0;
19092   PyObject *__pyx_v__xsi = 0;
19093   PyObject *__pyx_v__attributes = 0;
19094   PyObject *__pyx_v_dict_result;
19095   PyObject *__pyx_v_temp;
19096   PyObject *__pyx_v_prefix;
19097   PyObject *__pyx_v_name;
19098   PyObject *__pyx_v_ns;
19099   PyObject *__pyx_v_strval;
19100   PyObject *__pyx_v_type_check;
19101   PyObject *__pyx_r = NULL;
19102   int __pyx_t_1;
19103   int __pyx_t_2;
19104   int __pyx_t_3;
19105   Py_ssize_t __pyx_t_4;
19106   PyObject *__pyx_t_5 = NULL;
19107   PyObject *__pyx_t_6 = NULL;
19108   PyObject *__pyx_t_7 = NULL;
19109   int __pyx_t_8;
19110   PyObject *__pyx_t_9 = NULL;
19111   PyObject *__pyx_t_10 = NULL;
19112   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui__value,&__pyx_n_ui_attrib,&__pyx_n_ui_nsmap,&__pyx_n_ui__pytype,&__pyx_n_ui__xsi,0};
19113   __Pyx_SetupRefcountContext("DataElement");
19114   __pyx_self = __pyx_self;
19115   __pyx_v__attributes = PyDict_New(); if (unlikely(!__pyx_v__attributes)) return NULL;
19116   __Pyx_GOTREF(__pyx_v__attributes);
19117   if (unlikely(__pyx_kwds)) {
19118     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
19119     PyObject* values[5] = {0,0,0,0,0};
19120     values[1] = ((PyObject *)Py_None);
19121     values[2] = ((PyObject *)Py_None);
19122     values[3] = ((PyObject *)Py_None);
19123     values[4] = ((PyObject *)Py_None);
19124     switch (PyTuple_GET_SIZE(__pyx_args)) {
19125       case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
19126       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19127       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19128       case  0: break;
19129       default: goto __pyx_L5_argtuple_error;
19130     }
19131     switch (PyTuple_GET_SIZE(__pyx_args)) {
19132       case  0:
19133       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui__value);
19134       if (likely(values[0])) kw_args--;
19135       else goto __pyx_L5_argtuple_error;
19136       case  1:
19137       if (kw_args > 0) {
19138         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_attrib);
19139         if (unlikely(value)) { values[1] = value; kw_args--; }
19140       }
19141       case  2:
19142       if (kw_args > 0) {
19143         PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_nsmap);
19144         if (unlikely(value)) { values[2] = value; kw_args--; }
19145       }
19146     }
19147     if (unlikely(kw_args > 0)) {
19148       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, PyTuple_GET_SIZE(__pyx_args), "DataElement") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
19149     }
19150     __pyx_v__value = values[0];
19151     __pyx_v_attrib = values[1];
19152     __pyx_v_nsmap = values[2];
19153     __pyx_v__pytype = values[3];
19154     __pyx_v__xsi = values[4];
19155   } else {
19156     __pyx_v_attrib = ((PyObject *)Py_None);
19157     __pyx_v_nsmap = ((PyObject *)Py_None);
19158     __pyx_v__pytype = ((PyObject *)Py_None);
19159     __pyx_v__xsi = ((PyObject *)Py_None);
19160     switch (PyTuple_GET_SIZE(__pyx_args)) {
19161       case  3: __pyx_v_nsmap = PyTuple_GET_ITEM(__pyx_args, 2);
19162       case  2: __pyx_v_attrib = PyTuple_GET_ITEM(__pyx_args, 1);
19163       case  1: __pyx_v__value = PyTuple_GET_ITEM(__pyx_args, 0);
19164       break;
19165       default: goto __pyx_L5_argtuple_error;
19166     }
19167   }
19168   goto __pyx_L4_argument_unpacking_done;
19169   __pyx_L5_argtuple_error:;
19170   __Pyx_RaiseArgtupleInvalid("DataElement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
19171   __pyx_L3_error:;
19172   __Pyx_DECREF(__pyx_v__attributes);
19173   __Pyx_AddTraceback("lxml.objectify.DataElement");
19174   return NULL;
19175   __pyx_L4_argument_unpacking_done:;
19176   __Pyx_INCREF(__pyx_v__value);
19177   __Pyx_INCREF(__pyx_v_attrib);
19178   __Pyx_INCREF(__pyx_v_nsmap);
19179   __Pyx_INCREF(__pyx_v__pytype);
19180   __Pyx_INCREF(__pyx_v__xsi);
19181   __pyx_v_temp = Py_None; __Pyx_INCREF(Py_None);
19182   __pyx_v_prefix = Py_None; __Pyx_INCREF(Py_None);
19183   __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
19184   __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
19185   __pyx_v_strval = Py_None; __Pyx_INCREF(Py_None);
19186   __pyx_v_type_check = Py_None; __Pyx_INCREF(Py_None);
19187
19188   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1904
19189  *     """
19190  *     cdef python.PyObject* dict_result
19191  *     if nsmap is None:             # <<<<<<<<<<<<<<
19192  *         nsmap = _DEFAULT_NSMAP
19193  *     if attrib is not None and attrib:
19194  */
19195   __pyx_t_1 = (__pyx_v_nsmap == Py_None);
19196   if (__pyx_t_1) {
19197
19198     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1905
19199  *     cdef python.PyObject* dict_result
19200  *     if nsmap is None:
19201  *         nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<<
19202  *     if attrib is not None and attrib:
19203  *         if python.PyDict_Size(_attributes):
19204  */
19205     __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
19206     __Pyx_DECREF(__pyx_v_nsmap);
19207     __pyx_v_nsmap = ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
19208     goto __pyx_L6;
19209   }
19210   __pyx_L6:;
19211
19212   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1906
19213  *     if nsmap is None:
19214  *         nsmap = _DEFAULT_NSMAP
19215  *     if attrib is not None and attrib:             # <<<<<<<<<<<<<<
19216  *         if python.PyDict_Size(_attributes):
19217  *             attrib = dict(attrib)
19218  */
19219   __pyx_t_1 = (__pyx_v_attrib != Py_None);
19220   if (__pyx_t_1) {
19221     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19222     __pyx_t_3 = __pyx_t_2;
19223   } else {
19224     __pyx_t_3 = __pyx_t_1;
19225   }
19226   if (__pyx_t_3) {
19227
19228     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1907
19229  *         nsmap = _DEFAULT_NSMAP
19230  *     if attrib is not None and attrib:
19231  *         if python.PyDict_Size(_attributes):             # <<<<<<<<<<<<<<
19232  *             attrib = dict(attrib)
19233  *             attrib.update(_attributes)
19234  */
19235     __pyx_t_4 = PyDict_Size(__pyx_v__attributes);
19236     if (__pyx_t_4) {
19237
19238       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1908
19239  *     if attrib is not None and attrib:
19240  *         if python.PyDict_Size(_attributes):
19241  *             attrib = dict(attrib)             # <<<<<<<<<<<<<<
19242  *             attrib.update(_attributes)
19243  *         _attributes = attrib
19244  */
19245       __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19246       __Pyx_GOTREF(((PyObject *)__pyx_t_5));
19247       __Pyx_INCREF(__pyx_v_attrib);
19248       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_attrib);
19249       __Pyx_GIVEREF(__pyx_v_attrib);
19250       __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19251       __Pyx_GOTREF(__pyx_t_6);
19252       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
19253       __Pyx_DECREF(__pyx_v_attrib);
19254       __pyx_v_attrib = __pyx_t_6;
19255       __pyx_t_6 = 0;
19256
19257       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1909
19258  *         if python.PyDict_Size(_attributes):
19259  *             attrib = dict(attrib)
19260  *             attrib.update(_attributes)             # <<<<<<<<<<<<<<
19261  *         _attributes = attrib
19262  *     if isinstance(_value, ObjectifiedElement):
19263  */
19264       __pyx_t_6 = PyObject_GetAttr(__pyx_v_attrib, __pyx_n_ui_update); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19265       __Pyx_GOTREF(__pyx_t_6);
19266       __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19267       __Pyx_GOTREF(((PyObject *)__pyx_t_5));
19268       __Pyx_INCREF(__pyx_v__attributes);
19269       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v__attributes);
19270       __Pyx_GIVEREF(__pyx_v__attributes);
19271       __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19272       __Pyx_GOTREF(__pyx_t_7);
19273       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19274       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
19275       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19276       goto __pyx_L8;
19277     }
19278     __pyx_L8:;
19279
19280     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1910
19281  *             attrib = dict(attrib)
19282  *             attrib.update(_attributes)
19283  *         _attributes = attrib             # <<<<<<<<<<<<<<
19284  *     if isinstance(_value, ObjectifiedElement):
19285  *         if _pytype is None:
19286  */
19287     __Pyx_INCREF(__pyx_v_attrib);
19288     __Pyx_DECREF(__pyx_v__attributes);
19289     __pyx_v__attributes = __pyx_v_attrib;
19290     goto __pyx_L7;
19291   }
19292   __pyx_L7:;
19293
19294   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1911
19295  *             attrib.update(_attributes)
19296  *         _attributes = attrib
19297  *     if isinstance(_value, ObjectifiedElement):             # <<<<<<<<<<<<<<
19298  *         if _pytype is None:
19299  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
19300  */
19301   __pyx_t_3 = PyObject_TypeCheck(__pyx_v__value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement))); 
19302   if (__pyx_t_3) {
19303
19304     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1912
19305  *         _attributes = attrib
19306  *     if isinstance(_value, ObjectifiedElement):
19307  *         if _pytype is None:             # <<<<<<<<<<<<<<
19308  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
19309  *                 # special case: no change!
19310  */
19311     __pyx_t_3 = (__pyx_v__pytype == Py_None);
19312     if (__pyx_t_3) {
19313
19314       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1913
19315  *     if isinstance(_value, ObjectifiedElement):
19316  *         if _pytype is None:
19317  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<<
19318  *                 # special case: no change!
19319  *                 return _value.__copy__()
19320  */
19321       __pyx_t_3 = (__pyx_v__xsi == Py_None);
19322       if (__pyx_t_3) {
19323         __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19324         if ((!__pyx_t_1)) {
19325           __pyx_t_2 = (__pyx_v_nsmap == ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
19326           __pyx_t_8 = __pyx_t_2;
19327         } else {
19328           __pyx_t_8 = (!__pyx_t_1);
19329         }
19330         __pyx_t_1 = __pyx_t_8;
19331       } else {
19332         __pyx_t_1 = __pyx_t_3;
19333       }
19334       if (__pyx_t_1) {
19335
19336         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1915
19337  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
19338  *                 # special case: no change!
19339  *                 return _value.__copy__()             # <<<<<<<<<<<<<<
19340  *     if isinstance(_value, ObjectifiedDataElement):
19341  *         # reuse existing nsmap unless redefined in nsmap parameter
19342  */
19343         __Pyx_XDECREF(__pyx_r);
19344         __pyx_t_7 = PyObject_GetAttr(__pyx_v__value, __pyx_n_ui___copy__); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19345         __Pyx_GOTREF(__pyx_t_7);
19346         __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19347         __Pyx_GOTREF(__pyx_t_5);
19348         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19349         __pyx_r = __pyx_t_5;
19350         __pyx_t_5 = 0;
19351         goto __pyx_L0;
19352         goto __pyx_L11;
19353       }
19354       __pyx_L11:;
19355       goto __pyx_L10;
19356     }
19357     __pyx_L10:;
19358     goto __pyx_L9;
19359   }
19360   __pyx_L9:;
19361
19362   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1916
19363  *                 # special case: no change!
19364  *                 return _value.__copy__()
19365  *     if isinstance(_value, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
19366  *         # reuse existing nsmap unless redefined in nsmap parameter
19367  *         temp = _value.nsmap
19368  */
19369   __pyx_t_1 = PyObject_TypeCheck(__pyx_v__value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement))); 
19370   if (__pyx_t_1) {
19371
19372     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1918
19373  *     if isinstance(_value, ObjectifiedDataElement):
19374  *         # reuse existing nsmap unless redefined in nsmap parameter
19375  *         temp = _value.nsmap             # <<<<<<<<<<<<<<
19376  *         if temp is not None and temp:
19377  *             temp = dict(temp)
19378  */
19379     __pyx_t_5 = PyObject_GetAttr(__pyx_v__value, __pyx_n_ui_nsmap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19380     __Pyx_GOTREF(__pyx_t_5);
19381     __Pyx_DECREF(__pyx_v_temp);
19382     __pyx_v_temp = __pyx_t_5;
19383     __pyx_t_5 = 0;
19384
19385     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1919
19386  *         # reuse existing nsmap unless redefined in nsmap parameter
19387  *         temp = _value.nsmap
19388  *         if temp is not None and temp:             # <<<<<<<<<<<<<<
19389  *             temp = dict(temp)
19390  *             temp.update(nsmap)
19391  */
19392     __pyx_t_1 = (__pyx_v_temp != Py_None);
19393     if (__pyx_t_1) {
19394       __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19395       __pyx_t_8 = __pyx_t_3;
19396     } else {
19397       __pyx_t_8 = __pyx_t_1;
19398     }
19399     if (__pyx_t_8) {
19400
19401       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1920
19402  *         temp = _value.nsmap
19403  *         if temp is not None and temp:
19404  *             temp = dict(temp)             # <<<<<<<<<<<<<<
19405  *             temp.update(nsmap)
19406  *             nsmap = temp
19407  */
19408       __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19409       __Pyx_GOTREF(((PyObject *)__pyx_t_5));
19410       __Pyx_INCREF(__pyx_v_temp);
19411       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_temp);
19412       __Pyx_GIVEREF(__pyx_v_temp);
19413       __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19414       __Pyx_GOTREF(__pyx_t_7);
19415       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
19416       __Pyx_DECREF(__pyx_v_temp);
19417       __pyx_v_temp = __pyx_t_7;
19418       __pyx_t_7 = 0;
19419
19420       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1921
19421  *         if temp is not None and temp:
19422  *             temp = dict(temp)
19423  *             temp.update(nsmap)             # <<<<<<<<<<<<<<
19424  *             nsmap = temp
19425  *         # reuse existing attributes unless redefined in attrib/_attributes
19426  */
19427       __pyx_t_7 = PyObject_GetAttr(__pyx_v_temp, __pyx_n_ui_update); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19428       __Pyx_GOTREF(__pyx_t_7);
19429       __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19430       __Pyx_GOTREF(((PyObject *)__pyx_t_5));
19431       __Pyx_INCREF(__pyx_v_nsmap);
19432       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_nsmap);
19433       __Pyx_GIVEREF(__pyx_v_nsmap);
19434       __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19435       __Pyx_GOTREF(__pyx_t_6);
19436       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19437       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
19438       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19439
19440       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1922
19441  *             temp = dict(temp)
19442  *             temp.update(nsmap)
19443  *             nsmap = temp             # <<<<<<<<<<<<<<
19444  *         # reuse existing attributes unless redefined in attrib/_attributes
19445  *         temp = _value.attrib
19446  */
19447       __Pyx_INCREF(__pyx_v_temp);
19448       __Pyx_DECREF(__pyx_v_nsmap);
19449       __pyx_v_nsmap = __pyx_v_temp;
19450       goto __pyx_L13;
19451     }
19452     __pyx_L13:;
19453
19454     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1924
19455  *             nsmap = temp
19456  *         # reuse existing attributes unless redefined in attrib/_attributes
19457  *         temp = _value.attrib             # <<<<<<<<<<<<<<
19458  *         if temp is not None and temp:
19459  *             temp = dict(temp)
19460  */
19461     __pyx_t_6 = PyObject_GetAttr(__pyx_v__value, __pyx_n_ui_attrib); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19462     __Pyx_GOTREF(__pyx_t_6);
19463     __Pyx_DECREF(__pyx_v_temp);
19464     __pyx_v_temp = __pyx_t_6;
19465     __pyx_t_6 = 0;
19466
19467     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1925
19468  *         # reuse existing attributes unless redefined in attrib/_attributes
19469  *         temp = _value.attrib
19470  *         if temp is not None and temp:             # <<<<<<<<<<<<<<
19471  *             temp = dict(temp)
19472  *             temp.update(_attributes)
19473  */
19474     __pyx_t_8 = (__pyx_v_temp != Py_None);
19475     if (__pyx_t_8) {
19476       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19477       __pyx_t_3 = __pyx_t_1;
19478     } else {
19479       __pyx_t_3 = __pyx_t_8;
19480     }
19481     if (__pyx_t_3) {
19482
19483       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1926
19484  *         temp = _value.attrib
19485  *         if temp is not None and temp:
19486  *             temp = dict(temp)             # <<<<<<<<<<<<<<
19487  *             temp.update(_attributes)
19488  *             _attributes = temp
19489  */
19490       __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19491       __Pyx_GOTREF(((PyObject *)__pyx_t_6));
19492       __Pyx_INCREF(__pyx_v_temp);
19493       PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_temp);
19494       __Pyx_GIVEREF(__pyx_v_temp);
19495       __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19496       __Pyx_GOTREF(__pyx_t_5);
19497       __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
19498       __Pyx_DECREF(__pyx_v_temp);
19499       __pyx_v_temp = __pyx_t_5;
19500       __pyx_t_5 = 0;
19501
19502       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1927
19503  *         if temp is not None and temp:
19504  *             temp = dict(temp)
19505  *             temp.update(_attributes)             # <<<<<<<<<<<<<<
19506  *             _attributes = temp
19507  *         # reuse existing xsi:type or py:pytype attributes, unless provided as
19508  */
19509       __pyx_t_5 = PyObject_GetAttr(__pyx_v_temp, __pyx_n_ui_update); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19510       __Pyx_GOTREF(__pyx_t_5);
19511       __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19512       __Pyx_GOTREF(((PyObject *)__pyx_t_6));
19513       __Pyx_INCREF(__pyx_v__attributes);
19514       PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__attributes);
19515       __Pyx_GIVEREF(__pyx_v__attributes);
19516       __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19517       __Pyx_GOTREF(__pyx_t_7);
19518       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19519       __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
19520       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19521
19522       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1928
19523  *             temp = dict(temp)
19524  *             temp.update(_attributes)
19525  *             _attributes = temp             # <<<<<<<<<<<<<<
19526  *         # reuse existing xsi:type or py:pytype attributes, unless provided as
19527  *         # arguments
19528  */
19529       __Pyx_INCREF(__pyx_v_temp);
19530       __Pyx_DECREF(__pyx_v__attributes);
19531       __pyx_v__attributes = __pyx_v_temp;
19532       goto __pyx_L14;
19533     }
19534     __pyx_L14:;
19535
19536     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1931
19537  *         # reuse existing xsi:type or py:pytype attributes, unless provided as
19538  *         # arguments
19539  *         if _xsi is None and _pytype is None:             # <<<<<<<<<<<<<<
19540  *             dict_result = python.PyDict_GetItem(_attributes,
19541  *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)
19542  */
19543     __pyx_t_3 = (__pyx_v__xsi == Py_None);
19544     if (__pyx_t_3) {
19545       __pyx_t_8 = (__pyx_v__pytype == Py_None);
19546       __pyx_t_1 = __pyx_t_8;
19547     } else {
19548       __pyx_t_1 = __pyx_t_3;
19549     }
19550     if (__pyx_t_1) {
19551
19552       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1933
19553  *         if _xsi is None and _pytype is None:
19554  *             dict_result = python.PyDict_GetItem(_attributes,
19555  *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)             # <<<<<<<<<<<<<<
19556  *             if dict_result is not NULL:
19557  *                 _xsi = <object>dict_result
19558  */
19559       __pyx_v_dict_result = PyDict_GetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
19560
19561       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1934
19562  *             dict_result = python.PyDict_GetItem(_attributes,
19563  *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)
19564  *             if dict_result is not NULL:             # <<<<<<<<<<<<<<
19565  *                 _xsi = <object>dict_result
19566  *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
19567  */
19568       __pyx_t_1 = (__pyx_v_dict_result != NULL);
19569       if (__pyx_t_1) {
19570
19571         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1935
19572  *                                                 XML_SCHEMA_INSTANCE_TYPE_ATTR)
19573  *             if dict_result is not NULL:
19574  *                 _xsi = <object>dict_result             # <<<<<<<<<<<<<<
19575  *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
19576  *             if dict_result is not NULL:
19577  */
19578         __Pyx_INCREF(((PyObject *)__pyx_v_dict_result));
19579         __Pyx_DECREF(__pyx_v__xsi);
19580         __pyx_v__xsi = ((PyObject *)__pyx_v_dict_result);
19581         goto __pyx_L16;
19582       }
19583       __pyx_L16:;
19584
19585       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1936
19586  *             if dict_result is not NULL:
19587  *                 _xsi = <object>dict_result
19588  *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)             # <<<<<<<<<<<<<<
19589  *             if dict_result is not NULL:
19590  *                 _pytype = <object>dict_result
19591  */
19592       __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19593       __Pyx_GOTREF(__pyx_t_7);
19594       __pyx_v_dict_result = PyDict_GetItem(__pyx_v__attributes, __pyx_t_7);
19595       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19596
19597       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1937
19598  *                 _xsi = <object>dict_result
19599  *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
19600  *             if dict_result is not NULL:             # <<<<<<<<<<<<<<
19601  *                 _pytype = <object>dict_result
19602  * 
19603  */
19604       __pyx_t_1 = (__pyx_v_dict_result != NULL);
19605       if (__pyx_t_1) {
19606
19607         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1938
19608  *             dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
19609  *             if dict_result is not NULL:
19610  *                 _pytype = <object>dict_result             # <<<<<<<<<<<<<<
19611  * 
19612  *     if _xsi is not None:
19613  */
19614         __Pyx_INCREF(((PyObject *)__pyx_v_dict_result));
19615         __Pyx_DECREF(__pyx_v__pytype);
19616         __pyx_v__pytype = ((PyObject *)__pyx_v_dict_result);
19617         goto __pyx_L17;
19618       }
19619       __pyx_L17:;
19620       goto __pyx_L15;
19621     }
19622     __pyx_L15:;
19623     goto __pyx_L12;
19624   }
19625   __pyx_L12:;
19626
19627   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1940
19628  *                 _pytype = <object>dict_result
19629  * 
19630  *     if _xsi is not None:             # <<<<<<<<<<<<<<
19631  *         if u':' in _xsi:
19632  *             prefix, name = _xsi.split(u':', 1)
19633  */
19634   __pyx_t_1 = (__pyx_v__xsi != Py_None);
19635   if (__pyx_t_1) {
19636
19637     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1941
19638  * 
19639  *     if _xsi is not None:
19640  *         if u':' in _xsi:             # <<<<<<<<<<<<<<
19641  *             prefix, name = _xsi.split(u':', 1)
19642  *             ns = nsmap.get(prefix)
19643  */
19644     __pyx_t_1 = (PySequence_Contains(__pyx_v__xsi, ((PyObject *)__pyx_kp_u_32))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19645     if (__pyx_t_1) {
19646
19647       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1942
19648  *     if _xsi is not None:
19649  *         if u':' in _xsi:
19650  *             prefix, name = _xsi.split(u':', 1)             # <<<<<<<<<<<<<<
19651  *             ns = nsmap.get(prefix)
19652  *             if ns != XML_SCHEMA_NS:
19653  */
19654       __pyx_t_7 = PyObject_GetAttr(__pyx_v__xsi, __pyx_n_ui_split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19655       __Pyx_GOTREF(__pyx_t_7);
19656       __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19657       __Pyx_GOTREF(((PyObject *)__pyx_t_6));
19658       __Pyx_INCREF(((PyObject *)__pyx_kp_u_32));
19659       PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_u_32));
19660       __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_32));
19661       __Pyx_INCREF(__pyx_int_1);
19662       PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1);
19663       __Pyx_GIVEREF(__pyx_int_1);
19664       __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19665       __Pyx_GOTREF(__pyx_t_5);
19666       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19667       __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
19668       if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
19669         PyObject* tuple = __pyx_t_5;
19670         __pyx_t_6 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_6);
19671         __pyx_t_7 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_7);
19672         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19673         __Pyx_DECREF(__pyx_v_prefix);
19674         __pyx_v_prefix = __pyx_t_6;
19675         __pyx_t_6 = 0;
19676         __Pyx_DECREF(__pyx_v_name);
19677         __pyx_v_name = __pyx_t_7;
19678         __pyx_t_7 = 0;
19679       } else {
19680         __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19681         __Pyx_GOTREF(__pyx_t_9);
19682         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19683         __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_9, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19684         __Pyx_GOTREF(__pyx_t_6);
19685         __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_9, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19686         __Pyx_GOTREF(__pyx_t_7);
19687         if (__Pyx_EndUnpack(__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19688         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19689         __Pyx_DECREF(__pyx_v_prefix);
19690         __pyx_v_prefix = __pyx_t_6;
19691         __pyx_t_6 = 0;
19692         __Pyx_DECREF(__pyx_v_name);
19693         __pyx_v_name = __pyx_t_7;
19694         __pyx_t_7 = 0;
19695       }
19696
19697       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1943
19698  *         if u':' in _xsi:
19699  *             prefix, name = _xsi.split(u':', 1)
19700  *             ns = nsmap.get(prefix)             # <<<<<<<<<<<<<<
19701  *             if ns != XML_SCHEMA_NS:
19702  *                 raise ValueError, u"XSD types require the XSD namespace"
19703  */
19704       __pyx_t_5 = PyObject_GetAttr(__pyx_v_nsmap, __pyx_n_ui_get); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19705       __Pyx_GOTREF(__pyx_t_5);
19706       __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19707       __Pyx_GOTREF(((PyObject *)__pyx_t_7));
19708       __Pyx_INCREF(__pyx_v_prefix);
19709       PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_prefix);
19710       __Pyx_GIVEREF(__pyx_v_prefix);
19711       __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19712       __Pyx_GOTREF(__pyx_t_6);
19713       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19714       __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
19715       __Pyx_DECREF(__pyx_v_ns);
19716       __pyx_v_ns = __pyx_t_6;
19717       __pyx_t_6 = 0;
19718
19719       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1944
19720  *             prefix, name = _xsi.split(u':', 1)
19721  *             ns = nsmap.get(prefix)
19722  *             if ns != XML_SCHEMA_NS:             # <<<<<<<<<<<<<<
19723  *                 raise ValueError, u"XSD types require the XSD namespace"
19724  *         elif nsmap is _DEFAULT_NSMAP:
19725  */
19726       __pyx_t_6 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_NE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19727       __Pyx_GOTREF(__pyx_t_6);
19728       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19729       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19730       if (__pyx_t_1) {
19731
19732         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1945
19733  *             ns = nsmap.get(prefix)
19734  *             if ns != XML_SCHEMA_NS:
19735  *                 raise ValueError, u"XSD types require the XSD namespace"             # <<<<<<<<<<<<<<
19736  *         elif nsmap is _DEFAULT_NSMAP:
19737  *             name = _xsi
19738  */
19739         __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_44), 0);
19740         {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19741         goto __pyx_L20;
19742       }
19743       __pyx_L20:;
19744       goto __pyx_L19;
19745     }
19746
19747     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1946
19748  *             if ns != XML_SCHEMA_NS:
19749  *                 raise ValueError, u"XSD types require the XSD namespace"
19750  *         elif nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<<
19751  *             name = _xsi
19752  *             _xsi = u'xsd:' + _xsi
19753  */
19754     __pyx_t_1 = (__pyx_v_nsmap == ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
19755     if (__pyx_t_1) {
19756
19757       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1947
19758  *                 raise ValueError, u"XSD types require the XSD namespace"
19759  *         elif nsmap is _DEFAULT_NSMAP:
19760  *             name = _xsi             # <<<<<<<<<<<<<<
19761  *             _xsi = u'xsd:' + _xsi
19762  *         else:
19763  */
19764       __Pyx_INCREF(__pyx_v__xsi);
19765       __Pyx_DECREF(__pyx_v_name);
19766       __pyx_v_name = __pyx_v__xsi;
19767
19768       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1948
19769  *         elif nsmap is _DEFAULT_NSMAP:
19770  *             name = _xsi
19771  *             _xsi = u'xsd:' + _xsi             # <<<<<<<<<<<<<<
19772  *         else:
19773  *             name = _xsi
19774  */
19775       __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_kp_u_45), __pyx_v__xsi); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19776       __Pyx_GOTREF(__pyx_t_6);
19777       __Pyx_DECREF(__pyx_v__xsi);
19778       __pyx_v__xsi = __pyx_t_6;
19779       __pyx_t_6 = 0;
19780       goto __pyx_L19;
19781     }
19782     /*else*/ {
19783
19784       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1950
19785  *             _xsi = u'xsd:' + _xsi
19786  *         else:
19787  *             name = _xsi             # <<<<<<<<<<<<<<
19788  *             for prefix, ns in nsmap.items():
19789  *                 if ns == XML_SCHEMA_NS:
19790  */
19791       __Pyx_INCREF(__pyx_v__xsi);
19792       __Pyx_DECREF(__pyx_v_name);
19793       __pyx_v_name = __pyx_v__xsi;
19794
19795       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1951
19796  *         else:
19797  *             name = _xsi
19798  *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<<
19799  *                 if ns == XML_SCHEMA_NS:
19800  *                     if prefix is not None and prefix:
19801  */
19802       __pyx_t_6 = PyObject_GetAttr(__pyx_v_nsmap, __pyx_n_ui_items); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19803       __Pyx_GOTREF(__pyx_t_6);
19804       __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19805       __Pyx_GOTREF(__pyx_t_7);
19806       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19807       if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
19808         __pyx_t_4 = 0; __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6);
19809       } else {
19810         __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19811         __Pyx_GOTREF(__pyx_t_6);
19812       }
19813       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19814       for (;;) {
19815         if (likely(PyList_CheckExact(__pyx_t_6))) {
19816           if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
19817           __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++;
19818         } else if (likely(PyTuple_CheckExact(__pyx_t_6))) {
19819           if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
19820           __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++;
19821         } else {
19822           __pyx_t_7 = PyIter_Next(__pyx_t_6);
19823           if (!__pyx_t_7) {
19824             if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19825             break;
19826           }
19827           __Pyx_GOTREF(__pyx_t_7);
19828         }
19829         if (PyTuple_CheckExact(__pyx_t_7) && likely(PyTuple_GET_SIZE(__pyx_t_7) == 2)) {
19830           PyObject* tuple = __pyx_t_7;
19831           __pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
19832           __pyx_t_9 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_9);
19833           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19834           __Pyx_DECREF(__pyx_v_prefix);
19835           __pyx_v_prefix = __pyx_t_5;
19836           __pyx_t_5 = 0;
19837           __Pyx_DECREF(__pyx_v_ns);
19838           __pyx_v_ns = __pyx_t_9;
19839           __pyx_t_9 = 0;
19840         } else {
19841           __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19842           __Pyx_GOTREF(__pyx_t_10);
19843           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19844           __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_10, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19845           __Pyx_GOTREF(__pyx_t_5);
19846           __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_10, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19847           __Pyx_GOTREF(__pyx_t_9);
19848           if (__Pyx_EndUnpack(__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19849           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
19850           __Pyx_DECREF(__pyx_v_prefix);
19851           __pyx_v_prefix = __pyx_t_5;
19852           __pyx_t_5 = 0;
19853           __Pyx_DECREF(__pyx_v_ns);
19854           __pyx_v_ns = __pyx_t_9;
19855           __pyx_t_9 = 0;
19856         }
19857
19858         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1952
19859  *             name = _xsi
19860  *             for prefix, ns in nsmap.items():
19861  *                 if ns == XML_SCHEMA_NS:             # <<<<<<<<<<<<<<
19862  *                     if prefix is not None and prefix:
19863  *                         _xsi = prefix + u':' + _xsi
19864  */
19865         __pyx_t_7 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19866         __Pyx_GOTREF(__pyx_t_7);
19867         __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19868         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19869         if (__pyx_t_1) {
19870
19871           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1953
19872  *             for prefix, ns in nsmap.items():
19873  *                 if ns == XML_SCHEMA_NS:
19874  *                     if prefix is not None and prefix:             # <<<<<<<<<<<<<<
19875  *                         _xsi = prefix + u':' + _xsi
19876  *                     break
19877  */
19878           __pyx_t_1 = (__pyx_v_prefix != Py_None);
19879           if (__pyx_t_1) {
19880             __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_prefix); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19881             __pyx_t_8 = __pyx_t_3;
19882           } else {
19883             __pyx_t_8 = __pyx_t_1;
19884           }
19885           if (__pyx_t_8) {
19886
19887             /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1954
19888  *                 if ns == XML_SCHEMA_NS:
19889  *                     if prefix is not None and prefix:
19890  *                         _xsi = prefix + u':' + _xsi             # <<<<<<<<<<<<<<
19891  *                     break
19892  *             else:
19893  */
19894             __pyx_t_7 = PyNumber_Add(__pyx_v_prefix, ((PyObject *)__pyx_kp_u_32)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19895             __Pyx_GOTREF(__pyx_t_7);
19896             __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_v__xsi); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19897             __Pyx_GOTREF(__pyx_t_9);
19898             __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19899             __Pyx_DECREF(__pyx_v__xsi);
19900             __pyx_v__xsi = __pyx_t_9;
19901             __pyx_t_9 = 0;
19902             goto __pyx_L24;
19903           }
19904           __pyx_L24:;
19905
19906           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1955
19907  *                     if prefix is not None and prefix:
19908  *                         _xsi = prefix + u':' + _xsi
19909  *                     break             # <<<<<<<<<<<<<<
19910  *             else:
19911  *                 raise ValueError, u"XSD types require the XSD namespace"
19912  */
19913           goto __pyx_L22_break;
19914           goto __pyx_L23;
19915         }
19916         __pyx_L23:;
19917       }
19918       /*else*/ {
19919
19920         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1957
19921  *                     break
19922  *             else:
19923  *                 raise ValueError, u"XSD types require the XSD namespace"             # <<<<<<<<<<<<<<
19924  *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi
19925  *         if _pytype is None:
19926  */
19927         __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_44), 0);
19928         {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19929       }
19930       __pyx_L22_break:;
19931       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19932     }
19933     __pyx_L19:;
19934
19935     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1958
19936  *             else:
19937  *                 raise ValueError, u"XSD types require the XSD namespace"
19938  *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi             # <<<<<<<<<<<<<<
19939  *         if _pytype is None:
19940  *             # allow using unregistered or even wrong xsi:type names
19941  */
19942     if (PyObject_SetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR, __pyx_v__xsi) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19943
19944     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1959
19945  *                 raise ValueError, u"XSD types require the XSD namespace"
19946  *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi
19947  *         if _pytype is None:             # <<<<<<<<<<<<<<
19948  *             # allow using unregistered or even wrong xsi:type names
19949  *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)
19950  */
19951     __pyx_t_8 = (__pyx_v__pytype == Py_None);
19952     if (__pyx_t_8) {
19953
19954       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1961
19955  *         if _pytype is None:
19956  *             # allow using unregistered or even wrong xsi:type names
19957  *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)             # <<<<<<<<<<<<<<
19958  *             if dict_result is NULL:
19959  *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
19960  */
19961       __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v__xsi);
19962
19963       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1962
19964  *             # allow using unregistered or even wrong xsi:type names
19965  *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)
19966  *             if dict_result is NULL:             # <<<<<<<<<<<<<<
19967  *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
19968  *             if dict_result is not NULL:
19969  */
19970       __pyx_t_8 = (__pyx_v_dict_result == NULL);
19971       if (__pyx_t_8) {
19972
19973         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1963
19974  *             dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)
19975  *             if dict_result is NULL:
19976  *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)             # <<<<<<<<<<<<<<
19977  *             if dict_result is not NULL:
19978  *                 _pytype = (<PyType>dict_result).name
19979  */
19980         __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_name);
19981         goto __pyx_L26;
19982       }
19983       __pyx_L26:;
19984
19985       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1964
19986  *             if dict_result is NULL:
19987  *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
19988  *             if dict_result is not NULL:             # <<<<<<<<<<<<<<
19989  *                 _pytype = (<PyType>dict_result).name
19990  * 
19991  */
19992       __pyx_t_8 = (__pyx_v_dict_result != NULL);
19993       if (__pyx_t_8) {
19994
19995         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1965
19996  *                 dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
19997  *             if dict_result is not NULL:
19998  *                 _pytype = (<PyType>dict_result).name             # <<<<<<<<<<<<<<
19999  * 
20000  *     if _value is None and _pytype != u"str":
20001  */
20002         __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->name);
20003         __Pyx_DECREF(__pyx_v__pytype);
20004         __pyx_v__pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->name;
20005         goto __pyx_L27;
20006       }
20007       __pyx_L27:;
20008       goto __pyx_L25;
20009     }
20010     __pyx_L25:;
20011     goto __pyx_L18;
20012   }
20013   __pyx_L18:;
20014
20015   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1967
20016  *                 _pytype = (<PyType>dict_result).name
20017  * 
20018  *     if _value is None and _pytype != u"str":             # <<<<<<<<<<<<<<
20019  *         _pytype = _pytype or u"NoneType"
20020  *         strval = None
20021  */
20022   __pyx_t_8 = (__pyx_v__value == Py_None);
20023   if (__pyx_t_8) {
20024     __pyx_t_6 = PyObject_RichCompare(__pyx_v__pytype, ((PyObject *)__pyx_n_u_str), Py_NE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20025     __Pyx_GOTREF(__pyx_t_6);
20026     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20027     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20028     __pyx_t_3 = __pyx_t_1;
20029   } else {
20030     __pyx_t_3 = __pyx_t_8;
20031   }
20032   if (__pyx_t_3) {
20033
20034     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1968
20035  * 
20036  *     if _value is None and _pytype != u"str":
20037  *         _pytype = _pytype or u"NoneType"             # <<<<<<<<<<<<<<
20038  *         strval = None
20039  *     elif python._isString(_value):
20040  */
20041     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__pytype); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20042     if (!__pyx_t_3) {
20043       __Pyx_INCREF(((PyObject *)__pyx_n_u_NoneType));
20044       __pyx_t_6 = __pyx_n_u_NoneType;
20045     } else {
20046       __Pyx_INCREF(__pyx_v__pytype);
20047       __pyx_t_6 = __pyx_v__pytype;
20048     }
20049     __Pyx_DECREF(__pyx_v__pytype);
20050     __pyx_v__pytype = __pyx_t_6;
20051     __pyx_t_6 = 0;
20052
20053     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1969
20054  *     if _value is None and _pytype != u"str":
20055  *         _pytype = _pytype or u"NoneType"
20056  *         strval = None             # <<<<<<<<<<<<<<
20057  *     elif python._isString(_value):
20058  *         strval = _value
20059  */
20060     __Pyx_INCREF(Py_None);
20061     __Pyx_DECREF(__pyx_v_strval);
20062     __pyx_v_strval = Py_None;
20063     goto __pyx_L28;
20064   }
20065
20066   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1970
20067  *         _pytype = _pytype or u"NoneType"
20068  *         strval = None
20069  *     elif python._isString(_value):             # <<<<<<<<<<<<<<
20070  *         strval = _value
20071  *     elif python.PyBool_Check(_value):
20072  */
20073   __pyx_t_3 = _isString(__pyx_v__value);
20074   if (__pyx_t_3) {
20075
20076     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1971
20077  *         strval = None
20078  *     elif python._isString(_value):
20079  *         strval = _value             # <<<<<<<<<<<<<<
20080  *     elif python.PyBool_Check(_value):
20081  *         if _value:
20082  */
20083     __Pyx_INCREF(__pyx_v__value);
20084     __Pyx_DECREF(__pyx_v_strval);
20085     __pyx_v_strval = __pyx_v__value;
20086     goto __pyx_L28;
20087   }
20088
20089   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1972
20090  *     elif python._isString(_value):
20091  *         strval = _value
20092  *     elif python.PyBool_Check(_value):             # <<<<<<<<<<<<<<
20093  *         if _value:
20094  *             strval = u"true"
20095  */
20096   __pyx_t_3 = PyBool_Check(__pyx_v__value);
20097   if (__pyx_t_3) {
20098
20099     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1973
20100  *         strval = _value
20101  *     elif python.PyBool_Check(_value):
20102  *         if _value:             # <<<<<<<<<<<<<<
20103  *             strval = u"true"
20104  *         else:
20105  */
20106     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__value); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20107     if (__pyx_t_3) {
20108
20109       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1974
20110  *     elif python.PyBool_Check(_value):
20111  *         if _value:
20112  *             strval = u"true"             # <<<<<<<<<<<<<<
20113  *         else:
20114  *             strval = u"false"
20115  */
20116       __Pyx_INCREF(((PyObject *)__pyx_n_u_true));
20117       __Pyx_DECREF(__pyx_v_strval);
20118       __pyx_v_strval = ((PyObject *)__pyx_n_u_true);
20119       goto __pyx_L29;
20120     }
20121     /*else*/ {
20122
20123       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1976
20124  *             strval = u"true"
20125  *         else:
20126  *             strval = u"false"             # <<<<<<<<<<<<<<
20127  *     else:
20128  *         strval = unicode(_value)
20129  */
20130       __Pyx_INCREF(((PyObject *)__pyx_n_u_false));
20131       __Pyx_DECREF(__pyx_v_strval);
20132       __pyx_v_strval = ((PyObject *)__pyx_n_u_false);
20133     }
20134     __pyx_L29:;
20135     goto __pyx_L28;
20136   }
20137   /*else*/ {
20138
20139     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1978
20140  *             strval = u"false"
20141  *     else:
20142  *         strval = unicode(_value)             # <<<<<<<<<<<<<<
20143  * 
20144  *     if _pytype is None:
20145  */
20146     __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20147     __Pyx_GOTREF(((PyObject *)__pyx_t_6));
20148     __Pyx_INCREF(__pyx_v__value);
20149     PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__value);
20150     __Pyx_GIVEREF(__pyx_v__value);
20151     __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20152     __Pyx_GOTREF(__pyx_t_9);
20153     __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
20154     __Pyx_DECREF(__pyx_v_strval);
20155     __pyx_v_strval = __pyx_t_9;
20156     __pyx_t_9 = 0;
20157   }
20158   __pyx_L28:;
20159
20160   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1980
20161  *         strval = unicode(_value)
20162  * 
20163  *     if _pytype is None:             # <<<<<<<<<<<<<<
20164  *         _pytype = _pytypename(_value)
20165  * 
20166  */
20167   __pyx_t_3 = (__pyx_v__pytype == Py_None);
20168   if (__pyx_t_3) {
20169
20170     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1981
20171  * 
20172  *     if _pytype is None:
20173  *         _pytype = _pytypename(_value)             # <<<<<<<<<<<<<<
20174  * 
20175  *     if _pytype is not None:
20176  */
20177     __pyx_t_9 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v__value); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20178     __Pyx_GOTREF(__pyx_t_9);
20179     __Pyx_DECREF(__pyx_v__pytype);
20180     __pyx_v__pytype = __pyx_t_9;
20181     __pyx_t_9 = 0;
20182     goto __pyx_L30;
20183   }
20184   __pyx_L30:;
20185
20186   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1983
20187  *         _pytype = _pytypename(_value)
20188  * 
20189  *     if _pytype is not None:             # <<<<<<<<<<<<<<
20190  *         if _pytype == u"NoneType" or _pytype == u"none":
20191  *             strval = None
20192  */
20193   __pyx_t_3 = (__pyx_v__pytype != Py_None);
20194   if (__pyx_t_3) {
20195
20196     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1984
20197  * 
20198  *     if _pytype is not None:
20199  *         if _pytype == u"NoneType" or _pytype == u"none":             # <<<<<<<<<<<<<<
20200  *             strval = None
20201  *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"
20202  */
20203     __pyx_t_9 = PyObject_RichCompare(__pyx_v__pytype, ((PyObject *)__pyx_n_u_NoneType), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20204     __Pyx_GOTREF(__pyx_t_9);
20205     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20206     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
20207     if (!__pyx_t_3) {
20208       __pyx_t_9 = PyObject_RichCompare(__pyx_v__pytype, ((PyObject *)__pyx_n_u_none), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20209       __Pyx_GOTREF(__pyx_t_9);
20210       __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20211       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
20212       __pyx_t_1 = __pyx_t_8;
20213     } else {
20214       __pyx_t_1 = __pyx_t_3;
20215     }
20216     if (__pyx_t_1) {
20217
20218       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1985
20219  *     if _pytype is not None:
20220  *         if _pytype == u"NoneType" or _pytype == u"none":
20221  *             strval = None             # <<<<<<<<<<<<<<
20222  *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"
20223  *         else:
20224  */
20225       __Pyx_INCREF(Py_None);
20226       __Pyx_DECREF(__pyx_v_strval);
20227       __pyx_v_strval = Py_None;
20228
20229       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1986
20230  *         if _pytype == u"NoneType" or _pytype == u"none":
20231  *             strval = None
20232  *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"             # <<<<<<<<<<<<<<
20233  *         else:
20234  *             # check if type information from arguments is valid
20235  */
20236       if (PyObject_SetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, ((PyObject *)__pyx_n_u_true)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20237       goto __pyx_L32;
20238     }
20239     /*else*/ {
20240
20241       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1989
20242  *         else:
20243  *             # check if type information from arguments is valid
20244  *             dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)             # <<<<<<<<<<<<<<
20245  *             if dict_result is not NULL:
20246  *                 type_check = (<PyType>dict_result).type_check
20247  */
20248       __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v__pytype);
20249
20250       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1990
20251  *             # check if type information from arguments is valid
20252  *             dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)
20253  *             if dict_result is not NULL:             # <<<<<<<<<<<<<<
20254  *                 type_check = (<PyType>dict_result).type_check
20255  *                 if type_check is not None:
20256  */
20257       __pyx_t_1 = (__pyx_v_dict_result != NULL);
20258       if (__pyx_t_1) {
20259
20260         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1991
20261  *             dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)
20262  *             if dict_result is not NULL:
20263  *                 type_check = (<PyType>dict_result).type_check             # <<<<<<<<<<<<<<
20264  *                 if type_check is not None:
20265  *                     type_check(strval)
20266  */
20267         __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->type_check);
20268         __Pyx_DECREF(__pyx_v_type_check);
20269         __pyx_v_type_check = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->type_check;
20270
20271         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1992
20272  *             if dict_result is not NULL:
20273  *                 type_check = (<PyType>dict_result).type_check
20274  *                 if type_check is not None:             # <<<<<<<<<<<<<<
20275  *                     type_check(strval)
20276  * 
20277  */
20278         __pyx_t_1 = (__pyx_v_type_check != Py_None);
20279         if (__pyx_t_1) {
20280
20281           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1993
20282  *                 type_check = (<PyType>dict_result).type_check
20283  *                 if type_check is not None:
20284  *                     type_check(strval)             # <<<<<<<<<<<<<<
20285  * 
20286  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
20287  */
20288           __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20289           __Pyx_GOTREF(((PyObject *)__pyx_t_9));
20290           __Pyx_INCREF(__pyx_v_strval);
20291           PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_strval);
20292           __Pyx_GIVEREF(__pyx_v_strval);
20293           __pyx_t_6 = PyObject_Call(__pyx_v_type_check, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20294           __Pyx_GOTREF(__pyx_t_6);
20295           __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
20296           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20297           goto __pyx_L34;
20298         }
20299         __pyx_L34:;
20300
20301         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1995
20302  *                     type_check(strval)
20303  * 
20304  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype             # <<<<<<<<<<<<<<
20305  * 
20306  *     return _makeElement(u"value", strval, _attributes, nsmap)
20307  */
20308         __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20309         __Pyx_GOTREF(__pyx_t_6);
20310         if (PyObject_SetItem(__pyx_v__attributes, __pyx_t_6, __pyx_v__pytype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20311         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20312         goto __pyx_L33;
20313       }
20314       __pyx_L33:;
20315     }
20316     __pyx_L32:;
20317     goto __pyx_L31;
20318   }
20319   __pyx_L31:;
20320
20321   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1997
20322  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
20323  * 
20324  *     return _makeElement(u"value", strval, _attributes, nsmap)             # <<<<<<<<<<<<<<
20325  * 
20326  * 
20327  */
20328   __Pyx_XDECREF(__pyx_r);
20329   __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(((PyObject *)__pyx_n_u_value), __pyx_v_strval, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20330   __Pyx_GOTREF(__pyx_t_6);
20331   __pyx_r = __pyx_t_6;
20332   __pyx_t_6 = 0;
20333   goto __pyx_L0;
20334
20335   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20336   goto __pyx_L0;
20337   __pyx_L1_error:;
20338   __Pyx_XDECREF(__pyx_t_5);
20339   __Pyx_XDECREF(__pyx_t_6);
20340   __Pyx_XDECREF(__pyx_t_7);
20341   __Pyx_XDECREF(__pyx_t_9);
20342   __Pyx_XDECREF(__pyx_t_10);
20343   __Pyx_AddTraceback("lxml.objectify.DataElement");
20344   __pyx_r = NULL;
20345   __pyx_L0:;
20346   __Pyx_DECREF(__pyx_v__attributes);
20347   __Pyx_DECREF(__pyx_v_temp);
20348   __Pyx_DECREF(__pyx_v_prefix);
20349   __Pyx_DECREF(__pyx_v_name);
20350   __Pyx_DECREF(__pyx_v_ns);
20351   __Pyx_DECREF(__pyx_v_strval);
20352   __Pyx_DECREF(__pyx_v_type_check);
20353   __Pyx_DECREF(__pyx_v__value);
20354   __Pyx_DECREF(__pyx_v_attrib);
20355   __Pyx_DECREF(__pyx_v_nsmap);
20356   __Pyx_DECREF(__pyx_v__pytype);
20357   __Pyx_DECREF(__pyx_v__xsi);
20358   __Pyx_XGIVEREF(__pyx_r);
20359   __Pyx_FinishRefcountContext();
20360   return __pyx_r;
20361 }
20362
20363 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":21
20364  *     cdef _ObjectPath*  _c_path
20365  *     cdef Py_ssize_t _path_len
20366  *     def __init__(self, path):             # <<<<<<<<<<<<<<
20367  *         if python._isString(path):
20368  *             self._path = _parseObjectPathString(path)
20369  */
20370
20371 static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20372 static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20373   PyObject *__pyx_v_path = 0;
20374   int __pyx_r;
20375   int __pyx_t_1;
20376   PyObject *__pyx_t_2 = NULL;
20377   PyObject *__pyx_t_3 = NULL;
20378   PyObject *__pyx_t_4 = NULL;
20379   __pyx_t_4lxml_9objectify__ObjectPath *__pyx_t_5;
20380   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_path,0};
20381   __Pyx_SetupRefcountContext("__init__");
20382   if (unlikely(__pyx_kwds)) {
20383     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
20384     PyObject* values[1] = {0};
20385     switch (PyTuple_GET_SIZE(__pyx_args)) {
20386       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20387       case  0: break;
20388       default: goto __pyx_L5_argtuple_error;
20389     }
20390     switch (PyTuple_GET_SIZE(__pyx_args)) {
20391       case  0:
20392       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_path);
20393       if (likely(values[0])) kw_args--;
20394       else goto __pyx_L5_argtuple_error;
20395     }
20396     if (unlikely(kw_args > 0)) {
20397       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20398     }
20399     __pyx_v_path = values[0];
20400   } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
20401     goto __pyx_L5_argtuple_error;
20402   } else {
20403     __pyx_v_path = PyTuple_GET_ITEM(__pyx_args, 0);
20404   }
20405   goto __pyx_L4_argument_unpacking_done;
20406   __pyx_L5_argtuple_error:;
20407   __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20408   __pyx_L3_error:;
20409   __Pyx_AddTraceback("lxml.objectify.ObjectPath.__init__");
20410   return -1;
20411   __pyx_L4_argument_unpacking_done:;
20412   __Pyx_INCREF((PyObject *)__pyx_v_self);
20413   __Pyx_INCREF(__pyx_v_path);
20414
20415   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":22
20416  *     cdef Py_ssize_t _path_len
20417  *     def __init__(self, path):
20418  *         if python._isString(path):             # <<<<<<<<<<<<<<
20419  *             self._path = _parseObjectPathString(path)
20420  *             self._path_str = path
20421  */
20422   __pyx_t_1 = _isString(__pyx_v_path);
20423   if (__pyx_t_1) {
20424
20425     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":23
20426  *     def __init__(self, path):
20427  *         if python._isString(path):
20428  *             self._path = _parseObjectPathString(path)             # <<<<<<<<<<<<<<
20429  *             self._path_str = path
20430  *         else:
20431  */
20432     __pyx_t_2 = __pyx_f_4lxml_9objectify__parseObjectPathString(__pyx_v_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20433     __Pyx_GOTREF(__pyx_t_2);
20434     __Pyx_GIVEREF(__pyx_t_2);
20435     __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
20436     __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
20437     ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path = __pyx_t_2;
20438     __pyx_t_2 = 0;
20439
20440     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":24
20441  *         if python._isString(path):
20442  *             self._path = _parseObjectPathString(path)
20443  *             self._path_str = path             # <<<<<<<<<<<<<<
20444  *         else:
20445  *             self._path = _parseObjectPathList(path)
20446  */
20447     __Pyx_INCREF(__pyx_v_path);
20448     __Pyx_GIVEREF(__pyx_v_path);
20449     __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
20450     __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
20451     ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str = __pyx_v_path;
20452     goto __pyx_L6;
20453   }
20454   /*else*/ {
20455
20456     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":26
20457  *             self._path_str = path
20458  *         else:
20459  *             self._path = _parseObjectPathList(path)             # <<<<<<<<<<<<<<
20460  *             self._path_str = u'.'.join(path)
20461  *         self._path_len = python.PyList_GET_SIZE(self._path)
20462  */
20463     __pyx_t_2 = __pyx_f_4lxml_9objectify__parseObjectPathList(__pyx_v_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20464     __Pyx_GOTREF(__pyx_t_2);
20465     __Pyx_GIVEREF(__pyx_t_2);
20466     __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
20467     __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
20468     ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path = __pyx_t_2;
20469     __pyx_t_2 = 0;
20470
20471     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":27
20472  *         else:
20473  *             self._path = _parseObjectPathList(path)
20474  *             self._path_str = u'.'.join(path)             # <<<<<<<<<<<<<<
20475  *         self._path_len = python.PyList_GET_SIZE(self._path)
20476  *         self._c_path = _buildObjectPathSegments(self._path)
20477  */
20478     __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_u_9), __pyx_n_ui_join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20479     __Pyx_GOTREF(__pyx_t_2);
20480     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20481     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
20482     __Pyx_INCREF(__pyx_v_path);
20483     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path);
20484     __Pyx_GIVEREF(__pyx_v_path);
20485     __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20486     __Pyx_GOTREF(__pyx_t_4);
20487     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20488     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
20489     __Pyx_GIVEREF(__pyx_t_4);
20490     __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
20491     __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
20492     ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str = __pyx_t_4;
20493     __pyx_t_4 = 0;
20494   }
20495   __pyx_L6:;
20496
20497   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":28
20498  *             self._path = _parseObjectPathList(path)
20499  *             self._path_str = u'.'.join(path)
20500  *         self._path_len = python.PyList_GET_SIZE(self._path)             # <<<<<<<<<<<<<<
20501  *         self._c_path = _buildObjectPathSegments(self._path)
20502  *         self.find = self.__call__
20503  */
20504   ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len = PyList_GET_SIZE(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
20505
20506   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":29
20507  *             self._path_str = u'.'.join(path)
20508  *         self._path_len = python.PyList_GET_SIZE(self._path)
20509  *         self._c_path = _buildObjectPathSegments(self._path)             # <<<<<<<<<<<<<<
20510  *         self.find = self.__call__
20511  * 
20512  */
20513   __pyx_t_5 = __pyx_f_4lxml_9objectify__buildObjectPathSegments(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20514   ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path = __pyx_t_5;
20515
20516   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":30
20517  *         self._path_len = python.PyList_GET_SIZE(self._path)
20518  *         self._c_path = _buildObjectPathSegments(self._path)
20519  *         self.find = self.__call__             # <<<<<<<<<<<<<<
20520  * 
20521  *     def __dealloc__(self):
20522  */
20523   __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui___call__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20524   __Pyx_GOTREF(__pyx_t_4);
20525   __Pyx_GIVEREF(__pyx_t_4);
20526   __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->find);
20527   __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->find);
20528   ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->find = __pyx_t_4;
20529   __pyx_t_4 = 0;
20530
20531   __pyx_r = 0;
20532   goto __pyx_L0;
20533   __pyx_L1_error:;
20534   __Pyx_XDECREF(__pyx_t_2);
20535   __Pyx_XDECREF(__pyx_t_3);
20536   __Pyx_XDECREF(__pyx_t_4);
20537   __Pyx_AddTraceback("lxml.objectify.ObjectPath.__init__");
20538   __pyx_r = -1;
20539   __pyx_L0:;
20540   __Pyx_DECREF((PyObject *)__pyx_v_self);
20541   __Pyx_DECREF(__pyx_v_path);
20542   __Pyx_FinishRefcountContext();
20543   return __pyx_r;
20544 }
20545
20546 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":32
20547  *         self.find = self.__call__
20548  * 
20549  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
20550  *         if self._c_path is not NULL:
20551  *             python.PyMem_Free(self._c_path)
20552  */
20553
20554 static void __pyx_pf_4lxml_9objectify_10ObjectPath___dealloc__(PyObject *__pyx_v_self); /*proto*/
20555 static void __pyx_pf_4lxml_9objectify_10ObjectPath___dealloc__(PyObject *__pyx_v_self) {
20556   int __pyx_t_1;
20557   __Pyx_SetupRefcountContext("__dealloc__");
20558   __Pyx_INCREF((PyObject *)__pyx_v_self);
20559
20560   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":33
20561  * 
20562  *     def __dealloc__(self):
20563  *         if self._c_path is not NULL:             # <<<<<<<<<<<<<<
20564  *             python.PyMem_Free(self._c_path)
20565  * 
20566  */
20567   __pyx_t_1 = (((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path != NULL);
20568   if (__pyx_t_1) {
20569
20570     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":34
20571  *     def __dealloc__(self):
20572  *         if self._c_path is not NULL:
20573  *             python.PyMem_Free(self._c_path)             # <<<<<<<<<<<<<<
20574  * 
20575  *     def __str__(self):
20576  */
20577     PyMem_Free(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path);
20578     goto __pyx_L5;
20579   }
20580   __pyx_L5:;
20581
20582   __Pyx_DECREF((PyObject *)__pyx_v_self);
20583   __Pyx_FinishRefcountContext();
20584 }
20585
20586 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":36
20587  *             python.PyMem_Free(self._c_path)
20588  * 
20589  *     def __str__(self):             # <<<<<<<<<<<<<<
20590  *         return self._path_str
20591  * 
20592  */
20593
20594 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___str__(PyObject *__pyx_v_self); /*proto*/
20595 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___str__(PyObject *__pyx_v_self) {
20596   PyObject *__pyx_r = NULL;
20597   __Pyx_SetupRefcountContext("__str__");
20598
20599   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":37
20600  * 
20601  *     def __str__(self):
20602  *         return self._path_str             # <<<<<<<<<<<<<<
20603  * 
20604  *     def __call__(self, _Element root not None, *default):
20605  */
20606   __Pyx_XDECREF(__pyx_r);
20607   __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
20608   __pyx_r = ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str;
20609   goto __pyx_L0;
20610
20611   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20612   __pyx_L0:;
20613   __Pyx_XGIVEREF(__pyx_r);
20614   __Pyx_FinishRefcountContext();
20615   return __pyx_r;
20616 }
20617
20618 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":39
20619  *         return self._path_str
20620  * 
20621  *     def __call__(self, _Element root not None, *default):             # <<<<<<<<<<<<<<
20622  *         u"""Follow the attribute path in the object structure and return the
20623  *         target attribute value.
20624  */
20625
20626 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20627 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        ";
20628 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20629   struct LxmlElement *__pyx_v_root = 0;
20630   PyObject *__pyx_v_default = 0;
20631   Py_ssize_t __pyx_v_use_default;
20632   PyObject *__pyx_r = NULL;
20633   int __pyx_t_1;
20634   PyObject *__pyx_t_2 = NULL;
20635   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_root,0};
20636   __Pyx_SetupRefcountContext("__call__");
20637   if (PyTuple_GET_SIZE(__pyx_args) > 1) {
20638     __pyx_v_default = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); __Pyx_GOTREF(__pyx_v_default);
20639     if (unlikely(!__pyx_v_default)) return NULL;
20640   } else {
20641     __pyx_v_default = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
20642   }
20643   if (unlikely(__pyx_kwds)) {
20644     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
20645     PyObject* values[1] = {0};
20646     switch (PyTuple_GET_SIZE(__pyx_args)) {
20647       default:
20648       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20649       case  0: break;
20650     }
20651     switch (PyTuple_GET_SIZE(__pyx_args)) {
20652       case  0:
20653       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_root);
20654       if (likely(values[0])) kw_args--;
20655       else goto __pyx_L5_argtuple_error;
20656     }
20657     if (unlikely(kw_args > 0)) {
20658       const Py_ssize_t used_pos_args = (PyTuple_GET_SIZE(__pyx_args) < 1) ? PyTuple_GET_SIZE(__pyx_args) : 1;
20659       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20660     }
20661     __pyx_v_root = ((struct LxmlElement *)values[0]);
20662   } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
20663     goto __pyx_L5_argtuple_error;
20664   } else {
20665     __pyx_v_root = ((struct LxmlElement *)PyTuple_GET_ITEM(__pyx_args, 0));
20666   }
20667   goto __pyx_L4_argument_unpacking_done;
20668   __pyx_L5_argtuple_error:;
20669   __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20670   __pyx_L3_error:;
20671   __Pyx_DECREF(__pyx_v_default);
20672   __Pyx_AddTraceback("lxml.objectify.ObjectPath.__call__");
20673   return NULL;
20674   __pyx_L4_argument_unpacking_done:;
20675   __Pyx_INCREF((PyObject *)__pyx_v_self);
20676   __Pyx_INCREF((PyObject *)__pyx_v_root);
20677   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20678
20679   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":47
20680  *         """
20681  *         cdef Py_ssize_t use_default
20682  *         use_default = python.PyTuple_GET_SIZE(default)             # <<<<<<<<<<<<<<
20683  *         if use_default == 1:
20684  *             default = python.PyTuple_GET_ITEM(default, 0)
20685  */
20686   __pyx_v_use_default = PyTuple_GET_SIZE(__pyx_v_default);
20687
20688   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":48
20689  *         cdef Py_ssize_t use_default
20690  *         use_default = python.PyTuple_GET_SIZE(default)
20691  *         if use_default == 1:             # <<<<<<<<<<<<<<
20692  *             default = python.PyTuple_GET_ITEM(default, 0)
20693  *             python.Py_INCREF(default)
20694  */
20695   __pyx_t_1 = (__pyx_v_use_default == 1);
20696   if (__pyx_t_1) {
20697
20698     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":49
20699  *         use_default = python.PyTuple_GET_SIZE(default)
20700  *         if use_default == 1:
20701  *             default = python.PyTuple_GET_ITEM(default, 0)             # <<<<<<<<<<<<<<
20702  *             python.Py_INCREF(default)
20703  *             use_default = 1
20704  */
20705     __pyx_t_2 = PyTuple_GET_ITEM(__pyx_v_default, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20706     __Pyx_GOTREF(__pyx_t_2);
20707     __Pyx_DECREF(__pyx_v_default);
20708     __pyx_v_default = __pyx_t_2;
20709     __pyx_t_2 = 0;
20710
20711     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":50
20712  *         if use_default == 1:
20713  *             default = python.PyTuple_GET_ITEM(default, 0)
20714  *             python.Py_INCREF(default)             # <<<<<<<<<<<<<<
20715  *             use_default = 1
20716  *         elif use_default > 1:
20717  */
20718     Py_INCREF(__pyx_v_default);
20719
20720     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":51
20721  *             default = python.PyTuple_GET_ITEM(default, 0)
20722  *             python.Py_INCREF(default)
20723  *             use_default = 1             # <<<<<<<<<<<<<<
20724  *         elif use_default > 1:
20725  *             raise TypeError, u"invalid number of arguments: needs one or two"
20726  */
20727     __pyx_v_use_default = 1;
20728     goto __pyx_L6;
20729   }
20730
20731   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":52
20732  *             python.Py_INCREF(default)
20733  *             use_default = 1
20734  *         elif use_default > 1:             # <<<<<<<<<<<<<<
20735  *             raise TypeError, u"invalid number of arguments: needs one or two"
20736  *         return _findObjectPath(root, self._c_path, self._path_len,
20737  */
20738   __pyx_t_1 = (__pyx_v_use_default > 1);
20739   if (__pyx_t_1) {
20740
20741     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":53
20742  *             use_default = 1
20743  *         elif use_default > 1:
20744  *             raise TypeError, u"invalid number of arguments: needs one or two"             # <<<<<<<<<<<<<<
20745  *         return _findObjectPath(root, self._c_path, self._path_len,
20746  *                                default, use_default)
20747  */
20748     __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_46), 0);
20749     {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20750     goto __pyx_L6;
20751   }
20752   __pyx_L6:;
20753
20754   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":54
20755  *         elif use_default > 1:
20756  *             raise TypeError, u"invalid number of arguments: needs one or two"
20757  *         return _findObjectPath(root, self._c_path, self._path_len,             # <<<<<<<<<<<<<<
20758  *                                default, use_default)
20759  * 
20760  */
20761   __Pyx_XDECREF(__pyx_r);
20762
20763   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":55
20764  *             raise TypeError, u"invalid number of arguments: needs one or two"
20765  *         return _findObjectPath(root, self._c_path, self._path_len,
20766  *                                default, use_default)             # <<<<<<<<<<<<<<
20767  * 
20768  *     def hasattr(self, _Element root not None):
20769  */
20770   __pyx_t_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_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20771   __Pyx_GOTREF(__pyx_t_2);
20772   __pyx_r = __pyx_t_2;
20773   __pyx_t_2 = 0;
20774   goto __pyx_L0;
20775
20776   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20777   goto __pyx_L0;
20778   __pyx_L1_error:;
20779   __Pyx_XDECREF(__pyx_t_2);
20780   __Pyx_AddTraceback("lxml.objectify.ObjectPath.__call__");
20781   __pyx_r = NULL;
20782   __pyx_L0:;
20783   __Pyx_DECREF(__pyx_v_default);
20784   __Pyx_DECREF((PyObject *)__pyx_v_self);
20785   __Pyx_DECREF((PyObject *)__pyx_v_root);
20786   __Pyx_XGIVEREF(__pyx_r);
20787   __Pyx_FinishRefcountContext();
20788   return __pyx_r;
20789 }
20790
20791 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":57
20792  *                                default, use_default)
20793  * 
20794  *     def hasattr(self, _Element root not None):             # <<<<<<<<<<<<<<
20795  *         u"hasattr(self, root)"
20796  *         try:
20797  */
20798
20799 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root); /*proto*/
20800 static char __pyx_doc_4lxml_9objectify_10ObjectPath_hasattr[] = "hasattr(self, root)";
20801 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root) {
20802   PyObject *__pyx_r = NULL;
20803   PyObject *__pyx_t_1 = NULL;
20804   int __pyx_t_2;
20805   PyObject *__pyx_t_3 = NULL;
20806   PyObject *__pyx_t_4 = NULL;
20807   PyObject *__pyx_t_5 = NULL;
20808   __Pyx_SetupRefcountContext("hasattr");
20809   __Pyx_INCREF((PyObject *)__pyx_v_self);
20810   __Pyx_INCREF((PyObject *)__pyx_v_root);
20811   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20812
20813   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":59
20814  *     def hasattr(self, _Element root not None):
20815  *         u"hasattr(self, root)"
20816  *         try:             # <<<<<<<<<<<<<<
20817  *             _findObjectPath(root, self._c_path, self._path_len, None, 0)
20818  *         except AttributeError:
20819  */
20820   {
20821     PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
20822     __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
20823     __Pyx_XGOTREF(__pyx_save_exc_type);
20824     __Pyx_XGOTREF(__pyx_save_exc_value);
20825     __Pyx_XGOTREF(__pyx_save_exc_tb);
20826     /*try:*/ {
20827
20828       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":60
20829  *         u"hasattr(self, root)"
20830  *         try:
20831  *             _findObjectPath(root, self._c_path, self._path_len, None, 0)             # <<<<<<<<<<<<<<
20832  *         except AttributeError:
20833  *             return False
20834  */
20835       __pyx_t_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_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
20836       __Pyx_GOTREF(__pyx_t_1);
20837       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20838     }
20839     __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
20840     __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
20841     __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
20842     goto __pyx_L12_try_end;
20843     __pyx_L5_error:;
20844     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
20845
20846     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":61
20847  *         try:
20848  *             _findObjectPath(root, self._c_path, self._path_len, None, 0)
20849  *         except AttributeError:             # <<<<<<<<<<<<<<
20850  *             return False
20851  *         return True
20852  */
20853     __pyx_t_2 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
20854     if (__pyx_t_2) {
20855       __Pyx_AddTraceback("lxml.objectify.hasattr");
20856       if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
20857       __Pyx_GOTREF(__pyx_t_1);
20858       __Pyx_GOTREF(__pyx_t_3);
20859       __Pyx_GOTREF(__pyx_t_4);
20860
20861       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":62
20862  *             _findObjectPath(root, self._c_path, self._path_len, None, 0)
20863  *         except AttributeError:
20864  *             return False             # <<<<<<<<<<<<<<
20865  *         return True
20866  * 
20867  */
20868       __Pyx_XDECREF(__pyx_r);
20869       __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
20870       __Pyx_GOTREF(__pyx_t_5);
20871       __pyx_r = __pyx_t_5;
20872       __pyx_t_5 = 0;
20873       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20874       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20875       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20876       goto __pyx_L8_except_return;
20877       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20878       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20879       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20880       goto __pyx_L6_exception_handled;
20881     }
20882     __pyx_L7_except_error:;
20883     __Pyx_XDECREF(__pyx_save_exc_type);
20884     __Pyx_XDECREF(__pyx_save_exc_value);
20885     __Pyx_XDECREF(__pyx_save_exc_tb);
20886     goto __pyx_L1_error;
20887     __pyx_L8_except_return:;
20888     __Pyx_XGIVEREF(__pyx_save_exc_type);
20889     __Pyx_XGIVEREF(__pyx_save_exc_value);
20890     __Pyx_XGIVEREF(__pyx_save_exc_tb);
20891     __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
20892     goto __pyx_L0;
20893     __pyx_L6_exception_handled:;
20894     __Pyx_XGIVEREF(__pyx_save_exc_type);
20895     __Pyx_XGIVEREF(__pyx_save_exc_value);
20896     __Pyx_XGIVEREF(__pyx_save_exc_tb);
20897     __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
20898     __pyx_L12_try_end:;
20899   }
20900
20901   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":63
20902  *         except AttributeError:
20903  *             return False
20904  *         return True             # <<<<<<<<<<<<<<
20905  * 
20906  *     def setattr(self, _Element root not None, value):
20907  */
20908   __Pyx_XDECREF(__pyx_r);
20909   __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20910   __Pyx_GOTREF(__pyx_t_4);
20911   __pyx_r = __pyx_t_4;
20912   __pyx_t_4 = 0;
20913   goto __pyx_L0;
20914
20915   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20916   goto __pyx_L0;
20917   __pyx_L1_error:;
20918   __Pyx_XDECREF(__pyx_t_1);
20919   __Pyx_XDECREF(__pyx_t_3);
20920   __Pyx_XDECREF(__pyx_t_4);
20921   __Pyx_XDECREF(__pyx_t_5);
20922   __Pyx_AddTraceback("lxml.objectify.ObjectPath.hasattr");
20923   __pyx_r = NULL;
20924   __pyx_L0:;
20925   __Pyx_DECREF((PyObject *)__pyx_v_self);
20926   __Pyx_DECREF((PyObject *)__pyx_v_root);
20927   __Pyx_XGIVEREF(__pyx_r);
20928   __Pyx_FinishRefcountContext();
20929   return __pyx_r;
20930 }
20931
20932 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":65
20933  *         return True
20934  * 
20935  *     def setattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
20936  *         u"""setattr(self, root, value)
20937  * 
20938  */
20939
20940 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20941 static char __pyx_doc_4lxml_9objectify_10ObjectPath_setattr[] = "setattr(self, root, value)\n\n        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        ";
20942 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20943   struct LxmlElement *__pyx_v_root = 0;
20944   PyObject *__pyx_v_value = 0;
20945   PyObject *__pyx_r = NULL;
20946   PyObject *__pyx_t_1 = NULL;
20947   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_root,&__pyx_n_ui_value,0};
20948   __Pyx_SetupRefcountContext("setattr");
20949   if (unlikely(__pyx_kwds)) {
20950     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
20951     PyObject* values[2] = {0,0};
20952     switch (PyTuple_GET_SIZE(__pyx_args)) {
20953       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20954       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20955       case  0: break;
20956       default: goto __pyx_L5_argtuple_error;
20957     }
20958     switch (PyTuple_GET_SIZE(__pyx_args)) {
20959       case  0:
20960       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_root);
20961       if (likely(values[0])) kw_args--;
20962       else goto __pyx_L5_argtuple_error;
20963       case  1:
20964       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_value);
20965       if (likely(values[1])) kw_args--;
20966       else {
20967         __Pyx_RaiseArgtupleInvalid("setattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20968       }
20969     }
20970     if (unlikely(kw_args > 0)) {
20971       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "setattr") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20972     }
20973     __pyx_v_root = ((struct LxmlElement *)values[0]);
20974     __pyx_v_value = values[1];
20975   } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
20976     goto __pyx_L5_argtuple_error;
20977   } else {
20978     __pyx_v_root = ((struct LxmlElement *)PyTuple_GET_ITEM(__pyx_args, 0));
20979     __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
20980   }
20981   goto __pyx_L4_argument_unpacking_done;
20982   __pyx_L5_argtuple_error:;
20983   __Pyx_RaiseArgtupleInvalid("setattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20984   __pyx_L3_error:;
20985   __Pyx_AddTraceback("lxml.objectify.ObjectPath.setattr");
20986   return NULL;
20987   __pyx_L4_argument_unpacking_done:;
20988   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20989
20990   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":72
20991  *         If any of the children on the path does not exist, it is created.
20992  *         """
20993  *         _createObjectPath(root, self._c_path, self._path_len, 1, value)             # <<<<<<<<<<<<<<
20994  * 
20995  *     def addattr(self, _Element root not None, value):
20996  */
20997   __pyx_t_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_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20998   __Pyx_GOTREF(__pyx_t_1);
20999   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21000
21001   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21002   goto __pyx_L0;
21003   __pyx_L1_error:;
21004   __Pyx_XDECREF(__pyx_t_1);
21005   __Pyx_AddTraceback("lxml.objectify.ObjectPath.setattr");
21006   __pyx_r = NULL;
21007   __pyx_L0:;
21008   __Pyx_XGIVEREF(__pyx_r);
21009   __Pyx_FinishRefcountContext();
21010   return __pyx_r;
21011 }
21012
21013 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":74
21014  *         _createObjectPath(root, self._c_path, self._path_len, 1, value)
21015  * 
21016  *     def addattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
21017  *         u"""addattr(self, root, value)
21018  * 
21019  */
21020
21021 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21022 static char __pyx_doc_4lxml_9objectify_10ObjectPath_addattr[] = "addattr(self, root, value)\n\n        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        ";
21023 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21024   struct LxmlElement *__pyx_v_root = 0;
21025   PyObject *__pyx_v_value = 0;
21026   PyObject *__pyx_r = NULL;
21027   PyObject *__pyx_t_1 = NULL;
21028   static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_root,&__pyx_n_ui_value,0};
21029   __Pyx_SetupRefcountContext("addattr");
21030   if (unlikely(__pyx_kwds)) {
21031     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
21032     PyObject* values[2] = {0,0};
21033     switch (PyTuple_GET_SIZE(__pyx_args)) {
21034       case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21035       case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21036       case  0: break;
21037       default: goto __pyx_L5_argtuple_error;
21038     }
21039     switch (PyTuple_GET_SIZE(__pyx_args)) {
21040       case  0:
21041       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_root);
21042       if (likely(values[0])) kw_args--;
21043       else goto __pyx_L5_argtuple_error;
21044       case  1:
21045       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_value);
21046       if (likely(values[1])) kw_args--;
21047       else {
21048         __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21049       }
21050     }
21051     if (unlikely(kw_args > 0)) {
21052       if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "addattr") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21053     }
21054     __pyx_v_root = ((struct LxmlElement *)values[0]);
21055     __pyx_v_value = values[1];
21056   } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
21057     goto __pyx_L5_argtuple_error;
21058   } else {
21059     __pyx_v_root = ((struct LxmlElement *)PyTuple_GET_ITEM(__pyx_args, 0));
21060     __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
21061   }
21062   goto __pyx_L4_argument_unpacking_done;
21063   __pyx_L5_argtuple_error:;
21064   __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21065   __pyx_L3_error:;
21066   __Pyx_AddTraceback("lxml.objectify.ObjectPath.addattr");
21067   return NULL;
21068   __pyx_L4_argument_unpacking_done:;
21069   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21070
21071   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":81
21072  *         If any of the children on the path does not exist, it is created.
21073  *         """
21074  *         _createObjectPath(root, self._c_path, self._path_len, 0, value)             # <<<<<<<<<<<<<<
21075  * 
21076  * cdef object __MATCH_PATH_SEGMENT
21077  */
21078   __pyx_t_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_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21079   __Pyx_GOTREF(__pyx_t_1);
21080   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21081
21082   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21083   goto __pyx_L0;
21084   __pyx_L1_error:;
21085   __Pyx_XDECREF(__pyx_t_1);
21086   __Pyx_AddTraceback("lxml.objectify.ObjectPath.addattr");
21087   __pyx_r = NULL;
21088   __pyx_L0:;
21089   __Pyx_XGIVEREF(__pyx_r);
21090   __Pyx_FinishRefcountContext();
21091   return __pyx_r;
21092 }
21093
21094 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":91
21095  * _RELATIVE_PATH_SEGMENT = (None, None, 0)
21096  * 
21097  * cdef _parseObjectPathString(path):             # <<<<<<<<<<<<<<
21098  *     u"""Parse object path string into a (ns, name, index) list.
21099  *     """
21100  */
21101
21102 static  PyObject *__pyx_f_4lxml_9objectify__parseObjectPathString(PyObject *__pyx_v_path) {
21103   int __pyx_v_has_dot;
21104   PyObject *__pyx_v_new_path = 0;
21105   PyObject *__pyx_v_path_pos;
21106   PyObject *__pyx_v_match;
21107   PyObject *__pyx_v_dot;
21108   PyObject *__pyx_v_ns;
21109   PyObject *__pyx_v_name;
21110   PyObject *__pyx_v_index;
21111   PyObject *__pyx_r = NULL;
21112   PyObject *__pyx_t_1 = NULL;
21113   int __pyx_t_2;
21114   PyObject *__pyx_t_3 = NULL;
21115   PyObject *__pyx_t_4 = NULL;
21116   PyObject *__pyx_t_5 = NULL;
21117   PyObject *__pyx_t_6 = NULL;
21118   PyObject *__pyx_t_7 = NULL;
21119   int __pyx_t_8;
21120   int __pyx_t_9;
21121   int __pyx_t_10;
21122   __Pyx_SetupRefcountContext("_parseObjectPathString");
21123   __Pyx_INCREF(__pyx_v_path);
21124   __pyx_v_path_pos = Py_None; __Pyx_INCREF(Py_None);
21125   __pyx_v_match = Py_None; __Pyx_INCREF(Py_None);
21126   __pyx_v_dot = Py_None; __Pyx_INCREF(Py_None);
21127   __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
21128   __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
21129   __pyx_v_index = Py_None; __Pyx_INCREF(Py_None);
21130
21131   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":95
21132  *     """
21133  *     cdef bint has_dot
21134  *     cdef list new_path = []             # <<<<<<<<<<<<<<
21135  *     if python.PyString_Check(path):
21136  *         path = python.PyUnicode_FromEncodedObject(path, 'ASCII', NULL)
21137  */
21138   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21139   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
21140   __pyx_v_new_path = __pyx_t_1;
21141   __pyx_t_1 = 0;
21142
21143   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":96
21144  *     cdef bint has_dot
21145  *     cdef list new_path = []
21146  *     if python.PyString_Check(path):             # <<<<<<<<<<<<<<
21147  *         path = python.PyUnicode_FromEncodedObject(path, 'ASCII', NULL)
21148  *     path = path.strip()
21149  */
21150   __pyx_t_2 = PyString_Check(__pyx_v_path);
21151   if (__pyx_t_2) {
21152
21153     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":97
21154  *     cdef list new_path = []
21155  *     if python.PyString_Check(path):
21156  *         path = python.PyUnicode_FromEncodedObject(path, 'ASCII', NULL)             # <<<<<<<<<<<<<<
21157  *     path = path.strip()
21158  *     if path == u'.':
21159  */
21160     __pyx_t_1 = PyUnicode_FromEncodedObject(__pyx_v_path, __pyx_k_ASCII, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21161     __Pyx_GOTREF(__pyx_t_1);
21162     __Pyx_DECREF(__pyx_v_path);
21163     __pyx_v_path = __pyx_t_1;
21164     __pyx_t_1 = 0;
21165     goto __pyx_L3;
21166   }
21167   __pyx_L3:;
21168
21169   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":98
21170  *     if python.PyString_Check(path):
21171  *         path = python.PyUnicode_FromEncodedObject(path, 'ASCII', NULL)
21172  *     path = path.strip()             # <<<<<<<<<<<<<<
21173  *     if path == u'.':
21174  *         return [_RELATIVE_PATH_SEGMENT]
21175  */
21176   __pyx_t_1 = PyObject_GetAttr(__pyx_v_path, __pyx_n_ui_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21177   __Pyx_GOTREF(__pyx_t_1);
21178   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21179   __Pyx_GOTREF(__pyx_t_3);
21180   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21181   __Pyx_DECREF(__pyx_v_path);
21182   __pyx_v_path = __pyx_t_3;
21183   __pyx_t_3 = 0;
21184
21185   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":99
21186  *         path = python.PyUnicode_FromEncodedObject(path, 'ASCII', NULL)
21187  *     path = path.strip()
21188  *     if path == u'.':             # <<<<<<<<<<<<<<
21189  *         return [_RELATIVE_PATH_SEGMENT]
21190  *     path_pos = 0
21191  */
21192   __pyx_t_3 = PyObject_RichCompare(__pyx_v_path, ((PyObject *)__pyx_kp_u_9), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21193   __Pyx_GOTREF(__pyx_t_3);
21194   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21195   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21196   if (__pyx_t_2) {
21197
21198     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":100
21199  *     path = path.strip()
21200  *     if path == u'.':
21201  *         return [_RELATIVE_PATH_SEGMENT]             # <<<<<<<<<<<<<<
21202  *     path_pos = 0
21203  *     while python.PyUnicode_GET_SIZE(path) > 0:
21204  */
21205     __Pyx_XDECREF(__pyx_r);
21206     __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21207     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
21208     __Pyx_INCREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
21209     PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
21210     __Pyx_GIVEREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
21211     __pyx_r = ((PyObject *)__pyx_t_3);
21212     __pyx_t_3 = 0;
21213     goto __pyx_L0;
21214     goto __pyx_L4;
21215   }
21216   __pyx_L4:;
21217
21218   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":101
21219  *     if path == u'.':
21220  *         return [_RELATIVE_PATH_SEGMENT]
21221  *     path_pos = 0             # <<<<<<<<<<<<<<
21222  *     while python.PyUnicode_GET_SIZE(path) > 0:
21223  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
21224  */
21225   __Pyx_INCREF(__pyx_int_0);
21226   __Pyx_DECREF(__pyx_v_path_pos);
21227   __pyx_v_path_pos = __pyx_int_0;
21228
21229   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":102
21230  *         return [_RELATIVE_PATH_SEGMENT]
21231  *     path_pos = 0
21232  *     while python.PyUnicode_GET_SIZE(path) > 0:             # <<<<<<<<<<<<<<
21233  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
21234  *         if match is None:
21235  */
21236   while (1) {
21237     __pyx_t_2 = (PyUnicode_GET_SIZE(__pyx_v_path) > 0);
21238     if (!__pyx_t_2) break;
21239
21240     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":103
21241  *     path_pos = 0
21242  *     while python.PyUnicode_GET_SIZE(path) > 0:
21243  *         match = __MATCH_PATH_SEGMENT(path, path_pos)             # <<<<<<<<<<<<<<
21244  *         if match is None:
21245  *             break
21246  */
21247     __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21248     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
21249     __Pyx_INCREF(__pyx_v_path);
21250     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path);
21251     __Pyx_GIVEREF(__pyx_v_path);
21252     __Pyx_INCREF(__pyx_v_path_pos);
21253     PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_path_pos);
21254     __Pyx_GIVEREF(__pyx_v_path_pos);
21255     __pyx_t_1 = PyObject_Call(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21256     __Pyx_GOTREF(__pyx_t_1);
21257     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
21258     __Pyx_DECREF(__pyx_v_match);
21259     __pyx_v_match = __pyx_t_1;
21260     __pyx_t_1 = 0;
21261
21262     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":104
21263  *     while python.PyUnicode_GET_SIZE(path) > 0:
21264  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
21265  *         if match is None:             # <<<<<<<<<<<<<<
21266  *             break
21267  * 
21268  */
21269     __pyx_t_2 = (__pyx_v_match == Py_None);
21270     if (__pyx_t_2) {
21271
21272       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":105
21273  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
21274  *         if match is None:
21275  *             break             # <<<<<<<<<<<<<<
21276  * 
21277  *         dot, ns, name, index = match.groups()
21278  */
21279       goto __pyx_L6_break;
21280       goto __pyx_L7;
21281     }
21282     __pyx_L7:;
21283
21284     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":107
21285  *             break
21286  * 
21287  *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<<
21288  *         if index is None or not index:
21289  *             index = 0
21290  */
21291     __pyx_t_1 = PyObject_GetAttr(__pyx_v_match, __pyx_n_ui_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21292     __Pyx_GOTREF(__pyx_t_1);
21293     __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21294     __Pyx_GOTREF(__pyx_t_3);
21295     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21296     if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 4)) {
21297       PyObject* tuple = __pyx_t_3;
21298       __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
21299       __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
21300       __pyx_t_5 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_5);
21301       __pyx_t_6 = PyTuple_GET_ITEM(tuple, 3); __Pyx_INCREF(__pyx_t_6);
21302       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21303       __Pyx_DECREF(__pyx_v_dot);
21304       __pyx_v_dot = __pyx_t_1;
21305       __pyx_t_1 = 0;
21306       __Pyx_DECREF(__pyx_v_ns);
21307       __pyx_v_ns = __pyx_t_4;
21308       __pyx_t_4 = 0;
21309       __Pyx_DECREF(__pyx_v_name);
21310       __pyx_v_name = __pyx_t_5;
21311       __pyx_t_5 = 0;
21312       __Pyx_DECREF(__pyx_v_index);
21313       __pyx_v_index = __pyx_t_6;
21314       __pyx_t_6 = 0;
21315     } else {
21316       __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21317       __Pyx_GOTREF(__pyx_t_7);
21318       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21319       __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21320       __Pyx_GOTREF(__pyx_t_1);
21321       __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21322       __Pyx_GOTREF(__pyx_t_4);
21323       __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21324       __Pyx_GOTREF(__pyx_t_5);
21325       __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21326       __Pyx_GOTREF(__pyx_t_6);
21327       if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21328       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
21329       __Pyx_DECREF(__pyx_v_dot);
21330       __pyx_v_dot = __pyx_t_1;
21331       __pyx_t_1 = 0;
21332       __Pyx_DECREF(__pyx_v_ns);
21333       __pyx_v_ns = __pyx_t_4;
21334       __pyx_t_4 = 0;
21335       __Pyx_DECREF(__pyx_v_name);
21336       __pyx_v_name = __pyx_t_5;
21337       __pyx_t_5 = 0;
21338       __Pyx_DECREF(__pyx_v_index);
21339       __pyx_v_index = __pyx_t_6;
21340       __pyx_t_6 = 0;
21341     }
21342
21343     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":108
21344  * 
21345  *         dot, ns, name, index = match.groups()
21346  *         if index is None or not index:             # <<<<<<<<<<<<<<
21347  *             index = 0
21348  *         else:
21349  */
21350     __pyx_t_2 = (__pyx_v_index == Py_None);
21351     if (!__pyx_t_2) {
21352       __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21353       __pyx_t_9 = (!__pyx_t_8);
21354     } else {
21355       __pyx_t_9 = __pyx_t_2;
21356     }
21357     if (__pyx_t_9) {
21358
21359       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":109
21360  *         dot, ns, name, index = match.groups()
21361  *         if index is None or not index:
21362  *             index = 0             # <<<<<<<<<<<<<<
21363  *         else:
21364  *             index = int(index)
21365  */
21366       __Pyx_INCREF(__pyx_int_0);
21367       __Pyx_DECREF(__pyx_v_index);
21368       __pyx_v_index = __pyx_int_0;
21369       goto __pyx_L8;
21370     }
21371     /*else*/ {
21372
21373       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":111
21374  *             index = 0
21375  *         else:
21376  *             index = int(index)             # <<<<<<<<<<<<<<
21377  *         has_dot = dot == u'.'
21378  *         if python.PyList_GET_SIZE(new_path) == 0:
21379  */
21380       __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21381       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
21382       __Pyx_INCREF(__pyx_v_index);
21383       PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
21384       __Pyx_GIVEREF(__pyx_v_index);
21385       __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21386       __Pyx_GOTREF(__pyx_t_6);
21387       __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
21388       __Pyx_DECREF(__pyx_v_index);
21389       __pyx_v_index = __pyx_t_6;
21390       __pyx_t_6 = 0;
21391     }
21392     __pyx_L8:;
21393
21394     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":112
21395  *         else:
21396  *             index = int(index)
21397  *         has_dot = dot == u'.'             # <<<<<<<<<<<<<<
21398  *         if python.PyList_GET_SIZE(new_path) == 0:
21399  *             if has_dot:
21400  */
21401     __pyx_t_6 = PyObject_RichCompare(__pyx_v_dot, ((PyObject *)__pyx_kp_u_9), Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21402     __Pyx_GOTREF(__pyx_t_6);
21403     __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 == (int)-1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21404     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21405     __pyx_v_has_dot = __pyx_t_9;
21406
21407     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":113
21408  *             index = int(index)
21409  *         has_dot = dot == u'.'
21410  *         if python.PyList_GET_SIZE(new_path) == 0:             # <<<<<<<<<<<<<<
21411  *             if has_dot:
21412  *                 # path '.child' => ignore root
21413  */
21414     __pyx_t_9 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
21415     if (__pyx_t_9) {
21416
21417       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":114
21418  *         has_dot = dot == u'.'
21419  *         if python.PyList_GET_SIZE(new_path) == 0:
21420  *             if has_dot:             # <<<<<<<<<<<<<<
21421  *                 # path '.child' => ignore root
21422  *                 new_path.append(_RELATIVE_PATH_SEGMENT)
21423  */
21424       __pyx_t_9 = __pyx_v_has_dot;
21425       if (__pyx_t_9) {
21426
21427         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":116
21428  *             if has_dot:
21429  *                 # path '.child' => ignore root
21430  *                 new_path.append(_RELATIVE_PATH_SEGMENT)             # <<<<<<<<<<<<<<
21431  *             elif index != 0:
21432  *                 raise ValueError, u"index not allowed on root node"
21433  */
21434         if (unlikely(__pyx_v_new_path == Py_None)) {
21435           PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
21436         }
21437         __pyx_t_10 = PyList_Append(((PyObject *)__pyx_v_new_path), __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21438         goto __pyx_L10;
21439       }
21440
21441       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":117
21442  *                 # path '.child' => ignore root
21443  *                 new_path.append(_RELATIVE_PATH_SEGMENT)
21444  *             elif index != 0:             # <<<<<<<<<<<<<<
21445  *                 raise ValueError, u"index not allowed on root node"
21446  *         elif not has_dot:
21447  */
21448       __pyx_t_6 = PyObject_RichCompare(__pyx_v_index, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21449       __Pyx_GOTREF(__pyx_t_6);
21450       __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21451       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21452       if (__pyx_t_9) {
21453
21454         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":118
21455  *                 new_path.append(_RELATIVE_PATH_SEGMENT)
21456  *             elif index != 0:
21457  *                 raise ValueError, u"index not allowed on root node"             # <<<<<<<<<<<<<<
21458  *         elif not has_dot:
21459  *             raise ValueError, u"invalid path"
21460  */
21461         __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_47), 0);
21462         {__pyx_filename = __pyx_f[1]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21463         goto __pyx_L10;
21464       }
21465       __pyx_L10:;
21466       goto __pyx_L9;
21467     }
21468
21469     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":119
21470  *             elif index != 0:
21471  *                 raise ValueError, u"index not allowed on root node"
21472  *         elif not has_dot:             # <<<<<<<<<<<<<<
21473  *             raise ValueError, u"invalid path"
21474  *         if ns is not None:
21475  */
21476     __pyx_t_9 = (!__pyx_v_has_dot);
21477     if (__pyx_t_9) {
21478
21479       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":120
21480  *                 raise ValueError, u"index not allowed on root node"
21481  *         elif not has_dot:
21482  *             raise ValueError, u"invalid path"             # <<<<<<<<<<<<<<
21483  *         if ns is not None:
21484  *             ns = python.PyUnicode_AsUTF8String(ns)
21485  */
21486       __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_48), 0);
21487       {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21488       goto __pyx_L9;
21489     }
21490     __pyx_L9:;
21491
21492     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":121
21493  *         elif not has_dot:
21494  *             raise ValueError, u"invalid path"
21495  *         if ns is not None:             # <<<<<<<<<<<<<<
21496  *             ns = python.PyUnicode_AsUTF8String(ns)
21497  *         name = python.PyUnicode_AsUTF8String(name)
21498  */
21499     __pyx_t_9 = (__pyx_v_ns != Py_None);
21500     if (__pyx_t_9) {
21501
21502       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":122
21503  *             raise ValueError, u"invalid path"
21504  *         if ns is not None:
21505  *             ns = python.PyUnicode_AsUTF8String(ns)             # <<<<<<<<<<<<<<
21506  *         name = python.PyUnicode_AsUTF8String(name)
21507  *         new_path.append( (ns, name, index) )
21508  */
21509       __pyx_t_6 = PyUnicode_AsUTF8String(__pyx_v_ns); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21510       __Pyx_GOTREF(__pyx_t_6);
21511       __Pyx_DECREF(__pyx_v_ns);
21512       __pyx_v_ns = __pyx_t_6;
21513       __pyx_t_6 = 0;
21514       goto __pyx_L11;
21515     }
21516     __pyx_L11:;
21517
21518     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":123
21519  *         if ns is not None:
21520  *             ns = python.PyUnicode_AsUTF8String(ns)
21521  *         name = python.PyUnicode_AsUTF8String(name)             # <<<<<<<<<<<<<<
21522  *         new_path.append( (ns, name, index) )
21523  * 
21524  */
21525     __pyx_t_6 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21526     __Pyx_GOTREF(__pyx_t_6);
21527     __Pyx_DECREF(__pyx_v_name);
21528     __pyx_v_name = __pyx_t_6;
21529     __pyx_t_6 = 0;
21530
21531     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":124
21532  *             ns = python.PyUnicode_AsUTF8String(ns)
21533  *         name = python.PyUnicode_AsUTF8String(name)
21534  *         new_path.append( (ns, name, index) )             # <<<<<<<<<<<<<<
21535  * 
21536  *         path_pos = match.end()
21537  */
21538     if (unlikely(__pyx_v_new_path == Py_None)) {
21539       PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
21540     }
21541     __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21542     __Pyx_GOTREF(((PyObject *)__pyx_t_6));
21543     __Pyx_INCREF(__pyx_v_ns);
21544     PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_ns);
21545     __Pyx_GIVEREF(__pyx_v_ns);
21546     __Pyx_INCREF(__pyx_v_name);
21547     PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_name);
21548     __Pyx_GIVEREF(__pyx_v_name);
21549     __Pyx_INCREF(__pyx_v_index);
21550     PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_index);
21551     __Pyx_GIVEREF(__pyx_v_index);
21552     __pyx_t_10 = PyList_Append(((PyObject *)__pyx_v_new_path), ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21553     __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
21554
21555     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":126
21556  *         new_path.append( (ns, name, index) )
21557  * 
21558  *         path_pos = match.end()             # <<<<<<<<<<<<<<
21559  *     if python.PyList_GET_SIZE(new_path) == 0 or \
21560  *            python.PyUnicode_GET_SIZE(path) > path_pos:
21561  */
21562     __pyx_t_6 = PyObject_GetAttr(__pyx_v_match, __pyx_n_ui_end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21563     __Pyx_GOTREF(__pyx_t_6);
21564     __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21565     __Pyx_GOTREF(__pyx_t_3);
21566     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21567     __Pyx_DECREF(__pyx_v_path_pos);
21568     __pyx_v_path_pos = __pyx_t_3;
21569     __pyx_t_3 = 0;
21570   }
21571   __pyx_L6_break:;
21572
21573   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":127
21574  * 
21575  *         path_pos = match.end()
21576  *     if python.PyList_GET_SIZE(new_path) == 0 or \             # <<<<<<<<<<<<<<
21577  *            python.PyUnicode_GET_SIZE(path) > path_pos:
21578  *         raise ValueError, u"invalid path"
21579  */
21580   __pyx_t_9 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
21581   if (!__pyx_t_9) {
21582
21583     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":128
21584  *         path_pos = match.end()
21585  *     if python.PyList_GET_SIZE(new_path) == 0 or \
21586  *            python.PyUnicode_GET_SIZE(path) > path_pos:             # <<<<<<<<<<<<<<
21587  *         raise ValueError, u"invalid path"
21588  *     return new_path
21589  */
21590     __pyx_t_3 = PyInt_FromSsize_t(PyUnicode_GET_SIZE(__pyx_v_path)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21591     __Pyx_GOTREF(__pyx_t_3);
21592     __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_v_path_pos, Py_GT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21593     __Pyx_GOTREF(__pyx_t_6);
21594     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21595     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21596     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21597     __pyx_t_8 = __pyx_t_2;
21598   } else {
21599     __pyx_t_8 = __pyx_t_9;
21600   }
21601   if (__pyx_t_8) {
21602
21603     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":129
21604  *     if python.PyList_GET_SIZE(new_path) == 0 or \
21605  *            python.PyUnicode_GET_SIZE(path) > path_pos:
21606  *         raise ValueError, u"invalid path"             # <<<<<<<<<<<<<<
21607  *     return new_path
21608  * 
21609  */
21610     __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_48), 0);
21611     {__pyx_filename = __pyx_f[1]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21612     goto __pyx_L12;
21613   }
21614   __pyx_L12:;
21615
21616   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":130
21617  *            python.PyUnicode_GET_SIZE(path) > path_pos:
21618  *         raise ValueError, u"invalid path"
21619  *     return new_path             # <<<<<<<<<<<<<<
21620  * 
21621  * cdef _parseObjectPathList(path):
21622  */
21623   __Pyx_XDECREF(__pyx_r);
21624   __Pyx_INCREF(((PyObject *)__pyx_v_new_path));
21625   __pyx_r = ((PyObject *)__pyx_v_new_path);
21626   goto __pyx_L0;
21627
21628   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21629   goto __pyx_L0;
21630   __pyx_L1_error:;
21631   __Pyx_XDECREF(__pyx_t_1);
21632   __Pyx_XDECREF(__pyx_t_3);
21633   __Pyx_XDECREF(__pyx_t_4);
21634   __Pyx_XDECREF(__pyx_t_5);
21635   __Pyx_XDECREF(__pyx_t_6);
21636   __Pyx_XDECREF(__pyx_t_7);
21637   __Pyx_AddTraceback("lxml.objectify._parseObjectPathString");
21638   __pyx_r = 0;
21639   __pyx_L0:;
21640   __Pyx_XDECREF(__pyx_v_new_path);
21641   __Pyx_DECREF(__pyx_v_path_pos);
21642   __Pyx_DECREF(__pyx_v_match);
21643   __Pyx_DECREF(__pyx_v_dot);
21644   __Pyx_DECREF(__pyx_v_ns);
21645   __Pyx_DECREF(__pyx_v_name);
21646   __Pyx_DECREF(__pyx_v_index);
21647   __Pyx_DECREF(__pyx_v_path);
21648   __Pyx_XGIVEREF(__pyx_r);
21649   __Pyx_FinishRefcountContext();
21650   return __pyx_r;
21651 }
21652
21653 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":132
21654  *     return new_path
21655  * 
21656  * cdef _parseObjectPathList(path):             # <<<<<<<<<<<<<<
21657  *     u"""Parse object path sequence into a (ns, name, index) list.
21658  *     """
21659  */
21660
21661 static  PyObject *__pyx_f_4lxml_9objectify__parseObjectPathList(PyObject *__pyx_v_path) {
21662   char *__pyx_v_index_pos;
21663   char *__pyx_v_index_end;
21664   char *__pyx_v_c_name;
21665   PyObject *__pyx_v_new_path = 0;
21666   PyObject *__pyx_v_item;
21667   PyObject *__pyx_v_ns;
21668   PyObject *__pyx_v_name;
21669   PyObject *__pyx_v_index;
21670   PyObject *__pyx_r = NULL;
21671   PyObject *__pyx_t_1 = NULL;
21672   Py_ssize_t __pyx_t_2;
21673   PyObject *__pyx_t_3 = NULL;
21674   PyObject *__pyx_t_4 = NULL;
21675   int __pyx_t_5;
21676   int __pyx_t_6;
21677   int __pyx_t_7;
21678   PyObject *__pyx_t_8 = NULL;
21679   PyObject *__pyx_t_9 = NULL;
21680   int __pyx_t_10;
21681   __Pyx_SetupRefcountContext("_parseObjectPathList");
21682   __Pyx_INCREF(__pyx_v_path);
21683   __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);
21684   __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
21685   __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
21686   __pyx_v_index = Py_None; __Pyx_INCREF(Py_None);
21687
21688   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":138
21689  *     cdef char* index_end
21690  *     cdef char* c_name
21691  *     cdef list new_path = []             # <<<<<<<<<<<<<<
21692  *     for item in path:
21693  *         item = item.strip()
21694  */
21695   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21696   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
21697   __pyx_v_new_path = __pyx_t_1;
21698   __pyx_t_1 = 0;
21699
21700   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":139
21701  *     cdef char* c_name
21702  *     cdef list new_path = []
21703  *     for item in path:             # <<<<<<<<<<<<<<
21704  *         item = item.strip()
21705  *         if python.PyList_GET_SIZE(new_path) == 0 and item == u'':
21706  */
21707   if (PyList_CheckExact(__pyx_v_path) || PyTuple_CheckExact(__pyx_v_path)) {
21708     __pyx_t_2 = 0; __pyx_t_1 = __pyx_v_path; __Pyx_INCREF(__pyx_t_1);
21709   } else {
21710     __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21711     __Pyx_GOTREF(__pyx_t_1);
21712   }
21713   for (;;) {
21714     if (likely(PyList_CheckExact(__pyx_t_1))) {
21715       if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
21716       __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
21717     } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
21718       if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
21719       __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
21720     } else {
21721       __pyx_t_3 = PyIter_Next(__pyx_t_1);
21722       if (!__pyx_t_3) {
21723         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21724         break;
21725       }
21726       __Pyx_GOTREF(__pyx_t_3);
21727     }
21728     __Pyx_DECREF(__pyx_v_item);
21729     __pyx_v_item = __pyx_t_3;
21730     __pyx_t_3 = 0;
21731
21732     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":140
21733  *     cdef list new_path = []
21734  *     for item in path:
21735  *         item = item.strip()             # <<<<<<<<<<<<<<
21736  *         if python.PyList_GET_SIZE(new_path) == 0 and item == u'':
21737  *             # path '.child' => ignore root
21738  */
21739     __pyx_t_3 = PyObject_GetAttr(__pyx_v_item, __pyx_n_ui_strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21740     __Pyx_GOTREF(__pyx_t_3);
21741     __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21742     __Pyx_GOTREF(__pyx_t_4);
21743     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21744     __Pyx_DECREF(__pyx_v_item);
21745     __pyx_v_item = __pyx_t_4;
21746     __pyx_t_4 = 0;
21747
21748     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":141
21749  *     for item in path:
21750  *         item = item.strip()
21751  *         if python.PyList_GET_SIZE(new_path) == 0 and item == u'':             # <<<<<<<<<<<<<<
21752  *             # path '.child' => ignore root
21753  *             ns = name = None
21754  */
21755     __pyx_t_5 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
21756     if (__pyx_t_5) {
21757       __pyx_t_4 = PyObject_RichCompare(__pyx_v_item, ((PyObject *)__pyx_kp_u_4), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21758       __Pyx_GOTREF(__pyx_t_4);
21759       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21760       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21761       __pyx_t_7 = __pyx_t_6;
21762     } else {
21763       __pyx_t_7 = __pyx_t_5;
21764     }
21765     if (__pyx_t_7) {
21766
21767       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":143
21768  *         if python.PyList_GET_SIZE(new_path) == 0 and item == u'':
21769  *             # path '.child' => ignore root
21770  *             ns = name = None             # <<<<<<<<<<<<<<
21771  *             index = 0
21772  *         else:
21773  */
21774       __Pyx_INCREF(Py_None);
21775       __Pyx_DECREF(__pyx_v_ns);
21776       __pyx_v_ns = Py_None;
21777       __Pyx_INCREF(Py_None);
21778       __Pyx_DECREF(__pyx_v_name);
21779       __pyx_v_name = Py_None;
21780
21781       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":144
21782  *             # path '.child' => ignore root
21783  *             ns = name = None
21784  *             index = 0             # <<<<<<<<<<<<<<
21785  *         else:
21786  *             ns, name = cetree.getNsTag(item)
21787  */
21788       __Pyx_INCREF(__pyx_int_0);
21789       __Pyx_DECREF(__pyx_v_index);
21790       __pyx_v_index = __pyx_int_0;
21791       goto __pyx_L5;
21792     }
21793     /*else*/ {
21794
21795       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":146
21796  *             index = 0
21797  *         else:
21798  *             ns, name = cetree.getNsTag(item)             # <<<<<<<<<<<<<<
21799  *             c_name = _cstr(name)
21800  *             index_pos = cstd.strchr(c_name, c'[')
21801  */
21802       __pyx_t_4 = getNsTag(__pyx_v_item); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21803       __Pyx_GOTREF(__pyx_t_4);
21804       if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
21805         PyObject* tuple = __pyx_t_4;
21806         __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
21807         __pyx_t_8 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_8);
21808         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21809         __Pyx_DECREF(__pyx_v_ns);
21810         __pyx_v_ns = __pyx_t_3;
21811         __pyx_t_3 = 0;
21812         __Pyx_DECREF(__pyx_v_name);
21813         __pyx_v_name = __pyx_t_8;
21814         __pyx_t_8 = 0;
21815       } else {
21816         __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21817         __Pyx_GOTREF(__pyx_t_9);
21818         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21819         __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_9, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21820         __Pyx_GOTREF(__pyx_t_3);
21821         __pyx_t_8 = __Pyx_UnpackItem(__pyx_t_9, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21822         __Pyx_GOTREF(__pyx_t_8);
21823         if (__Pyx_EndUnpack(__pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21824         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21825         __Pyx_DECREF(__pyx_v_ns);
21826         __pyx_v_ns = __pyx_t_3;
21827         __pyx_t_3 = 0;
21828         __Pyx_DECREF(__pyx_v_name);
21829         __pyx_v_name = __pyx_t_8;
21830         __pyx_t_8 = 0;
21831       }
21832
21833       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":147
21834  *         else:
21835  *             ns, name = cetree.getNsTag(item)
21836  *             c_name = _cstr(name)             # <<<<<<<<<<<<<<
21837  *             index_pos = cstd.strchr(c_name, c'[')
21838  *             if index_pos is NULL:
21839  */
21840       __pyx_v_c_name = PyString_AS_STRING(__pyx_v_name);
21841
21842       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":148
21843  *             ns, name = cetree.getNsTag(item)
21844  *             c_name = _cstr(name)
21845  *             index_pos = cstd.strchr(c_name, c'[')             # <<<<<<<<<<<<<<
21846  *             if index_pos is NULL:
21847  *                 index = 0
21848  */
21849       __pyx_v_index_pos = strchr(__pyx_v_c_name, '[');
21850
21851       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":149
21852  *             c_name = _cstr(name)
21853  *             index_pos = cstd.strchr(c_name, c'[')
21854  *             if index_pos is NULL:             # <<<<<<<<<<<<<<
21855  *                 index = 0
21856  *             else:
21857  */
21858       __pyx_t_7 = (__pyx_v_index_pos == NULL);
21859       if (__pyx_t_7) {
21860
21861         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":150
21862  *             index_pos = cstd.strchr(c_name, c'[')
21863  *             if index_pos is NULL:
21864  *                 index = 0             # <<<<<<<<<<<<<<
21865  *             else:
21866  *                 index_end = cstd.strchr(index_pos + 1, c']')
21867  */
21868         __Pyx_INCREF(__pyx_int_0);
21869         __Pyx_DECREF(__pyx_v_index);
21870         __pyx_v_index = __pyx_int_0;
21871         goto __pyx_L6;
21872       }
21873       /*else*/ {
21874
21875         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":152
21876  *                 index = 0
21877  *             else:
21878  *                 index_end = cstd.strchr(index_pos + 1, c']')             # <<<<<<<<<<<<<<
21879  *                 if index_end is NULL:
21880  *                     raise ValueError, u"index must be enclosed in []"
21881  */
21882         __pyx_v_index_end = strchr((__pyx_v_index_pos + 1), ']');
21883
21884         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":153
21885  *             else:
21886  *                 index_end = cstd.strchr(index_pos + 1, c']')
21887  *                 if index_end is NULL:             # <<<<<<<<<<<<<<
21888  *                     raise ValueError, u"index must be enclosed in []"
21889  *                 index = int(
21890  */
21891         __pyx_t_7 = (__pyx_v_index_end == NULL);
21892         if (__pyx_t_7) {
21893
21894           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":154
21895  *                 index_end = cstd.strchr(index_pos + 1, c']')
21896  *                 if index_end is NULL:
21897  *                     raise ValueError, u"index must be enclosed in []"             # <<<<<<<<<<<<<<
21898  *                 index = int(
21899  *                     python.PyString_FromStringAndSize(
21900  */
21901           __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_49), 0);
21902           {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21903           goto __pyx_L7;
21904         }
21905         __pyx_L7:;
21906
21907         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":157
21908  *                 index = int(
21909  *                     python.PyString_FromStringAndSize(
21910  *                         index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1)))             # <<<<<<<<<<<<<<
21911  *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
21912  *                     raise ValueError, u"index not allowed on root node"
21913  */
21914         __pyx_t_4 = PyString_FromStringAndSize((__pyx_v_index_pos + 1), ((Py_ssize_t)((__pyx_v_index_end - __pyx_v_index_pos) - 1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21915         __Pyx_GOTREF(__pyx_t_4);
21916         __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21917         __Pyx_GOTREF(((PyObject *)__pyx_t_8));
21918         PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
21919         __Pyx_GIVEREF(__pyx_t_4);
21920         __pyx_t_4 = 0;
21921         __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21922         __Pyx_GOTREF(__pyx_t_4);
21923         __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
21924         __Pyx_DECREF(__pyx_v_index);
21925         __pyx_v_index = __pyx_t_4;
21926         __pyx_t_4 = 0;
21927
21928         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":158
21929  *                     python.PyString_FromStringAndSize(
21930  *                         index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1)))
21931  *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:             # <<<<<<<<<<<<<<
21932  *                     raise ValueError, u"index not allowed on root node"
21933  *                 name = python.PyString_FromStringAndSize(
21934  */
21935         __pyx_t_7 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
21936         if (__pyx_t_7) {
21937           __pyx_t_4 = PyObject_RichCompare(__pyx_v_index, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21938           __Pyx_GOTREF(__pyx_t_4);
21939           __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21940           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21941           __pyx_t_6 = __pyx_t_5;
21942         } else {
21943           __pyx_t_6 = __pyx_t_7;
21944         }
21945         if (__pyx_t_6) {
21946
21947           /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":159
21948  *                         index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1)))
21949  *                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
21950  *                     raise ValueError, u"index not allowed on root node"             # <<<<<<<<<<<<<<
21951  *                 name = python.PyString_FromStringAndSize(
21952  *                     c_name, <Py_ssize_t>(index_pos - c_name))
21953  */
21954           __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_47), 0);
21955           {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21956           goto __pyx_L8;
21957         }
21958         __pyx_L8:;
21959
21960         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":161
21961  *                     raise ValueError, u"index not allowed on root node"
21962  *                 name = python.PyString_FromStringAndSize(
21963  *                     c_name, <Py_ssize_t>(index_pos - c_name))             # <<<<<<<<<<<<<<
21964  *         new_path.append( (ns, name, index) )
21965  *     if python.PyList_GET_SIZE(new_path) == 0:
21966  */
21967         __pyx_t_4 = PyString_FromStringAndSize(__pyx_v_c_name, ((Py_ssize_t)(__pyx_v_index_pos - __pyx_v_c_name))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21968         __Pyx_GOTREF(__pyx_t_4);
21969         __Pyx_DECREF(__pyx_v_name);
21970         __pyx_v_name = __pyx_t_4;
21971         __pyx_t_4 = 0;
21972       }
21973       __pyx_L6:;
21974     }
21975     __pyx_L5:;
21976
21977     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":162
21978  *                 name = python.PyString_FromStringAndSize(
21979  *                     c_name, <Py_ssize_t>(index_pos - c_name))
21980  *         new_path.append( (ns, name, index) )             # <<<<<<<<<<<<<<
21981  *     if python.PyList_GET_SIZE(new_path) == 0:
21982  *         raise ValueError, u"invalid path"
21983  */
21984     if (unlikely(__pyx_v_new_path == Py_None)) {
21985       PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
21986     }
21987     __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21988     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
21989     __Pyx_INCREF(__pyx_v_ns);
21990     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ns);
21991     __Pyx_GIVEREF(__pyx_v_ns);
21992     __Pyx_INCREF(__pyx_v_name);
21993     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_name);
21994     __Pyx_GIVEREF(__pyx_v_name);
21995     __Pyx_INCREF(__pyx_v_index);
21996     PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_index);
21997     __Pyx_GIVEREF(__pyx_v_index);
21998     __pyx_t_10 = PyList_Append(((PyObject *)__pyx_v_new_path), ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21999     __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
22000   }
22001   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22002
22003   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":163
22004  *                     c_name, <Py_ssize_t>(index_pos - c_name))
22005  *         new_path.append( (ns, name, index) )
22006  *     if python.PyList_GET_SIZE(new_path) == 0:             # <<<<<<<<<<<<<<
22007  *         raise ValueError, u"invalid path"
22008  *     return new_path
22009  */
22010   __pyx_t_6 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
22011   if (__pyx_t_6) {
22012
22013     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":164
22014  *         new_path.append( (ns, name, index) )
22015  *     if python.PyList_GET_SIZE(new_path) == 0:
22016  *         raise ValueError, u"invalid path"             # <<<<<<<<<<<<<<
22017  *     return new_path
22018  * 
22019  */
22020     __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_48), 0);
22021     {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22022     goto __pyx_L9;
22023   }
22024   __pyx_L9:;
22025
22026   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":165
22027  *     if python.PyList_GET_SIZE(new_path) == 0:
22028  *         raise ValueError, u"invalid path"
22029  *     return new_path             # <<<<<<<<<<<<<<
22030  * 
22031  * cdef _ObjectPath* _buildObjectPathSegments(path_list) except NULL:
22032  */
22033   __Pyx_XDECREF(__pyx_r);
22034   __Pyx_INCREF(((PyObject *)__pyx_v_new_path));
22035   __pyx_r = ((PyObject *)__pyx_v_new_path);
22036   goto __pyx_L0;
22037
22038   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22039   goto __pyx_L0;
22040   __pyx_L1_error:;
22041   __Pyx_XDECREF(__pyx_t_1);
22042   __Pyx_XDECREF(__pyx_t_3);
22043   __Pyx_XDECREF(__pyx_t_4);
22044   __Pyx_XDECREF(__pyx_t_8);
22045   __Pyx_XDECREF(__pyx_t_9);
22046   __Pyx_AddTraceback("lxml.objectify._parseObjectPathList");
22047   __pyx_r = 0;
22048   __pyx_L0:;
22049   __Pyx_XDECREF(__pyx_v_new_path);
22050   __Pyx_DECREF(__pyx_v_item);
22051   __Pyx_DECREF(__pyx_v_ns);
22052   __Pyx_DECREF(__pyx_v_name);
22053   __Pyx_DECREF(__pyx_v_index);
22054   __Pyx_DECREF(__pyx_v_path);
22055   __Pyx_XGIVEREF(__pyx_r);
22056   __Pyx_FinishRefcountContext();
22057   return __pyx_r;
22058 }
22059
22060 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":167
22061  *     return new_path
22062  * 
22063  * cdef _ObjectPath* _buildObjectPathSegments(path_list) except NULL:             # <<<<<<<<<<<<<<
22064  *     cdef _ObjectPath* c_path
22065  *     cdef _ObjectPath* c_path_segments
22066  */
22067
22068 static  __pyx_t_4lxml_9objectify__ObjectPath *__pyx_f_4lxml_9objectify__buildObjectPathSegments(PyObject *__pyx_v_path_list) {
22069   __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path;
22070   __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path_segments;
22071   PyObject *__pyx_v_href;
22072   PyObject *__pyx_v_name;
22073   PyObject *__pyx_v_index;
22074   __pyx_t_4lxml_9objectify__ObjectPath *__pyx_r;
22075   int __pyx_t_1;
22076   PyObject *__pyx_t_2 = NULL;
22077   Py_ssize_t __pyx_t_3;
22078   PyObject *__pyx_t_4 = NULL;
22079   PyObject *__pyx_t_5 = NULL;
22080   PyObject *__pyx_t_6 = NULL;
22081   PyObject *__pyx_t_7 = NULL;
22082   PyObject *__pyx_t_8 = NULL;
22083   Py_ssize_t __pyx_t_9;
22084   __Pyx_SetupRefcountContext("_buildObjectPathSegments");
22085   __Pyx_INCREF(__pyx_v_path_list);
22086   __pyx_v_href = Py_None; __Pyx_INCREF(Py_None);
22087   __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
22088   __pyx_v_index = Py_None; __Pyx_INCREF(Py_None);
22089
22090   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":171
22091  *     cdef _ObjectPath* c_path_segments
22092  *     c_path_segments = <_ObjectPath*>python.PyMem_Malloc(
22093  *         sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))             # <<<<<<<<<<<<<<
22094  *     if c_path_segments is NULL:
22095  *         python.PyErr_NoMemory()
22096  */
22097   __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))));
22098
22099   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":172
22100  *     c_path_segments = <_ObjectPath*>python.PyMem_Malloc(
22101  *         sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))
22102  *     if c_path_segments is NULL:             # <<<<<<<<<<<<<<
22103  *         python.PyErr_NoMemory()
22104  *     c_path = c_path_segments
22105  */
22106   __pyx_t_1 = (__pyx_v_c_path_segments == NULL);
22107   if (__pyx_t_1) {
22108
22109     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":173
22110  *         sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))
22111  *     if c_path_segments is NULL:
22112  *         python.PyErr_NoMemory()             # <<<<<<<<<<<<<<
22113  *     c_path = c_path_segments
22114  *     for href, name, index in path_list:
22115  */
22116     __pyx_t_2 = PyErr_NoMemory(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22117     __Pyx_GOTREF(__pyx_t_2);
22118     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22119     goto __pyx_L3;
22120   }
22121   __pyx_L3:;
22122
22123   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":174
22124  *     if c_path_segments is NULL:
22125  *         python.PyErr_NoMemory()
22126  *     c_path = c_path_segments             # <<<<<<<<<<<<<<
22127  *     for href, name, index in path_list:
22128  *         if href is None:
22129  */
22130   __pyx_v_c_path = __pyx_v_c_path_segments;
22131
22132   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":175
22133  *         python.PyErr_NoMemory()
22134  *     c_path = c_path_segments
22135  *     for href, name, index in path_list:             # <<<<<<<<<<<<<<
22136  *         if href is None:
22137  *             c_path[0].href = NULL
22138  */
22139   if (PyList_CheckExact(__pyx_v_path_list) || PyTuple_CheckExact(__pyx_v_path_list)) {
22140     __pyx_t_3 = 0; __pyx_t_2 = __pyx_v_path_list; __Pyx_INCREF(__pyx_t_2);
22141   } else {
22142     __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_path_list); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22143     __Pyx_GOTREF(__pyx_t_2);
22144   }
22145   for (;;) {
22146     if (likely(PyList_CheckExact(__pyx_t_2))) {
22147       if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
22148       __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
22149     } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
22150       if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
22151       __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
22152     } else {
22153       __pyx_t_4 = PyIter_Next(__pyx_t_2);
22154       if (!__pyx_t_4) {
22155         if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22156         break;
22157       }
22158       __Pyx_GOTREF(__pyx_t_4);
22159     }
22160     if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 3)) {
22161       PyObject* tuple = __pyx_t_4;
22162       __pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
22163       __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
22164       __pyx_t_7 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_7);
22165       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22166       __Pyx_DECREF(__pyx_v_href);
22167       __pyx_v_href = __pyx_t_5;
22168       __pyx_t_5 = 0;
22169       __Pyx_DECREF(__pyx_v_name);
22170       __pyx_v_name = __pyx_t_6;
22171       __pyx_t_6 = 0;
22172       __Pyx_DECREF(__pyx_v_index);
22173       __pyx_v_index = __pyx_t_7;
22174       __pyx_t_7 = 0;
22175     } else {
22176       __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22177       __Pyx_GOTREF(__pyx_t_8);
22178       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22179       __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_8, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22180       __Pyx_GOTREF(__pyx_t_5);
22181       __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_8, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22182       __Pyx_GOTREF(__pyx_t_6);
22183       __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_8, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22184       __Pyx_GOTREF(__pyx_t_7);
22185       if (__Pyx_EndUnpack(__pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22186       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
22187       __Pyx_DECREF(__pyx_v_href);
22188       __pyx_v_href = __pyx_t_5;
22189       __pyx_t_5 = 0;
22190       __Pyx_DECREF(__pyx_v_name);
22191       __pyx_v_name = __pyx_t_6;
22192       __pyx_t_6 = 0;
22193       __Pyx_DECREF(__pyx_v_index);
22194       __pyx_v_index = __pyx_t_7;
22195       __pyx_t_7 = 0;
22196     }
22197
22198     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":176
22199  *     c_path = c_path_segments
22200  *     for href, name, index in path_list:
22201  *         if href is None:             # <<<<<<<<<<<<<<
22202  *             c_path[0].href = NULL
22203  *         else:
22204  */
22205     __pyx_t_1 = (__pyx_v_href == Py_None);
22206     if (__pyx_t_1) {
22207
22208       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":177
22209  *     for href, name, index in path_list:
22210  *         if href is None:
22211  *             c_path[0].href = NULL             # <<<<<<<<<<<<<<
22212  *         else:
22213  *             c_path[0].href = _cstr(href)
22214  */
22215       (__pyx_v_c_path[0]).href = NULL;
22216       goto __pyx_L6;
22217     }
22218     /*else*/ {
22219
22220       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":179
22221  *             c_path[0].href = NULL
22222  *         else:
22223  *             c_path[0].href = _cstr(href)             # <<<<<<<<<<<<<<
22224  *         if name is None:
22225  *             c_path[0].name = NULL
22226  */
22227       (__pyx_v_c_path[0]).href = PyString_AS_STRING(__pyx_v_href);
22228     }
22229     __pyx_L6:;
22230
22231     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":180
22232  *         else:
22233  *             c_path[0].href = _cstr(href)
22234  *         if name is None:             # <<<<<<<<<<<<<<
22235  *             c_path[0].name = NULL
22236  *         else:
22237  */
22238     __pyx_t_1 = (__pyx_v_name == Py_None);
22239     if (__pyx_t_1) {
22240
22241       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":181
22242  *             c_path[0].href = _cstr(href)
22243  *         if name is None:
22244  *             c_path[0].name = NULL             # <<<<<<<<<<<<<<
22245  *         else:
22246  *             c_path[0].name = _cstr(name)
22247  */
22248       (__pyx_v_c_path[0]).name = NULL;
22249       goto __pyx_L7;
22250     }
22251     /*else*/ {
22252
22253       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":183
22254  *             c_path[0].name = NULL
22255  *         else:
22256  *             c_path[0].name = _cstr(name)             # <<<<<<<<<<<<<<
22257  *         c_path[0].index = index
22258  *         c_path = c_path + 1
22259  */
22260       (__pyx_v_c_path[0]).name = PyString_AS_STRING(__pyx_v_name);
22261     }
22262     __pyx_L7:;
22263
22264     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":184
22265  *         else:
22266  *             c_path[0].name = _cstr(name)
22267  *         c_path[0].index = index             # <<<<<<<<<<<<<<
22268  *         c_path = c_path + 1
22269  *     return c_path_segments
22270  */
22271     __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22272     (__pyx_v_c_path[0]).index = __pyx_t_9;
22273
22274     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":185
22275  *             c_path[0].name = _cstr(name)
22276  *         c_path[0].index = index
22277  *         c_path = c_path + 1             # <<<<<<<<<<<<<<
22278  *     return c_path_segments
22279  * 
22280  */
22281     __pyx_v_c_path = (__pyx_v_c_path + 1);
22282   }
22283   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22284
22285   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":186
22286  *         c_path[0].index = index
22287  *         c_path = c_path + 1
22288  *     return c_path_segments             # <<<<<<<<<<<<<<
22289  * 
22290  * cdef _findObjectPath(_Element root, _ObjectPath* c_path, Py_ssize_t c_path_len,
22291  */
22292   __pyx_r = __pyx_v_c_path_segments;
22293   goto __pyx_L0;
22294
22295   __pyx_r = 0;
22296   goto __pyx_L0;
22297   __pyx_L1_error:;
22298   __Pyx_XDECREF(__pyx_t_2);
22299   __Pyx_XDECREF(__pyx_t_4);
22300   __Pyx_XDECREF(__pyx_t_5);
22301   __Pyx_XDECREF(__pyx_t_6);
22302   __Pyx_XDECREF(__pyx_t_7);
22303   __Pyx_XDECREF(__pyx_t_8);
22304   __Pyx_AddTraceback("lxml.objectify._buildObjectPathSegments");
22305   __pyx_r = NULL;
22306   __pyx_L0:;
22307   __Pyx_DECREF(__pyx_v_href);
22308   __Pyx_DECREF(__pyx_v_name);
22309   __Pyx_DECREF(__pyx_v_index);
22310   __Pyx_DECREF(__pyx_v_path_list);
22311   __Pyx_FinishRefcountContext();
22312   return __pyx_r;
22313 }
22314
22315 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":188
22316  *     return c_path_segments
22317  * 
22318  * cdef _findObjectPath(_Element root, _ObjectPath* c_path, Py_ssize_t c_path_len,             # <<<<<<<<<<<<<<
22319  *                      default_value, int use_default):
22320  *     u"""Follow the path to find the target element.
22321  */
22322
22323 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) {
22324   xmlNode *__pyx_v_c_node;
22325   char *__pyx_v_c_href;
22326   char *__pyx_v_c_name;
22327   Py_ssize_t __pyx_v_c_index;
22328   PyObject *__pyx_v_tag;
22329   PyObject *__pyx_r = NULL;
22330   int __pyx_t_1;
22331   int __pyx_t_2;
22332   PyObject *__pyx_t_3 = NULL;
22333   PyObject *__pyx_t_4 = NULL;
22334   PyObject *__pyx_t_5 = NULL;
22335   __Pyx_SetupRefcountContext("_findObjectPath");
22336   __Pyx_INCREF((PyObject *)__pyx_v_root);
22337   __Pyx_INCREF(__pyx_v_default_value);
22338   __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
22339
22340   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":196
22341  *     cdef char* c_name
22342  *     cdef Py_ssize_t c_index
22343  *     c_node = root._c_node             # <<<<<<<<<<<<<<
22344  *     c_name = c_path[0].name
22345  *     c_href = c_path[0].href
22346  */
22347   __pyx_v_c_node = __pyx_v_root->_c_node;
22348
22349   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":197
22350  *     cdef Py_ssize_t c_index
22351  *     c_node = root._c_node
22352  *     c_name = c_path[0].name             # <<<<<<<<<<<<<<
22353  *     c_href = c_path[0].href
22354  *     if c_href is NULL or c_href[0] == c'\0':
22355  */
22356   __pyx_v_c_name = (__pyx_v_c_path[0]).name;
22357
22358   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":198
22359  *     c_node = root._c_node
22360  *     c_name = c_path[0].name
22361  *     c_href = c_path[0].href             # <<<<<<<<<<<<<<
22362  *     if c_href is NULL or c_href[0] == c'\0':
22363  *         c_href = tree._getNs(c_node)
22364  */
22365   __pyx_v_c_href = (__pyx_v_c_path[0]).href;
22366
22367   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":199
22368  *     c_name = c_path[0].name
22369  *     c_href = c_path[0].href
22370  *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<<
22371  *         c_href = tree._getNs(c_node)
22372  *     if not cetree.tagMatches(c_node, c_href, c_name):
22373  */
22374   if (!(__pyx_v_c_href == NULL)) {
22375     __pyx_t_1 = ((__pyx_v_c_href[0]) == '\x00');
22376   } else {
22377     __pyx_t_1 = (__pyx_v_c_href == NULL);
22378   }
22379   if (__pyx_t_1) {
22380
22381     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":200
22382  *     c_href = c_path[0].href
22383  *     if c_href is NULL or c_href[0] == c'\0':
22384  *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
22385  *     if not cetree.tagMatches(c_node, c_href, c_name):
22386  *         if use_default:
22387  */
22388     __pyx_v_c_href = _getNs(__pyx_v_c_node);
22389     goto __pyx_L3;
22390   }
22391   __pyx_L3:;
22392
22393   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":201
22394  *     if c_href is NULL or c_href[0] == c'\0':
22395  *         c_href = tree._getNs(c_node)
22396  *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<<
22397  *         if use_default:
22398  *             return default_value
22399  */
22400   __pyx_t_1 = (!tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name));
22401   if (__pyx_t_1) {
22402
22403     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":202
22404  *         c_href = tree._getNs(c_node)
22405  *     if not cetree.tagMatches(c_node, c_href, c_name):
22406  *         if use_default:             # <<<<<<<<<<<<<<
22407  *             return default_value
22408  *         else:
22409  */
22410     __pyx_t_2 = __pyx_v_use_default;
22411     if (__pyx_t_2) {
22412
22413       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":203
22414  *     if not cetree.tagMatches(c_node, c_href, c_name):
22415  *         if use_default:
22416  *             return default_value             # <<<<<<<<<<<<<<
22417  *         else:
22418  *             raise ValueError, \
22419  */
22420       __Pyx_XDECREF(__pyx_r);
22421       __Pyx_INCREF(__pyx_v_default_value);
22422       __pyx_r = __pyx_v_default_value;
22423       goto __pyx_L0;
22424       goto __pyx_L5;
22425     }
22426     /*else*/ {
22427
22428       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":207
22429  *             raise ValueError, \
22430  *                 u"root element does not match: need %s, got %s" % \
22431  *                 (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)             # <<<<<<<<<<<<<<
22432  * 
22433  *     while c_node is not NULL:
22434  */
22435       __pyx_t_3 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22436       __Pyx_GOTREF(__pyx_t_3);
22437       __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_root), __pyx_n_ui_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22438       __Pyx_GOTREF(__pyx_t_4);
22439       __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22440       __Pyx_GOTREF(((PyObject *)__pyx_t_5));
22441       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
22442       __Pyx_GIVEREF(__pyx_t_3);
22443       PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
22444       __Pyx_GIVEREF(__pyx_t_4);
22445       __pyx_t_3 = 0;
22446       __pyx_t_4 = 0;
22447       __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_50), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22448       __Pyx_GOTREF(__pyx_t_4);
22449       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
22450       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0);
22451       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22452       {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22453     }
22454     __pyx_L5:;
22455     goto __pyx_L4;
22456   }
22457   __pyx_L4:;
22458
22459   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":209
22460  *                 (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
22461  * 
22462  *     while c_node is not NULL:             # <<<<<<<<<<<<<<
22463  *         c_path_len = c_path_len - 1
22464  *         if c_path_len <= 0:
22465  */
22466   while (1) {
22467     __pyx_t_1 = (__pyx_v_c_node != NULL);
22468     if (!__pyx_t_1) break;
22469
22470     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":210
22471  * 
22472  *     while c_node is not NULL:
22473  *         c_path_len = c_path_len - 1             # <<<<<<<<<<<<<<
22474  *         if c_path_len <= 0:
22475  *             break
22476  */
22477     __pyx_v_c_path_len = (__pyx_v_c_path_len - 1);
22478
22479     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":211
22480  *     while c_node is not NULL:
22481  *         c_path_len = c_path_len - 1
22482  *         if c_path_len <= 0:             # <<<<<<<<<<<<<<
22483  *             break
22484  * 
22485  */
22486     __pyx_t_1 = (__pyx_v_c_path_len <= 0);
22487     if (__pyx_t_1) {
22488
22489       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":212
22490  *         c_path_len = c_path_len - 1
22491  *         if c_path_len <= 0:
22492  *             break             # <<<<<<<<<<<<<<
22493  * 
22494  *         c_path = c_path + 1
22495  */
22496       goto __pyx_L7_break;
22497       goto __pyx_L8;
22498     }
22499     __pyx_L8:;
22500
22501     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":214
22502  *             break
22503  * 
22504  *         c_path = c_path + 1             # <<<<<<<<<<<<<<
22505  *         if c_path[0].href is not NULL:
22506  *             c_href = c_path[0].href # otherwise: keep parent namespace
22507  */
22508     __pyx_v_c_path = (__pyx_v_c_path + 1);
22509
22510     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":215
22511  * 
22512  *         c_path = c_path + 1
22513  *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<<
22514  *             c_href = c_path[0].href # otherwise: keep parent namespace
22515  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22516  */
22517     __pyx_t_1 = ((__pyx_v_c_path[0]).href != NULL);
22518     if (__pyx_t_1) {
22519
22520       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":216
22521  *         c_path = c_path + 1
22522  *         if c_path[0].href is not NULL:
22523  *             c_href = c_path[0].href # otherwise: keep parent namespace             # <<<<<<<<<<<<<<
22524  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22525  *         if c_name is NULL:
22526  */
22527       __pyx_v_c_href = (__pyx_v_c_path[0]).href;
22528       goto __pyx_L9;
22529     }
22530     __pyx_L9:;
22531
22532     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":217
22533  *         if c_path[0].href is not NULL:
22534  *             c_href = c_path[0].href # otherwise: keep parent namespace
22535  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)             # <<<<<<<<<<<<<<
22536  *         if c_name is NULL:
22537  *             c_name = c_path[0].name
22538  */
22539     __pyx_v_c_name = xmlDictExists(__pyx_v_c_node->doc->dict, (__pyx_v_c_path[0]).name, -1);
22540
22541     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":218
22542  *             c_href = c_path[0].href # otherwise: keep parent namespace
22543  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22544  *         if c_name is NULL:             # <<<<<<<<<<<<<<
22545  *             c_name = c_path[0].name
22546  *             c_node = NULL
22547  */
22548     __pyx_t_1 = (__pyx_v_c_name == NULL);
22549     if (__pyx_t_1) {
22550
22551       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":219
22552  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22553  *         if c_name is NULL:
22554  *             c_name = c_path[0].name             # <<<<<<<<<<<<<<
22555  *             c_node = NULL
22556  *             break
22557  */
22558       __pyx_v_c_name = (__pyx_v_c_path[0]).name;
22559
22560       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":220
22561  *         if c_name is NULL:
22562  *             c_name = c_path[0].name
22563  *             c_node = NULL             # <<<<<<<<<<<<<<
22564  *             break
22565  *         c_index = c_path[0].index
22566  */
22567       __pyx_v_c_node = NULL;
22568
22569       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":221
22570  *             c_name = c_path[0].name
22571  *             c_node = NULL
22572  *             break             # <<<<<<<<<<<<<<
22573  *         c_index = c_path[0].index
22574  * 
22575  */
22576       goto __pyx_L7_break;
22577       goto __pyx_L10;
22578     }
22579     __pyx_L10:;
22580
22581     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":222
22582  *             c_node = NULL
22583  *             break
22584  *         c_index = c_path[0].index             # <<<<<<<<<<<<<<
22585  * 
22586  *         if c_index < 0:
22587  */
22588     __pyx_v_c_index = (__pyx_v_c_path[0]).index;
22589
22590     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":224
22591  *         c_index = c_path[0].index
22592  * 
22593  *         if c_index < 0:             # <<<<<<<<<<<<<<
22594  *             c_node = c_node.last
22595  *         else:
22596  */
22597     __pyx_t_1 = (__pyx_v_c_index < 0);
22598     if (__pyx_t_1) {
22599
22600       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":225
22601  * 
22602  *         if c_index < 0:
22603  *             c_node = c_node.last             # <<<<<<<<<<<<<<
22604  *         else:
22605  *             c_node = c_node.children
22606  */
22607       __pyx_v_c_node = __pyx_v_c_node->last;
22608       goto __pyx_L11;
22609     }
22610     /*else*/ {
22611
22612       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":227
22613  *             c_node = c_node.last
22614  *         else:
22615  *             c_node = c_node.children             # <<<<<<<<<<<<<<
22616  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
22617  * 
22618  */
22619       __pyx_v_c_node = __pyx_v_c_node->children;
22620     }
22621     __pyx_L11:;
22622
22623     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":228
22624  *         else:
22625  *             c_node = c_node.children
22626  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)             # <<<<<<<<<<<<<<
22627  * 
22628  *     if c_node is not NULL:
22629  */
22630     __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);
22631   }
22632   __pyx_L7_break:;
22633
22634   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":230
22635  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
22636  * 
22637  *     if c_node is not NULL:             # <<<<<<<<<<<<<<
22638  *         return cetree.elementFactory(root._doc, c_node)
22639  *     elif use_default:
22640  */
22641   __pyx_t_1 = (__pyx_v_c_node != NULL);
22642   if (__pyx_t_1) {
22643
22644     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":231
22645  * 
22646  *     if c_node is not NULL:
22647  *         return cetree.elementFactory(root._doc, c_node)             # <<<<<<<<<<<<<<
22648  *     elif use_default:
22649  *         return default_value
22650  */
22651     __Pyx_XDECREF(__pyx_r);
22652     __pyx_t_4 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22653     __Pyx_GOTREF(__pyx_t_4);
22654     __pyx_r = __pyx_t_4;
22655     __pyx_t_4 = 0;
22656     goto __pyx_L0;
22657     goto __pyx_L12;
22658   }
22659
22660   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":232
22661  *     if c_node is not NULL:
22662  *         return cetree.elementFactory(root._doc, c_node)
22663  *     elif use_default:             # <<<<<<<<<<<<<<
22664  *         return default_value
22665  *     else:
22666  */
22667   __pyx_t_2 = __pyx_v_use_default;
22668   if (__pyx_t_2) {
22669
22670     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":233
22671  *         return cetree.elementFactory(root._doc, c_node)
22672  *     elif use_default:
22673  *         return default_value             # <<<<<<<<<<<<<<
22674  *     else:
22675  *         tag = cetree.namespacedNameFromNsName(c_href, c_name)
22676  */
22677     __Pyx_XDECREF(__pyx_r);
22678     __Pyx_INCREF(__pyx_v_default_value);
22679     __pyx_r = __pyx_v_default_value;
22680     goto __pyx_L0;
22681     goto __pyx_L12;
22682   }
22683   /*else*/ {
22684
22685     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":235
22686  *         return default_value
22687  *     else:
22688  *         tag = cetree.namespacedNameFromNsName(c_href, c_name)             # <<<<<<<<<<<<<<
22689  *         raise AttributeError, u"no such child: " + tag
22690  * 
22691  */
22692     __pyx_t_4 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22693     __Pyx_GOTREF(__pyx_t_4);
22694     __Pyx_DECREF(__pyx_v_tag);
22695     __pyx_v_tag = __pyx_t_4;
22696     __pyx_t_4 = 0;
22697
22698     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":236
22699  *     else:
22700  *         tag = cetree.namespacedNameFromNsName(c_href, c_name)
22701  *         raise AttributeError, u"no such child: " + tag             # <<<<<<<<<<<<<<
22702  * 
22703  * cdef _createObjectPath(_Element root, _ObjectPath* c_path,
22704  */
22705     __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_kp_u_10), __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22706     __Pyx_GOTREF(__pyx_t_4);
22707     __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_t_4, 0);
22708     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22709     {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22710   }
22711   __pyx_L12:;
22712
22713   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22714   goto __pyx_L0;
22715   __pyx_L1_error:;
22716   __Pyx_XDECREF(__pyx_t_3);
22717   __Pyx_XDECREF(__pyx_t_4);
22718   __Pyx_XDECREF(__pyx_t_5);
22719   __Pyx_AddTraceback("lxml.objectify._findObjectPath");
22720   __pyx_r = 0;
22721   __pyx_L0:;
22722   __Pyx_DECREF(__pyx_v_tag);
22723   __Pyx_DECREF((PyObject *)__pyx_v_root);
22724   __Pyx_DECREF(__pyx_v_default_value);
22725   __Pyx_XGIVEREF(__pyx_r);
22726   __Pyx_FinishRefcountContext();
22727   return __pyx_r;
22728 }
22729
22730 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":238
22731  *         raise AttributeError, u"no such child: " + tag
22732  * 
22733  * cdef _createObjectPath(_Element root, _ObjectPath* c_path,             # <<<<<<<<<<<<<<
22734  *                        Py_ssize_t c_path_len, int replace, value):
22735  *     u"""Follow the path to find the target element, build the missing children
22736  */
22737
22738 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) {
22739   struct LxmlElement *__pyx_v_child;
22740   xmlNode *__pyx_v_c_node;
22741   xmlNode *__pyx_v_c_child;
22742   char *__pyx_v_c_href;
22743   char *__pyx_v_c_name;
22744   Py_ssize_t __pyx_v_c_index;
22745   PyObject *__pyx_v_element;
22746   PyObject *__pyx_r = NULL;
22747   int __pyx_t_1;
22748   PyObject *__pyx_t_2 = NULL;
22749   PyObject *__pyx_t_3 = NULL;
22750   PyObject *__pyx_t_4 = NULL;
22751   int __pyx_t_5;
22752   __Pyx_SetupRefcountContext("_createObjectPath");
22753   __Pyx_INCREF((PyObject *)__pyx_v_root);
22754   __Pyx_INCREF(__pyx_v_value);
22755   __pyx_v_child = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
22756   __pyx_v_element = Py_None; __Pyx_INCREF(Py_None);
22757
22758   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":250
22759  *     cdef char* c_name
22760  *     cdef Py_ssize_t c_index
22761  *     if c_path_len == 1:             # <<<<<<<<<<<<<<
22762  *         raise TypeError, u"cannot update root node"
22763  * 
22764  */
22765   __pyx_t_1 = (__pyx_v_c_path_len == 1);
22766   if (__pyx_t_1) {
22767
22768     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":251
22769  *     cdef Py_ssize_t c_index
22770  *     if c_path_len == 1:
22771  *         raise TypeError, u"cannot update root node"             # <<<<<<<<<<<<<<
22772  * 
22773  *     c_node = root._c_node
22774  */
22775     __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_51), 0);
22776     {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22777     goto __pyx_L3;
22778   }
22779   __pyx_L3:;
22780
22781   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":253
22782  *         raise TypeError, u"cannot update root node"
22783  * 
22784  *     c_node = root._c_node             # <<<<<<<<<<<<<<
22785  *     c_name = c_path[0].name
22786  *     c_href = c_path[0].href
22787  */
22788   __pyx_v_c_node = __pyx_v_root->_c_node;
22789
22790   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":254
22791  * 
22792  *     c_node = root._c_node
22793  *     c_name = c_path[0].name             # <<<<<<<<<<<<<<
22794  *     c_href = c_path[0].href
22795  *     if c_href is NULL or c_href[0] == c'\0':
22796  */
22797   __pyx_v_c_name = (__pyx_v_c_path[0]).name;
22798
22799   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":255
22800  *     c_node = root._c_node
22801  *     c_name = c_path[0].name
22802  *     c_href = c_path[0].href             # <<<<<<<<<<<<<<
22803  *     if c_href is NULL or c_href[0] == c'\0':
22804  *         c_href = tree._getNs(c_node)
22805  */
22806   __pyx_v_c_href = (__pyx_v_c_path[0]).href;
22807
22808   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":256
22809  *     c_name = c_path[0].name
22810  *     c_href = c_path[0].href
22811  *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<<
22812  *         c_href = tree._getNs(c_node)
22813  *     if not cetree.tagMatches(c_node, c_href, c_name):
22814  */
22815   if (!(__pyx_v_c_href == NULL)) {
22816     __pyx_t_1 = ((__pyx_v_c_href[0]) == '\x00');
22817   } else {
22818     __pyx_t_1 = (__pyx_v_c_href == NULL);
22819   }
22820   if (__pyx_t_1) {
22821
22822     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":257
22823  *     c_href = c_path[0].href
22824  *     if c_href is NULL or c_href[0] == c'\0':
22825  *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
22826  *     if not cetree.tagMatches(c_node, c_href, c_name):
22827  *         raise ValueError, \
22828  */
22829     __pyx_v_c_href = _getNs(__pyx_v_c_node);
22830     goto __pyx_L4;
22831   }
22832   __pyx_L4:;
22833
22834   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":258
22835  *     if c_href is NULL or c_href[0] == c'\0':
22836  *         c_href = tree._getNs(c_node)
22837  *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<<
22838  *         raise ValueError, \
22839  *             u"root element does not match: need %s, got %s" % \
22840  */
22841   __pyx_t_1 = (!tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name));
22842   if (__pyx_t_1) {
22843
22844     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":261
22845  *         raise ValueError, \
22846  *             u"root element does not match: need %s, got %s" % \
22847  *             (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)             # <<<<<<<<<<<<<<
22848  * 
22849  *     while c_path_len > 1:
22850  */
22851     __pyx_t_2 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22852     __Pyx_GOTREF(__pyx_t_2);
22853     __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_root), __pyx_n_ui_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22854     __Pyx_GOTREF(__pyx_t_3);
22855     __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22856     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
22857     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
22858     __Pyx_GIVEREF(__pyx_t_2);
22859     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
22860     __Pyx_GIVEREF(__pyx_t_3);
22861     __pyx_t_2 = 0;
22862     __pyx_t_3 = 0;
22863     __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_50), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22864     __Pyx_GOTREF(__pyx_t_3);
22865     __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
22866     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_3, 0);
22867     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22868     {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22869     goto __pyx_L5;
22870   }
22871   __pyx_L5:;
22872
22873   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":263
22874  *             (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
22875  * 
22876  *     while c_path_len > 1:             # <<<<<<<<<<<<<<
22877  *         c_path_len = c_path_len - 1
22878  *         c_path = c_path + 1
22879  */
22880   while (1) {
22881     __pyx_t_1 = (__pyx_v_c_path_len > 1);
22882     if (!__pyx_t_1) break;
22883
22884     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":264
22885  * 
22886  *     while c_path_len > 1:
22887  *         c_path_len = c_path_len - 1             # <<<<<<<<<<<<<<
22888  *         c_path = c_path + 1
22889  *         if c_path[0].href is not NULL:
22890  */
22891     __pyx_v_c_path_len = (__pyx_v_c_path_len - 1);
22892
22893     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":265
22894  *     while c_path_len > 1:
22895  *         c_path_len = c_path_len - 1
22896  *         c_path = c_path + 1             # <<<<<<<<<<<<<<
22897  *         if c_path[0].href is not NULL:
22898  *             c_href = c_path[0].href # otherwise: keep parent namespace
22899  */
22900     __pyx_v_c_path = (__pyx_v_c_path + 1);
22901
22902     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":266
22903  *         c_path_len = c_path_len - 1
22904  *         c_path = c_path + 1
22905  *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<<
22906  *             c_href = c_path[0].href # otherwise: keep parent namespace
22907  *         c_index = c_path[0].index
22908  */
22909     __pyx_t_1 = ((__pyx_v_c_path[0]).href != NULL);
22910     if (__pyx_t_1) {
22911
22912       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":267
22913  *         c_path = c_path + 1
22914  *         if c_path[0].href is not NULL:
22915  *             c_href = c_path[0].href # otherwise: keep parent namespace             # <<<<<<<<<<<<<<
22916  *         c_index = c_path[0].index
22917  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22918  */
22919       __pyx_v_c_href = (__pyx_v_c_path[0]).href;
22920       goto __pyx_L8;
22921     }
22922     __pyx_L8:;
22923
22924     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":268
22925  *         if c_path[0].href is not NULL:
22926  *             c_href = c_path[0].href # otherwise: keep parent namespace
22927  *         c_index = c_path[0].index             # <<<<<<<<<<<<<<
22928  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22929  *         if c_name is NULL:
22930  */
22931     __pyx_v_c_index = (__pyx_v_c_path[0]).index;
22932
22933     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":269
22934  *             c_href = c_path[0].href # otherwise: keep parent namespace
22935  *         c_index = c_path[0].index
22936  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)             # <<<<<<<<<<<<<<
22937  *         if c_name is NULL:
22938  *             c_name = c_path[0].name
22939  */
22940     __pyx_v_c_name = xmlDictExists(__pyx_v_c_node->doc->dict, (__pyx_v_c_path[0]).name, -1);
22941
22942     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":270
22943  *         c_index = c_path[0].index
22944  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22945  *         if c_name is NULL:             # <<<<<<<<<<<<<<
22946  *             c_name = c_path[0].name
22947  *             c_child = NULL
22948  */
22949     __pyx_t_1 = (__pyx_v_c_name == NULL);
22950     if (__pyx_t_1) {
22951
22952       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":271
22953  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22954  *         if c_name is NULL:
22955  *             c_name = c_path[0].name             # <<<<<<<<<<<<<<
22956  *             c_child = NULL
22957  *         else:
22958  */
22959       __pyx_v_c_name = (__pyx_v_c_path[0]).name;
22960
22961       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":272
22962  *         if c_name is NULL:
22963  *             c_name = c_path[0].name
22964  *             c_child = NULL             # <<<<<<<<<<<<<<
22965  *         else:
22966  *             if c_index < 0:
22967  */
22968       __pyx_v_c_child = NULL;
22969       goto __pyx_L9;
22970     }
22971     /*else*/ {
22972
22973       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":274
22974  *             c_child = NULL
22975  *         else:
22976  *             if c_index < 0:             # <<<<<<<<<<<<<<
22977  *                 c_child = c_node.last
22978  *             else:
22979  */
22980       __pyx_t_1 = (__pyx_v_c_index < 0);
22981       if (__pyx_t_1) {
22982
22983         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":275
22984  *         else:
22985  *             if c_index < 0:
22986  *                 c_child = c_node.last             # <<<<<<<<<<<<<<
22987  *             else:
22988  *                 c_child = c_node.children
22989  */
22990         __pyx_v_c_child = __pyx_v_c_node->last;
22991         goto __pyx_L10;
22992       }
22993       /*else*/ {
22994
22995         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":277
22996  *                 c_child = c_node.last
22997  *             else:
22998  *                 c_child = c_node.children             # <<<<<<<<<<<<<<
22999  *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
23000  * 
23001  */
23002         __pyx_v_c_child = __pyx_v_c_node->children;
23003       }
23004       __pyx_L10:;
23005
23006       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":278
23007  *             else:
23008  *                 c_child = c_node.children
23009  *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)             # <<<<<<<<<<<<<<
23010  * 
23011  *         if c_child is not NULL:
23012  */
23013       __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);
23014     }
23015     __pyx_L9:;
23016
23017     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":280
23018  *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
23019  * 
23020  *         if c_child is not NULL:             # <<<<<<<<<<<<<<
23021  *             c_node = c_child
23022  *         elif c_index != 0:
23023  */
23024     __pyx_t_1 = (__pyx_v_c_child != NULL);
23025     if (__pyx_t_1) {
23026
23027       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":281
23028  * 
23029  *         if c_child is not NULL:
23030  *             c_node = c_child             # <<<<<<<<<<<<<<
23031  *         elif c_index != 0:
23032  *             raise TypeError, \
23033  */
23034       __pyx_v_c_node = __pyx_v_c_child;
23035       goto __pyx_L11;
23036     }
23037
23038     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":282
23039  *         if c_child is not NULL:
23040  *             c_node = c_child
23041  *         elif c_index != 0:             # <<<<<<<<<<<<<<
23042  *             raise TypeError, \
23043  *                 u"creating indexed path attributes is not supported"
23044  */
23045     __pyx_t_1 = (__pyx_v_c_index != 0);
23046     if (__pyx_t_1) {
23047
23048       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":283
23049  *             c_node = c_child
23050  *         elif c_index != 0:
23051  *             raise TypeError, \             # <<<<<<<<<<<<<<
23052  *                 u"creating indexed path attributes is not supported"
23053  *         elif c_path_len == 1:
23054  */
23055       __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_52), 0);
23056       {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23057       goto __pyx_L11;
23058     }
23059
23060     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":285
23061  *             raise TypeError, \
23062  *                 u"creating indexed path attributes is not supported"
23063  *         elif c_path_len == 1:             # <<<<<<<<<<<<<<
23064  *             _appendValue(cetree.elementFactory(root._doc, c_node),
23065  *                          cetree.namespacedNameFromNsName(c_href, c_name),
23066  */
23067     __pyx_t_1 = (__pyx_v_c_path_len == 1);
23068     if (__pyx_t_1) {
23069
23070       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":286
23071  *                 u"creating indexed path attributes is not supported"
23072  *         elif c_path_len == 1:
23073  *             _appendValue(cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<<
23074  *                          cetree.namespacedNameFromNsName(c_href, c_name),
23075  *                          value)
23076  */
23077       __pyx_t_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23078       __Pyx_GOTREF(__pyx_t_3);
23079
23080       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":287
23081  *         elif c_path_len == 1:
23082  *             _appendValue(cetree.elementFactory(root._doc, c_node),
23083  *                          cetree.namespacedNameFromNsName(c_href, c_name),             # <<<<<<<<<<<<<<
23084  *                          value)
23085  *             return
23086  */
23087       __pyx_t_4 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23088       __Pyx_GOTREF(__pyx_t_4);
23089
23090       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":288
23091  *             _appendValue(cetree.elementFactory(root._doc, c_node),
23092  *                          cetree.namespacedNameFromNsName(c_href, c_name),
23093  *                          value)             # <<<<<<<<<<<<<<
23094  *             return
23095  *         else:
23096  */
23097       __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_t_3), __pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23098       __Pyx_GOTREF(__pyx_t_2);
23099       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23100       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23101       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23102
23103       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":289
23104  *                          cetree.namespacedNameFromNsName(c_href, c_name),
23105  *                          value)
23106  *             return             # <<<<<<<<<<<<<<
23107  *         else:
23108  *             child = cetree.makeSubElement(
23109  */
23110       __Pyx_XDECREF(__pyx_r);
23111       __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23112       goto __pyx_L0;
23113       goto __pyx_L11;
23114     }
23115     /*else*/ {
23116
23117       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":292
23118  *         else:
23119  *             child = cetree.makeSubElement(
23120  *                 cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<<
23121  *                 cetree.namespacedNameFromNsName(c_href, c_name),
23122  *                 None, None, None, None)
23123  */
23124       __pyx_t_2 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23125       __Pyx_GOTREF(__pyx_t_2);
23126
23127       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":293
23128  *             child = cetree.makeSubElement(
23129  *                 cetree.elementFactory(root._doc, c_node),
23130  *                 cetree.namespacedNameFromNsName(c_href, c_name),             # <<<<<<<<<<<<<<
23131  *                 None, None, None, None)
23132  *             c_node = child._c_node
23133  */
23134       __pyx_t_4 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23135       __Pyx_GOTREF(__pyx_t_4);
23136
23137       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":294
23138  *                 cetree.elementFactory(root._doc, c_node),
23139  *                 cetree.namespacedNameFromNsName(c_href, c_name),
23140  *                 None, None, None, None)             # <<<<<<<<<<<<<<
23141  *             c_node = child._c_node
23142  * 
23143  */
23144       __pyx_t_3 = ((PyObject *)makeSubElement(((struct LxmlElement *)__pyx_t_2), __pyx_t_4, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23145       __Pyx_GOTREF(__pyx_t_3);
23146       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23147       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23148       __Pyx_DECREF(((PyObject *)__pyx_v_child));
23149       __pyx_v_child = ((struct LxmlElement *)__pyx_t_3);
23150       __pyx_t_3 = 0;
23151
23152       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":295
23153  *                 cetree.namespacedNameFromNsName(c_href, c_name),
23154  *                 None, None, None, None)
23155  *             c_node = child._c_node             # <<<<<<<<<<<<<<
23156  * 
23157  *     # if we get here, the entire path was already there
23158  */
23159       __pyx_v_c_node = __pyx_v_child->_c_node;
23160     }
23161     __pyx_L11:;
23162   }
23163
23164   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":298
23165  * 
23166  *     # if we get here, the entire path was already there
23167  *     if replace:             # <<<<<<<<<<<<<<
23168  *         element = cetree.elementFactory(root._doc, c_node)
23169  *         _replaceElement(element, value)
23170  */
23171   __pyx_t_5 = __pyx_v_replace;
23172   if (__pyx_t_5) {
23173
23174     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":299
23175  *     # if we get here, the entire path was already there
23176  *     if replace:
23177  *         element = cetree.elementFactory(root._doc, c_node)             # <<<<<<<<<<<<<<
23178  *         _replaceElement(element, value)
23179  *     else:
23180  */
23181     __pyx_t_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23182     __Pyx_GOTREF(__pyx_t_3);
23183     __Pyx_DECREF(__pyx_v_element);
23184     __pyx_v_element = __pyx_t_3;
23185     __pyx_t_3 = 0;
23186
23187     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":300
23188  *     if replace:
23189  *         element = cetree.elementFactory(root._doc, c_node)
23190  *         _replaceElement(element, value)             # <<<<<<<<<<<<<<
23191  *     else:
23192  *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
23193  */
23194     if (!(__Pyx_TypeTest(__pyx_v_element, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23195     __pyx_t_3 = __pyx_f_4lxml_9objectify__replaceElement(((struct LxmlElement *)__pyx_v_element), __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23196     __Pyx_GOTREF(__pyx_t_3);
23197     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23198     goto __pyx_L12;
23199   }
23200   /*else*/ {
23201
23202     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":302
23203  *         _replaceElement(element, value)
23204  *     else:
23205  *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),             # <<<<<<<<<<<<<<
23206  *                      cetree.namespacedName(c_node), value)
23207  * 
23208  */
23209     __pyx_t_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node->parent)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23210     __Pyx_GOTREF(__pyx_t_3);
23211
23212     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":303
23213  *     else:
23214  *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
23215  *                      cetree.namespacedName(c_node), value)             # <<<<<<<<<<<<<<
23216  * 
23217  * cdef list _buildDescendantPaths(tree.xmlNode* c_node, prefix_string):
23218  */
23219     __pyx_t_4 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23220     __Pyx_GOTREF(__pyx_t_4);
23221     __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_t_3), __pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23222     __Pyx_GOTREF(__pyx_t_2);
23223     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23224     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23225     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23226   }
23227   __pyx_L12:;
23228
23229   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23230   goto __pyx_L0;
23231   __pyx_L1_error:;
23232   __Pyx_XDECREF(__pyx_t_2);
23233   __Pyx_XDECREF(__pyx_t_3);
23234   __Pyx_XDECREF(__pyx_t_4);
23235   __Pyx_AddTraceback("lxml.objectify._createObjectPath");
23236   __pyx_r = 0;
23237   __pyx_L0:;
23238   __Pyx_DECREF((PyObject *)__pyx_v_child);
23239   __Pyx_DECREF(__pyx_v_element);
23240   __Pyx_DECREF((PyObject *)__pyx_v_root);
23241   __Pyx_DECREF(__pyx_v_value);
23242   __Pyx_XGIVEREF(__pyx_r);
23243   __Pyx_FinishRefcountContext();
23244   return __pyx_r;
23245 }
23246
23247 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":305
23248  *                      cetree.namespacedName(c_node), value)
23249  * 
23250  * cdef list _buildDescendantPaths(tree.xmlNode* c_node, prefix_string):             # <<<<<<<<<<<<<<
23251  *     u"""Returns a list of all descendant paths.
23252  *     """
23253  */
23254
23255 static  PyObject *__pyx_f_4lxml_9objectify__buildDescendantPaths(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_prefix_string) {
23256   PyObject *__pyx_v_path;
23257   PyObject *__pyx_v_path_list;
23258   PyObject *__pyx_v_tag;
23259   PyObject *__pyx_r = NULL;
23260   PyObject *__pyx_t_1 = NULL;
23261   int __pyx_t_2;
23262   PyObject *__pyx_t_3 = NULL;
23263   int __pyx_t_4;
23264   __Pyx_SetupRefcountContext("_buildDescendantPaths");
23265   __Pyx_INCREF(__pyx_v_prefix_string);
23266   __pyx_v_path = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
23267   __pyx_v_path_list = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
23268   __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
23269
23270   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":309
23271  *     """
23272  *     cdef list path, path_list
23273  *     tag = cetree.namespacedName(c_node)             # <<<<<<<<<<<<<<
23274  *     if prefix_string:
23275  *         if prefix_string[-1] != u'.':
23276  */
23277   __pyx_t_1 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23278   __Pyx_GOTREF(__pyx_t_1);
23279   __Pyx_DECREF(__pyx_v_tag);
23280   __pyx_v_tag = __pyx_t_1;
23281   __pyx_t_1 = 0;
23282
23283   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":310
23284  *     cdef list path, path_list
23285  *     tag = cetree.namespacedName(c_node)
23286  *     if prefix_string:             # <<<<<<<<<<<<<<
23287  *         if prefix_string[-1] != u'.':
23288  *             prefix_string = prefix_string + u'.'
23289  */
23290   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_prefix_string); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23291   if (__pyx_t_2) {
23292
23293     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":311
23294  *     tag = cetree.namespacedName(c_node)
23295  *     if prefix_string:
23296  *         if prefix_string[-1] != u'.':             # <<<<<<<<<<<<<<
23297  *             prefix_string = prefix_string + u'.'
23298  *         prefix_string = prefix_string + tag
23299  */
23300     __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_prefix_string, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23301     __Pyx_GOTREF(__pyx_t_1);
23302     __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_u_9), Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23303     __Pyx_GOTREF(__pyx_t_3);
23304     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23305     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23306     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23307     if (__pyx_t_2) {
23308
23309       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":312
23310  *     if prefix_string:
23311  *         if prefix_string[-1] != u'.':
23312  *             prefix_string = prefix_string + u'.'             # <<<<<<<<<<<<<<
23313  *         prefix_string = prefix_string + tag
23314  *     else:
23315  */
23316       __pyx_t_3 = PyNumber_Add(__pyx_v_prefix_string, ((PyObject *)__pyx_kp_u_9)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23317       __Pyx_GOTREF(__pyx_t_3);
23318       __Pyx_DECREF(__pyx_v_prefix_string);
23319       __pyx_v_prefix_string = __pyx_t_3;
23320       __pyx_t_3 = 0;
23321       goto __pyx_L4;
23322     }
23323     __pyx_L4:;
23324
23325     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":313
23326  *         if prefix_string[-1] != u'.':
23327  *             prefix_string = prefix_string + u'.'
23328  *         prefix_string = prefix_string + tag             # <<<<<<<<<<<<<<
23329  *     else:
23330  *         prefix_string = tag
23331  */
23332     __pyx_t_3 = PyNumber_Add(__pyx_v_prefix_string, __pyx_v_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23333     __Pyx_GOTREF(__pyx_t_3);
23334     __Pyx_DECREF(__pyx_v_prefix_string);
23335     __pyx_v_prefix_string = __pyx_t_3;
23336     __pyx_t_3 = 0;
23337     goto __pyx_L3;
23338   }
23339   /*else*/ {
23340
23341     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":315
23342  *         prefix_string = prefix_string + tag
23343  *     else:
23344  *         prefix_string = tag             # <<<<<<<<<<<<<<
23345  *     path = [prefix_string]
23346  *     path_list = []
23347  */
23348     __Pyx_INCREF(__pyx_v_tag);
23349     __Pyx_DECREF(__pyx_v_prefix_string);
23350     __pyx_v_prefix_string = __pyx_v_tag;
23351   }
23352   __pyx_L3:;
23353
23354   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":316
23355  *     else:
23356  *         prefix_string = tag
23357  *     path = [prefix_string]             # <<<<<<<<<<<<<<
23358  *     path_list = []
23359  *     _recursiveBuildDescendantPaths(c_node, path, path_list)
23360  */
23361   __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23362   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
23363   __Pyx_INCREF(__pyx_v_prefix_string);
23364   PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_prefix_string);
23365   __Pyx_GIVEREF(__pyx_v_prefix_string);
23366   __Pyx_DECREF(((PyObject *)__pyx_v_path));
23367   __pyx_v_path = __pyx_t_3;
23368   __pyx_t_3 = 0;
23369
23370   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":317
23371  *         prefix_string = tag
23372  *     path = [prefix_string]
23373  *     path_list = []             # <<<<<<<<<<<<<<
23374  *     _recursiveBuildDescendantPaths(c_node, path, path_list)
23375  *     return path_list
23376  */
23377   __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23378   __Pyx_GOTREF(((PyObject *)__pyx_t_3));
23379   __Pyx_DECREF(((PyObject *)__pyx_v_path_list));
23380   __pyx_v_path_list = __pyx_t_3;
23381   __pyx_t_3 = 0;
23382
23383   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":318
23384  *     path = [prefix_string]
23385  *     path_list = []
23386  *     _recursiveBuildDescendantPaths(c_node, path, path_list)             # <<<<<<<<<<<<<<
23387  *     return path_list
23388  * 
23389  */
23390   __pyx_t_4 = __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(__pyx_v_c_node, __pyx_v_path, __pyx_v_path_list); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23391
23392   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":319
23393  *     path_list = []
23394  *     _recursiveBuildDescendantPaths(c_node, path, path_list)
23395  *     return path_list             # <<<<<<<<<<<<<<
23396  * 
23397  * cdef int _recursiveBuildDescendantPaths(tree.xmlNode* c_node,
23398  */
23399   __Pyx_XDECREF(((PyObject *)__pyx_r));
23400   __Pyx_INCREF(((PyObject *)__pyx_v_path_list));
23401   __pyx_r = __pyx_v_path_list;
23402   goto __pyx_L0;
23403
23404   __pyx_r = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
23405   goto __pyx_L0;
23406   __pyx_L1_error:;
23407   __Pyx_XDECREF(__pyx_t_1);
23408   __Pyx_XDECREF(__pyx_t_3);
23409   __Pyx_AddTraceback("lxml.objectify._buildDescendantPaths");
23410   __pyx_r = 0;
23411   __pyx_L0:;
23412   __Pyx_DECREF(__pyx_v_path);
23413   __Pyx_DECREF(__pyx_v_path_list);
23414   __Pyx_DECREF(__pyx_v_tag);
23415   __Pyx_DECREF(__pyx_v_prefix_string);
23416   __Pyx_XGIVEREF(__pyx_r);
23417   __Pyx_FinishRefcountContext();
23418   return __pyx_r;
23419 }
23420
23421 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":321
23422  *     return path_list
23423  * 
23424  * cdef int _recursiveBuildDescendantPaths(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
23425  *                                         list path, list path_list) except -1:
23426  *     u"""Fills the list 'path_list' with all descendant paths, initial prefix
23427  */
23428
23429 static  int __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_path, PyObject *__pyx_v_path_list) {
23430   PyObject *__pyx_v_dict_result;
23431   xmlNode *__pyx_v_c_child;
23432   char *__pyx_v_c_href;
23433   PyObject *__pyx_v_tags = 0;
23434   PyObject *__pyx_v_tag;
23435   PyObject *__pyx_v_count;
23436   int __pyx_r;
23437   PyObject *__pyx_t_1 = NULL;
23438   PyObject *__pyx_t_2 = NULL;
23439   PyObject *__pyx_t_3 = NULL;
23440   int __pyx_t_4;
23441   int __pyx_t_5;
23442   __Pyx_SetupRefcountContext("_recursiveBuildDescendantPaths");
23443   __Pyx_INCREF(__pyx_v_path);
23444   __Pyx_INCREF(__pyx_v_path_list);
23445   __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
23446   __pyx_v_count = Py_None; __Pyx_INCREF(Py_None);
23447
23448   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":329
23449  *     cdef tree.xmlNode* c_child
23450  *     cdef char* c_href
23451  *     cdef dict tags = {}             # <<<<<<<<<<<<<<
23452  *     path_list.append( u'.'.join(path) )
23453  *     c_href = tree._getNs(c_node)
23454  */
23455   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23456   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
23457   __pyx_v_tags = __pyx_t_1;
23458   __pyx_t_1 = 0;
23459
23460   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":330
23461  *     cdef char* c_href
23462  *     cdef dict tags = {}
23463  *     path_list.append( u'.'.join(path) )             # <<<<<<<<<<<<<<
23464  *     c_href = tree._getNs(c_node)
23465  *     c_child = c_node.children
23466  */
23467   if (unlikely(__pyx_v_path_list == Py_None)) {
23468     PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
23469   }
23470   __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_u_9), __pyx_n_ui_join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23471   __Pyx_GOTREF(__pyx_t_1);
23472   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23473   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
23474   __Pyx_INCREF(((PyObject *)__pyx_v_path));
23475   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_path));
23476   __Pyx_GIVEREF(((PyObject *)__pyx_v_path));
23477   __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23478   __Pyx_GOTREF(__pyx_t_3);
23479   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23480   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
23481   __pyx_t_4 = PyList_Append(((PyObject *)__pyx_v_path_list), __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23482   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23483
23484   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":331
23485  *     cdef dict tags = {}
23486  *     path_list.append( u'.'.join(path) )
23487  *     c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
23488  *     c_child = c_node.children
23489  *     while c_child is not NULL:
23490  */
23491   __pyx_v_c_href = _getNs(__pyx_v_c_node);
23492
23493   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":332
23494  *     path_list.append( u'.'.join(path) )
23495  *     c_href = tree._getNs(c_node)
23496  *     c_child = c_node.children             # <<<<<<<<<<<<<<
23497  *     while c_child is not NULL:
23498  *         while c_child.type != tree.XML_ELEMENT_NODE:
23499  */
23500   __pyx_v_c_child = __pyx_v_c_node->children;
23501
23502   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":333
23503  *     c_href = tree._getNs(c_node)
23504  *     c_child = c_node.children
23505  *     while c_child is not NULL:             # <<<<<<<<<<<<<<
23506  *         while c_child.type != tree.XML_ELEMENT_NODE:
23507  *             c_child = c_child.next
23508  */
23509   while (1) {
23510     __pyx_t_5 = (__pyx_v_c_child != NULL);
23511     if (!__pyx_t_5) break;
23512
23513     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":334
23514  *     c_child = c_node.children
23515  *     while c_child is not NULL:
23516  *         while c_child.type != tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<<
23517  *             c_child = c_child.next
23518  *             if c_child is NULL:
23519  */
23520     while (1) {
23521       __pyx_t_5 = (__pyx_v_c_child->type != XML_ELEMENT_NODE);
23522       if (!__pyx_t_5) break;
23523
23524       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":335
23525  *     while c_child is not NULL:
23526  *         while c_child.type != tree.XML_ELEMENT_NODE:
23527  *             c_child = c_child.next             # <<<<<<<<<<<<<<
23528  *             if c_child is NULL:
23529  *                 return 0
23530  */
23531       __pyx_v_c_child = __pyx_v_c_child->next;
23532
23533       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":336
23534  *         while c_child.type != tree.XML_ELEMENT_NODE:
23535  *             c_child = c_child.next
23536  *             if c_child is NULL:             # <<<<<<<<<<<<<<
23537  *                 return 0
23538  *         if c_href is tree._getNs(c_child):
23539  */
23540       __pyx_t_5 = (__pyx_v_c_child == NULL);
23541       if (__pyx_t_5) {
23542
23543         /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":337
23544  *             c_child = c_child.next
23545  *             if c_child is NULL:
23546  *                 return 0             # <<<<<<<<<<<<<<
23547  *         if c_href is tree._getNs(c_child):
23548  *             tag = pyunicode(c_child.name)
23549  */
23550         __pyx_r = 0;
23551         goto __pyx_L0;
23552         goto __pyx_L7;
23553       }
23554       __pyx_L7:;
23555     }
23556
23557     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":338
23558  *             if c_child is NULL:
23559  *                 return 0
23560  *         if c_href is tree._getNs(c_child):             # <<<<<<<<<<<<<<
23561  *             tag = pyunicode(c_child.name)
23562  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
23563  */
23564     __pyx_t_5 = (__pyx_v_c_href == _getNs(__pyx_v_c_child));
23565     if (__pyx_t_5) {
23566
23567       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":339
23568  *                 return 0
23569  *         if c_href is tree._getNs(c_child):
23570  *             tag = pyunicode(c_child.name)             # <<<<<<<<<<<<<<
23571  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
23572  *             # special case: parent has namespace, child does not
23573  */
23574       __pyx_t_3 = pyunicode(__pyx_v_c_child->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23575       __Pyx_GOTREF(__pyx_t_3);
23576       __Pyx_DECREF(__pyx_v_tag);
23577       __pyx_v_tag = __pyx_t_3;
23578       __pyx_t_3 = 0;
23579       goto __pyx_L8;
23580     }
23581
23582     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":340
23583  *         if c_href is tree._getNs(c_child):
23584  *             tag = pyunicode(c_child.name)
23585  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:             # <<<<<<<<<<<<<<
23586  *             # special case: parent has namespace, child does not
23587  *             tag = u'{}' + pyunicode(c_child.name)
23588  */
23589     if ((__pyx_v_c_href != NULL)) {
23590       __pyx_t_5 = (_getNs(__pyx_v_c_child) == NULL);
23591     } else {
23592       __pyx_t_5 = (__pyx_v_c_href != NULL);
23593     }
23594     if (__pyx_t_5) {
23595
23596       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":342
23597  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
23598  *             # special case: parent has namespace, child does not
23599  *             tag = u'{}' + pyunicode(c_child.name)             # <<<<<<<<<<<<<<
23600  *         else:
23601  *             tag = cetree.namespacedName(c_child)
23602  */
23603       __pyx_t_3 = pyunicode(__pyx_v_c_child->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23604       __Pyx_GOTREF(__pyx_t_3);
23605       __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_u_53), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23606       __Pyx_GOTREF(__pyx_t_2);
23607       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23608       __Pyx_DECREF(__pyx_v_tag);
23609       __pyx_v_tag = __pyx_t_2;
23610       __pyx_t_2 = 0;
23611       goto __pyx_L8;
23612     }
23613     /*else*/ {
23614
23615       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":344
23616  *             tag = u'{}' + pyunicode(c_child.name)
23617  *         else:
23618  *             tag = cetree.namespacedName(c_child)             # <<<<<<<<<<<<<<
23619  *         dict_result = python.PyDict_GetItem(tags, tag)
23620  *         if dict_result is NULL:
23621  */
23622       __pyx_t_2 = namespacedName(__pyx_v_c_child); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23623       __Pyx_GOTREF(__pyx_t_2);
23624       __Pyx_DECREF(__pyx_v_tag);
23625       __pyx_v_tag = __pyx_t_2;
23626       __pyx_t_2 = 0;
23627     }
23628     __pyx_L8:;
23629
23630     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":345
23631  *         else:
23632  *             tag = cetree.namespacedName(c_child)
23633  *         dict_result = python.PyDict_GetItem(tags, tag)             # <<<<<<<<<<<<<<
23634  *         if dict_result is NULL:
23635  *             count = 0
23636  */
23637     __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_tags), __pyx_v_tag);
23638
23639     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":346
23640  *             tag = cetree.namespacedName(c_child)
23641  *         dict_result = python.PyDict_GetItem(tags, tag)
23642  *         if dict_result is NULL:             # <<<<<<<<<<<<<<
23643  *             count = 0
23644  *         else:
23645  */
23646     __pyx_t_5 = (__pyx_v_dict_result == NULL);
23647     if (__pyx_t_5) {
23648
23649       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":347
23650  *         dict_result = python.PyDict_GetItem(tags, tag)
23651  *         if dict_result is NULL:
23652  *             count = 0             # <<<<<<<<<<<<<<
23653  *         else:
23654  *             count = (<object>dict_result) + 1
23655  */
23656       __Pyx_INCREF(__pyx_int_0);
23657       __Pyx_DECREF(__pyx_v_count);
23658       __pyx_v_count = __pyx_int_0;
23659       goto __pyx_L9;
23660     }
23661     /*else*/ {
23662
23663       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":349
23664  *             count = 0
23665  *         else:
23666  *             count = (<object>dict_result) + 1             # <<<<<<<<<<<<<<
23667  *         tags[tag] = count
23668  *         if count > 0:
23669  */
23670       __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_dict_result), __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23671       __Pyx_GOTREF(__pyx_t_2);
23672       __Pyx_DECREF(__pyx_v_count);
23673       __pyx_v_count = __pyx_t_2;
23674       __pyx_t_2 = 0;
23675     }
23676     __pyx_L9:;
23677
23678     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":350
23679  *         else:
23680  *             count = (<object>dict_result) + 1
23681  *         tags[tag] = count             # <<<<<<<<<<<<<<
23682  *         if count > 0:
23683  *             tag += u'[%d]' % count
23684  */
23685     if (PyDict_SetItem(((PyObject *)__pyx_v_tags), __pyx_v_tag, __pyx_v_count) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23686
23687     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":351
23688  *             count = (<object>dict_result) + 1
23689  *         tags[tag] = count
23690  *         if count > 0:             # <<<<<<<<<<<<<<
23691  *             tag += u'[%d]' % count
23692  *         path.append(tag)
23693  */
23694     __pyx_t_2 = PyObject_RichCompare(__pyx_v_count, __pyx_int_0, Py_GT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23695     __Pyx_GOTREF(__pyx_t_2);
23696     __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23697     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23698     if (__pyx_t_5) {
23699
23700       /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":352
23701  *         tags[tag] = count
23702  *         if count > 0:
23703  *             tag += u'[%d]' % count             # <<<<<<<<<<<<<<
23704  *         path.append(tag)
23705  *         _recursiveBuildDescendantPaths(c_child, path, path_list)
23706  */
23707       __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_54), __pyx_v_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23708       __Pyx_GOTREF(__pyx_t_2);
23709       __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_tag, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23710       __Pyx_GOTREF(__pyx_t_3);
23711       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23712       __Pyx_DECREF(__pyx_v_tag);
23713       __pyx_v_tag = __pyx_t_3;
23714       __pyx_t_3 = 0;
23715       goto __pyx_L10;
23716     }
23717     __pyx_L10:;
23718
23719     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":353
23720  *         if count > 0:
23721  *             tag += u'[%d]' % count
23722  *         path.append(tag)             # <<<<<<<<<<<<<<
23723  *         _recursiveBuildDescendantPaths(c_child, path, path_list)
23724  *         del path[-1]
23725  */
23726     if (unlikely(__pyx_v_path == Py_None)) {
23727       PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
23728     }
23729     __pyx_t_4 = PyList_Append(((PyObject *)__pyx_v_path), __pyx_v_tag); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23730
23731     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":354
23732  *             tag += u'[%d]' % count
23733  *         path.append(tag)
23734  *         _recursiveBuildDescendantPaths(c_child, path, path_list)             # <<<<<<<<<<<<<<
23735  *         del path[-1]
23736  *         c_child = c_child.next
23737  */
23738     __pyx_t_4 = __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(__pyx_v_c_child, __pyx_v_path, __pyx_v_path_list); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23739
23740     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":355
23741  *         path.append(tag)
23742  *         _recursiveBuildDescendantPaths(c_child, path, path_list)
23743  *         del path[-1]             # <<<<<<<<<<<<<<
23744  *         c_child = c_child.next
23745  *     return 0
23746  */
23747     if (__Pyx_DelItemInt(((PyObject *)__pyx_v_path), -1, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23748
23749     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":356
23750  *         _recursiveBuildDescendantPaths(c_child, path, path_list)
23751  *         del path[-1]
23752  *         c_child = c_child.next             # <<<<<<<<<<<<<<
23753  *     return 0
23754  */
23755     __pyx_v_c_child = __pyx_v_c_child->next;
23756   }
23757
23758   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":357
23759  *         del path[-1]
23760  *         c_child = c_child.next
23761  *     return 0             # <<<<<<<<<<<<<<
23762  */
23763   __pyx_r = 0;
23764   goto __pyx_L0;
23765
23766   __pyx_r = 0;
23767   goto __pyx_L0;
23768   __pyx_L1_error:;
23769   __Pyx_XDECREF(__pyx_t_1);
23770   __Pyx_XDECREF(__pyx_t_2);
23771   __Pyx_XDECREF(__pyx_t_3);
23772   __Pyx_AddTraceback("lxml.objectify._recursiveBuildDescendantPaths");
23773   __pyx_r = -1;
23774   __pyx_L0:;
23775   __Pyx_XDECREF(__pyx_v_tags);
23776   __Pyx_DECREF(__pyx_v_tag);
23777   __Pyx_DECREF(__pyx_v_count);
23778   __Pyx_DECREF(__pyx_v_path);
23779   __Pyx_DECREF(__pyx_v_path_list);
23780   __Pyx_FinishRefcountContext();
23781   return __pyx_r;
23782 }
23783
23784 static PyObject *__pyx_tp_new_4lxml_9objectify_PyType(PyTypeObject *t, PyObject *a, PyObject *k) {
23785   struct __pyx_obj_4lxml_9objectify_PyType *p;
23786   PyObject *o = (*t->tp_alloc)(t, 0);
23787   if (!o) return 0;
23788   p = ((struct __pyx_obj_4lxml_9objectify_PyType *)o);
23789   p->name = Py_None; Py_INCREF(Py_None);
23790   p->type_check = Py_None; Py_INCREF(Py_None);
23791   p->stringify = Py_None; Py_INCREF(Py_None);
23792   p->_type = Py_None; Py_INCREF(Py_None);
23793   p->_schema_types = ((PyObject *)Py_None); Py_INCREF(Py_None);
23794   return o;
23795 }
23796
23797 static void __pyx_tp_dealloc_4lxml_9objectify_PyType(PyObject *o) {
23798   struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
23799   Py_XDECREF(p->name);
23800   Py_XDECREF(p->type_check);
23801   Py_XDECREF(p->stringify);
23802   Py_XDECREF(p->_type);
23803   Py_XDECREF(((PyObject *)p->_schema_types));
23804   (*Py_TYPE(o)->tp_free)(o);
23805 }
23806
23807 static int __pyx_tp_traverse_4lxml_9objectify_PyType(PyObject *o, visitproc v, void *a) {
23808   int e;
23809   struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
23810   if (p->name) {
23811     e = (*v)(p->name, a); if (e) return e;
23812   }
23813   if (p->type_check) {
23814     e = (*v)(p->type_check, a); if (e) return e;
23815   }
23816   if (p->stringify) {
23817     e = (*v)(p->stringify, a); if (e) return e;
23818   }
23819   if (p->_type) {
23820     e = (*v)(p->_type, a); if (e) return e;
23821   }
23822   if (p->_schema_types) {
23823     e = (*v)(p->_schema_types, a); if (e) return e;
23824   }
23825   return 0;
23826 }
23827
23828 static int __pyx_tp_clear_4lxml_9objectify_PyType(PyObject *o) {
23829   struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
23830   PyObject* tmp;
23831   tmp = ((PyObject*)p->name);
23832   p->name = Py_None; Py_INCREF(Py_None);
23833   Py_XDECREF(tmp);
23834   tmp = ((PyObject*)p->type_check);
23835   p->type_check = Py_None; Py_INCREF(Py_None);
23836   Py_XDECREF(tmp);
23837   tmp = ((PyObject*)p->stringify);
23838   p->stringify = Py_None; Py_INCREF(Py_None);
23839   Py_XDECREF(tmp);
23840   tmp = ((PyObject*)p->_type);
23841   p->_type = Py_None; Py_INCREF(Py_None);
23842   Py_XDECREF(tmp);
23843   tmp = ((PyObject*)p->_schema_types);
23844   p->_schema_types = ((PyObject *)Py_None); Py_INCREF(Py_None);
23845   Py_XDECREF(tmp);
23846   return 0;
23847 }
23848
23849 static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, void *x) {
23850   return __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(o);
23851 }
23852
23853 static int __pyx_setprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, PyObject *v, void *x) {
23854   if (v) {
23855     return __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___set__(o, v);
23856   }
23857   else {
23858     PyErr_SetString(PyExc_NotImplementedError, "__del__");
23859     return -1;
23860   }
23861 }
23862
23863 static struct PyMethodDef __pyx_methods_4lxml_9objectify_PyType[] = {
23864   {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_6PyType___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
23865   {__Pyx_NAMESTR("register"), (PyCFunction)__pyx_pf_4lxml_9objectify_6PyType_register, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_6PyType_register)},
23866   {__Pyx_NAMESTR("unregister"), (PyCFunction)__pyx_pf_4lxml_9objectify_6PyType_unregister, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_6PyType_unregister)},
23867   {0, 0, 0, 0}
23868 };
23869
23870 static struct PyMemberDef __pyx_members_4lxml_9objectify_PyType[] = {
23871   {(char *)"name", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_PyType, name), READONLY, 0},
23872   {(char *)"type_check", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_PyType, type_check), READONLY, 0},
23873   {(char *)"stringify", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_PyType, stringify), READONLY, 0},
23874   {0, 0, 0, 0, 0}
23875 };
23876
23877 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_PyType[] = {
23878   {(char *)"xmlSchemaTypes", __pyx_getprop_4lxml_9objectify_6PyType_xmlSchemaTypes, __pyx_setprop_4lxml_9objectify_6PyType_xmlSchemaTypes, __Pyx_DOCSTR(__pyx_k_55), 0},
23879   {0, 0, 0, 0, 0}
23880 };
23881
23882 static PyNumberMethods __pyx_tp_as_number_PyType = {
23883   0, /*nb_add*/
23884   0, /*nb_subtract*/
23885   0, /*nb_multiply*/
23886   #if PY_MAJOR_VERSION < 3
23887   0, /*nb_divide*/
23888   #endif
23889   0, /*nb_remainder*/
23890   0, /*nb_divmod*/
23891   0, /*nb_power*/
23892   0, /*nb_negative*/
23893   0, /*nb_positive*/
23894   0, /*nb_absolute*/
23895   0, /*nb_nonzero*/
23896   0, /*nb_invert*/
23897   0, /*nb_lshift*/
23898   0, /*nb_rshift*/
23899   0, /*nb_and*/
23900   0, /*nb_xor*/
23901   0, /*nb_or*/
23902   #if PY_MAJOR_VERSION < 3
23903   0, /*nb_coerce*/
23904   #endif
23905   0, /*nb_int*/
23906   #if PY_MAJOR_VERSION >= 3
23907   0, /*reserved*/
23908   #else
23909   0, /*nb_long*/
23910   #endif
23911   0, /*nb_float*/
23912   #if PY_MAJOR_VERSION < 3
23913   0, /*nb_oct*/
23914   #endif
23915   #if PY_MAJOR_VERSION < 3
23916   0, /*nb_hex*/
23917   #endif
23918   0, /*nb_inplace_add*/
23919   0, /*nb_inplace_subtract*/
23920   0, /*nb_inplace_multiply*/
23921   #if PY_MAJOR_VERSION < 3
23922   0, /*nb_inplace_divide*/
23923   #endif
23924   0, /*nb_inplace_remainder*/
23925   0, /*nb_inplace_power*/
23926   0, /*nb_inplace_lshift*/
23927   0, /*nb_inplace_rshift*/
23928   0, /*nb_inplace_and*/
23929   0, /*nb_inplace_xor*/
23930   0, /*nb_inplace_or*/
23931   0, /*nb_floor_divide*/
23932   0, /*nb_true_divide*/
23933   0, /*nb_inplace_floor_divide*/
23934   0, /*nb_inplace_true_divide*/
23935   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
23936   0, /*nb_index*/
23937   #endif
23938 };
23939
23940 static PySequenceMethods __pyx_tp_as_sequence_PyType = {
23941   0, /*sq_length*/
23942   0, /*sq_concat*/
23943   0, /*sq_repeat*/
23944   0, /*sq_item*/
23945   0, /*sq_slice*/
23946   0, /*sq_ass_item*/
23947   0, /*sq_ass_slice*/
23948   0, /*sq_contains*/
23949   0, /*sq_inplace_concat*/
23950   0, /*sq_inplace_repeat*/
23951 };
23952
23953 static PyMappingMethods __pyx_tp_as_mapping_PyType = {
23954   0, /*mp_length*/
23955   0, /*mp_subscript*/
23956   0, /*mp_ass_subscript*/
23957 };
23958
23959 static PyBufferProcs __pyx_tp_as_buffer_PyType = {
23960   #if PY_MAJOR_VERSION < 3
23961   0, /*bf_getreadbuffer*/
23962   #endif
23963   #if PY_MAJOR_VERSION < 3
23964   0, /*bf_getwritebuffer*/
23965   #endif
23966   #if PY_MAJOR_VERSION < 3
23967   0, /*bf_getsegcount*/
23968   #endif
23969   #if PY_MAJOR_VERSION < 3
23970   0, /*bf_getcharbuffer*/
23971   #endif
23972   #if PY_VERSION_HEX >= 0x02060000
23973   0, /*bf_getbuffer*/
23974   #endif
23975   #if PY_VERSION_HEX >= 0x02060000
23976   0, /*bf_releasebuffer*/
23977   #endif
23978 };
23979
23980 PyTypeObject __pyx_type_4lxml_9objectify_PyType = {
23981   PyVarObject_HEAD_INIT(0, 0)
23982   __Pyx_NAMESTR("lxml.objectify.PyType"), /*tp_name*/
23983   sizeof(struct __pyx_obj_4lxml_9objectify_PyType), /*tp_basicsize*/
23984   0, /*tp_itemsize*/
23985   __pyx_tp_dealloc_4lxml_9objectify_PyType, /*tp_dealloc*/
23986   0, /*tp_print*/
23987   0, /*tp_getattr*/
23988   0, /*tp_setattr*/
23989   0, /*tp_compare*/
23990   __pyx_pf_4lxml_9objectify_6PyType___repr__, /*tp_repr*/
23991   &__pyx_tp_as_number_PyType, /*tp_as_number*/
23992   &__pyx_tp_as_sequence_PyType, /*tp_as_sequence*/
23993   &__pyx_tp_as_mapping_PyType, /*tp_as_mapping*/
23994   0, /*tp_hash*/
23995   0, /*tp_call*/
23996   0, /*tp_str*/
23997   0, /*tp_getattro*/
23998   0, /*tp_setattro*/
23999   &__pyx_tp_as_buffer_PyType, /*tp_as_buffer*/
24000   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
24001   __Pyx_DOCSTR("PyType(self, name, type_check, type_class, stringify=None)\n    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\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*/
24002   __pyx_tp_traverse_4lxml_9objectify_PyType, /*tp_traverse*/
24003   __pyx_tp_clear_4lxml_9objectify_PyType, /*tp_clear*/
24004   0, /*tp_richcompare*/
24005   0, /*tp_weaklistoffset*/
24006   0, /*tp_iter*/
24007   0, /*tp_iternext*/
24008   __pyx_methods_4lxml_9objectify_PyType, /*tp_methods*/
24009   __pyx_members_4lxml_9objectify_PyType, /*tp_members*/
24010   __pyx_getsets_4lxml_9objectify_PyType, /*tp_getset*/
24011   0, /*tp_base*/
24012   0, /*tp_dict*/
24013   0, /*tp_descr_get*/
24014   0, /*tp_descr_set*/
24015   0, /*tp_dictoffset*/
24016   __pyx_pf_4lxml_9objectify_6PyType___init__, /*tp_init*/
24017   0, /*tp_alloc*/
24018   __pyx_tp_new_4lxml_9objectify_PyType, /*tp_new*/
24019   0, /*tp_free*/
24020   0, /*tp_is_gc*/
24021   0, /*tp_bases*/
24022   0, /*tp_mro*/
24023   0, /*tp_cache*/
24024   0, /*tp_subclasses*/
24025   0, /*tp_weaklist*/
24026 };
24027
24028 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedElement(PyTypeObject *t, PyObject *a, PyObject *k) {
24029   PyObject *o = __pyx_ptype_4lxml_11etreepublic_ElementBase->tp_new(t, a, k);
24030   if (!o) return 0;
24031   return o;
24032 }
24033
24034 static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement(PyObject *o) {
24035   __pyx_ptype_4lxml_11etreepublic_ElementBase->tp_dealloc(o);
24036 }
24037
24038 static int __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement(PyObject *o, visitproc v, void *a) {
24039   int e;
24040   if (__pyx_ptype_4lxml_11etreepublic_ElementBase->tp_traverse) {
24041     e = __pyx_ptype_4lxml_11etreepublic_ElementBase->tp_traverse(o, v, a); if (e) return e;
24042   }
24043   return 0;
24044 }
24045
24046 static int __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement(PyObject *o) {
24047   if (__pyx_ptype_4lxml_11etreepublic_ElementBase->tp_clear) {
24048     __pyx_ptype_4lxml_11etreepublic_ElementBase->tp_clear(o);
24049   }
24050   return 0;
24051 }
24052 static PyObject *__pyx_sq_item_4lxml_9objectify_ObjectifiedElement(PyObject *o, Py_ssize_t i) {
24053   PyObject *r;
24054   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
24055   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
24056   Py_DECREF(x);
24057   return r;
24058 }
24059
24060 static int __pyx_mp_ass_subscript_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *i, PyObject *v) {
24061   if (v) {
24062     return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setitem__(o, i, v);
24063   }
24064   else {
24065     return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delitem__(o, i);
24066   }
24067 }
24068
24069 static PyObject *__pyx_tp_getattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n) {
24070   PyObject *v = PyObject_GenericGetAttr(o, n);
24071   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
24072     PyErr_Clear();
24073     v = __pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__(o, n);
24074   }
24075   return v;
24076 }
24077
24078 static int __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n, PyObject *v) {
24079   if (v) {
24080     return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setattr__(o, n, v);
24081   }
24082   else {
24083     return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delattr__(o, n);
24084   }
24085 }
24086
24087 static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text(PyObject *o, void *x) {
24088   return __pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(o);
24089 }
24090
24091 static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement___dict__(PyObject *o, void *x) {
24092   return __pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(o);
24093 }
24094
24095 static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedElement[] = {
24096   {__Pyx_NAMESTR("__iter__"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__)},
24097   {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24098   {__Pyx_NAMESTR("countchildren"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_countchildren, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_countchildren)},
24099   {__Pyx_NAMESTR("getchildren"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_getchildren, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_getchildren)},
24100   {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement___getattr__)},
24101   {__Pyx_NAMESTR("addattr"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_addattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_addattr)},
24102   {__Pyx_NAMESTR("__getitem__"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__, METH_O|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement___getitem__)},
24103   {__Pyx_NAMESTR("iterfind"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_iterfind, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_iterfind)},
24104   {__Pyx_NAMESTR("findall"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findall, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_findall)},
24105   {__Pyx_NAMESTR("find"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_find, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_find)},
24106   {__Pyx_NAMESTR("findtext"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findtext, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_findtext)},
24107   {__Pyx_NAMESTR("descendantpaths"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_descendantpaths, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_descendantpaths)},
24108   {0, 0, 0, 0}
24109 };
24110
24111 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectifiedElement[] = {
24112   {(char *)"text", __pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text, 0, 0, 0},
24113   {(char *)"__dict__", __pyx_getprop_4lxml_9objectify_18ObjectifiedElement___dict__, 0, __Pyx_DOCSTR(__pyx_k_56), 0},
24114   {0, 0, 0, 0, 0}
24115 };
24116
24117 static PyNumberMethods __pyx_tp_as_number_ObjectifiedElement = {
24118   0, /*nb_add*/
24119   0, /*nb_subtract*/
24120   0, /*nb_multiply*/
24121   #if PY_MAJOR_VERSION < 3
24122   0, /*nb_divide*/
24123   #endif
24124   0, /*nb_remainder*/
24125   0, /*nb_divmod*/
24126   0, /*nb_power*/
24127   0, /*nb_negative*/
24128   0, /*nb_positive*/
24129   0, /*nb_absolute*/
24130   0, /*nb_nonzero*/
24131   0, /*nb_invert*/
24132   0, /*nb_lshift*/
24133   0, /*nb_rshift*/
24134   0, /*nb_and*/
24135   0, /*nb_xor*/
24136   0, /*nb_or*/
24137   #if PY_MAJOR_VERSION < 3
24138   0, /*nb_coerce*/
24139   #endif
24140   0, /*nb_int*/
24141   #if PY_MAJOR_VERSION >= 3
24142   0, /*reserved*/
24143   #else
24144   0, /*nb_long*/
24145   #endif
24146   0, /*nb_float*/
24147   #if PY_MAJOR_VERSION < 3
24148   0, /*nb_oct*/
24149   #endif
24150   #if PY_MAJOR_VERSION < 3
24151   0, /*nb_hex*/
24152   #endif
24153   0, /*nb_inplace_add*/
24154   0, /*nb_inplace_subtract*/
24155   0, /*nb_inplace_multiply*/
24156   #if PY_MAJOR_VERSION < 3
24157   0, /*nb_inplace_divide*/
24158   #endif
24159   0, /*nb_inplace_remainder*/
24160   0, /*nb_inplace_power*/
24161   0, /*nb_inplace_lshift*/
24162   0, /*nb_inplace_rshift*/
24163   0, /*nb_inplace_and*/
24164   0, /*nb_inplace_xor*/
24165   0, /*nb_inplace_or*/
24166   0, /*nb_floor_divide*/
24167   0, /*nb_true_divide*/
24168   0, /*nb_inplace_floor_divide*/
24169   0, /*nb_inplace_true_divide*/
24170   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
24171   0, /*nb_index*/
24172   #endif
24173 };
24174
24175 static PySequenceMethods __pyx_tp_as_sequence_ObjectifiedElement = {
24176   __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__, /*sq_length*/
24177   0, /*sq_concat*/
24178   0, /*sq_repeat*/
24179   __pyx_sq_item_4lxml_9objectify_ObjectifiedElement, /*sq_item*/
24180   0, /*sq_slice*/
24181   0, /*sq_ass_item*/
24182   0, /*sq_ass_slice*/
24183   0, /*sq_contains*/
24184   0, /*sq_inplace_concat*/
24185   0, /*sq_inplace_repeat*/
24186 };
24187
24188 static PyMappingMethods __pyx_tp_as_mapping_ObjectifiedElement = {
24189   __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__, /*mp_length*/
24190   __pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__, /*mp_subscript*/
24191   __pyx_mp_ass_subscript_4lxml_9objectify_ObjectifiedElement, /*mp_ass_subscript*/
24192 };
24193
24194 static PyBufferProcs __pyx_tp_as_buffer_ObjectifiedElement = {
24195   #if PY_MAJOR_VERSION < 3
24196   0, /*bf_getreadbuffer*/
24197   #endif
24198   #if PY_MAJOR_VERSION < 3
24199   0, /*bf_getwritebuffer*/
24200   #endif
24201   #if PY_MAJOR_VERSION < 3
24202   0, /*bf_getsegcount*/
24203   #endif
24204   #if PY_MAJOR_VERSION < 3
24205   0, /*bf_getcharbuffer*/
24206   #endif
24207   #if PY_VERSION_HEX >= 0x02060000
24208   0, /*bf_getbuffer*/
24209   #endif
24210   #if PY_VERSION_HEX >= 0x02060000
24211   0, /*bf_releasebuffer*/
24212   #endif
24213 };
24214
24215 PyTypeObject __pyx_type_4lxml_9objectify_ObjectifiedElement = {
24216   PyVarObject_HEAD_INIT(0, 0)
24217   __Pyx_NAMESTR("lxml.objectify.ObjectifiedElement"), /*tp_name*/
24218   sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement), /*tp_basicsize*/
24219   0, /*tp_itemsize*/
24220   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
24221   0, /*tp_print*/
24222   0, /*tp_getattr*/
24223   0, /*tp_setattr*/
24224   0, /*tp_compare*/
24225   0, /*tp_repr*/
24226   &__pyx_tp_as_number_ObjectifiedElement, /*tp_as_number*/
24227   &__pyx_tp_as_sequence_ObjectifiedElement, /*tp_as_sequence*/
24228   &__pyx_tp_as_mapping_ObjectifiedElement, /*tp_as_mapping*/
24229   0, /*tp_hash*/
24230   0, /*tp_call*/
24231   __pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__, /*tp_str*/
24232   __pyx_tp_getattro_4lxml_9objectify_ObjectifiedElement, /*tp_getattro*/
24233   __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement, /*tp_setattro*/
24234   &__pyx_tp_as_buffer_ObjectifiedElement, /*tp_as_buffer*/
24235   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
24236   __Pyx_DOCSTR("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 = XML(\"<root><c1><c2>0</c2><c2>1</c2></c1></root>\")\n       >>> second_c2 = root.c1.c2[1]\n       >>> print(second_c2.text)\n       1\n\n    Note that you cannot (and must not) instantiate this class or its\n    subclasses.\n    "), /*tp_doc*/
24237   __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
24238   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
24239   0, /*tp_richcompare*/
24240   0, /*tp_weaklistoffset*/
24241   __pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__, /*tp_iter*/
24242   0, /*tp_iternext*/
24243   __pyx_methods_4lxml_9objectify_ObjectifiedElement, /*tp_methods*/
24244   0, /*tp_members*/
24245   __pyx_getsets_4lxml_9objectify_ObjectifiedElement, /*tp_getset*/
24246   0, /*tp_base*/
24247   0, /*tp_dict*/
24248   0, /*tp_descr_get*/
24249   0, /*tp_descr_set*/
24250   0, /*tp_dictoffset*/
24251   0, /*tp_init*/
24252   0, /*tp_alloc*/
24253   __pyx_tp_new_4lxml_9objectify_ObjectifiedElement, /*tp_new*/
24254   0, /*tp_free*/
24255   0, /*tp_is_gc*/
24256   0, /*tp_bases*/
24257   0, /*tp_mro*/
24258   0, /*tp_cache*/
24259   0, /*tp_subclasses*/
24260   0, /*tp_weaklist*/
24261 };
24262
24263 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(PyTypeObject *t, PyObject *a, PyObject *k) {
24264   PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
24265   if (!o) return 0;
24266   return o;
24267 }
24268
24269 static PyObject *__pyx_getprop_4lxml_9objectify_22ObjectifiedDataElement_pyval(PyObject *o, void *x) {
24270   return __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(o);
24271 }
24272
24273 static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedDataElement[] = {
24274   {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24275   {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24276   {__Pyx_NAMESTR("_setText"), (PyCFunction)__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement__setText, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_22ObjectifiedDataElement__setText)},
24277   {0, 0, 0, 0}
24278 };
24279
24280 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectifiedDataElement[] = {
24281   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_22ObjectifiedDataElement_pyval, 0, 0, 0},
24282   {0, 0, 0, 0, 0}
24283 };
24284
24285 static PyNumberMethods __pyx_tp_as_number_ObjectifiedDataElement = {
24286   0, /*nb_add*/
24287   0, /*nb_subtract*/
24288   0, /*nb_multiply*/
24289   #if PY_MAJOR_VERSION < 3
24290   0, /*nb_divide*/
24291   #endif
24292   0, /*nb_remainder*/
24293   0, /*nb_divmod*/
24294   0, /*nb_power*/
24295   0, /*nb_negative*/
24296   0, /*nb_positive*/
24297   0, /*nb_absolute*/
24298   0, /*nb_nonzero*/
24299   0, /*nb_invert*/
24300   0, /*nb_lshift*/
24301   0, /*nb_rshift*/
24302   0, /*nb_and*/
24303   0, /*nb_xor*/
24304   0, /*nb_or*/
24305   #if PY_MAJOR_VERSION < 3
24306   0, /*nb_coerce*/
24307   #endif
24308   0, /*nb_int*/
24309   #if PY_MAJOR_VERSION >= 3
24310   0, /*reserved*/
24311   #else
24312   0, /*nb_long*/
24313   #endif
24314   0, /*nb_float*/
24315   #if PY_MAJOR_VERSION < 3
24316   0, /*nb_oct*/
24317   #endif
24318   #if PY_MAJOR_VERSION < 3
24319   0, /*nb_hex*/
24320   #endif
24321   0, /*nb_inplace_add*/
24322   0, /*nb_inplace_subtract*/
24323   0, /*nb_inplace_multiply*/
24324   #if PY_MAJOR_VERSION < 3
24325   0, /*nb_inplace_divide*/
24326   #endif
24327   0, /*nb_inplace_remainder*/
24328   0, /*nb_inplace_power*/
24329   0, /*nb_inplace_lshift*/
24330   0, /*nb_inplace_rshift*/
24331   0, /*nb_inplace_and*/
24332   0, /*nb_inplace_xor*/
24333   0, /*nb_inplace_or*/
24334   0, /*nb_floor_divide*/
24335   0, /*nb_true_divide*/
24336   0, /*nb_inplace_floor_divide*/
24337   0, /*nb_inplace_true_divide*/
24338   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
24339   0, /*nb_index*/
24340   #endif
24341 };
24342
24343 static PySequenceMethods __pyx_tp_as_sequence_ObjectifiedDataElement = {
24344   0, /*sq_length*/
24345   0, /*sq_concat*/
24346   0, /*sq_repeat*/
24347   0, /*sq_item*/
24348   0, /*sq_slice*/
24349   0, /*sq_ass_item*/
24350   0, /*sq_ass_slice*/
24351   0, /*sq_contains*/
24352   0, /*sq_inplace_concat*/
24353   0, /*sq_inplace_repeat*/
24354 };
24355
24356 static PyMappingMethods __pyx_tp_as_mapping_ObjectifiedDataElement = {
24357   0, /*mp_length*/
24358   0, /*mp_subscript*/
24359   0, /*mp_ass_subscript*/
24360 };
24361
24362 static PyBufferProcs __pyx_tp_as_buffer_ObjectifiedDataElement = {
24363   #if PY_MAJOR_VERSION < 3
24364   0, /*bf_getreadbuffer*/
24365   #endif
24366   #if PY_MAJOR_VERSION < 3
24367   0, /*bf_getwritebuffer*/
24368   #endif
24369   #if PY_MAJOR_VERSION < 3
24370   0, /*bf_getsegcount*/
24371   #endif
24372   #if PY_MAJOR_VERSION < 3
24373   0, /*bf_getcharbuffer*/
24374   #endif
24375   #if PY_VERSION_HEX >= 0x02060000
24376   0, /*bf_getbuffer*/
24377   #endif
24378   #if PY_VERSION_HEX >= 0x02060000
24379   0, /*bf_releasebuffer*/
24380   #endif
24381 };
24382
24383 PyTypeObject __pyx_type_4lxml_9objectify_ObjectifiedDataElement = {
24384   PyVarObject_HEAD_INIT(0, 0)
24385   __Pyx_NAMESTR("lxml.objectify.ObjectifiedDataElement"), /*tp_name*/
24386   sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement), /*tp_basicsize*/
24387   0, /*tp_itemsize*/
24388   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
24389   0, /*tp_print*/
24390   0, /*tp_getattr*/
24391   0, /*tp_setattr*/
24392   0, /*tp_compare*/
24393   __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__, /*tp_repr*/
24394   &__pyx_tp_as_number_ObjectifiedDataElement, /*tp_as_number*/
24395   &__pyx_tp_as_sequence_ObjectifiedDataElement, /*tp_as_sequence*/
24396   &__pyx_tp_as_mapping_ObjectifiedDataElement, /*tp_as_mapping*/
24397   0, /*tp_hash*/
24398   0, /*tp_call*/
24399   __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__, /*tp_str*/
24400   0, /*tp_getattro*/
24401   0, /*tp_setattro*/
24402   &__pyx_tp_as_buffer_ObjectifiedDataElement, /*tp_as_buffer*/
24403   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
24404   __Pyx_DOCSTR("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*/
24405   __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
24406   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
24407   0, /*tp_richcompare*/
24408   0, /*tp_weaklistoffset*/
24409   0, /*tp_iter*/
24410   0, /*tp_iternext*/
24411   __pyx_methods_4lxml_9objectify_ObjectifiedDataElement, /*tp_methods*/
24412   0, /*tp_members*/
24413   __pyx_getsets_4lxml_9objectify_ObjectifiedDataElement, /*tp_getset*/
24414   0, /*tp_base*/
24415   0, /*tp_dict*/
24416   0, /*tp_descr_get*/
24417   0, /*tp_descr_set*/
24418   0, /*tp_dictoffset*/
24419   0, /*tp_init*/
24420   0, /*tp_alloc*/
24421   __pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement, /*tp_new*/
24422   0, /*tp_free*/
24423   0, /*tp_is_gc*/
24424   0, /*tp_bases*/
24425   0, /*tp_mro*/
24426   0, /*tp_cache*/
24427   0, /*tp_subclasses*/
24428   0, /*tp_weaklist*/
24429 };
24430
24431 static PyObject *__pyx_tp_new_4lxml_9objectify_NumberElement(PyTypeObject *t, PyObject *a, PyObject *k) {
24432   struct __pyx_obj_4lxml_9objectify_NumberElement *p;
24433   PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
24434   if (!o) return 0;
24435   p = ((struct __pyx_obj_4lxml_9objectify_NumberElement *)o);
24436   p->_parse_value = Py_None; Py_INCREF(Py_None);
24437   return o;
24438 }
24439
24440 static void __pyx_tp_dealloc_4lxml_9objectify_NumberElement(PyObject *o) {
24441   struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
24442   Py_XDECREF(p->_parse_value);
24443   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement(o);
24444 }
24445
24446 static int __pyx_tp_traverse_4lxml_9objectify_NumberElement(PyObject *o, visitproc v, void *a) {
24447   int e;
24448   struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
24449   e = __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement(o, v, a); if (e) return e;
24450   if (p->_parse_value) {
24451     e = (*v)(p->_parse_value, a); if (e) return e;
24452   }
24453   return 0;
24454 }
24455
24456 static int __pyx_tp_clear_4lxml_9objectify_NumberElement(PyObject *o) {
24457   struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
24458   PyObject* tmp;
24459   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement(o);
24460   tmp = ((PyObject*)p->_parse_value);
24461   p->_parse_value = Py_None; Py_INCREF(Py_None);
24462   Py_XDECREF(tmp);
24463   return 0;
24464 }
24465
24466 static PyObject *__pyx_getprop_4lxml_9objectify_13NumberElement_pyval(PyObject *o, void *x) {
24467   return __pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(o);
24468 }
24469
24470 static struct PyMethodDef __pyx_methods_4lxml_9objectify_NumberElement[] = {
24471   {__Pyx_NAMESTR("_setValueParser"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_13NumberElement__setValueParser)},
24472   {__Pyx_NAMESTR("__int__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___int__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24473   {__Pyx_NAMESTR("__long__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___long__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24474   {__Pyx_NAMESTR("__float__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___float__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24475   {__Pyx_NAMESTR("__complex__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___complex__, METH_NOARGS, __Pyx_DOCSTR(0)},
24476   {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24477   {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24478   {__Pyx_NAMESTR("__oct__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___oct__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24479   {__Pyx_NAMESTR("__hex__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___hex__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24480   {__Pyx_NAMESTR("__add__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___add__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24481   {__Pyx_NAMESTR("__sub__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___sub__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24482   {__Pyx_NAMESTR("__mul__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___mul__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24483   {__Pyx_NAMESTR("__div__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___div__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24484   {__Pyx_NAMESTR("__truediv__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___truediv__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24485   {__Pyx_NAMESTR("__mod__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___mod__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24486   {__Pyx_NAMESTR("__neg__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___neg__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24487   {__Pyx_NAMESTR("__pos__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___pos__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24488   {__Pyx_NAMESTR("__abs__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___abs__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24489   {__Pyx_NAMESTR("__invert__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___invert__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24490   {__Pyx_NAMESTR("__lshift__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___lshift__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24491   {__Pyx_NAMESTR("__rshift__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___rshift__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24492   {__Pyx_NAMESTR("__and__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___and__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24493   {__Pyx_NAMESTR("__or__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___or__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24494   {__Pyx_NAMESTR("__xor__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___xor__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24495   {0, 0, 0, 0}
24496 };
24497
24498 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_NumberElement[] = {
24499   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_13NumberElement_pyval, 0, 0, 0},
24500   {0, 0, 0, 0, 0}
24501 };
24502
24503 static PyNumberMethods __pyx_tp_as_number_NumberElement = {
24504   __pyx_pf_4lxml_9objectify_13NumberElement___add__, /*nb_add*/
24505   __pyx_pf_4lxml_9objectify_13NumberElement___sub__, /*nb_subtract*/
24506   __pyx_pf_4lxml_9objectify_13NumberElement___mul__, /*nb_multiply*/
24507   #if PY_MAJOR_VERSION < 3
24508   __pyx_pf_4lxml_9objectify_13NumberElement___div__, /*nb_divide*/
24509   #endif
24510   __pyx_pf_4lxml_9objectify_13NumberElement___mod__, /*nb_remainder*/
24511   0, /*nb_divmod*/
24512   __pyx_pf_4lxml_9objectify_13NumberElement___pow__, /*nb_power*/
24513   __pyx_pf_4lxml_9objectify_13NumberElement___neg__, /*nb_negative*/
24514   __pyx_pf_4lxml_9objectify_13NumberElement___pos__, /*nb_positive*/
24515   __pyx_pf_4lxml_9objectify_13NumberElement___abs__, /*nb_absolute*/
24516   __pyx_pf_4lxml_9objectify_13NumberElement___nonzero__, /*nb_nonzero*/
24517   __pyx_pf_4lxml_9objectify_13NumberElement___invert__, /*nb_invert*/
24518   __pyx_pf_4lxml_9objectify_13NumberElement___lshift__, /*nb_lshift*/
24519   __pyx_pf_4lxml_9objectify_13NumberElement___rshift__, /*nb_rshift*/
24520   __pyx_pf_4lxml_9objectify_13NumberElement___and__, /*nb_and*/
24521   __pyx_pf_4lxml_9objectify_13NumberElement___xor__, /*nb_xor*/
24522   __pyx_pf_4lxml_9objectify_13NumberElement___or__, /*nb_or*/
24523   #if PY_MAJOR_VERSION < 3
24524   0, /*nb_coerce*/
24525   #endif
24526   __pyx_pf_4lxml_9objectify_13NumberElement___int__, /*nb_int*/
24527   #if PY_MAJOR_VERSION >= 3
24528   0, /*reserved*/
24529   #else
24530   __pyx_pf_4lxml_9objectify_13NumberElement___long__, /*nb_long*/
24531   #endif
24532   __pyx_pf_4lxml_9objectify_13NumberElement___float__, /*nb_float*/
24533   #if PY_MAJOR_VERSION < 3
24534   __pyx_pf_4lxml_9objectify_13NumberElement___oct__, /*nb_oct*/
24535   #endif
24536   #if PY_MAJOR_VERSION < 3
24537   __pyx_pf_4lxml_9objectify_13NumberElement___hex__, /*nb_hex*/
24538   #endif
24539   0, /*nb_inplace_add*/
24540   0, /*nb_inplace_subtract*/
24541   0, /*nb_inplace_multiply*/
24542   #if PY_MAJOR_VERSION < 3
24543   0, /*nb_inplace_divide*/
24544   #endif
24545   0, /*nb_inplace_remainder*/
24546   0, /*nb_inplace_power*/
24547   0, /*nb_inplace_lshift*/
24548   0, /*nb_inplace_rshift*/
24549   0, /*nb_inplace_and*/
24550   0, /*nb_inplace_xor*/
24551   0, /*nb_inplace_or*/
24552   0, /*nb_floor_divide*/
24553   __pyx_pf_4lxml_9objectify_13NumberElement___truediv__, /*nb_true_divide*/
24554   0, /*nb_inplace_floor_divide*/
24555   0, /*nb_inplace_true_divide*/
24556   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
24557   0, /*nb_index*/
24558   #endif
24559 };
24560
24561 static PySequenceMethods __pyx_tp_as_sequence_NumberElement = {
24562   0, /*sq_length*/
24563   0, /*sq_concat*/
24564   0, /*sq_repeat*/
24565   0, /*sq_item*/
24566   0, /*sq_slice*/
24567   0, /*sq_ass_item*/
24568   0, /*sq_ass_slice*/
24569   0, /*sq_contains*/
24570   0, /*sq_inplace_concat*/
24571   0, /*sq_inplace_repeat*/
24572 };
24573
24574 static PyMappingMethods __pyx_tp_as_mapping_NumberElement = {
24575   0, /*mp_length*/
24576   0, /*mp_subscript*/
24577   0, /*mp_ass_subscript*/
24578 };
24579
24580 static PyBufferProcs __pyx_tp_as_buffer_NumberElement = {
24581   #if PY_MAJOR_VERSION < 3
24582   0, /*bf_getreadbuffer*/
24583   #endif
24584   #if PY_MAJOR_VERSION < 3
24585   0, /*bf_getwritebuffer*/
24586   #endif
24587   #if PY_MAJOR_VERSION < 3
24588   0, /*bf_getsegcount*/
24589   #endif
24590   #if PY_MAJOR_VERSION < 3
24591   0, /*bf_getcharbuffer*/
24592   #endif
24593   #if PY_VERSION_HEX >= 0x02060000
24594   0, /*bf_getbuffer*/
24595   #endif
24596   #if PY_VERSION_HEX >= 0x02060000
24597   0, /*bf_releasebuffer*/
24598   #endif
24599 };
24600
24601 PyTypeObject __pyx_type_4lxml_9objectify_NumberElement = {
24602   PyVarObject_HEAD_INIT(0, 0)
24603   __Pyx_NAMESTR("lxml.objectify.NumberElement"), /*tp_name*/
24604   sizeof(struct __pyx_obj_4lxml_9objectify_NumberElement), /*tp_basicsize*/
24605   0, /*tp_itemsize*/
24606   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
24607   0, /*tp_print*/
24608   0, /*tp_getattr*/
24609   0, /*tp_setattr*/
24610   0, /*tp_compare*/
24611   __pyx_pf_4lxml_9objectify_13NumberElement___repr__, /*tp_repr*/
24612   &__pyx_tp_as_number_NumberElement, /*tp_as_number*/
24613   &__pyx_tp_as_sequence_NumberElement, /*tp_as_sequence*/
24614   &__pyx_tp_as_mapping_NumberElement, /*tp_as_mapping*/
24615   0, /*tp_hash*/
24616   0, /*tp_call*/
24617   __pyx_pf_4lxml_9objectify_13NumberElement___str__, /*tp_str*/
24618   0, /*tp_getattro*/
24619   0, /*tp_setattro*/
24620   &__pyx_tp_as_buffer_NumberElement, /*tp_as_buffer*/
24621   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
24622   0, /*tp_doc*/
24623   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
24624   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
24625   __pyx_pf_4lxml_9objectify_13NumberElement___richcmp__, /*tp_richcompare*/
24626   0, /*tp_weaklistoffset*/
24627   0, /*tp_iter*/
24628   0, /*tp_iternext*/
24629   __pyx_methods_4lxml_9objectify_NumberElement, /*tp_methods*/
24630   0, /*tp_members*/
24631   __pyx_getsets_4lxml_9objectify_NumberElement, /*tp_getset*/
24632   0, /*tp_base*/
24633   0, /*tp_dict*/
24634   0, /*tp_descr_get*/
24635   0, /*tp_descr_set*/
24636   0, /*tp_dictoffset*/
24637   0, /*tp_init*/
24638   0, /*tp_alloc*/
24639   __pyx_tp_new_4lxml_9objectify_NumberElement, /*tp_new*/
24640   0, /*tp_free*/
24641   0, /*tp_is_gc*/
24642   0, /*tp_bases*/
24643   0, /*tp_mro*/
24644   0, /*tp_cache*/
24645   0, /*tp_subclasses*/
24646   0, /*tp_weaklist*/
24647 };
24648
24649 static PyObject *__pyx_tp_new_4lxml_9objectify_IntElement(PyTypeObject *t, PyObject *a, PyObject *k) {
24650   PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
24651   if (!o) return 0;
24652   return o;
24653 }
24654
24655 static struct PyMethodDef __pyx_methods_4lxml_9objectify_IntElement[] = {
24656   {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pf_4lxml_9objectify_10IntElement__init, METH_NOARGS, __Pyx_DOCSTR(0)},
24657   {0, 0, 0, 0}
24658 };
24659
24660 static PyNumberMethods __pyx_tp_as_number_IntElement = {
24661   0, /*nb_add*/
24662   0, /*nb_subtract*/
24663   0, /*nb_multiply*/
24664   #if PY_MAJOR_VERSION < 3
24665   0, /*nb_divide*/
24666   #endif
24667   0, /*nb_remainder*/
24668   0, /*nb_divmod*/
24669   0, /*nb_power*/
24670   0, /*nb_negative*/
24671   0, /*nb_positive*/
24672   0, /*nb_absolute*/
24673   0, /*nb_nonzero*/
24674   0, /*nb_invert*/
24675   0, /*nb_lshift*/
24676   0, /*nb_rshift*/
24677   0, /*nb_and*/
24678   0, /*nb_xor*/
24679   0, /*nb_or*/
24680   #if PY_MAJOR_VERSION < 3
24681   0, /*nb_coerce*/
24682   #endif
24683   0, /*nb_int*/
24684   #if PY_MAJOR_VERSION >= 3
24685   0, /*reserved*/
24686   #else
24687   0, /*nb_long*/
24688   #endif
24689   0, /*nb_float*/
24690   #if PY_MAJOR_VERSION < 3
24691   0, /*nb_oct*/
24692   #endif
24693   #if PY_MAJOR_VERSION < 3
24694   0, /*nb_hex*/
24695   #endif
24696   0, /*nb_inplace_add*/
24697   0, /*nb_inplace_subtract*/
24698   0, /*nb_inplace_multiply*/
24699   #if PY_MAJOR_VERSION < 3
24700   0, /*nb_inplace_divide*/
24701   #endif
24702   0, /*nb_inplace_remainder*/
24703   0, /*nb_inplace_power*/
24704   0, /*nb_inplace_lshift*/
24705   0, /*nb_inplace_rshift*/
24706   0, /*nb_inplace_and*/
24707   0, /*nb_inplace_xor*/
24708   0, /*nb_inplace_or*/
24709   0, /*nb_floor_divide*/
24710   0, /*nb_true_divide*/
24711   0, /*nb_inplace_floor_divide*/
24712   0, /*nb_inplace_true_divide*/
24713   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
24714   0, /*nb_index*/
24715   #endif
24716 };
24717
24718 static PySequenceMethods __pyx_tp_as_sequence_IntElement = {
24719   0, /*sq_length*/
24720   0, /*sq_concat*/
24721   0, /*sq_repeat*/
24722   0, /*sq_item*/
24723   0, /*sq_slice*/
24724   0, /*sq_ass_item*/
24725   0, /*sq_ass_slice*/
24726   0, /*sq_contains*/
24727   0, /*sq_inplace_concat*/
24728   0, /*sq_inplace_repeat*/
24729 };
24730
24731 static PyMappingMethods __pyx_tp_as_mapping_IntElement = {
24732   0, /*mp_length*/
24733   0, /*mp_subscript*/
24734   0, /*mp_ass_subscript*/
24735 };
24736
24737 static PyBufferProcs __pyx_tp_as_buffer_IntElement = {
24738   #if PY_MAJOR_VERSION < 3
24739   0, /*bf_getreadbuffer*/
24740   #endif
24741   #if PY_MAJOR_VERSION < 3
24742   0, /*bf_getwritebuffer*/
24743   #endif
24744   #if PY_MAJOR_VERSION < 3
24745   0, /*bf_getsegcount*/
24746   #endif
24747   #if PY_MAJOR_VERSION < 3
24748   0, /*bf_getcharbuffer*/
24749   #endif
24750   #if PY_VERSION_HEX >= 0x02060000
24751   0, /*bf_getbuffer*/
24752   #endif
24753   #if PY_VERSION_HEX >= 0x02060000
24754   0, /*bf_releasebuffer*/
24755   #endif
24756 };
24757
24758 PyTypeObject __pyx_type_4lxml_9objectify_IntElement = {
24759   PyVarObject_HEAD_INIT(0, 0)
24760   __Pyx_NAMESTR("lxml.objectify.IntElement"), /*tp_name*/
24761   sizeof(struct __pyx_obj_4lxml_9objectify_IntElement), /*tp_basicsize*/
24762   0, /*tp_itemsize*/
24763   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
24764   0, /*tp_print*/
24765   0, /*tp_getattr*/
24766   0, /*tp_setattr*/
24767   0, /*tp_compare*/
24768   0, /*tp_repr*/
24769   &__pyx_tp_as_number_IntElement, /*tp_as_number*/
24770   &__pyx_tp_as_sequence_IntElement, /*tp_as_sequence*/
24771   &__pyx_tp_as_mapping_IntElement, /*tp_as_mapping*/
24772   0, /*tp_hash*/
24773   0, /*tp_call*/
24774   0, /*tp_str*/
24775   0, /*tp_getattro*/
24776   0, /*tp_setattro*/
24777   &__pyx_tp_as_buffer_IntElement, /*tp_as_buffer*/
24778   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
24779   0, /*tp_doc*/
24780   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
24781   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
24782   0, /*tp_richcompare*/
24783   0, /*tp_weaklistoffset*/
24784   0, /*tp_iter*/
24785   0, /*tp_iternext*/
24786   __pyx_methods_4lxml_9objectify_IntElement, /*tp_methods*/
24787   0, /*tp_members*/
24788   0, /*tp_getset*/
24789   0, /*tp_base*/
24790   0, /*tp_dict*/
24791   0, /*tp_descr_get*/
24792   0, /*tp_descr_set*/
24793   0, /*tp_dictoffset*/
24794   0, /*tp_init*/
24795   0, /*tp_alloc*/
24796   __pyx_tp_new_4lxml_9objectify_IntElement, /*tp_new*/
24797   0, /*tp_free*/
24798   0, /*tp_is_gc*/
24799   0, /*tp_bases*/
24800   0, /*tp_mro*/
24801   0, /*tp_cache*/
24802   0, /*tp_subclasses*/
24803   0, /*tp_weaklist*/
24804 };
24805
24806 static PyObject *__pyx_tp_new_4lxml_9objectify_LongElement(PyTypeObject *t, PyObject *a, PyObject *k) {
24807   PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
24808   if (!o) return 0;
24809   return o;
24810 }
24811
24812 static struct PyMethodDef __pyx_methods_4lxml_9objectify_LongElement[] = {
24813   {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pf_4lxml_9objectify_11LongElement__init, METH_NOARGS, __Pyx_DOCSTR(0)},
24814   {0, 0, 0, 0}
24815 };
24816
24817 static PyNumberMethods __pyx_tp_as_number_LongElement = {
24818   0, /*nb_add*/
24819   0, /*nb_subtract*/
24820   0, /*nb_multiply*/
24821   #if PY_MAJOR_VERSION < 3
24822   0, /*nb_divide*/
24823   #endif
24824   0, /*nb_remainder*/
24825   0, /*nb_divmod*/
24826   0, /*nb_power*/
24827   0, /*nb_negative*/
24828   0, /*nb_positive*/
24829   0, /*nb_absolute*/
24830   0, /*nb_nonzero*/
24831   0, /*nb_invert*/
24832   0, /*nb_lshift*/
24833   0, /*nb_rshift*/
24834   0, /*nb_and*/
24835   0, /*nb_xor*/
24836   0, /*nb_or*/
24837   #if PY_MAJOR_VERSION < 3
24838   0, /*nb_coerce*/
24839   #endif
24840   0, /*nb_int*/
24841   #if PY_MAJOR_VERSION >= 3
24842   0, /*reserved*/
24843   #else
24844   0, /*nb_long*/
24845   #endif
24846   0, /*nb_float*/
24847   #if PY_MAJOR_VERSION < 3
24848   0, /*nb_oct*/
24849   #endif
24850   #if PY_MAJOR_VERSION < 3
24851   0, /*nb_hex*/
24852   #endif
24853   0, /*nb_inplace_add*/
24854   0, /*nb_inplace_subtract*/
24855   0, /*nb_inplace_multiply*/
24856   #if PY_MAJOR_VERSION < 3
24857   0, /*nb_inplace_divide*/
24858   #endif
24859   0, /*nb_inplace_remainder*/
24860   0, /*nb_inplace_power*/
24861   0, /*nb_inplace_lshift*/
24862   0, /*nb_inplace_rshift*/
24863   0, /*nb_inplace_and*/
24864   0, /*nb_inplace_xor*/
24865   0, /*nb_inplace_or*/
24866   0, /*nb_floor_divide*/
24867   0, /*nb_true_divide*/
24868   0, /*nb_inplace_floor_divide*/
24869   0, /*nb_inplace_true_divide*/
24870   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
24871   0, /*nb_index*/
24872   #endif
24873 };
24874
24875 static PySequenceMethods __pyx_tp_as_sequence_LongElement = {
24876   0, /*sq_length*/
24877   0, /*sq_concat*/
24878   0, /*sq_repeat*/
24879   0, /*sq_item*/
24880   0, /*sq_slice*/
24881   0, /*sq_ass_item*/
24882   0, /*sq_ass_slice*/
24883   0, /*sq_contains*/
24884   0, /*sq_inplace_concat*/
24885   0, /*sq_inplace_repeat*/
24886 };
24887
24888 static PyMappingMethods __pyx_tp_as_mapping_LongElement = {
24889   0, /*mp_length*/
24890   0, /*mp_subscript*/
24891   0, /*mp_ass_subscript*/
24892 };
24893
24894 static PyBufferProcs __pyx_tp_as_buffer_LongElement = {
24895   #if PY_MAJOR_VERSION < 3
24896   0, /*bf_getreadbuffer*/
24897   #endif
24898   #if PY_MAJOR_VERSION < 3
24899   0, /*bf_getwritebuffer*/
24900   #endif
24901   #if PY_MAJOR_VERSION < 3
24902   0, /*bf_getsegcount*/
24903   #endif
24904   #if PY_MAJOR_VERSION < 3
24905   0, /*bf_getcharbuffer*/
24906   #endif
24907   #if PY_VERSION_HEX >= 0x02060000
24908   0, /*bf_getbuffer*/
24909   #endif
24910   #if PY_VERSION_HEX >= 0x02060000
24911   0, /*bf_releasebuffer*/
24912   #endif
24913 };
24914
24915 PyTypeObject __pyx_type_4lxml_9objectify_LongElement = {
24916   PyVarObject_HEAD_INIT(0, 0)
24917   __Pyx_NAMESTR("lxml.objectify.LongElement"), /*tp_name*/
24918   sizeof(struct __pyx_obj_4lxml_9objectify_LongElement), /*tp_basicsize*/
24919   0, /*tp_itemsize*/
24920   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
24921   0, /*tp_print*/
24922   0, /*tp_getattr*/
24923   0, /*tp_setattr*/
24924   0, /*tp_compare*/
24925   0, /*tp_repr*/
24926   &__pyx_tp_as_number_LongElement, /*tp_as_number*/
24927   &__pyx_tp_as_sequence_LongElement, /*tp_as_sequence*/
24928   &__pyx_tp_as_mapping_LongElement, /*tp_as_mapping*/
24929   0, /*tp_hash*/
24930   0, /*tp_call*/
24931   0, /*tp_str*/
24932   0, /*tp_getattro*/
24933   0, /*tp_setattro*/
24934   &__pyx_tp_as_buffer_LongElement, /*tp_as_buffer*/
24935   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
24936   0, /*tp_doc*/
24937   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
24938   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
24939   0, /*tp_richcompare*/
24940   0, /*tp_weaklistoffset*/
24941   0, /*tp_iter*/
24942   0, /*tp_iternext*/
24943   __pyx_methods_4lxml_9objectify_LongElement, /*tp_methods*/
24944   0, /*tp_members*/
24945   0, /*tp_getset*/
24946   0, /*tp_base*/
24947   0, /*tp_dict*/
24948   0, /*tp_descr_get*/
24949   0, /*tp_descr_set*/
24950   0, /*tp_dictoffset*/
24951   0, /*tp_init*/
24952   0, /*tp_alloc*/
24953   __pyx_tp_new_4lxml_9objectify_LongElement, /*tp_new*/
24954   0, /*tp_free*/
24955   0, /*tp_is_gc*/
24956   0, /*tp_bases*/
24957   0, /*tp_mro*/
24958   0, /*tp_cache*/
24959   0, /*tp_subclasses*/
24960   0, /*tp_weaklist*/
24961 };
24962
24963 static PyObject *__pyx_tp_new_4lxml_9objectify_FloatElement(PyTypeObject *t, PyObject *a, PyObject *k) {
24964   PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
24965   if (!o) return 0;
24966   return o;
24967 }
24968
24969 static struct PyMethodDef __pyx_methods_4lxml_9objectify_FloatElement[] = {
24970   {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pf_4lxml_9objectify_12FloatElement__init, METH_NOARGS, __Pyx_DOCSTR(0)},
24971   {0, 0, 0, 0}
24972 };
24973
24974 static PyNumberMethods __pyx_tp_as_number_FloatElement = {
24975   0, /*nb_add*/
24976   0, /*nb_subtract*/
24977   0, /*nb_multiply*/
24978   #if PY_MAJOR_VERSION < 3
24979   0, /*nb_divide*/
24980   #endif
24981   0, /*nb_remainder*/
24982   0, /*nb_divmod*/
24983   0, /*nb_power*/
24984   0, /*nb_negative*/
24985   0, /*nb_positive*/
24986   0, /*nb_absolute*/
24987   0, /*nb_nonzero*/
24988   0, /*nb_invert*/
24989   0, /*nb_lshift*/
24990   0, /*nb_rshift*/
24991   0, /*nb_and*/
24992   0, /*nb_xor*/
24993   0, /*nb_or*/
24994   #if PY_MAJOR_VERSION < 3
24995   0, /*nb_coerce*/
24996   #endif
24997   0, /*nb_int*/
24998   #if PY_MAJOR_VERSION >= 3
24999   0, /*reserved*/
25000   #else
25001   0, /*nb_long*/
25002   #endif
25003   0, /*nb_float*/
25004   #if PY_MAJOR_VERSION < 3
25005   0, /*nb_oct*/
25006   #endif
25007   #if PY_MAJOR_VERSION < 3
25008   0, /*nb_hex*/
25009   #endif
25010   0, /*nb_inplace_add*/
25011   0, /*nb_inplace_subtract*/
25012   0, /*nb_inplace_multiply*/
25013   #if PY_MAJOR_VERSION < 3
25014   0, /*nb_inplace_divide*/
25015   #endif
25016   0, /*nb_inplace_remainder*/
25017   0, /*nb_inplace_power*/
25018   0, /*nb_inplace_lshift*/
25019   0, /*nb_inplace_rshift*/
25020   0, /*nb_inplace_and*/
25021   0, /*nb_inplace_xor*/
25022   0, /*nb_inplace_or*/
25023   0, /*nb_floor_divide*/
25024   0, /*nb_true_divide*/
25025   0, /*nb_inplace_floor_divide*/
25026   0, /*nb_inplace_true_divide*/
25027   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
25028   0, /*nb_index*/
25029   #endif
25030 };
25031
25032 static PySequenceMethods __pyx_tp_as_sequence_FloatElement = {
25033   0, /*sq_length*/
25034   0, /*sq_concat*/
25035   0, /*sq_repeat*/
25036   0, /*sq_item*/
25037   0, /*sq_slice*/
25038   0, /*sq_ass_item*/
25039   0, /*sq_ass_slice*/
25040   0, /*sq_contains*/
25041   0, /*sq_inplace_concat*/
25042   0, /*sq_inplace_repeat*/
25043 };
25044
25045 static PyMappingMethods __pyx_tp_as_mapping_FloatElement = {
25046   0, /*mp_length*/
25047   0, /*mp_subscript*/
25048   0, /*mp_ass_subscript*/
25049 };
25050
25051 static PyBufferProcs __pyx_tp_as_buffer_FloatElement = {
25052   #if PY_MAJOR_VERSION < 3
25053   0, /*bf_getreadbuffer*/
25054   #endif
25055   #if PY_MAJOR_VERSION < 3
25056   0, /*bf_getwritebuffer*/
25057   #endif
25058   #if PY_MAJOR_VERSION < 3
25059   0, /*bf_getsegcount*/
25060   #endif
25061   #if PY_MAJOR_VERSION < 3
25062   0, /*bf_getcharbuffer*/
25063   #endif
25064   #if PY_VERSION_HEX >= 0x02060000
25065   0, /*bf_getbuffer*/
25066   #endif
25067   #if PY_VERSION_HEX >= 0x02060000
25068   0, /*bf_releasebuffer*/
25069   #endif
25070 };
25071
25072 PyTypeObject __pyx_type_4lxml_9objectify_FloatElement = {
25073   PyVarObject_HEAD_INIT(0, 0)
25074   __Pyx_NAMESTR("lxml.objectify.FloatElement"), /*tp_name*/
25075   sizeof(struct __pyx_obj_4lxml_9objectify_FloatElement), /*tp_basicsize*/
25076   0, /*tp_itemsize*/
25077   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
25078   0, /*tp_print*/
25079   0, /*tp_getattr*/
25080   0, /*tp_setattr*/
25081   0, /*tp_compare*/
25082   0, /*tp_repr*/
25083   &__pyx_tp_as_number_FloatElement, /*tp_as_number*/
25084   &__pyx_tp_as_sequence_FloatElement, /*tp_as_sequence*/
25085   &__pyx_tp_as_mapping_FloatElement, /*tp_as_mapping*/
25086   0, /*tp_hash*/
25087   0, /*tp_call*/
25088   0, /*tp_str*/
25089   0, /*tp_getattro*/
25090   0, /*tp_setattro*/
25091   &__pyx_tp_as_buffer_FloatElement, /*tp_as_buffer*/
25092   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
25093   0, /*tp_doc*/
25094   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
25095   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
25096   0, /*tp_richcompare*/
25097   0, /*tp_weaklistoffset*/
25098   0, /*tp_iter*/
25099   0, /*tp_iternext*/
25100   __pyx_methods_4lxml_9objectify_FloatElement, /*tp_methods*/
25101   0, /*tp_members*/
25102   0, /*tp_getset*/
25103   0, /*tp_base*/
25104   0, /*tp_dict*/
25105   0, /*tp_descr_get*/
25106   0, /*tp_descr_set*/
25107   0, /*tp_dictoffset*/
25108   0, /*tp_init*/
25109   0, /*tp_alloc*/
25110   __pyx_tp_new_4lxml_9objectify_FloatElement, /*tp_new*/
25111   0, /*tp_free*/
25112   0, /*tp_is_gc*/
25113   0, /*tp_bases*/
25114   0, /*tp_mro*/
25115   0, /*tp_cache*/
25116   0, /*tp_subclasses*/
25117   0, /*tp_weaklist*/
25118 };
25119
25120 static PyObject *__pyx_tp_new_4lxml_9objectify_StringElement(PyTypeObject *t, PyObject *a, PyObject *k) {
25121   PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
25122   if (!o) return 0;
25123   return o;
25124 }
25125
25126 static PyObject *__pyx_getprop_4lxml_9objectify_13StringElement_pyval(PyObject *o, void *x) {
25127   return __pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(o);
25128 }
25129
25130 static struct PyMethodDef __pyx_methods_4lxml_9objectify_StringElement[] = {
25131   {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25132   {__Pyx_NAMESTR("strlen"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement_strlen, METH_NOARGS, __Pyx_DOCSTR(0)},
25133   {__Pyx_NAMESTR("__add__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___add__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
25134   {__Pyx_NAMESTR("__mul__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___mul__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
25135   {__Pyx_NAMESTR("__mod__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___mod__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
25136   {__Pyx_NAMESTR("__int__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___int__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25137   {__Pyx_NAMESTR("__long__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___long__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25138   {__Pyx_NAMESTR("__float__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___float__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25139   {__Pyx_NAMESTR("__complex__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___complex__, METH_NOARGS, __Pyx_DOCSTR(0)},
25140   {0, 0, 0, 0}
25141 };
25142
25143 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_StringElement[] = {
25144   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_13StringElement_pyval, 0, 0, 0},
25145   {0, 0, 0, 0, 0}
25146 };
25147
25148 static PyNumberMethods __pyx_tp_as_number_StringElement = {
25149   __pyx_pf_4lxml_9objectify_13StringElement___add__, /*nb_add*/
25150   0, /*nb_subtract*/
25151   __pyx_pf_4lxml_9objectify_13StringElement___mul__, /*nb_multiply*/
25152   #if PY_MAJOR_VERSION < 3
25153   0, /*nb_divide*/
25154   #endif
25155   __pyx_pf_4lxml_9objectify_13StringElement___mod__, /*nb_remainder*/
25156   0, /*nb_divmod*/
25157   0, /*nb_power*/
25158   0, /*nb_negative*/
25159   0, /*nb_positive*/
25160   0, /*nb_absolute*/
25161   __pyx_pf_4lxml_9objectify_13StringElement___nonzero__, /*nb_nonzero*/
25162   0, /*nb_invert*/
25163   0, /*nb_lshift*/
25164   0, /*nb_rshift*/
25165   0, /*nb_and*/
25166   0, /*nb_xor*/
25167   0, /*nb_or*/
25168   #if PY_MAJOR_VERSION < 3
25169   0, /*nb_coerce*/
25170   #endif
25171   __pyx_pf_4lxml_9objectify_13StringElement___int__, /*nb_int*/
25172   #if PY_MAJOR_VERSION >= 3
25173   0, /*reserved*/
25174   #else
25175   __pyx_pf_4lxml_9objectify_13StringElement___long__, /*nb_long*/
25176   #endif
25177   __pyx_pf_4lxml_9objectify_13StringElement___float__, /*nb_float*/
25178   #if PY_MAJOR_VERSION < 3
25179   0, /*nb_oct*/
25180   #endif
25181   #if PY_MAJOR_VERSION < 3
25182   0, /*nb_hex*/
25183   #endif
25184   0, /*nb_inplace_add*/
25185   0, /*nb_inplace_subtract*/
25186   0, /*nb_inplace_multiply*/
25187   #if PY_MAJOR_VERSION < 3
25188   0, /*nb_inplace_divide*/
25189   #endif
25190   0, /*nb_inplace_remainder*/
25191   0, /*nb_inplace_power*/
25192   0, /*nb_inplace_lshift*/
25193   0, /*nb_inplace_rshift*/
25194   0, /*nb_inplace_and*/
25195   0, /*nb_inplace_xor*/
25196   0, /*nb_inplace_or*/
25197   0, /*nb_floor_divide*/
25198   0, /*nb_true_divide*/
25199   0, /*nb_inplace_floor_divide*/
25200   0, /*nb_inplace_true_divide*/
25201   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
25202   0, /*nb_index*/
25203   #endif
25204 };
25205
25206 static PySequenceMethods __pyx_tp_as_sequence_StringElement = {
25207   0, /*sq_length*/
25208   0, /*sq_concat*/
25209   0, /*sq_repeat*/
25210   0, /*sq_item*/
25211   0, /*sq_slice*/
25212   0, /*sq_ass_item*/
25213   0, /*sq_ass_slice*/
25214   0, /*sq_contains*/
25215   0, /*sq_inplace_concat*/
25216   0, /*sq_inplace_repeat*/
25217 };
25218
25219 static PyMappingMethods __pyx_tp_as_mapping_StringElement = {
25220   0, /*mp_length*/
25221   0, /*mp_subscript*/
25222   0, /*mp_ass_subscript*/
25223 };
25224
25225 static PyBufferProcs __pyx_tp_as_buffer_StringElement = {
25226   #if PY_MAJOR_VERSION < 3
25227   0, /*bf_getreadbuffer*/
25228   #endif
25229   #if PY_MAJOR_VERSION < 3
25230   0, /*bf_getwritebuffer*/
25231   #endif
25232   #if PY_MAJOR_VERSION < 3
25233   0, /*bf_getsegcount*/
25234   #endif
25235   #if PY_MAJOR_VERSION < 3
25236   0, /*bf_getcharbuffer*/
25237   #endif
25238   #if PY_VERSION_HEX >= 0x02060000
25239   0, /*bf_getbuffer*/
25240   #endif
25241   #if PY_VERSION_HEX >= 0x02060000
25242   0, /*bf_releasebuffer*/
25243   #endif
25244 };
25245
25246 PyTypeObject __pyx_type_4lxml_9objectify_StringElement = {
25247   PyVarObject_HEAD_INIT(0, 0)
25248   __Pyx_NAMESTR("lxml.objectify.StringElement"), /*tp_name*/
25249   sizeof(struct __pyx_obj_4lxml_9objectify_StringElement), /*tp_basicsize*/
25250   0, /*tp_itemsize*/
25251   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
25252   0, /*tp_print*/
25253   0, /*tp_getattr*/
25254   0, /*tp_setattr*/
25255   0, /*tp_compare*/
25256   __pyx_pf_4lxml_9objectify_13StringElement___repr__, /*tp_repr*/
25257   &__pyx_tp_as_number_StringElement, /*tp_as_number*/
25258   &__pyx_tp_as_sequence_StringElement, /*tp_as_sequence*/
25259   &__pyx_tp_as_mapping_StringElement, /*tp_as_mapping*/
25260   0, /*tp_hash*/
25261   0, /*tp_call*/
25262   0, /*tp_str*/
25263   0, /*tp_getattro*/
25264   0, /*tp_setattro*/
25265   &__pyx_tp_as_buffer_StringElement, /*tp_as_buffer*/
25266   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
25267   __Pyx_DOCSTR("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*/
25268   __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
25269   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
25270   __pyx_pf_4lxml_9objectify_13StringElement___richcmp__, /*tp_richcompare*/
25271   0, /*tp_weaklistoffset*/
25272   0, /*tp_iter*/
25273   0, /*tp_iternext*/
25274   __pyx_methods_4lxml_9objectify_StringElement, /*tp_methods*/
25275   0, /*tp_members*/
25276   __pyx_getsets_4lxml_9objectify_StringElement, /*tp_getset*/
25277   0, /*tp_base*/
25278   0, /*tp_dict*/
25279   0, /*tp_descr_get*/
25280   0, /*tp_descr_set*/
25281   0, /*tp_dictoffset*/
25282   0, /*tp_init*/
25283   0, /*tp_alloc*/
25284   __pyx_tp_new_4lxml_9objectify_StringElement, /*tp_new*/
25285   0, /*tp_free*/
25286   0, /*tp_is_gc*/
25287   0, /*tp_bases*/
25288   0, /*tp_mro*/
25289   0, /*tp_cache*/
25290   0, /*tp_subclasses*/
25291   0, /*tp_weaklist*/
25292 };
25293
25294 static PyObject *__pyx_tp_new_4lxml_9objectify_NoneElement(PyTypeObject *t, PyObject *a, PyObject *k) {
25295   PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
25296   if (!o) return 0;
25297   return o;
25298 }
25299
25300 static PyObject *__pyx_getprop_4lxml_9objectify_11NoneElement_pyval(PyObject *o, void *x) {
25301   return __pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(o);
25302 }
25303
25304 static struct PyMethodDef __pyx_methods_4lxml_9objectify_NoneElement[] = {
25305   {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_11NoneElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25306   {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_11NoneElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25307   {0, 0, 0, 0}
25308 };
25309
25310 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_NoneElement[] = {
25311   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_11NoneElement_pyval, 0, 0, 0},
25312   {0, 0, 0, 0, 0}
25313 };
25314
25315 static PyNumberMethods __pyx_tp_as_number_NoneElement = {
25316   0, /*nb_add*/
25317   0, /*nb_subtract*/
25318   0, /*nb_multiply*/
25319   #if PY_MAJOR_VERSION < 3
25320   0, /*nb_divide*/
25321   #endif
25322   0, /*nb_remainder*/
25323   0, /*nb_divmod*/
25324   0, /*nb_power*/
25325   0, /*nb_negative*/
25326   0, /*nb_positive*/
25327   0, /*nb_absolute*/
25328   __pyx_pf_4lxml_9objectify_11NoneElement___nonzero__, /*nb_nonzero*/
25329   0, /*nb_invert*/
25330   0, /*nb_lshift*/
25331   0, /*nb_rshift*/
25332   0, /*nb_and*/
25333   0, /*nb_xor*/
25334   0, /*nb_or*/
25335   #if PY_MAJOR_VERSION < 3
25336   0, /*nb_coerce*/
25337   #endif
25338   0, /*nb_int*/
25339   #if PY_MAJOR_VERSION >= 3
25340   0, /*reserved*/
25341   #else
25342   0, /*nb_long*/
25343   #endif
25344   0, /*nb_float*/
25345   #if PY_MAJOR_VERSION < 3
25346   0, /*nb_oct*/
25347   #endif
25348   #if PY_MAJOR_VERSION < 3
25349   0, /*nb_hex*/
25350   #endif
25351   0, /*nb_inplace_add*/
25352   0, /*nb_inplace_subtract*/
25353   0, /*nb_inplace_multiply*/
25354   #if PY_MAJOR_VERSION < 3
25355   0, /*nb_inplace_divide*/
25356   #endif
25357   0, /*nb_inplace_remainder*/
25358   0, /*nb_inplace_power*/
25359   0, /*nb_inplace_lshift*/
25360   0, /*nb_inplace_rshift*/
25361   0, /*nb_inplace_and*/
25362   0, /*nb_inplace_xor*/
25363   0, /*nb_inplace_or*/
25364   0, /*nb_floor_divide*/
25365   0, /*nb_true_divide*/
25366   0, /*nb_inplace_floor_divide*/
25367   0, /*nb_inplace_true_divide*/
25368   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
25369   0, /*nb_index*/
25370   #endif
25371 };
25372
25373 static PySequenceMethods __pyx_tp_as_sequence_NoneElement = {
25374   0, /*sq_length*/
25375   0, /*sq_concat*/
25376   0, /*sq_repeat*/
25377   0, /*sq_item*/
25378   0, /*sq_slice*/
25379   0, /*sq_ass_item*/
25380   0, /*sq_ass_slice*/
25381   0, /*sq_contains*/
25382   0, /*sq_inplace_concat*/
25383   0, /*sq_inplace_repeat*/
25384 };
25385
25386 static PyMappingMethods __pyx_tp_as_mapping_NoneElement = {
25387   0, /*mp_length*/
25388   0, /*mp_subscript*/
25389   0, /*mp_ass_subscript*/
25390 };
25391
25392 static PyBufferProcs __pyx_tp_as_buffer_NoneElement = {
25393   #if PY_MAJOR_VERSION < 3
25394   0, /*bf_getreadbuffer*/
25395   #endif
25396   #if PY_MAJOR_VERSION < 3
25397   0, /*bf_getwritebuffer*/
25398   #endif
25399   #if PY_MAJOR_VERSION < 3
25400   0, /*bf_getsegcount*/
25401   #endif
25402   #if PY_MAJOR_VERSION < 3
25403   0, /*bf_getcharbuffer*/
25404   #endif
25405   #if PY_VERSION_HEX >= 0x02060000
25406   0, /*bf_getbuffer*/
25407   #endif
25408   #if PY_VERSION_HEX >= 0x02060000
25409   0, /*bf_releasebuffer*/
25410   #endif
25411 };
25412
25413 PyTypeObject __pyx_type_4lxml_9objectify_NoneElement = {
25414   PyVarObject_HEAD_INIT(0, 0)
25415   __Pyx_NAMESTR("lxml.objectify.NoneElement"), /*tp_name*/
25416   sizeof(struct __pyx_obj_4lxml_9objectify_NoneElement), /*tp_basicsize*/
25417   0, /*tp_itemsize*/
25418   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
25419   0, /*tp_print*/
25420   0, /*tp_getattr*/
25421   0, /*tp_setattr*/
25422   0, /*tp_compare*/
25423   __pyx_pf_4lxml_9objectify_11NoneElement___repr__, /*tp_repr*/
25424   &__pyx_tp_as_number_NoneElement, /*tp_as_number*/
25425   &__pyx_tp_as_sequence_NoneElement, /*tp_as_sequence*/
25426   &__pyx_tp_as_mapping_NoneElement, /*tp_as_mapping*/
25427   0, /*tp_hash*/
25428   0, /*tp_call*/
25429   __pyx_pf_4lxml_9objectify_11NoneElement___str__, /*tp_str*/
25430   0, /*tp_getattro*/
25431   0, /*tp_setattro*/
25432   &__pyx_tp_as_buffer_NoneElement, /*tp_as_buffer*/
25433   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
25434   0, /*tp_doc*/
25435   __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
25436   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
25437   __pyx_pf_4lxml_9objectify_11NoneElement___richcmp__, /*tp_richcompare*/
25438   0, /*tp_weaklistoffset*/
25439   0, /*tp_iter*/
25440   0, /*tp_iternext*/
25441   __pyx_methods_4lxml_9objectify_NoneElement, /*tp_methods*/
25442   0, /*tp_members*/
25443   __pyx_getsets_4lxml_9objectify_NoneElement, /*tp_getset*/
25444   0, /*tp_base*/
25445   0, /*tp_dict*/
25446   0, /*tp_descr_get*/
25447   0, /*tp_descr_set*/
25448   0, /*tp_dictoffset*/
25449   0, /*tp_init*/
25450   0, /*tp_alloc*/
25451   __pyx_tp_new_4lxml_9objectify_NoneElement, /*tp_new*/
25452   0, /*tp_free*/
25453   0, /*tp_is_gc*/
25454   0, /*tp_bases*/
25455   0, /*tp_mro*/
25456   0, /*tp_cache*/
25457   0, /*tp_subclasses*/
25458   0, /*tp_weaklist*/
25459 };
25460
25461 static PyObject *__pyx_tp_new_4lxml_9objectify_BoolElement(PyTypeObject *t, PyObject *a, PyObject *k) {
25462   PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
25463   if (!o) return 0;
25464   return o;
25465 }
25466
25467 static PyObject *__pyx_getprop_4lxml_9objectify_11BoolElement_pyval(PyObject *o, void *x) {
25468   return __pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(o);
25469 }
25470
25471 static struct PyMethodDef __pyx_methods_4lxml_9objectify_BoolElement[] = {
25472   {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pf_4lxml_9objectify_11BoolElement__init, METH_NOARGS, __Pyx_DOCSTR(0)},
25473   {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_11BoolElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25474   {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_11BoolElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25475   {0, 0, 0, 0}
25476 };
25477
25478 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_BoolElement[] = {
25479   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_11BoolElement_pyval, 0, 0, 0},
25480   {0, 0, 0, 0, 0}
25481 };
25482
25483 static PyNumberMethods __pyx_tp_as_number_BoolElement = {
25484   0, /*nb_add*/
25485   0, /*nb_subtract*/
25486   0, /*nb_multiply*/
25487   #if PY_MAJOR_VERSION < 3
25488   0, /*nb_divide*/
25489   #endif
25490   0, /*nb_remainder*/
25491   0, /*nb_divmod*/
25492   0, /*nb_power*/
25493   0, /*nb_negative*/
25494   0, /*nb_positive*/
25495   0, /*nb_absolute*/
25496   __pyx_pf_4lxml_9objectify_11BoolElement___nonzero__, /*nb_nonzero*/
25497   0, /*nb_invert*/
25498   0, /*nb_lshift*/
25499   0, /*nb_rshift*/
25500   0, /*nb_and*/
25501   0, /*nb_xor*/
25502   0, /*nb_or*/
25503   #if PY_MAJOR_VERSION < 3
25504   0, /*nb_coerce*/
25505   #endif
25506   0, /*nb_int*/
25507   #if PY_MAJOR_VERSION >= 3
25508   0, /*reserved*/
25509   #else
25510   0, /*nb_long*/
25511   #endif
25512   0, /*nb_float*/
25513   #if PY_MAJOR_VERSION < 3
25514   0, /*nb_oct*/
25515   #endif
25516   #if PY_MAJOR_VERSION < 3
25517   0, /*nb_hex*/
25518   #endif
25519   0, /*nb_inplace_add*/
25520   0, /*nb_inplace_subtract*/
25521   0, /*nb_inplace_multiply*/
25522   #if PY_MAJOR_VERSION < 3
25523   0, /*nb_inplace_divide*/
25524   #endif
25525   0, /*nb_inplace_remainder*/
25526   0, /*nb_inplace_power*/
25527   0, /*nb_inplace_lshift*/
25528   0, /*nb_inplace_rshift*/
25529   0, /*nb_inplace_and*/
25530   0, /*nb_inplace_xor*/
25531   0, /*nb_inplace_or*/
25532   0, /*nb_floor_divide*/
25533   0, /*nb_true_divide*/
25534   0, /*nb_inplace_floor_divide*/
25535   0, /*nb_inplace_true_divide*/
25536   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
25537   0, /*nb_index*/
25538   #endif
25539 };
25540
25541 static PySequenceMethods __pyx_tp_as_sequence_BoolElement = {
25542   0, /*sq_length*/
25543   0, /*sq_concat*/
25544   0, /*sq_repeat*/
25545   0, /*sq_item*/
25546   0, /*sq_slice*/
25547   0, /*sq_ass_item*/
25548   0, /*sq_ass_slice*/
25549   0, /*sq_contains*/
25550   0, /*sq_inplace_concat*/
25551   0, /*sq_inplace_repeat*/
25552 };
25553
25554 static PyMappingMethods __pyx_tp_as_mapping_BoolElement = {
25555   0, /*mp_length*/
25556   0, /*mp_subscript*/
25557   0, /*mp_ass_subscript*/
25558 };
25559
25560 static PyBufferProcs __pyx_tp_as_buffer_BoolElement = {
25561   #if PY_MAJOR_VERSION < 3
25562   0, /*bf_getreadbuffer*/
25563   #endif
25564   #if PY_MAJOR_VERSION < 3
25565   0, /*bf_getwritebuffer*/
25566   #endif
25567   #if PY_MAJOR_VERSION < 3
25568   0, /*bf_getsegcount*/
25569   #endif
25570   #if PY_MAJOR_VERSION < 3
25571   0, /*bf_getcharbuffer*/
25572   #endif
25573   #if PY_VERSION_HEX >= 0x02060000
25574   0, /*bf_getbuffer*/
25575   #endif
25576   #if PY_VERSION_HEX >= 0x02060000
25577   0, /*bf_releasebuffer*/
25578   #endif
25579 };
25580
25581 PyTypeObject __pyx_type_4lxml_9objectify_BoolElement = {
25582   PyVarObject_HEAD_INIT(0, 0)
25583   __Pyx_NAMESTR("lxml.objectify.BoolElement"), /*tp_name*/
25584   sizeof(struct __pyx_obj_4lxml_9objectify_BoolElement), /*tp_basicsize*/
25585   0, /*tp_itemsize*/
25586   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
25587   0, /*tp_print*/
25588   0, /*tp_getattr*/
25589   0, /*tp_setattr*/
25590   0, /*tp_compare*/
25591   __pyx_pf_4lxml_9objectify_11BoolElement___repr__, /*tp_repr*/
25592   &__pyx_tp_as_number_BoolElement, /*tp_as_number*/
25593   &__pyx_tp_as_sequence_BoolElement, /*tp_as_sequence*/
25594   &__pyx_tp_as_mapping_BoolElement, /*tp_as_mapping*/
25595   0, /*tp_hash*/
25596   0, /*tp_call*/
25597   __pyx_pf_4lxml_9objectify_11BoolElement___str__, /*tp_str*/
25598   0, /*tp_getattro*/
25599   0, /*tp_setattro*/
25600   &__pyx_tp_as_buffer_BoolElement, /*tp_as_buffer*/
25601   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
25602   __Pyx_DOCSTR("Boolean type base on string values: 'true' or 'false'.\n\n    Note that this inherits from IntElement to mimic the behaviour of\n    Python's bool type.\n    "), /*tp_doc*/
25603   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
25604   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
25605   __pyx_pf_4lxml_9objectify_11BoolElement___richcmp__, /*tp_richcompare*/
25606   0, /*tp_weaklistoffset*/
25607   0, /*tp_iter*/
25608   0, /*tp_iternext*/
25609   __pyx_methods_4lxml_9objectify_BoolElement, /*tp_methods*/
25610   0, /*tp_members*/
25611   __pyx_getsets_4lxml_9objectify_BoolElement, /*tp_getset*/
25612   0, /*tp_base*/
25613   0, /*tp_dict*/
25614   0, /*tp_descr_get*/
25615   0, /*tp_descr_set*/
25616   0, /*tp_dictoffset*/
25617   0, /*tp_init*/
25618   0, /*tp_alloc*/
25619   __pyx_tp_new_4lxml_9objectify_BoolElement, /*tp_new*/
25620   0, /*tp_free*/
25621   0, /*tp_is_gc*/
25622   0, /*tp_bases*/
25623   0, /*tp_mro*/
25624   0, /*tp_cache*/
25625   0, /*tp_subclasses*/
25626   0, /*tp_weaklist*/
25627 };
25628
25629 static PyObject *__pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller(PyTypeObject *t, PyObject *a, PyObject *k) {
25630   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p;
25631   PyObject *o = (*t->tp_alloc)(t, 0);
25632   if (!o) return 0;
25633   p = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o);
25634   p->_tag = Py_None; Py_INCREF(Py_None);
25635   p->_nsmap = Py_None; Py_INCREF(Py_None);
25636   p->_element_factory = Py_None; Py_INCREF(Py_None);
25637   return o;
25638 }
25639
25640 static void __pyx_tp_dealloc_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o) {
25641   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
25642   Py_XDECREF(p->_tag);
25643   Py_XDECREF(p->_nsmap);
25644   Py_XDECREF(p->_element_factory);
25645   (*Py_TYPE(o)->tp_free)(o);
25646 }
25647
25648 static int __pyx_tp_traverse_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o, visitproc v, void *a) {
25649   int e;
25650   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
25651   if (p->_tag) {
25652     e = (*v)(p->_tag, a); if (e) return e;
25653   }
25654   if (p->_nsmap) {
25655     e = (*v)(p->_nsmap, a); if (e) return e;
25656   }
25657   if (p->_element_factory) {
25658     e = (*v)(p->_element_factory, a); if (e) return e;
25659   }
25660   return 0;
25661 }
25662
25663 static int __pyx_tp_clear_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o) {
25664   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
25665   PyObject* tmp;
25666   tmp = ((PyObject*)p->_tag);
25667   p->_tag = Py_None; Py_INCREF(Py_None);
25668   Py_XDECREF(tmp);
25669   tmp = ((PyObject*)p->_nsmap);
25670   p->_nsmap = Py_None; Py_INCREF(Py_None);
25671   Py_XDECREF(tmp);
25672   tmp = ((PyObject*)p->_element_factory);
25673   p->_element_factory = Py_None; Py_INCREF(Py_None);
25674   Py_XDECREF(tmp);
25675   return 0;
25676 }
25677
25678 static struct PyMethodDef __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller[] = {
25679   {__Pyx_NAMESTR("__call__"), (PyCFunction)__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__, METH_VARARGS|METH_KEYWORDS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__)},
25680   {0, 0, 0, 0}
25681 };
25682
25683 static PyNumberMethods __pyx_tp_as_number__ObjectifyElementMakerCaller = {
25684   0, /*nb_add*/
25685   0, /*nb_subtract*/
25686   0, /*nb_multiply*/
25687   #if PY_MAJOR_VERSION < 3
25688   0, /*nb_divide*/
25689   #endif
25690   0, /*nb_remainder*/
25691   0, /*nb_divmod*/
25692   0, /*nb_power*/
25693   0, /*nb_negative*/
25694   0, /*nb_positive*/
25695   0, /*nb_absolute*/
25696   0, /*nb_nonzero*/
25697   0, /*nb_invert*/
25698   0, /*nb_lshift*/
25699   0, /*nb_rshift*/
25700   0, /*nb_and*/
25701   0, /*nb_xor*/
25702   0, /*nb_or*/
25703   #if PY_MAJOR_VERSION < 3
25704   0, /*nb_coerce*/
25705   #endif
25706   0, /*nb_int*/
25707   #if PY_MAJOR_VERSION >= 3
25708   0, /*reserved*/
25709   #else
25710   0, /*nb_long*/
25711   #endif
25712   0, /*nb_float*/
25713   #if PY_MAJOR_VERSION < 3
25714   0, /*nb_oct*/
25715   #endif
25716   #if PY_MAJOR_VERSION < 3
25717   0, /*nb_hex*/
25718   #endif
25719   0, /*nb_inplace_add*/
25720   0, /*nb_inplace_subtract*/
25721   0, /*nb_inplace_multiply*/
25722   #if PY_MAJOR_VERSION < 3
25723   0, /*nb_inplace_divide*/
25724   #endif
25725   0, /*nb_inplace_remainder*/
25726   0, /*nb_inplace_power*/
25727   0, /*nb_inplace_lshift*/
25728   0, /*nb_inplace_rshift*/
25729   0, /*nb_inplace_and*/
25730   0, /*nb_inplace_xor*/
25731   0, /*nb_inplace_or*/
25732   0, /*nb_floor_divide*/
25733   0, /*nb_true_divide*/
25734   0, /*nb_inplace_floor_divide*/
25735   0, /*nb_inplace_true_divide*/
25736   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
25737   0, /*nb_index*/
25738   #endif
25739 };
25740
25741 static PySequenceMethods __pyx_tp_as_sequence__ObjectifyElementMakerCaller = {
25742   0, /*sq_length*/
25743   0, /*sq_concat*/
25744   0, /*sq_repeat*/
25745   0, /*sq_item*/
25746   0, /*sq_slice*/
25747   0, /*sq_ass_item*/
25748   0, /*sq_ass_slice*/
25749   0, /*sq_contains*/
25750   0, /*sq_inplace_concat*/
25751   0, /*sq_inplace_repeat*/
25752 };
25753
25754 static PyMappingMethods __pyx_tp_as_mapping__ObjectifyElementMakerCaller = {
25755   0, /*mp_length*/
25756   0, /*mp_subscript*/
25757   0, /*mp_ass_subscript*/
25758 };
25759
25760 static PyBufferProcs __pyx_tp_as_buffer__ObjectifyElementMakerCaller = {
25761   #if PY_MAJOR_VERSION < 3
25762   0, /*bf_getreadbuffer*/
25763   #endif
25764   #if PY_MAJOR_VERSION < 3
25765   0, /*bf_getwritebuffer*/
25766   #endif
25767   #if PY_MAJOR_VERSION < 3
25768   0, /*bf_getsegcount*/
25769   #endif
25770   #if PY_MAJOR_VERSION < 3
25771   0, /*bf_getcharbuffer*/
25772   #endif
25773   #if PY_VERSION_HEX >= 0x02060000
25774   0, /*bf_getbuffer*/
25775   #endif
25776   #if PY_VERSION_HEX >= 0x02060000
25777   0, /*bf_releasebuffer*/
25778   #endif
25779 };
25780
25781 PyTypeObject __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller = {
25782   PyVarObject_HEAD_INIT(0, 0)
25783   __Pyx_NAMESTR("lxml.objectify._ObjectifyElementMakerCaller"), /*tp_name*/
25784   sizeof(struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller), /*tp_basicsize*/
25785   0, /*tp_itemsize*/
25786   __pyx_tp_dealloc_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_dealloc*/
25787   0, /*tp_print*/
25788   0, /*tp_getattr*/
25789   0, /*tp_setattr*/
25790   0, /*tp_compare*/
25791   0, /*tp_repr*/
25792   &__pyx_tp_as_number__ObjectifyElementMakerCaller, /*tp_as_number*/
25793   &__pyx_tp_as_sequence__ObjectifyElementMakerCaller, /*tp_as_sequence*/
25794   &__pyx_tp_as_mapping__ObjectifyElementMakerCaller, /*tp_as_mapping*/
25795   0, /*tp_hash*/
25796   __pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__, /*tp_call*/
25797   0, /*tp_str*/
25798   0, /*tp_getattro*/
25799   0, /*tp_setattro*/
25800   &__pyx_tp_as_buffer__ObjectifyElementMakerCaller, /*tp_as_buffer*/
25801   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
25802   0, /*tp_doc*/
25803   __pyx_tp_traverse_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_traverse*/
25804   __pyx_tp_clear_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_clear*/
25805   0, /*tp_richcompare*/
25806   0, /*tp_weaklistoffset*/
25807   0, /*tp_iter*/
25808   0, /*tp_iternext*/
25809   __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_methods*/
25810   0, /*tp_members*/
25811   0, /*tp_getset*/
25812   0, /*tp_base*/
25813   0, /*tp_dict*/
25814   0, /*tp_descr_get*/
25815   0, /*tp_descr_set*/
25816   0, /*tp_dictoffset*/
25817   0, /*tp_init*/
25818   0, /*tp_alloc*/
25819   __pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_new*/
25820   0, /*tp_free*/
25821   0, /*tp_is_gc*/
25822   0, /*tp_bases*/
25823   0, /*tp_mro*/
25824   0, /*tp_cache*/
25825   0, /*tp_subclasses*/
25826   0, /*tp_weaklist*/
25827 };
25828
25829 static PyObject *__pyx_tp_new_4lxml_9objectify_ElementMaker(PyTypeObject *t, PyObject *a, PyObject *k) {
25830   struct __pyx_obj_4lxml_9objectify_ElementMaker *p;
25831   PyObject *o = (*t->tp_alloc)(t, 0);
25832   if (!o) return 0;
25833   p = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)o);
25834   p->_makeelement = Py_None; Py_INCREF(Py_None);
25835   p->_namespace = Py_None; Py_INCREF(Py_None);
25836   p->_nsmap = Py_None; Py_INCREF(Py_None);
25837   return o;
25838 }
25839
25840 static void __pyx_tp_dealloc_4lxml_9objectify_ElementMaker(PyObject *o) {
25841   struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
25842   Py_XDECREF(p->_makeelement);
25843   Py_XDECREF(p->_namespace);
25844   Py_XDECREF(p->_nsmap);
25845   (*Py_TYPE(o)->tp_free)(o);
25846 }
25847
25848 static int __pyx_tp_traverse_4lxml_9objectify_ElementMaker(PyObject *o, visitproc v, void *a) {
25849   int e;
25850   struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
25851   if (p->_makeelement) {
25852     e = (*v)(p->_makeelement, a); if (e) return e;
25853   }
25854   if (p->_namespace) {
25855     e = (*v)(p->_namespace, a); if (e) return e;
25856   }
25857   if (p->_nsmap) {
25858     e = (*v)(p->_nsmap, a); if (e) return e;
25859   }
25860   return 0;
25861 }
25862
25863 static int __pyx_tp_clear_4lxml_9objectify_ElementMaker(PyObject *o) {
25864   struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
25865   PyObject* tmp;
25866   tmp = ((PyObject*)p->_makeelement);
25867   p->_makeelement = Py_None; Py_INCREF(Py_None);
25868   Py_XDECREF(tmp);
25869   tmp = ((PyObject*)p->_namespace);
25870   p->_namespace = Py_None; Py_INCREF(Py_None);
25871   Py_XDECREF(tmp);
25872   tmp = ((PyObject*)p->_nsmap);
25873   p->_nsmap = Py_None; Py_INCREF(Py_None);
25874   Py_XDECREF(tmp);
25875   return 0;
25876 }
25877
25878 static PyObject *__pyx_tp_getattro_4lxml_9objectify_ElementMaker(PyObject *o, PyObject *n) {
25879   PyObject *v = PyObject_GenericGetAttr(o, n);
25880   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
25881     PyErr_Clear();
25882     v = __pyx_pf_4lxml_9objectify_12ElementMaker___getattr__(o, n);
25883   }
25884   return v;
25885 }
25886
25887 static struct PyMethodDef __pyx_methods_4lxml_9objectify_ElementMaker[] = {
25888   {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_12ElementMaker___getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
25889   {0, 0, 0, 0}
25890 };
25891
25892 static PyNumberMethods __pyx_tp_as_number_ElementMaker = {
25893   0, /*nb_add*/
25894   0, /*nb_subtract*/
25895   0, /*nb_multiply*/
25896   #if PY_MAJOR_VERSION < 3
25897   0, /*nb_divide*/
25898   #endif
25899   0, /*nb_remainder*/
25900   0, /*nb_divmod*/
25901   0, /*nb_power*/
25902   0, /*nb_negative*/
25903   0, /*nb_positive*/
25904   0, /*nb_absolute*/
25905   0, /*nb_nonzero*/
25906   0, /*nb_invert*/
25907   0, /*nb_lshift*/
25908   0, /*nb_rshift*/
25909   0, /*nb_and*/
25910   0, /*nb_xor*/
25911   0, /*nb_or*/
25912   #if PY_MAJOR_VERSION < 3
25913   0, /*nb_coerce*/
25914   #endif
25915   0, /*nb_int*/
25916   #if PY_MAJOR_VERSION >= 3
25917   0, /*reserved*/
25918   #else
25919   0, /*nb_long*/
25920   #endif
25921   0, /*nb_float*/
25922   #if PY_MAJOR_VERSION < 3
25923   0, /*nb_oct*/
25924   #endif
25925   #if PY_MAJOR_VERSION < 3
25926   0, /*nb_hex*/
25927   #endif
25928   0, /*nb_inplace_add*/
25929   0, /*nb_inplace_subtract*/
25930   0, /*nb_inplace_multiply*/
25931   #if PY_MAJOR_VERSION < 3
25932   0, /*nb_inplace_divide*/
25933   #endif
25934   0, /*nb_inplace_remainder*/
25935   0, /*nb_inplace_power*/
25936   0, /*nb_inplace_lshift*/
25937   0, /*nb_inplace_rshift*/
25938   0, /*nb_inplace_and*/
25939   0, /*nb_inplace_xor*/
25940   0, /*nb_inplace_or*/
25941   0, /*nb_floor_divide*/
25942   0, /*nb_true_divide*/
25943   0, /*nb_inplace_floor_divide*/
25944   0, /*nb_inplace_true_divide*/
25945   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
25946   0, /*nb_index*/
25947   #endif
25948 };
25949
25950 static PySequenceMethods __pyx_tp_as_sequence_ElementMaker = {
25951   0, /*sq_length*/
25952   0, /*sq_concat*/
25953   0, /*sq_repeat*/
25954   0, /*sq_item*/
25955   0, /*sq_slice*/
25956   0, /*sq_ass_item*/
25957   0, /*sq_ass_slice*/
25958   0, /*sq_contains*/
25959   0, /*sq_inplace_concat*/
25960   0, /*sq_inplace_repeat*/
25961 };
25962
25963 static PyMappingMethods __pyx_tp_as_mapping_ElementMaker = {
25964   0, /*mp_length*/
25965   0, /*mp_subscript*/
25966   0, /*mp_ass_subscript*/
25967 };
25968
25969 static PyBufferProcs __pyx_tp_as_buffer_ElementMaker = {
25970   #if PY_MAJOR_VERSION < 3
25971   0, /*bf_getreadbuffer*/
25972   #endif
25973   #if PY_MAJOR_VERSION < 3
25974   0, /*bf_getwritebuffer*/
25975   #endif
25976   #if PY_MAJOR_VERSION < 3
25977   0, /*bf_getsegcount*/
25978   #endif
25979   #if PY_MAJOR_VERSION < 3
25980   0, /*bf_getcharbuffer*/
25981   #endif
25982   #if PY_VERSION_HEX >= 0x02060000
25983   0, /*bf_getbuffer*/
25984   #endif
25985   #if PY_VERSION_HEX >= 0x02060000
25986   0, /*bf_releasebuffer*/
25987   #endif
25988 };
25989
25990 PyTypeObject __pyx_type_4lxml_9objectify_ElementMaker = {
25991   PyVarObject_HEAD_INIT(0, 0)
25992   __Pyx_NAMESTR("lxml.objectify.ElementMaker"), /*tp_name*/
25993   sizeof(struct __pyx_obj_4lxml_9objectify_ElementMaker), /*tp_basicsize*/
25994   0, /*tp_itemsize*/
25995   __pyx_tp_dealloc_4lxml_9objectify_ElementMaker, /*tp_dealloc*/
25996   0, /*tp_print*/
25997   0, /*tp_getattr*/
25998   0, /*tp_setattr*/
25999   0, /*tp_compare*/
26000   0, /*tp_repr*/
26001   &__pyx_tp_as_number_ElementMaker, /*tp_as_number*/
26002   &__pyx_tp_as_sequence_ElementMaker, /*tp_as_sequence*/
26003   &__pyx_tp_as_mapping_ElementMaker, /*tp_as_mapping*/
26004   0, /*tp_hash*/
26005   0, /*tp_call*/
26006   0, /*tp_str*/
26007   __pyx_tp_getattro_4lxml_9objectify_ElementMaker, /*tp_getattro*/
26008   0, /*tp_setattro*/
26009   &__pyx_tp_as_buffer_ElementMaker, /*tp_as_buffer*/
26010   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
26011   __Pyx_DOCSTR("ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)\n\n    An ElementMaker that can be used for constructing trees.\n\n    Example::\n\n      >>> M = ElementMaker(annotate=False)\n      >>> html = M.html( M.body( M.p('hello', M.br, 'objectify') ) )\n\n      >>> from lxml.etree import tostring\n      >>> print(tostring(html, method='html').decode('ASCII'))\n      <html><body><p>hello<br>objectify</p></body></html>\n\n    Note that this module has a predefined ElementMaker instance called ``E``.\n    "), /*tp_doc*/
26012   __pyx_tp_traverse_4lxml_9objectify_ElementMaker, /*tp_traverse*/
26013   __pyx_tp_clear_4lxml_9objectify_ElementMaker, /*tp_clear*/
26014   0, /*tp_richcompare*/
26015   0, /*tp_weaklistoffset*/
26016   0, /*tp_iter*/
26017   0, /*tp_iternext*/
26018   __pyx_methods_4lxml_9objectify_ElementMaker, /*tp_methods*/
26019   0, /*tp_members*/
26020   0, /*tp_getset*/
26021   0, /*tp_base*/
26022   0, /*tp_dict*/
26023   0, /*tp_descr_get*/
26024   0, /*tp_descr_set*/
26025   0, /*tp_dictoffset*/
26026   __pyx_pf_4lxml_9objectify_12ElementMaker___init__, /*tp_init*/
26027   0, /*tp_alloc*/
26028   __pyx_tp_new_4lxml_9objectify_ElementMaker, /*tp_new*/
26029   0, /*tp_free*/
26030   0, /*tp_is_gc*/
26031   0, /*tp_bases*/
26032   0, /*tp_mro*/
26033   0, /*tp_cache*/
26034   0, /*tp_subclasses*/
26035   0, /*tp_weaklist*/
26036 };
26037
26038 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
26039   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p;
26040   PyObject *o = __pyx_ptype_4lxml_11etreepublic_ElementClassLookup->tp_new(t, a, k);
26041   if (!o) return 0;
26042   p = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o);
26043   p->empty_data_class = Py_None; Py_INCREF(Py_None);
26044   p->tree_class = Py_None; Py_INCREF(Py_None);
26045   return o;
26046 }
26047
26048 static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o) {
26049   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
26050   Py_XDECREF(p->empty_data_class);
26051   Py_XDECREF(p->tree_class);
26052   __pyx_ptype_4lxml_11etreepublic_ElementClassLookup->tp_dealloc(o);
26053 }
26054
26055 static int __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o, visitproc v, void *a) {
26056   int e;
26057   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
26058   if (__pyx_ptype_4lxml_11etreepublic_ElementClassLookup->tp_traverse) {
26059     e = __pyx_ptype_4lxml_11etreepublic_ElementClassLookup->tp_traverse(o, v, a); if (e) return e;
26060   }
26061   if (p->empty_data_class) {
26062     e = (*v)(p->empty_data_class, a); if (e) return e;
26063   }
26064   if (p->tree_class) {
26065     e = (*v)(p->tree_class, a); if (e) return e;
26066   }
26067   return 0;
26068 }
26069
26070 static int __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o) {
26071   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
26072   PyObject* tmp;
26073   if (__pyx_ptype_4lxml_11etreepublic_ElementClassLookup->tp_clear) {
26074     __pyx_ptype_4lxml_11etreepublic_ElementClassLookup->tp_clear(o);
26075   }
26076   tmp = ((PyObject*)p->empty_data_class);
26077   p->empty_data_class = Py_None; Py_INCREF(Py_None);
26078   Py_XDECREF(tmp);
26079   tmp = ((PyObject*)p->tree_class);
26080   p->tree_class = Py_None; Py_INCREF(Py_None);
26081   Py_XDECREF(tmp);
26082   return 0;
26083 }
26084
26085 static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifyElementClassLookup[] = {
26086   {0, 0, 0, 0}
26087 };
26088
26089 static PyNumberMethods __pyx_tp_as_number_ObjectifyElementClassLookup = {
26090   0, /*nb_add*/
26091   0, /*nb_subtract*/
26092   0, /*nb_multiply*/
26093   #if PY_MAJOR_VERSION < 3
26094   0, /*nb_divide*/
26095   #endif
26096   0, /*nb_remainder*/
26097   0, /*nb_divmod*/
26098   0, /*nb_power*/
26099   0, /*nb_negative*/
26100   0, /*nb_positive*/
26101   0, /*nb_absolute*/
26102   0, /*nb_nonzero*/
26103   0, /*nb_invert*/
26104   0, /*nb_lshift*/
26105   0, /*nb_rshift*/
26106   0, /*nb_and*/
26107   0, /*nb_xor*/
26108   0, /*nb_or*/
26109   #if PY_MAJOR_VERSION < 3
26110   0, /*nb_coerce*/
26111   #endif
26112   0, /*nb_int*/
26113   #if PY_MAJOR_VERSION >= 3
26114   0, /*reserved*/
26115   #else
26116   0, /*nb_long*/
26117   #endif
26118   0, /*nb_float*/
26119   #if PY_MAJOR_VERSION < 3
26120   0, /*nb_oct*/
26121   #endif
26122   #if PY_MAJOR_VERSION < 3
26123   0, /*nb_hex*/
26124   #endif
26125   0, /*nb_inplace_add*/
26126   0, /*nb_inplace_subtract*/
26127   0, /*nb_inplace_multiply*/
26128   #if PY_MAJOR_VERSION < 3
26129   0, /*nb_inplace_divide*/
26130   #endif
26131   0, /*nb_inplace_remainder*/
26132   0, /*nb_inplace_power*/
26133   0, /*nb_inplace_lshift*/
26134   0, /*nb_inplace_rshift*/
26135   0, /*nb_inplace_and*/
26136   0, /*nb_inplace_xor*/
26137   0, /*nb_inplace_or*/
26138   0, /*nb_floor_divide*/
26139   0, /*nb_true_divide*/
26140   0, /*nb_inplace_floor_divide*/
26141   0, /*nb_inplace_true_divide*/
26142   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
26143   0, /*nb_index*/
26144   #endif
26145 };
26146
26147 static PySequenceMethods __pyx_tp_as_sequence_ObjectifyElementClassLookup = {
26148   0, /*sq_length*/
26149   0, /*sq_concat*/
26150   0, /*sq_repeat*/
26151   0, /*sq_item*/
26152   0, /*sq_slice*/
26153   0, /*sq_ass_item*/
26154   0, /*sq_ass_slice*/
26155   0, /*sq_contains*/
26156   0, /*sq_inplace_concat*/
26157   0, /*sq_inplace_repeat*/
26158 };
26159
26160 static PyMappingMethods __pyx_tp_as_mapping_ObjectifyElementClassLookup = {
26161   0, /*mp_length*/
26162   0, /*mp_subscript*/
26163   0, /*mp_ass_subscript*/
26164 };
26165
26166 static PyBufferProcs __pyx_tp_as_buffer_ObjectifyElementClassLookup = {
26167   #if PY_MAJOR_VERSION < 3
26168   0, /*bf_getreadbuffer*/
26169   #endif
26170   #if PY_MAJOR_VERSION < 3
26171   0, /*bf_getwritebuffer*/
26172   #endif
26173   #if PY_MAJOR_VERSION < 3
26174   0, /*bf_getsegcount*/
26175   #endif
26176   #if PY_MAJOR_VERSION < 3
26177   0, /*bf_getcharbuffer*/
26178   #endif
26179   #if PY_VERSION_HEX >= 0x02060000
26180   0, /*bf_getbuffer*/
26181   #endif
26182   #if PY_VERSION_HEX >= 0x02060000
26183   0, /*bf_releasebuffer*/
26184   #endif
26185 };
26186
26187 PyTypeObject __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup = {
26188   PyVarObject_HEAD_INIT(0, 0)
26189   __Pyx_NAMESTR("lxml.objectify.ObjectifyElementClassLookup"), /*tp_name*/
26190   sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup), /*tp_basicsize*/
26191   0, /*tp_itemsize*/
26192   __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_dealloc*/
26193   0, /*tp_print*/
26194   0, /*tp_getattr*/
26195   0, /*tp_setattr*/
26196   0, /*tp_compare*/
26197   0, /*tp_repr*/
26198   &__pyx_tp_as_number_ObjectifyElementClassLookup, /*tp_as_number*/
26199   &__pyx_tp_as_sequence_ObjectifyElementClassLookup, /*tp_as_sequence*/
26200   &__pyx_tp_as_mapping_ObjectifyElementClassLookup, /*tp_as_mapping*/
26201   0, /*tp_hash*/
26202   0, /*tp_call*/
26203   0, /*tp_str*/
26204   0, /*tp_getattro*/
26205   0, /*tp_setattro*/
26206   &__pyx_tp_as_buffer_ObjectifyElementClassLookup, /*tp_as_buffer*/
26207   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
26208   __Pyx_DOCSTR("ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None)\n    Element class lookup method that uses the objectify classes.\n    "), /*tp_doc*/
26209   __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_traverse*/
26210   __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_clear*/
26211   0, /*tp_richcompare*/
26212   0, /*tp_weaklistoffset*/
26213   0, /*tp_iter*/
26214   0, /*tp_iternext*/
26215   __pyx_methods_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_methods*/
26216   0, /*tp_members*/
26217   0, /*tp_getset*/
26218   0, /*tp_base*/
26219   0, /*tp_dict*/
26220   0, /*tp_descr_get*/
26221   0, /*tp_descr_set*/
26222   0, /*tp_dictoffset*/
26223   __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__, /*tp_init*/
26224   0, /*tp_alloc*/
26225   __pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_new*/
26226   0, /*tp_free*/
26227   0, /*tp_is_gc*/
26228   0, /*tp_bases*/
26229   0, /*tp_mro*/
26230   0, /*tp_cache*/
26231   0, /*tp_subclasses*/
26232   0, /*tp_weaklist*/
26233 };
26234
26235 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectPath(PyTypeObject *t, PyObject *a, PyObject *k) {
26236   struct __pyx_obj_4lxml_9objectify_ObjectPath *p;
26237   PyObject *o = (*t->tp_alloc)(t, 0);
26238   if (!o) return 0;
26239   p = ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)o);
26240   p->find = Py_None; Py_INCREF(Py_None);
26241   p->_path = Py_None; Py_INCREF(Py_None);
26242   p->_path_str = Py_None; Py_INCREF(Py_None);
26243   return o;
26244 }
26245
26246 static void __pyx_tp_dealloc_4lxml_9objectify_ObjectPath(PyObject *o) {
26247   struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
26248   {
26249     PyObject *etype, *eval, *etb;
26250     PyErr_Fetch(&etype, &eval, &etb);
26251     ++Py_REFCNT(o);
26252     __pyx_pf_4lxml_9objectify_10ObjectPath___dealloc__(o);
26253     if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
26254     --Py_REFCNT(o);
26255     PyErr_Restore(etype, eval, etb);
26256   }
26257   Py_XDECREF(p->find);
26258   Py_XDECREF(p->_path);
26259   Py_XDECREF(p->_path_str);
26260   (*Py_TYPE(o)->tp_free)(o);
26261 }
26262
26263 static int __pyx_tp_traverse_4lxml_9objectify_ObjectPath(PyObject *o, visitproc v, void *a) {
26264   int e;
26265   struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
26266   if (p->find) {
26267     e = (*v)(p->find, a); if (e) return e;
26268   }
26269   if (p->_path) {
26270     e = (*v)(p->_path, a); if (e) return e;
26271   }
26272   if (p->_path_str) {
26273     e = (*v)(p->_path_str, a); if (e) return e;
26274   }
26275   return 0;
26276 }
26277
26278 static int __pyx_tp_clear_4lxml_9objectify_ObjectPath(PyObject *o) {
26279   struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
26280   PyObject* tmp;
26281   tmp = ((PyObject*)p->find);
26282   p->find = Py_None; Py_INCREF(Py_None);
26283   Py_XDECREF(tmp);
26284   tmp = ((PyObject*)p->_path);
26285   p->_path = Py_None; Py_INCREF(Py_None);
26286   Py_XDECREF(tmp);
26287   tmp = ((PyObject*)p->_path_str);
26288   p->_path_str = Py_None; Py_INCREF(Py_None);
26289   Py_XDECREF(tmp);
26290   return 0;
26291 }
26292
26293 static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectPath[] = {
26294   {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
26295   {__Pyx_NAMESTR("__call__"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath___call__, METH_VARARGS|METH_KEYWORDS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath___call__)},
26296   {__Pyx_NAMESTR("hasattr"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath_hasattr, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath_hasattr)},
26297   {__Pyx_NAMESTR("setattr"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath_setattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath_setattr)},
26298   {__Pyx_NAMESTR("addattr"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath_addattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath_addattr)},
26299   {0, 0, 0, 0}
26300 };
26301
26302 static struct PyMemberDef __pyx_members_4lxml_9objectify_ObjectPath[] = {
26303   {(char *)"find", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_ObjectPath, find), READONLY, 0},
26304   {0, 0, 0, 0, 0}
26305 };
26306
26307 static PyNumberMethods __pyx_tp_as_number_ObjectPath = {
26308   0, /*nb_add*/
26309   0, /*nb_subtract*/
26310   0, /*nb_multiply*/
26311   #if PY_MAJOR_VERSION < 3
26312   0, /*nb_divide*/
26313   #endif
26314   0, /*nb_remainder*/
26315   0, /*nb_divmod*/
26316   0, /*nb_power*/
26317   0, /*nb_negative*/
26318   0, /*nb_positive*/
26319   0, /*nb_absolute*/
26320   0, /*nb_nonzero*/
26321   0, /*nb_invert*/
26322   0, /*nb_lshift*/
26323   0, /*nb_rshift*/
26324   0, /*nb_and*/
26325   0, /*nb_xor*/
26326   0, /*nb_or*/
26327   #if PY_MAJOR_VERSION < 3
26328   0, /*nb_coerce*/
26329   #endif
26330   0, /*nb_int*/
26331   #if PY_MAJOR_VERSION >= 3
26332   0, /*reserved*/
26333   #else
26334   0, /*nb_long*/
26335   #endif
26336   0, /*nb_float*/
26337   #if PY_MAJOR_VERSION < 3
26338   0, /*nb_oct*/
26339   #endif
26340   #if PY_MAJOR_VERSION < 3
26341   0, /*nb_hex*/
26342   #endif
26343   0, /*nb_inplace_add*/
26344   0, /*nb_inplace_subtract*/
26345   0, /*nb_inplace_multiply*/
26346   #if PY_MAJOR_VERSION < 3
26347   0, /*nb_inplace_divide*/
26348   #endif
26349   0, /*nb_inplace_remainder*/
26350   0, /*nb_inplace_power*/
26351   0, /*nb_inplace_lshift*/
26352   0, /*nb_inplace_rshift*/
26353   0, /*nb_inplace_and*/
26354   0, /*nb_inplace_xor*/
26355   0, /*nb_inplace_or*/
26356   0, /*nb_floor_divide*/
26357   0, /*nb_true_divide*/
26358   0, /*nb_inplace_floor_divide*/
26359   0, /*nb_inplace_true_divide*/
26360   #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
26361   0, /*nb_index*/
26362   #endif
26363 };
26364
26365 static PySequenceMethods __pyx_tp_as_sequence_ObjectPath = {
26366   0, /*sq_length*/
26367   0, /*sq_concat*/
26368   0, /*sq_repeat*/
26369   0, /*sq_item*/
26370   0, /*sq_slice*/
26371   0, /*sq_ass_item*/
26372   0, /*sq_ass_slice*/
26373   0, /*sq_contains*/
26374   0, /*sq_inplace_concat*/
26375   0, /*sq_inplace_repeat*/
26376 };
26377
26378 static PyMappingMethods __pyx_tp_as_mapping_ObjectPath = {
26379   0, /*mp_length*/
26380   0, /*mp_subscript*/
26381   0, /*mp_ass_subscript*/
26382 };
26383
26384 static PyBufferProcs __pyx_tp_as_buffer_ObjectPath = {
26385   #if PY_MAJOR_VERSION < 3
26386   0, /*bf_getreadbuffer*/
26387   #endif
26388   #if PY_MAJOR_VERSION < 3
26389   0, /*bf_getwritebuffer*/
26390   #endif
26391   #if PY_MAJOR_VERSION < 3
26392   0, /*bf_getsegcount*/
26393   #endif
26394   #if PY_MAJOR_VERSION < 3
26395   0, /*bf_getcharbuffer*/
26396   #endif
26397   #if PY_VERSION_HEX >= 0x02060000
26398   0, /*bf_getbuffer*/
26399   #endif
26400   #if PY_VERSION_HEX >= 0x02060000
26401   0, /*bf_releasebuffer*/
26402   #endif
26403 };
26404
26405 PyTypeObject __pyx_type_4lxml_9objectify_ObjectPath = {
26406   PyVarObject_HEAD_INIT(0, 0)
26407   __Pyx_NAMESTR("lxml.objectify.ObjectPath"), /*tp_name*/
26408   sizeof(struct __pyx_obj_4lxml_9objectify_ObjectPath), /*tp_basicsize*/
26409   0, /*tp_itemsize*/
26410   __pyx_tp_dealloc_4lxml_9objectify_ObjectPath, /*tp_dealloc*/
26411   0, /*tp_print*/
26412   0, /*tp_getattr*/
26413   0, /*tp_setattr*/
26414   0, /*tp_compare*/
26415   0, /*tp_repr*/
26416   &__pyx_tp_as_number_ObjectPath, /*tp_as_number*/
26417   &__pyx_tp_as_sequence_ObjectPath, /*tp_as_sequence*/
26418   &__pyx_tp_as_mapping_ObjectPath, /*tp_as_mapping*/
26419   0, /*tp_hash*/
26420   __pyx_pf_4lxml_9objectify_10ObjectPath___call__, /*tp_call*/
26421   __pyx_pf_4lxml_9objectify_10ObjectPath___str__, /*tp_str*/
26422   0, /*tp_getattro*/
26423   0, /*tp_setattro*/
26424   &__pyx_tp_as_buffer_ObjectPath, /*tp_as_buffer*/
26425   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
26426   __Pyx_DOCSTR("ObjectPath(path)\n    Immutable object that represents a compiled object path.\n\n    Example for a path: 'root.child[1].{other}child[25]'\n    "), /*tp_doc*/
26427   __pyx_tp_traverse_4lxml_9objectify_ObjectPath, /*tp_traverse*/
26428   __pyx_tp_clear_4lxml_9objectify_ObjectPath, /*tp_clear*/
26429   0, /*tp_richcompare*/
26430   0, /*tp_weaklistoffset*/
26431   0, /*tp_iter*/
26432   0, /*tp_iternext*/
26433   __pyx_methods_4lxml_9objectify_ObjectPath, /*tp_methods*/
26434   __pyx_members_4lxml_9objectify_ObjectPath, /*tp_members*/
26435   0, /*tp_getset*/
26436   0, /*tp_base*/
26437   0, /*tp_dict*/
26438   0, /*tp_descr_get*/
26439   0, /*tp_descr_set*/
26440   0, /*tp_dictoffset*/
26441   __pyx_pf_4lxml_9objectify_10ObjectPath___init__, /*tp_init*/
26442   0, /*tp_alloc*/
26443   __pyx_tp_new_4lxml_9objectify_ObjectPath, /*tp_new*/
26444   0, /*tp_free*/
26445   0, /*tp_is_gc*/
26446   0, /*tp_bases*/
26447   0, /*tp_mro*/
26448   0, /*tp_cache*/
26449   0, /*tp_subclasses*/
26450   0, /*tp_weaklist*/
26451 };
26452
26453 static struct PyMethodDef __pyx_methods[] = {
26454   {__Pyx_NAMESTR("set_pytype_attribute_tag"), (PyCFunction)__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_set_pytype_attribute_tag)},
26455   {__Pyx_NAMESTR("__checkBool"), (PyCFunction)__pyx_pf_4lxml_9objectify___checkBool, METH_O, __Pyx_DOCSTR(0)},
26456   {__Pyx_NAMESTR("__parseBool"), (PyCFunction)__pyx_pf_4lxml_9objectify___parseBool, METH_O, __Pyx_DOCSTR(0)},
26457   {__Pyx_NAMESTR("__lower_bool"), (PyCFunction)__pyx_pf_4lxml_9objectify___lower_bool, METH_O, __Pyx_DOCSTR(0)},
26458   {__Pyx_NAMESTR("pytypename"), (PyCFunction)__pyx_pf_4lxml_9objectify_pytypename, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_pytypename)},
26459   {__Pyx_NAMESTR("getRegisteredTypes"), (PyCFunction)__pyx_pf_4lxml_9objectify_getRegisteredTypes, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_getRegisteredTypes)},
26460   {__Pyx_NAMESTR("enable_recursive_str"), (PyCFunction)__pyx_pf_4lxml_9objectify_enable_recursive_str, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_enable_recursive_str)},
26461   {__Pyx_NAMESTR("dump"), (PyCFunction)__pyx_pf_4lxml_9objectify_dump, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_dump)},
26462   {__Pyx_NAMESTR("__unpickleElementTree"), (PyCFunction)__pyx_pf_4lxml_9objectify___unpickleElementTree, METH_O, __Pyx_DOCSTR(0)},
26463   {__Pyx_NAMESTR("pickleReduceElement"), (PyCFunction)__pyx_pf_4lxml_9objectify_pickleReduceElement, METH_O, __Pyx_DOCSTR(0)},
26464   {__Pyx_NAMESTR("pickleReduceElementTree"), (PyCFunction)__pyx_pf_4lxml_9objectify_pickleReduceElementTree, METH_O, __Pyx_DOCSTR(0)},
26465   {__Pyx_NAMESTR("pyannotate"), (PyCFunction)__pyx_pf_4lxml_9objectify_pyannotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_pyannotate)},
26466   {__Pyx_NAMESTR("xsiannotate"), (PyCFunction)__pyx_pf_4lxml_9objectify_xsiannotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_xsiannotate)},
26467   {__Pyx_NAMESTR("annotate"), (PyCFunction)__pyx_pf_4lxml_9objectify_annotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_annotate)},
26468   {__Pyx_NAMESTR("deannotate"), (PyCFunction)__pyx_pf_4lxml_9objectify_deannotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_deannotate)},
26469   {__Pyx_NAMESTR("set_default_parser"), (PyCFunction)__pyx_pf_4lxml_9objectify_set_default_parser, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_set_default_parser)},
26470   {__Pyx_NAMESTR("makeparser"), (PyCFunction)__pyx_pf_4lxml_9objectify_makeparser, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_makeparser)},
26471   {__Pyx_NAMESTR("fromstring"), (PyCFunction)__pyx_pf_4lxml_9objectify_fromstring, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_fromstring)},
26472   {__Pyx_NAMESTR("XML"), (PyCFunction)__pyx_pf_4lxml_9objectify_XML, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_XML)},
26473   {__Pyx_NAMESTR("parse"), (PyCFunction)__pyx_pf_4lxml_9objectify_parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_parse)},
26474   {__Pyx_NAMESTR("Element"), (PyCFunction)__pyx_pf_4lxml_9objectify_Element, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_Element)},
26475   {__Pyx_NAMESTR("DataElement"), (PyCFunction)__pyx_pf_4lxml_9objectify_DataElement, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_DataElement)},
26476   {0, 0, 0, 0}
26477 };
26478
26479 static void __pyx_init_filenames(void); /*proto*/
26480
26481 #if PY_MAJOR_VERSION >= 3
26482 static struct PyModuleDef __pyx_moduledef = {
26483     PyModuleDef_HEAD_INIT,
26484     __Pyx_NAMESTR("objectify"),
26485     __Pyx_DOCSTR(__pyx_k_57), /* m_doc */
26486     -1, /* m_size */
26487     __pyx_methods /* m_methods */,
26488     NULL, /* m_reload */
26489     NULL, /* m_traverse */
26490     NULL, /* m_clear */
26491     NULL /* m_free */
26492 };
26493 #endif
26494
26495 static __Pyx_StringTabEntry __pyx_string_tab[] = {
26496   {&__pyx_kp_u_0, __pyx_k_0, sizeof(__pyx_k_0), 1, 0, 0},
26497   {&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 1, 0, 0},
26498   {&__pyx_kp_u_10, __pyx_k_10, sizeof(__pyx_k_10), 1, 0, 0},
26499   {&__pyx_kp_u_11, __pyx_k_11, sizeof(__pyx_k_11), 1, 0, 0},
26500   {&__pyx_kp_u_12, __pyx_k_12, sizeof(__pyx_k_12), 1, 0, 0},
26501   {&__pyx_kp_u_13, __pyx_k_13, sizeof(__pyx_k_13), 1, 0, 0},
26502   {&__pyx_kp_u_14, __pyx_k_14, sizeof(__pyx_k_14), 1, 0, 0},
26503   {&__pyx_kp_u_15, __pyx_k_15, sizeof(__pyx_k_15), 1, 0, 0},
26504   {&__pyx_kp_u_16, __pyx_k_16, sizeof(__pyx_k_16), 1, 0, 0},
26505   {&__pyx_kp_u_17, __pyx_k_17, sizeof(__pyx_k_17), 1, 0, 0},
26506   {&__pyx_kp_u_18, __pyx_k_18, sizeof(__pyx_k_18), 1, 0, 0},
26507   {&__pyx_kp_u_19, __pyx_k_19, sizeof(__pyx_k_19), 1, 0, 0},
26508   {&__pyx_kp_u_20, __pyx_k_20, sizeof(__pyx_k_20), 1, 0, 0},
26509   {&__pyx_kp_u_21, __pyx_k_21, sizeof(__pyx_k_21), 1, 0, 0},
26510   {&__pyx_kp_u_23, __pyx_k_23, sizeof(__pyx_k_23), 1, 0, 0},
26511   {&__pyx_kp_u_24, __pyx_k_24, sizeof(__pyx_k_24), 1, 0, 0},
26512   {&__pyx_kp_u_26, __pyx_k_26, sizeof(__pyx_k_26), 1, 0, 0},
26513   {&__pyx_kp_u_27, __pyx_k_27, sizeof(__pyx_k_27), 1, 0, 0},
26514   {&__pyx_kp_u_28, __pyx_k_28, sizeof(__pyx_k_28), 1, 0, 0},
26515   {&__pyx_kp_u_29, __pyx_k_29, sizeof(__pyx_k_29), 1, 0, 0},
26516   {&__pyx_n_ui_3, __pyx_k_3, sizeof(__pyx_k_3), 1, 1, 1},
26517   {&__pyx_kp_u_30, __pyx_k_30, sizeof(__pyx_k_30), 1, 0, 0},
26518   {&__pyx_n_ui_31, __pyx_k_31, sizeof(__pyx_k_31), 1, 1, 1},
26519   {&__pyx_kp_b_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 0},
26520   {&__pyx_kp_u_32, __pyx_k_32, sizeof(__pyx_k_32), 1, 0, 0},
26521   {&__pyx_kp_u_4, __pyx_k_4, sizeof(__pyx_k_4), 1, 0, 0},
26522   {&__pyx_kp_u_42, __pyx_k_42, sizeof(__pyx_k_42), 1, 0, 0},
26523   {&__pyx_n_ui_43, __pyx_k_43, sizeof(__pyx_k_43), 1, 1, 1},
26524   {&__pyx_kp_u_44, __pyx_k_44, sizeof(__pyx_k_44), 1, 0, 0},
26525   {&__pyx_kp_u_45, __pyx_k_45, sizeof(__pyx_k_45), 1, 0, 0},
26526   {&__pyx_kp_u_46, __pyx_k_46, sizeof(__pyx_k_46), 1, 0, 0},
26527   {&__pyx_kp_u_47, __pyx_k_47, sizeof(__pyx_k_47), 1, 0, 0},
26528   {&__pyx_kp_u_48, __pyx_k_48, sizeof(__pyx_k_48), 1, 0, 0},
26529   {&__pyx_kp_u_49, __pyx_k_49, sizeof(__pyx_k_49), 1, 0, 0},
26530   {&__pyx_kp_u_5, __pyx_k_5, sizeof(__pyx_k_5), 1, 0, 0},
26531   {&__pyx_kp_u_50, __pyx_k_50, sizeof(__pyx_k_50), 1, 0, 0},
26532   {&__pyx_kp_u_51, __pyx_k_51, sizeof(__pyx_k_51), 1, 0, 0},
26533   {&__pyx_kp_u_52, __pyx_k_52, sizeof(__pyx_k_52), 1, 0, 0},
26534   {&__pyx_kp_u_53, __pyx_k_53, sizeof(__pyx_k_53), 1, 0, 0},
26535   {&__pyx_kp_u_54, __pyx_k_54, sizeof(__pyx_k_54), 1, 0, 0},
26536   {&__pyx_n_u_58, __pyx_k_58, sizeof(__pyx_k_58), 1, 1, 0},
26537   {&__pyx_n_u_59, __pyx_k_59, sizeof(__pyx_k_59), 1, 1, 0},
26538   {&__pyx_kp_u_6, __pyx_k_6, sizeof(__pyx_k_6), 1, 0, 0},
26539   {&__pyx_n_u_60, __pyx_k_60, sizeof(__pyx_k_60), 1, 1, 0},
26540   {&__pyx_n_u_61, __pyx_k_61, sizeof(__pyx_k_61), 1, 1, 0},
26541   {&__pyx_n_ui_61, __pyx_k_61, sizeof(__pyx_k_61), 1, 1, 1},
26542   {&__pyx_kp_u_62, __pyx_k_62, sizeof(__pyx_k_62), 1, 0, 0},
26543   {&__pyx_kp_u_63, __pyx_k_63, sizeof(__pyx_k_63), 1, 0, 0},
26544   {&__pyx_kp_u_64, __pyx_k_64, sizeof(__pyx_k_64), 1, 0, 0},
26545   {&__pyx_kp_u_65, __pyx_k_65, sizeof(__pyx_k_65), 1, 0, 0},
26546   {&__pyx_kp_u_66, __pyx_k_66, sizeof(__pyx_k_66), 1, 0, 0},
26547   {&__pyx_n_ui_67, __pyx_k_67, sizeof(__pyx_k_67), 1, 1, 1},
26548   {&__pyx_kp_u_68, __pyx_k_68, sizeof(__pyx_k_68), 1, 0, 0},
26549   {&__pyx_kp_u_7, __pyx_k_7, sizeof(__pyx_k_7), 1, 0, 0},
26550   {&__pyx_kp_u_8, __pyx_k_8, sizeof(__pyx_k_8), 1, 0, 0},
26551   {&__pyx_kp_u_9, __pyx_k_9, sizeof(__pyx_k_9), 1, 0, 0},
26552   {&__pyx_n_ui_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 1, 1, 1},
26553   {&__pyx_n_u_BoolElement, __pyx_k_BoolElement, sizeof(__pyx_k_BoolElement), 1, 1, 0},
26554   {&__pyx_n_u_DataElement, __pyx_k_DataElement, sizeof(__pyx_k_DataElement), 1, 1, 0},
26555   {&__pyx_n_u_E, __pyx_k_E, sizeof(__pyx_k_E), 1, 1, 0},
26556   {&__pyx_n_ui_E, __pyx_k_E, sizeof(__pyx_k_E), 1, 1, 1},
26557   {&__pyx_n_u_ENTITY, __pyx_k_ENTITY, sizeof(__pyx_k_ENTITY), 1, 1, 0},
26558   {&__pyx_n_ui_ETXPath, __pyx_k_ETXPath, sizeof(__pyx_k_ETXPath), 1, 1, 1},
26559   {&__pyx_n_u_Element, __pyx_k_Element, sizeof(__pyx_k_Element), 1, 1, 0},
26560   {&__pyx_n_u_ElementMaker, __pyx_k_ElementMaker, sizeof(__pyx_k_ElementMaker), 1, 1, 0},
26561   {&__pyx_n_ui_ElementTree, __pyx_k_ElementTree, sizeof(__pyx_k_ElementTree), 1, 1, 1},
26562   {&__pyx_n_u_FloatElement, __pyx_k_FloatElement, sizeof(__pyx_k_FloatElement), 1, 1, 0},
26563   {&__pyx_n_u_ID, __pyx_k_ID, sizeof(__pyx_k_ID), 1, 1, 0},
26564   {&__pyx_n_u_IDREF, __pyx_k_IDREF, sizeof(__pyx_k_IDREF), 1, 1, 0},
26565   {&__pyx_n_ui_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 1, 1, 1},
26566   {&__pyx_n_u_IntElement, __pyx_k_IntElement, sizeof(__pyx_k_IntElement), 1, 1, 0},
26567   {&__pyx_n_u_LongElement, __pyx_k_LongElement, sizeof(__pyx_k_LongElement), 1, 1, 0},
26568   {&__pyx_n_u_NCName, __pyx_k_NCName, sizeof(__pyx_k_NCName), 1, 1, 0},
26569   {&__pyx_n_u_NMTOKEN, __pyx_k_NMTOKEN, sizeof(__pyx_k_NMTOKEN), 1, 1, 0},
26570   {&__pyx_n_u_Name, __pyx_k_Name, sizeof(__pyx_k_Name), 1, 1, 0},
26571   {&__pyx_n_u_None, __pyx_k_None, sizeof(__pyx_k_None), 1, 1, 0},
26572   {&__pyx_n_u_NoneElement, __pyx_k_NoneElement, sizeof(__pyx_k_NoneElement), 1, 1, 0},
26573   {&__pyx_n_u_NoneType, __pyx_k_NoneType, sizeof(__pyx_k_NoneType), 1, 1, 0},
26574   {&__pyx_n_u_NumberElement, __pyx_k_NumberElement, sizeof(__pyx_k_NumberElement), 1, 1, 0},
26575   {&__pyx_n_u_ObjectPath, __pyx_k_ObjectPath, sizeof(__pyx_k_ObjectPath), 1, 1, 0},
26576   {&__pyx_n_u_ObjectifiedElement, __pyx_k_ObjectifiedElement, sizeof(__pyx_k_ObjectifiedElement), 1, 1, 0},
26577   {&__pyx_n_u_PYTYPE_ATTRIBUTE, __pyx_k_PYTYPE_ATTRIBUTE, sizeof(__pyx_k_PYTYPE_ATTRIBUTE), 1, 1, 0},
26578   {&__pyx_n_ui_PYTYPE_ATTRIBUTE, __pyx_k_PYTYPE_ATTRIBUTE, sizeof(__pyx_k_PYTYPE_ATTRIBUTE), 1, 1, 1},
26579   {&__pyx_n_u_PyType, __pyx_k_PyType, sizeof(__pyx_k_PyType), 1, 1, 0},
26580   {&__pyx_n_u_StringElement, __pyx_k_StringElement, sizeof(__pyx_k_StringElement), 1, 1, 0},
26581   {&__pyx_n_u_TREE, __pyx_k_TREE, sizeof(__pyx_k_TREE), 1, 1, 0},
26582   {&__pyx_n_ui_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 1, 1, 1},
26583   {&__pyx_n_ui_U, __pyx_k_U, sizeof(__pyx_k_U), 1, 1, 1},
26584   {&__pyx_n_ui_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1},
26585   {&__pyx_n_u_XML, __pyx_k_XML, sizeof(__pyx_k_XML), 1, 1, 0},
26586   {&__pyx_n_ui_XMLParser, __pyx_k_XMLParser, sizeof(__pyx_k_XMLParser), 1, 1, 1},
26587   {&__pyx_n_ui__ElementTree, __pyx_k__ElementTree, sizeof(__pyx_k__ElementTree), 1, 1, 1},
26588   {&__pyx_n_ui___all__, __pyx_k___all__, sizeof(__pyx_k___all__), 1, 1, 1},
26589   {&__pyx_n_ui___call__, __pyx_k___call__, sizeof(__pyx_k___call__), 1, 1, 1},
26590   {&__pyx_n_ui___checkBool, __pyx_k___checkBool, sizeof(__pyx_k___checkBool), 1, 1, 1},
26591   {&__pyx_n_ui___copy__, __pyx_k___copy__, sizeof(__pyx_k___copy__), 1, 1, 1},
26592   {&__pyx_n_ui___getattr__, __pyx_k___getattr__, sizeof(__pyx_k___getattr__), 1, 1, 1},
26593   {&__pyx_n_ui___getitem__, __pyx_k___getitem__, sizeof(__pyx_k___getitem__), 1, 1, 1},
26594   {&__pyx_n_ui___lower_bool, __pyx_k___lower_bool, sizeof(__pyx_k___lower_bool), 1, 1, 1},
26595   {&__pyx_n_ui___main__, __pyx_k___main__, sizeof(__pyx_k___main__), 1, 1, 1},
26596   {&__pyx_n_ui___name__, __pyx_k___name__, sizeof(__pyx_k___name__), 1, 1, 1},
26597   {&__pyx_n_ui___parseBool, __pyx_k___parseBool, sizeof(__pyx_k___parseBool), 1, 1, 1},
26598   {&__pyx_n_ui___set__, __pyx_k___set__, sizeof(__pyx_k___set__), 1, 1, 1},
26599   {&__pyx_n_ui___version__, __pyx_k___version__, sizeof(__pyx_k___version__), 1, 1, 1},
26600   {&__pyx_n_ui__annotate, __pyx_k__annotate, sizeof(__pyx_k__annotate), 1, 1, 1},
26601   {&__pyx_n_ui__c_node, __pyx_k__c_node, sizeof(__pyx_k__c_node), 1, 1, 1},
26602   {&__pyx_n_ui__c_path, __pyx_k__c_path, sizeof(__pyx_k__c_path), 1, 1, 1},
26603   {&__pyx_n_ui__doc, __pyx_k__doc, sizeof(__pyx_k__doc), 1, 1, 1},
26604   {&__pyx_n_ui__element_factory, __pyx_k__element_factory, sizeof(__pyx_k__element_factory), 1, 1, 1},
26605   {&__pyx_n_ui__lookup_function, __pyx_k__lookup_function, sizeof(__pyx_k__lookup_function), 1, 1, 1},
26606   {&__pyx_n_ui__makeelement, __pyx_k__makeelement, sizeof(__pyx_k__makeelement), 1, 1, 1},
26607   {&__pyx_n_ui__namespace, __pyx_k__namespace, sizeof(__pyx_k__namespace), 1, 1, 1},
26608   {&__pyx_n_ui__nsmap, __pyx_k__nsmap, sizeof(__pyx_k__nsmap), 1, 1, 1},
26609   {&__pyx_n_ui__parse_value, __pyx_k__parse_value, sizeof(__pyx_k__parse_value), 1, 1, 1},
26610   {&__pyx_n_ui__path, __pyx_k__path, sizeof(__pyx_k__path), 1, 1, 1},
26611   {&__pyx_n_ui__path_len, __pyx_k__path_len, sizeof(__pyx_k__path_len), 1, 1, 1},
26612   {&__pyx_n_ui__path_str, __pyx_k__path_str, sizeof(__pyx_k__path_str), 1, 1, 1},
26613   {&__pyx_n_ui__pytype, __pyx_k__pytype, sizeof(__pyx_k__pytype), 1, 1, 1},
26614   {&__pyx_n_ui__schema_types, __pyx_k__schema_types, sizeof(__pyx_k__schema_types), 1, 1, 1},
26615   {&__pyx_n_ui__tag, __pyx_k__tag, sizeof(__pyx_k__tag), 1, 1, 1},
26616   {&__pyx_n_ui__type, __pyx_k__type, sizeof(__pyx_k__type), 1, 1, 1},
26617   {&__pyx_n_ui__value, __pyx_k__value, sizeof(__pyx_k__value), 1, 1, 1},
26618   {&__pyx_n_ui__xsi, __pyx_k__xsi, sizeof(__pyx_k__xsi), 1, 1, 1},
26619   {&__pyx_n_ui_add, __pyx_k_add, sizeof(__pyx_k_add), 1, 1, 1},
26620   {&__pyx_n_ui_addnext, __pyx_k_addnext, sizeof(__pyx_k_addnext), 1, 1, 1},
26621   {&__pyx_n_ui_after, __pyx_k_after, sizeof(__pyx_k_after), 1, 1, 1},
26622   {&__pyx_n_u_annotate, __pyx_k_annotate, sizeof(__pyx_k_annotate), 1, 1, 0},
26623   {&__pyx_n_ui_annotate, __pyx_k_annotate, sizeof(__pyx_k_annotate), 1, 1, 1},
26624   {&__pyx_n_ui_annotate_pytype, __pyx_k_annotate_pytype, sizeof(__pyx_k_annotate_pytype), 1, 1, 1},
26625   {&__pyx_n_ui_annotate_xsi, __pyx_k_annotate_xsi, sizeof(__pyx_k_annotate_xsi), 1, 1, 1},
26626   {&__pyx_n_ui_attrib, __pyx_k_attrib, sizeof(__pyx_k_attrib), 1, 1, 1},
26627   {&__pyx_n_ui_attribute_tag, __pyx_k_attribute_tag, sizeof(__pyx_k_attribute_tag), 1, 1, 1},
26628   {&__pyx_n_u_base, __pyx_k_base, sizeof(__pyx_k_base), 1, 1, 0},
26629   {&__pyx_n_ui_base, __pyx_k_base, sizeof(__pyx_k_base), 1, 1, 1},
26630   {&__pyx_n_ui_base_url, __pyx_k_base_url, sizeof(__pyx_k_base_url), 1, 1, 1},
26631   {&__pyx_n_ui_before, __pyx_k_before, sizeof(__pyx_k_before), 1, 1, 1},
26632   {&__pyx_n_u_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 1, 1, 0},
26633   {&__pyx_n_u_boolean, __pyx_k_boolean, sizeof(__pyx_k_boolean), 1, 1, 0},
26634   {&__pyx_n_u_byte, __pyx_k_byte, sizeof(__pyx_k_byte), 1, 1, 0},
26635   {&__pyx_n_ui_children, __pyx_k_children, sizeof(__pyx_k_children), 1, 1, 1},
26636   {&__pyx_n_ui_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 1, 1, 1},
26637   {&__pyx_n_ui_constructor, __pyx_k_constructor, sizeof(__pyx_k_constructor), 1, 1, 1},
26638   {&__pyx_n_ui_copy_reg, __pyx_k_copy_reg, sizeof(__pyx_k_copy_reg), 1, 1, 1},
26639   {&__pyx_n_ui_copyreg, __pyx_k_copyreg, sizeof(__pyx_k_copyreg), 1, 1, 1},
26640   {&__pyx_n_u_deannotate, __pyx_k_deannotate, sizeof(__pyx_k_deannotate), 1, 1, 0},
26641   {&__pyx_n_ui_default, __pyx_k_default, sizeof(__pyx_k_default), 1, 1, 1},
26642   {&__pyx_n_ui_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 1, 1, 1},
26643   {&__pyx_n_ui_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 1, 1, 1},
26644   {&__pyx_n_u_double, __pyx_k_double, sizeof(__pyx_k_double), 1, 1, 0},
26645   {&__pyx_n_u_dump, __pyx_k_dump, sizeof(__pyx_k_dump), 1, 1, 0},
26646   {&__pyx_n_ui_element_or_tree, __pyx_k_element_or_tree, sizeof(__pyx_k_element_or_tree), 1, 1, 1},
26647   {&__pyx_n_ui_empty_data_class, __pyx_k_empty_data_class, sizeof(__pyx_k_empty_data_class), 1, 1, 1},
26648   {&__pyx_n_ui_empty_pytype, __pyx_k_empty_pytype, sizeof(__pyx_k_empty_pytype), 1, 1, 1},
26649   {&__pyx_n_ui_empty_type, __pyx_k_empty_type, sizeof(__pyx_k_empty_type), 1, 1, 1},
26650   {&__pyx_n_ui_end, __pyx_k_end, sizeof(__pyx_k_end), 1, 1, 1},
26651   {&__pyx_n_ui_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 1, 1, 1},
26652   {&__pyx_n_bi_etree, __pyx_k_etree, sizeof(__pyx_k_etree), 0, 1, 1},
26653   {&__pyx_n_ui_etree, __pyx_k_etree, sizeof(__pyx_k_etree), 1, 1, 1},
26654   {&__pyx_n_ui_f, __pyx_k_f, sizeof(__pyx_k_f), 1, 1, 1},
26655   {&__pyx_n_u_false, __pyx_k_false, sizeof(__pyx_k_false), 1, 1, 0},
26656   {&__pyx_n_ui_find, __pyx_k_find, sizeof(__pyx_k_find), 1, 1, 1},
26657   {&__pyx_n_ui_findall, __pyx_k_findall, sizeof(__pyx_k_findall), 1, 1, 1},
26658   {&__pyx_n_u_float, __pyx_k_float, sizeof(__pyx_k_float), 1, 1, 0},
26659   {&__pyx_n_u_fromstring, __pyx_k_fromstring, sizeof(__pyx_k_fromstring), 1, 1, 0},
26660   {&__pyx_n_ui_fromstring, __pyx_k_fromstring, sizeof(__pyx_k_fromstring), 1, 1, 1},
26661   {&__pyx_n_ui_get, __pyx_k_get, sizeof(__pyx_k_get), 1, 1, 1},
26662   {&__pyx_n_u_getRegisteredTypes, __pyx_k_getRegisteredTypes, sizeof(__pyx_k_getRegisteredTypes), 1, 1, 0},
26663   {&__pyx_n_ui_getparent, __pyx_k_getparent, sizeof(__pyx_k_getparent), 1, 1, 1},
26664   {&__pyx_n_ui_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 1, 1, 1},
26665   {&__pyx_n_ui_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 1, 1, 1},
26666   {&__pyx_n_ui_href, __pyx_k_href, sizeof(__pyx_k_href), 1, 1, 1},
26667   {&__pyx_n_ui_ignore_old, __pyx_k_ignore_old, sizeof(__pyx_k_ignore_old), 1, 1, 1},
26668   {&__pyx_n_ui_ignore_pytype, __pyx_k_ignore_pytype, sizeof(__pyx_k_ignore_pytype), 1, 1, 1},
26669   {&__pyx_n_ui_ignore_xsi, __pyx_k_ignore_xsi, sizeof(__pyx_k_ignore_xsi), 1, 1, 1},
26670   {&__pyx_n_ui_index, __pyx_k_index, sizeof(__pyx_k_index), 1, 1, 1},
26671   {&__pyx_n_ui_insert, __pyx_k_insert, sizeof(__pyx_k_insert), 1, 1, 1},
26672   {&__pyx_n_u_int, __pyx_k_int, sizeof(__pyx_k_int), 1, 1, 0},
26673   {&__pyx_n_u_integer, __pyx_k_integer, sizeof(__pyx_k_integer), 1, 1, 0},
26674   {&__pyx_n_bi_islice, __pyx_k_islice, sizeof(__pyx_k_islice), 0, 1, 1},
26675   {&__pyx_n_ui_islice, __pyx_k_islice, sizeof(__pyx_k_islice), 1, 1, 1},
26676   {&__pyx_n_ui_items, __pyx_k_items, sizeof(__pyx_k_items), 1, 1, 1},
26677   {&__pyx_n_ui_iterchildren, __pyx_k_iterchildren, sizeof(__pyx_k_iterchildren), 1, 1, 1},
26678   {&__pyx_n_ui_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 1, 1, 1},
26679   {&__pyx_n_ui_join, __pyx_k_join, sizeof(__pyx_k_join), 1, 1, 1},
26680   {&__pyx_n_u_language, __pyx_k_language, sizeof(__pyx_k_language), 1, 1, 0},
26681   {&__pyx_n_ui_last, __pyx_k_last, sizeof(__pyx_k_last), 1, 1, 1},
26682   {&__pyx_n_u_long, __pyx_k_long, sizeof(__pyx_k_long), 1, 1, 0},
26683   {&__pyx_n_ui_lxml, __pyx_k_lxml, sizeof(__pyx_k_lxml), 1, 1, 1},
26684   {&__pyx_n_ui_makeelement, __pyx_k_makeelement, sizeof(__pyx_k_makeelement), 1, 1, 1},
26685   {&__pyx_n_u_makeparser, __pyx_k_makeparser, sizeof(__pyx_k_makeparser), 1, 1, 0},
26686   {&__pyx_n_ui_map, __pyx_k_map, sizeof(__pyx_k_map), 1, 1, 1},
26687   {&__pyx_n_ui_match, __pyx_k_match, sizeof(__pyx_k_match), 1, 1, 1},
26688   {&__pyx_n_ui_name, __pyx_k_name, sizeof(__pyx_k_name), 1, 1, 1},
26689   {&__pyx_n_ui_namespace, __pyx_k_namespace, sizeof(__pyx_k_namespace), 1, 1, 1},
26690   {&__pyx_n_u_negativeInteger, __pyx_k_negativeInteger, sizeof(__pyx_k_negativeInteger), 1, 1, 0},
26691   {&__pyx_n_ui_new_parser, __pyx_k_new_parser, sizeof(__pyx_k_new_parser), 1, 1, 1},
26692   {&__pyx_n_ui_next, __pyx_k_next, sizeof(__pyx_k_next), 1, 1, 1},
26693   {&__pyx_n_u_nonNegativeInteger, __pyx_k_nonNegativeInteger, sizeof(__pyx_k_nonNegativeInteger), 1, 1, 0},
26694   {&__pyx_n_u_nonPositiveInteger, __pyx_k_nonPositiveInteger, sizeof(__pyx_k_nonPositiveInteger), 1, 1, 0},
26695   {&__pyx_n_u_none, __pyx_k_none, sizeof(__pyx_k_none), 1, 1, 0},
26696   {&__pyx_n_u_normalizedString, __pyx_k_normalizedString, sizeof(__pyx_k_normalizedString), 1, 1, 0},
26697   {&__pyx_n_ui_nsmap, __pyx_k_nsmap, sizeof(__pyx_k_nsmap), 1, 1, 1},
26698   {&__pyx_n_ui_object, __pyx_k_object, sizeof(__pyx_k_object), 1, 1, 1},
26699   {&__pyx_n_ui_oct, __pyx_k_oct, sizeof(__pyx_k_oct), 1, 1, 1},
26700   {&__pyx_n_ui_on, __pyx_k_on, sizeof(__pyx_k_on), 1, 1, 1},
26701   {&__pyx_n_ui_parent, __pyx_k_parent, sizeof(__pyx_k_parent), 1, 1, 1},
26702   {&__pyx_n_u_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 1, 1, 0},
26703   {&__pyx_n_ui_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 1, 1, 1},
26704   {&__pyx_n_ui_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 1, 1, 1},
26705   {&__pyx_n_ui_path, __pyx_k_path, sizeof(__pyx_k_path), 1, 1, 1},
26706   {&__pyx_n_ui_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 1, 1, 1},
26707   {&__pyx_n_ui_pickleReduceElement, __pyx_k_pickleReduceElement, sizeof(__pyx_k_pickleReduceElement), 1, 1, 1},
26708   {&__pyx_n_u_positiveInteger, __pyx_k_positiveInteger, sizeof(__pyx_k_positiveInteger), 1, 1, 0},
26709   {&__pyx_n_ui_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 1, 1, 1},
26710   {&__pyx_n_ui_prev, __pyx_k_prev, sizeof(__pyx_k_prev), 1, 1, 1},
26711   {&__pyx_n_u_py, __pyx_k_py, sizeof(__pyx_k_py), 1, 1, 0},
26712   {&__pyx_n_u_pyannotate, __pyx_k_pyannotate, sizeof(__pyx_k_pyannotate), 1, 1, 0},
26713   {&__pyx_n_u_pytype, __pyx_k_pytype, sizeof(__pyx_k_pytype), 1, 1, 0},
26714   {&__pyx_n_ui_pytype, __pyx_k_pytype, sizeof(__pyx_k_pytype), 1, 1, 1},
26715   {&__pyx_n_u_pytypename, __pyx_k_pytypename, sizeof(__pyx_k_pytypename), 1, 1, 0},
26716   {&__pyx_n_u_pyval, __pyx_k_pyval, sizeof(__pyx_k_pyval), 1, 1, 0},
26717   {&__pyx_n_ui_pyval, __pyx_k_pyval, sizeof(__pyx_k_pyval), 1, 1, 1},
26718   {&__pyx_n_ui_re, __pyx_k_re, sizeof(__pyx_k_re), 1, 1, 1},
26719   {&__pyx_n_ui_register, __pyx_k_register, sizeof(__pyx_k_register), 1, 1, 1},
26720   {&__pyx_n_ui_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 1, 1, 1},
26721   {&__pyx_n_b_remove_blank_text, __pyx_k_remove_blank_text, sizeof(__pyx_k_remove_blank_text), 0, 1, 0},
26722   {&__pyx_n_u_remove_blank_text, __pyx_k_remove_blank_text, sizeof(__pyx_k_remove_blank_text), 1, 1, 0},
26723   {&__pyx_n_ui_remove_blank_text, __pyx_k_remove_blank_text, sizeof(__pyx_k_remove_blank_text), 1, 1, 1},
26724   {&__pyx_n_ui_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 1, 1, 1},
26725   {&__pyx_n_ui_root, __pyx_k_root, sizeof(__pyx_k_root), 1, 1, 1},
26726   {&__pyx_n_u_set_default_parser, __pyx_k_set_default_parser, sizeof(__pyx_k_set_default_parser), 1, 1, 0},
26727   {&__pyx_n_u_short, __pyx_k_short, sizeof(__pyx_k_short), 1, 1, 0},
26728   {&__pyx_n_ui_split, __pyx_k_split, sizeof(__pyx_k_split), 1, 1, 1},
26729   {&__pyx_n_ui_start, __pyx_k_start, sizeof(__pyx_k_start), 1, 1, 1},
26730   {&__pyx_n_ui_step, __pyx_k_step, sizeof(__pyx_k_step), 1, 1, 1},
26731   {&__pyx_n_u_str, __pyx_k_str, sizeof(__pyx_k_str), 1, 1, 0},
26732   {&__pyx_n_u_string, __pyx_k_string, sizeof(__pyx_k_string), 1, 1, 0},
26733   {&__pyx_n_ui_stringify, __pyx_k_stringify, sizeof(__pyx_k_stringify), 1, 1, 1},
26734   {&__pyx_n_ui_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 1, 1, 1},
26735   {&__pyx_n_ui_strip_attributes, __pyx_k_strip_attributes, sizeof(__pyx_k_strip_attributes), 1, 1, 1},
26736   {&__pyx_n_u_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 1, 1, 0},
26737   {&__pyx_n_ui_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 1, 1, 1},
26738   {&__pyx_n_u_tail, __pyx_k_tail, sizeof(__pyx_k_tail), 1, 1, 0},
26739   {&__pyx_n_u_text, __pyx_k_text, sizeof(__pyx_k_text), 1, 1, 0},
26740   {&__pyx_n_ui_text, __pyx_k_text, sizeof(__pyx_k_text), 1, 1, 1},
26741   {&__pyx_n_u_token, __pyx_k_token, sizeof(__pyx_k_token), 1, 1, 0},
26742   {&__pyx_n_ui_tostring, __pyx_k_tostring, sizeof(__pyx_k_tostring), 1, 1, 1},
26743   {&__pyx_n_ui_tree_class, __pyx_k_tree_class, sizeof(__pyx_k_tree_class), 1, 1, 1},
26744   {&__pyx_n_u_true, __pyx_k_true, sizeof(__pyx_k_true), 1, 1, 0},
26745   {&__pyx_n_ui_type, __pyx_k_type, sizeof(__pyx_k_type), 1, 1, 1},
26746   {&__pyx_n_ui_type_check, __pyx_k_type_check, sizeof(__pyx_k_type_check), 1, 1, 1},
26747   {&__pyx_n_ui_type_class, __pyx_k_type_class, sizeof(__pyx_k_type_class), 1, 1, 1},
26748   {&__pyx_n_u_unsignedByte, __pyx_k_unsignedByte, sizeof(__pyx_k_unsignedByte), 1, 1, 0},
26749   {&__pyx_n_u_unsignedInt, __pyx_k_unsignedInt, sizeof(__pyx_k_unsignedInt), 1, 1, 0},
26750   {&__pyx_n_u_unsignedLong, __pyx_k_unsignedLong, sizeof(__pyx_k_unsignedLong), 1, 1, 0},
26751   {&__pyx_n_u_unsignedShort, __pyx_k_unsignedShort, sizeof(__pyx_k_unsignedShort), 1, 1, 0},
26752   {&__pyx_n_ui_update, __pyx_k_update, sizeof(__pyx_k_update), 1, 1, 1},
26753   {&__pyx_n_u_value, __pyx_k_value, sizeof(__pyx_k_value), 1, 1, 0},
26754   {&__pyx_n_ui_value, __pyx_k_value, sizeof(__pyx_k_value), 1, 1, 1},
26755   {&__pyx_n_ui_values, __pyx_k_values, sizeof(__pyx_k_values), 1, 1, 1},
26756   {&__pyx_n_ui_xml, __pyx_k_xml, sizeof(__pyx_k_xml), 1, 1, 1},
26757   {&__pyx_n_ui_xmlSchemaTypes, __pyx_k_xmlSchemaTypes, sizeof(__pyx_k_xmlSchemaTypes), 1, 1, 1},
26758   {&__pyx_n_u_xsd, __pyx_k_xsd, sizeof(__pyx_k_xsd), 1, 1, 0},
26759   {&__pyx_n_u_xsi, __pyx_k_xsi, sizeof(__pyx_k_xsi), 1, 1, 0},
26760   {&__pyx_n_ui_xsi, __pyx_k_xsi, sizeof(__pyx_k_xsi), 1, 1, 1},
26761   {&__pyx_n_ui_xsi_nil, __pyx_k_xsi_nil, sizeof(__pyx_k_xsi_nil), 1, 1, 1},
26762   {&__pyx_n_u_xsiannotate, __pyx_k_xsiannotate, sizeof(__pyx_k_xsiannotate), 1, 1, 0},
26763   {0, 0, 0, 0, 0, 0}
26764 };
26765 static int __Pyx_InitCachedBuiltins(void) {
26766   __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_ui_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26767   __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_ui_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26768   __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_ui_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26769   __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_ui_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26770   __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_ui_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26771   __pyx_builtin_oct = __Pyx_GetName(__pyx_b, __pyx_n_ui_oct); if (!__pyx_builtin_oct) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26772   __pyx_builtin_hex = __Pyx_GetName(__pyx_b, __pyx_n_ui_hex); if (!__pyx_builtin_hex) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26773   __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_ui_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26774   __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_n_ui_map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26775   return 0;
26776   __pyx_L1_error:;
26777   return -1;
26778 }
26779
26780 static int __Pyx_InitGlobals(void) {
26781   #if PY_VERSION_HEX < 0x02040000
26782   if (unlikely(__Pyx_Py23SetsImport() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26783   #endif
26784   if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26785   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26786   __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26787   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26788   return 0;
26789   __pyx_L1_error:;
26790   return -1;
26791 }
26792
26793 #if PY_MAJOR_VERSION < 3
26794 PyMODINIT_FUNC initobjectify(void); /*proto*/
26795 PyMODINIT_FUNC initobjectify(void)
26796 #else
26797 PyMODINIT_FUNC PyInit_objectify(void); /*proto*/
26798 PyMODINIT_FUNC PyInit_objectify(void)
26799 #endif
26800 {
26801   PyObject *__pyx_t_1 = NULL;
26802   PyObject *__pyx_t_2 = NULL;
26803   int __pyx_t_3;
26804   PyObject *__pyx_t_4 = NULL;
26805   PyObject *__pyx_t_5 = NULL;
26806   __pyx_init_filenames();
26807   #ifdef CYTHON_REFNANNY
26808   void* __pyx_refchk = NULL;
26809   __Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny");
26810   if (!__Pyx_Refnanny) {
26811       PyErr_Clear();
26812       __Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny");
26813       if (!__Pyx_Refnanny)
26814           Py_FatalError("failed to import refnanny module");
26815   }
26816   __pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_objectify(void)", __LINE__, __FILE__);
26817   #endif
26818   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26819   #if PY_MAJOR_VERSION < 3
26820   __pyx_empty_bytes = PyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26821   #else
26822   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26823   #endif
26824   /*--- Library function declarations ---*/
26825   /*--- Threads initialization code ---*/
26826   #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
26827   #ifdef WITH_THREAD /* Python build with threading support? */
26828   PyEval_InitThreads();
26829   #endif
26830   #endif
26831   /*--- Module creation code ---*/
26832   #if PY_MAJOR_VERSION < 3
26833   __pyx_m = Py_InitModule4(__Pyx_NAMESTR("objectify"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_57), 0, PYTHON_API_VERSION);
26834   #else
26835   __pyx_m = PyModule_Create(&__pyx_moduledef);
26836   #endif
26837   if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26838   #if PY_MAJOR_VERSION < 3
26839   Py_INCREF(__pyx_m);
26840   #endif
26841   __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
26842   if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26843   if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26844   if (__pyx_module_is_main_lxml__objectify) {
26845     if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_ui___main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26846   }
26847   /*--- Initialize various global constants etc. ---*/
26848   if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26849   /*--- Builtin init code ---*/
26850   if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26851   __pyx_skip_dispatch = 0;
26852   /*--- Global init code ---*/
26853   __pyx_v_4lxml_9objectify_etree = Py_None; Py_INCREF(Py_None);
26854   __pyx_v_4lxml_9objectify_re = Py_None; Py_INCREF(Py_None);
26855   __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = ((PyObject *)Py_None); Py_INCREF(Py_None);
26856   __pyx_v_4lxml_9objectify_is_special_method = Py_None; Py_INCREF(Py_None);
26857   __pyx_v_4lxml_9objectify_islice = Py_None; Py_INCREF(Py_None);
26858   __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = Py_None; Py_INCREF(Py_None);
26859   __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = Py_None; Py_INCREF(Py_None);
26860   __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = Py_None; Py_INCREF(Py_None);
26861   __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = Py_None; Py_INCREF(Py_None);
26862   __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = Py_None; Py_INCREF(Py_None);
26863   __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = Py_None; Py_INCREF(Py_None);
26864   __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = Py_None; Py_INCREF(Py_None);
26865   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = Py_None; Py_INCREF(Py_None);
26866   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = Py_None; Py_INCREF(Py_None);
26867   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = Py_None; Py_INCREF(Py_None);
26868   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = Py_None; Py_INCREF(Py_None);
26869   __pyx_v_4lxml_9objectify__PYTYPE_DICT = ((PyObject *)Py_None); Py_INCREF(Py_None);
26870   __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = ((PyObject *)Py_None); Py_INCREF(Py_None);
26871   __pyx_v_4lxml_9objectify__TYPE_CHECKS = ((PyObject *)Py_None); Py_INCREF(Py_None);
26872   __pyx_v_4lxml_9objectify_TREE_PYTYPE = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); Py_INCREF(Py_None);
26873   __pyx_v_4lxml_9objectify__strip_attributes = Py_None; Py_INCREF(Py_None);
26874   __pyx_v_4lxml_9objectify___DEFAULT_PARSER = Py_None; Py_INCREF(Py_None);
26875   __pyx_v_4lxml_9objectify_objectify_parser = Py_None; Py_INCREF(Py_None);
26876   __pyx_v_4lxml_9objectify__fromstring = Py_None; Py_INCREF(Py_None);
26877   __pyx_v_4lxml_9objectify__parse = Py_None; Py_INCREF(Py_None);
26878   __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = ((PyObject *)Py_None); Py_INCREF(Py_None);
26879   __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = Py_None; Py_INCREF(Py_None);
26880   __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = Py_None; Py_INCREF(Py_None);
26881   /*--- Function export code ---*/
26882   /*--- Type init code ---*/
26883   if (PyType_Ready(&__pyx_type_4lxml_9objectify_PyType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26884   if (__Pyx_SetAttrString(__pyx_m, "PyType", (PyObject *)&__pyx_type_4lxml_9objectify_PyType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26885   __pyx_ptype_4lxml_9objectify_PyType = &__pyx_type_4lxml_9objectify_PyType;
26886   __pyx_ptype_4lxml_11etreepublic_ElementBase = __Pyx_ImportType("lxml.etree", "ElementBase", sizeof(struct LxmlElementBase)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic_ElementBase)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26887   __pyx_type_4lxml_9objectify_ObjectifiedElement.tp_base = __pyx_ptype_4lxml_11etreepublic_ElementBase;
26888   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26889   if (__Pyx_SetAttrString(__pyx_m, "ObjectifiedElement", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26890   __pyx_ptype_4lxml_9objectify_ObjectifiedElement = &__pyx_type_4lxml_9objectify_ObjectifiedElement;
26891   __pyx_type_4lxml_9objectify_ObjectifiedDataElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedElement;
26892   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedDataElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26893   if (__Pyx_SetAttrString(__pyx_m, "ObjectifiedDataElement", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedDataElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26894   __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement = &__pyx_type_4lxml_9objectify_ObjectifiedDataElement;
26895   __pyx_type_4lxml_9objectify_NumberElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
26896   if (PyType_Ready(&__pyx_type_4lxml_9objectify_NumberElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26897   if (__Pyx_SetAttrString(__pyx_m, "NumberElement", (PyObject *)&__pyx_type_4lxml_9objectify_NumberElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26898   __pyx_ptype_4lxml_9objectify_NumberElement = &__pyx_type_4lxml_9objectify_NumberElement;
26899   __pyx_type_4lxml_9objectify_IntElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
26900   if (PyType_Ready(&__pyx_type_4lxml_9objectify_IntElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26901   if (__Pyx_SetAttrString(__pyx_m, "IntElement", (PyObject *)&__pyx_type_4lxml_9objectify_IntElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26902   __pyx_ptype_4lxml_9objectify_IntElement = &__pyx_type_4lxml_9objectify_IntElement;
26903   __pyx_type_4lxml_9objectify_LongElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
26904   if (PyType_Ready(&__pyx_type_4lxml_9objectify_LongElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26905   if (__Pyx_SetAttrString(__pyx_m, "LongElement", (PyObject *)&__pyx_type_4lxml_9objectify_LongElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26906   __pyx_ptype_4lxml_9objectify_LongElement = &__pyx_type_4lxml_9objectify_LongElement;
26907   __pyx_type_4lxml_9objectify_FloatElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
26908   if (PyType_Ready(&__pyx_type_4lxml_9objectify_FloatElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26909   if (__Pyx_SetAttrString(__pyx_m, "FloatElement", (PyObject *)&__pyx_type_4lxml_9objectify_FloatElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26910   __pyx_ptype_4lxml_9objectify_FloatElement = &__pyx_type_4lxml_9objectify_FloatElement;
26911   __pyx_type_4lxml_9objectify_StringElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
26912   if (PyType_Ready(&__pyx_type_4lxml_9objectify_StringElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26913   if (__Pyx_SetAttrString(__pyx_m, "StringElement", (PyObject *)&__pyx_type_4lxml_9objectify_StringElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26914   __pyx_ptype_4lxml_9objectify_StringElement = &__pyx_type_4lxml_9objectify_StringElement;
26915   __pyx_type_4lxml_9objectify_NoneElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
26916   if (PyType_Ready(&__pyx_type_4lxml_9objectify_NoneElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26917   if (__Pyx_SetAttrString(__pyx_m, "NoneElement", (PyObject *)&__pyx_type_4lxml_9objectify_NoneElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26918   __pyx_ptype_4lxml_9objectify_NoneElement = &__pyx_type_4lxml_9objectify_NoneElement;
26919   __pyx_type_4lxml_9objectify_BoolElement.tp_base = __pyx_ptype_4lxml_9objectify_IntElement;
26920   if (PyType_Ready(&__pyx_type_4lxml_9objectify_BoolElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26921   if (__Pyx_SetAttrString(__pyx_m, "BoolElement", (PyObject *)&__pyx_type_4lxml_9objectify_BoolElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26922   __pyx_ptype_4lxml_9objectify_BoolElement = &__pyx_type_4lxml_9objectify_BoolElement;
26923   if (PyType_Ready(&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26924   if (__Pyx_SetAttrString(__pyx_m, "_ObjectifyElementMakerCaller", (PyObject *)&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26925   __pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = &__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller;
26926   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ElementMaker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26927   if (__Pyx_SetAttrString(__pyx_m, "ElementMaker", (PyObject *)&__pyx_type_4lxml_9objectify_ElementMaker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26928   __pyx_ptype_4lxml_9objectify_ElementMaker = &__pyx_type_4lxml_9objectify_ElementMaker;
26929   __pyx_ptype_4lxml_11etreepublic_ElementClassLookup = __Pyx_ImportType("lxml.etree", "ElementClassLookup", sizeof(struct LxmlElementClassLookup)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic_ElementClassLookup)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26930   __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_base = __pyx_ptype_4lxml_11etreepublic_ElementClassLookup;
26931   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26932   if (__Pyx_SetAttrString(__pyx_m, "ObjectifyElementClassLookup", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26933   __pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = &__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup;
26934   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectPath) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26935   if (__Pyx_SetAttrString(__pyx_m, "ObjectPath", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectPath) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26936   __pyx_ptype_4lxml_9objectify_ObjectPath = &__pyx_type_4lxml_9objectify_ObjectPath;
26937   /*--- Type import code ---*/
26938   __pyx_ptype_4lxml_6python_slice = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "slice", sizeof(PySliceObject)); if (unlikely(!__pyx_ptype_4lxml_6python_slice)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26939   #if PY_MAJOR_VERSION >= 3
26940   __pyx_ptype_4lxml_6python_unicode = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "str", sizeof(PyUnicodeObject)); if (unlikely(!__pyx_ptype_4lxml_6python_unicode)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26941   #else
26942   __pyx_ptype_4lxml_6python_unicode = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "unicode", sizeof(PyUnicodeObject)); if (unlikely(!__pyx_ptype_4lxml_6python_unicode)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26943   #endif
26944   __pyx_ptype_4lxml_11etreepublic__Document = __Pyx_ImportType("lxml.etree", "_Document", sizeof(struct LxmlDocument)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__Document)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26945   __pyx_ptype_4lxml_11etreepublic__Element = __Pyx_ImportType("lxml.etree", "_Element", sizeof(struct LxmlElement)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__Element)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26946   __pyx_ptype_4lxml_11etreepublic__ElementTree = __Pyx_ImportType("lxml.etree", "_ElementTree", sizeof(struct LxmlElementTree)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__ElementTree)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26947   __pyx_ptype_4lxml_11etreepublic_FallbackElementClassLookup = __Pyx_ImportType("lxml.etree", "FallbackElementClassLookup", sizeof(struct LxmlFallbackElementClassLookup)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic_FallbackElementClassLookup)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26948   __pyx_ptype_4lxml_11etreepublic__ElementTagMatcher = __Pyx_ImportType("lxml.etree", "_ElementTagMatcher", sizeof(struct LxmlElementTagMatcher)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__ElementTagMatcher)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26949   __pyx_ptype_4lxml_11etreepublic__ElementIterator = __Pyx_ImportType("lxml.etree", "_ElementIterator", sizeof(struct LxmlElementIterator)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__ElementIterator)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26950   /*--- Function import code ---*/
26951   /*--- Execution code ---*/
26952
26953   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":14
26954  * cimport cstd
26955  * 
26956  * __all__ = [u'BoolElement', u'DataElement', u'E', u'Element', u'ElementMaker',             # <<<<<<<<<<<<<<
26957  *            u'FloatElement', u'IntElement', u'LongElement', u'NoneElement',
26958  *            u'NumberElement', u'ObjectPath', u'ObjectifiedDataElement',
26959  */
26960   __pyx_t_1 = PyList_New(31); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26961   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
26962   __Pyx_INCREF(((PyObject *)__pyx_n_u_BoolElement));
26963   PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_u_BoolElement));
26964   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_BoolElement));
26965   __Pyx_INCREF(((PyObject *)__pyx_n_u_DataElement));
26966   PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_u_DataElement));
26967   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_DataElement));
26968   __Pyx_INCREF(((PyObject *)__pyx_n_u_E));
26969   PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_u_E));
26970   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_E));
26971   __Pyx_INCREF(((PyObject *)__pyx_n_u_Element));
26972   PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_u_Element));
26973   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_Element));
26974   __Pyx_INCREF(((PyObject *)__pyx_n_u_ElementMaker));
26975   PyList_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_n_u_ElementMaker));
26976   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_ElementMaker));
26977   __Pyx_INCREF(((PyObject *)__pyx_n_u_FloatElement));
26978   PyList_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_n_u_FloatElement));
26979   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_FloatElement));
26980   __Pyx_INCREF(((PyObject *)__pyx_n_u_IntElement));
26981   PyList_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_n_u_IntElement));
26982   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_IntElement));
26983   __Pyx_INCREF(((PyObject *)__pyx_n_u_LongElement));
26984   PyList_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_n_u_LongElement));
26985   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_LongElement));
26986   __Pyx_INCREF(((PyObject *)__pyx_n_u_NoneElement));
26987   PyList_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_n_u_NoneElement));
26988   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_NoneElement));
26989   __Pyx_INCREF(((PyObject *)__pyx_n_u_NumberElement));
26990   PyList_SET_ITEM(__pyx_t_1, 9, ((PyObject *)__pyx_n_u_NumberElement));
26991   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_NumberElement));
26992   __Pyx_INCREF(((PyObject *)__pyx_n_u_ObjectPath));
26993   PyList_SET_ITEM(__pyx_t_1, 10, ((PyObject *)__pyx_n_u_ObjectPath));
26994   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_ObjectPath));
26995   __Pyx_INCREF(((PyObject *)__pyx_n_u_58));
26996   PyList_SET_ITEM(__pyx_t_1, 11, ((PyObject *)__pyx_n_u_58));
26997   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_58));
26998   __Pyx_INCREF(((PyObject *)__pyx_n_u_ObjectifiedElement));
26999   PyList_SET_ITEM(__pyx_t_1, 12, ((PyObject *)__pyx_n_u_ObjectifiedElement));
27000   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_ObjectifiedElement));
27001   __Pyx_INCREF(((PyObject *)__pyx_n_u_59));
27002   PyList_SET_ITEM(__pyx_t_1, 13, ((PyObject *)__pyx_n_u_59));
27003   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_59));
27004   __Pyx_INCREF(((PyObject *)__pyx_n_u_PYTYPE_ATTRIBUTE));
27005   PyList_SET_ITEM(__pyx_t_1, 14, ((PyObject *)__pyx_n_u_PYTYPE_ATTRIBUTE));
27006   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_PYTYPE_ATTRIBUTE));
27007   __Pyx_INCREF(((PyObject *)__pyx_n_u_PyType));
27008   PyList_SET_ITEM(__pyx_t_1, 15, ((PyObject *)__pyx_n_u_PyType));
27009   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_PyType));
27010   __Pyx_INCREF(((PyObject *)__pyx_n_u_StringElement));
27011   PyList_SET_ITEM(__pyx_t_1, 16, ((PyObject *)__pyx_n_u_StringElement));
27012   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_StringElement));
27013   __Pyx_INCREF(((PyObject *)__pyx_n_u_XML));
27014   PyList_SET_ITEM(__pyx_t_1, 17, ((PyObject *)__pyx_n_u_XML));
27015   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_XML));
27016   __Pyx_INCREF(((PyObject *)__pyx_n_u_annotate));
27017   PyList_SET_ITEM(__pyx_t_1, 18, ((PyObject *)__pyx_n_u_annotate));
27018   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_annotate));
27019   __Pyx_INCREF(((PyObject *)__pyx_n_u_deannotate));
27020   PyList_SET_ITEM(__pyx_t_1, 19, ((PyObject *)__pyx_n_u_deannotate));
27021   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_deannotate));
27022   __Pyx_INCREF(((PyObject *)__pyx_n_u_dump));
27023   PyList_SET_ITEM(__pyx_t_1, 20, ((PyObject *)__pyx_n_u_dump));
27024   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_dump));
27025   __Pyx_INCREF(((PyObject *)__pyx_n_u_60));
27026   PyList_SET_ITEM(__pyx_t_1, 21, ((PyObject *)__pyx_n_u_60));
27027   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_60));
27028   __Pyx_INCREF(((PyObject *)__pyx_n_u_fromstring));
27029   PyList_SET_ITEM(__pyx_t_1, 22, ((PyObject *)__pyx_n_u_fromstring));
27030   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_fromstring));
27031   __Pyx_INCREF(((PyObject *)__pyx_n_u_getRegisteredTypes));
27032   PyList_SET_ITEM(__pyx_t_1, 23, ((PyObject *)__pyx_n_u_getRegisteredTypes));
27033   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_getRegisteredTypes));
27034   __Pyx_INCREF(((PyObject *)__pyx_n_u_makeparser));
27035   PyList_SET_ITEM(__pyx_t_1, 24, ((PyObject *)__pyx_n_u_makeparser));
27036   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_makeparser));
27037   __Pyx_INCREF(((PyObject *)__pyx_n_u_parse));
27038   PyList_SET_ITEM(__pyx_t_1, 25, ((PyObject *)__pyx_n_u_parse));
27039   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_parse));
27040   __Pyx_INCREF(((PyObject *)__pyx_n_u_pyannotate));
27041   PyList_SET_ITEM(__pyx_t_1, 26, ((PyObject *)__pyx_n_u_pyannotate));
27042   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_pyannotate));
27043   __Pyx_INCREF(((PyObject *)__pyx_n_u_pytypename));
27044   PyList_SET_ITEM(__pyx_t_1, 27, ((PyObject *)__pyx_n_u_pytypename));
27045   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_pytypename));
27046   __Pyx_INCREF(((PyObject *)__pyx_n_u_set_default_parser));
27047   PyList_SET_ITEM(__pyx_t_1, 28, ((PyObject *)__pyx_n_u_set_default_parser));
27048   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_set_default_parser));
27049   __Pyx_INCREF(((PyObject *)__pyx_n_u_61));
27050   PyList_SET_ITEM(__pyx_t_1, 29, ((PyObject *)__pyx_n_u_61));
27051   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_61));
27052   __Pyx_INCREF(((PyObject *)__pyx_n_u_xsiannotate));
27053   PyList_SET_ITEM(__pyx_t_1, 30, ((PyObject *)__pyx_n_u_xsiannotate));
27054   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_xsiannotate));
27055   if (PyObject_SetAttr(__pyx_m, __pyx_n_ui___all__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27056   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27057
27058   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":25
27059  * 
27060  * cdef object etree
27061  * from lxml import etree             # <<<<<<<<<<<<<<
27062  * # initialize C-API of lxml.etree
27063  * import_lxml__etree()
27064  */
27065   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27066   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27067   __Pyx_INCREF(__pyx_n_ui_etree);
27068   PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_ui_etree);
27069   __Pyx_GIVEREF(__pyx_n_ui_etree);
27070   __pyx_t_2 = __Pyx_Import(__pyx_n_ui_lxml, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27071   __Pyx_GOTREF(__pyx_t_2);
27072   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27073   __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_bi_etree); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27074   __Pyx_GOTREF(__pyx_t_1);
27075   __Pyx_GOTREF(__pyx_v_4lxml_9objectify_etree);
27076   __Pyx_DECREF(__pyx_v_4lxml_9objectify_etree);
27077   __Pyx_GIVEREF(__pyx_t_1);
27078   __pyx_v_4lxml_9objectify_etree = __pyx_t_1;
27079   __pyx_t_1 = 0;
27080   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27081
27082   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":27
27083  * from lxml import etree
27084  * # initialize C-API of lxml.etree
27085  * import_lxml__etree()             # <<<<<<<<<<<<<<
27086  * 
27087  * __version__ = etree.__version__
27088  */
27089   __pyx_t_3 = import_lxml__etree(); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27090
27091   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":29
27092  * import_lxml__etree()
27093  * 
27094  * __version__ = etree.__version__             # <<<<<<<<<<<<<<
27095  * 
27096  * cdef object re
27097  */
27098   __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui___version__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27099   __Pyx_GOTREF(__pyx_t_2);
27100   if (PyObject_SetAttr(__pyx_m, __pyx_n_ui___version__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27101   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27102
27103   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":32
27104  * 
27105  * cdef object re
27106  * import re             # <<<<<<<<<<<<<<
27107  * 
27108  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
27109  */
27110   __pyx_t_2 = __Pyx_Import(__pyx_n_ui_re, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27111   __Pyx_GOTREF(__pyx_t_2);
27112   __Pyx_GOTREF(__pyx_v_4lxml_9objectify_re);
27113   __Pyx_DECREF(__pyx_v_4lxml_9objectify_re);
27114   __Pyx_GIVEREF(__pyx_t_2);
27115   __pyx_v_4lxml_9objectify_re = __pyx_t_2;
27116   __pyx_t_2 = 0;
27117
27118   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":34
27119  * import re
27120  * 
27121  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)             # <<<<<<<<<<<<<<
27122  * cdef object is_special_method = re.compile(u'__.*__$').match
27123  * 
27124  */
27125   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27126   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
27127   __Pyx_INCREF(__pyx_builtin_ValueError);
27128   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_ValueError);
27129   __Pyx_GIVEREF(__pyx_builtin_ValueError);
27130   __Pyx_INCREF(__pyx_builtin_TypeError);
27131   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_TypeError);
27132   __Pyx_GIVEREF(__pyx_builtin_TypeError);
27133   __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
27134   __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
27135   __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
27136   __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = __pyx_t_2;
27137   __pyx_t_2 = 0;
27138
27139   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":35
27140  * 
27141  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
27142  * cdef object is_special_method = re.compile(u'__.*__$').match             # <<<<<<<<<<<<<<
27143  * 
27144  * cdef object islice
27145  */
27146   __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_re, __pyx_n_ui_compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27147   __Pyx_GOTREF(__pyx_t_2);
27148   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27149   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27150   __Pyx_INCREF(((PyObject *)__pyx_kp_u_62));
27151   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_u_62));
27152   __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_62));
27153   __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27154   __Pyx_GOTREF(__pyx_t_4);
27155   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27156   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27157   __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_ui_match); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27158   __Pyx_GOTREF(__pyx_t_1);
27159   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27160   __Pyx_GOTREF(__pyx_v_4lxml_9objectify_is_special_method);
27161   __Pyx_DECREF(__pyx_v_4lxml_9objectify_is_special_method);
27162   __Pyx_GIVEREF(__pyx_t_1);
27163   __pyx_v_4lxml_9objectify_is_special_method = __pyx_t_1;
27164   __pyx_t_1 = 0;
27165
27166   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":38
27167  * 
27168  * cdef object islice
27169  * from itertools import islice             # <<<<<<<<<<<<<<
27170  * 
27171  * cdef object _typename(object t):
27172  */
27173   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27174   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27175   __Pyx_INCREF(__pyx_n_ui_islice);
27176   PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_ui_islice);
27177   __Pyx_GIVEREF(__pyx_n_ui_islice);
27178   __pyx_t_4 = __Pyx_Import(__pyx_n_ui_itertools, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27179   __Pyx_GOTREF(__pyx_t_4);
27180   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27181   __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_bi_islice); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27182   __Pyx_GOTREF(__pyx_t_1);
27183   __Pyx_GOTREF(__pyx_v_4lxml_9objectify_islice);
27184   __Pyx_DECREF(__pyx_v_4lxml_9objectify_islice);
27185   __Pyx_GIVEREF(__pyx_t_1);
27186   __pyx_v_4lxml_9objectify_islice = __pyx_t_1;
27187   __pyx_t_1 = 0;
27188   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27189
27190   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":58
27191  * cdef char* _PYTYPE_ATTRIBUTE_NAME
27192  * 
27193  * PYTYPE_ATTRIBUTE = None             # <<<<<<<<<<<<<<
27194  * 
27195  * cdef object TREE_PYTYPE_NAME
27196  */
27197   if (PyObject_SetAttr(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27198
27199   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":61
27200  * 
27201  * cdef object TREE_PYTYPE_NAME
27202  * TREE_PYTYPE_NAME = u"TREE"             # <<<<<<<<<<<<<<
27203  * 
27204  * cdef _unicodeAndUtf8(s):
27205  */
27206   __Pyx_INCREF(((PyObject *)__pyx_n_u_TREE));
27207   __Pyx_GOTREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
27208   __Pyx_DECREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
27209   __Pyx_GIVEREF(((PyObject *)__pyx_n_u_TREE));
27210   __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = ((PyObject *)__pyx_n_u_TREE);
27211
27212   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":98
27213  *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
27214  * 
27215  * set_pytype_attribute_tag()             # <<<<<<<<<<<<<<
27216  * 
27217  * 
27218  */
27219   __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_ui_61); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27220   __Pyx_GOTREF(__pyx_t_4);
27221   __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27222   __Pyx_GOTREF(__pyx_t_1);
27223   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27224   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27225
27226   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":104
27227  * cdef object XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8
27228  * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \
27229  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")             # <<<<<<<<<<<<<<
27230  * cdef char* _XML_SCHEMA_NS
27231  * _XML_SCHEMA_NS = _cstr(XML_SCHEMA_NS_UTF8)
27232  */
27233   __pyx_t_1 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(((PyObject *)__pyx_kp_u_63)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27234   __Pyx_GOTREF(__pyx_t_1);
27235   if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
27236     PyObject* tuple = __pyx_t_1;
27237     __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
27238     __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2);
27239
27240     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":103
27241  * # namespaces for XML Schema
27242  * cdef object XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8
27243  * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \             # <<<<<<<<<<<<<<
27244  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")
27245  * cdef char* _XML_SCHEMA_NS
27246  */
27247     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27248     __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
27249     __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
27250     __Pyx_GIVEREF(__pyx_t_4);
27251     __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = __pyx_t_4;
27252     __pyx_t_4 = 0;
27253     __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
27254     __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
27255     __Pyx_GIVEREF(__pyx_t_2);
27256     __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = __pyx_t_2;
27257     __pyx_t_2 = 0;
27258   } else {
27259     __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27260     __Pyx_GOTREF(__pyx_t_5);
27261     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27262     __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27263     __Pyx_GOTREF(__pyx_t_4);
27264     __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27265     __Pyx_GOTREF(__pyx_t_2);
27266     if (__Pyx_EndUnpack(__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27267     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27268     __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
27269     __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
27270     __Pyx_GIVEREF(__pyx_t_4);
27271     __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = __pyx_t_4;
27272     __pyx_t_4 = 0;
27273     __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
27274     __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
27275     __Pyx_GIVEREF(__pyx_t_2);
27276     __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = __pyx_t_2;
27277     __pyx_t_2 = 0;
27278   }
27279
27280   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":106
27281  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")
27282  * cdef char* _XML_SCHEMA_NS
27283  * _XML_SCHEMA_NS = _cstr(XML_SCHEMA_NS_UTF8)             # <<<<<<<<<<<<<<
27284  * 
27285  * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
27286  */
27287   __pyx_v_4lxml_9objectify__XML_SCHEMA_NS = PyString_AS_STRING(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
27288
27289   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":110
27290  * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
27291  * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \
27292  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")             # <<<<<<<<<<<<<<
27293  * cdef char* _XML_SCHEMA_INSTANCE_NS
27294  * _XML_SCHEMA_INSTANCE_NS = _cstr(XML_SCHEMA_INSTANCE_NS_UTF8)
27295  */
27296   __pyx_t_1 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(((PyObject *)__pyx_kp_u_64)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27297   __Pyx_GOTREF(__pyx_t_1);
27298   if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
27299     PyObject* tuple = __pyx_t_1;
27300     __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
27301     __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
27302
27303     /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":109
27304  * 
27305  * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
27306  * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \             # <<<<<<<<<<<<<<
27307  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")
27308  * cdef char* _XML_SCHEMA_INSTANCE_NS
27309  */
27310     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27311     __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
27312     __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
27313     __Pyx_GIVEREF(__pyx_t_2);
27314     __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = __pyx_t_2;
27315     __pyx_t_2 = 0;
27316     __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
27317     __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
27318     __Pyx_GIVEREF(__pyx_t_4);
27319     __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = __pyx_t_4;
27320     __pyx_t_4 = 0;
27321   } else {
27322     __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27323     __Pyx_GOTREF(__pyx_t_5);
27324     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27325     __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27326     __Pyx_GOTREF(__pyx_t_2);
27327     __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27328     __Pyx_GOTREF(__pyx_t_4);
27329     if (__Pyx_EndUnpack(__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27330     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27331     __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
27332     __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
27333     __Pyx_GIVEREF(__pyx_t_2);
27334     __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = __pyx_t_2;
27335     __pyx_t_2 = 0;
27336     __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
27337     __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
27338     __Pyx_GIVEREF(__pyx_t_4);
27339     __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = __pyx_t_4;
27340     __pyx_t_4 = 0;
27341   }
27342
27343   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":112
27344  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")
27345  * cdef char* _XML_SCHEMA_INSTANCE_NS
27346  * _XML_SCHEMA_INSTANCE_NS = _cstr(XML_SCHEMA_INSTANCE_NS_UTF8)             # <<<<<<<<<<<<<<
27347  * 
27348  * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR
27349  */
27350   __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS = PyString_AS_STRING(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
27351
27352   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":115
27353  * 
27354  * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR
27355  * XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
27356  * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR
27357  * XML_SCHEMA_INSTANCE_TYPE_ATTR = u"{%s}type" % XML_SCHEMA_INSTANCE_NS
27358  */
27359   __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_65), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27360   __Pyx_GOTREF(__pyx_t_1);
27361   __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
27362   __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
27363   __Pyx_GIVEREF(__pyx_t_1);
27364   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = __pyx_t_1;
27365   __pyx_t_1 = 0;
27366
27367   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":117
27368  * XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS
27369  * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR
27370  * XML_SCHEMA_INSTANCE_TYPE_ATTR = u"{%s}type" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
27371  * 
27372  * 
27373  */
27374   __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_66), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27375   __Pyx_GOTREF(__pyx_t_1);
27376   __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
27377   __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
27378   __Pyx_GIVEREF(__pyx_t_1);
27379   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = __pyx_t_1;
27380   __pyx_t_1 = 0;
27381
27382   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1040
27383  * 
27384  * cdef dict _PYTYPE_DICT
27385  * _PYTYPE_DICT = {}             # <<<<<<<<<<<<<<
27386  * 
27387  * cdef dict _SCHEMA_TYPE_DICT
27388  */
27389   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27390   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27391   __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT));
27392   __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT));
27393   __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
27394   __pyx_v_4lxml_9objectify__PYTYPE_DICT = __pyx_t_1;
27395   __pyx_t_1 = 0;
27396
27397   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1043
27398  * 
27399  * cdef dict _SCHEMA_TYPE_DICT
27400  * _SCHEMA_TYPE_DICT = {}             # <<<<<<<<<<<<<<
27401  * 
27402  * cdef list _TYPE_CHECKS
27403  */
27404   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27405   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27406   __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT));
27407   __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT));
27408   __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
27409   __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = __pyx_t_1;
27410   __pyx_t_1 = 0;
27411
27412   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1046
27413  * 
27414  * cdef list _TYPE_CHECKS
27415  * _TYPE_CHECKS = []             # <<<<<<<<<<<<<<
27416  * 
27417  * cdef _lower_bool(b):
27418  */
27419   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27420   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27421   __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS));
27422   __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS));
27423   __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
27424   __pyx_v_4lxml_9objectify__TYPE_CHECKS = __pyx_t_1;
27425   __pyx_t_1 = 0;
27426
27427   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1106
27428  * # non-registered PyType for inner tree elements
27429  * cdef PyType TREE_PYTYPE
27430  * TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)             # <<<<<<<<<<<<<<
27431  * 
27432  * _registerPyTypes()
27433  */
27434   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27435   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27436   __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
27437   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
27438   __Pyx_GIVEREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
27439   __Pyx_INCREF(Py_None);
27440   PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
27441   __Pyx_GIVEREF(Py_None);
27442   __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
27443   PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
27444   __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
27445   __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27446   __Pyx_GOTREF(__pyx_t_4);
27447   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27448   __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
27449   __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
27450   __Pyx_GIVEREF(__pyx_t_4);
27451   __pyx_v_4lxml_9objectify_TREE_PYTYPE = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
27452   __pyx_t_4 = 0;
27453
27454   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1108
27455  * TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)
27456  * 
27457  * _registerPyTypes()             # <<<<<<<<<<<<<<
27458  * 
27459  * def getRegisteredTypes():
27460  */
27461   __pyx_t_4 = __pyx_f_4lxml_9objectify__registerPyTypes(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27462   __Pyx_GOTREF(__pyx_t_4);
27463   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27464
27465   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1273
27466  *     cdef object _nsmap
27467  *     cdef bint _annotate
27468  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
27469  *                  makeelement=None):
27470  *         if nsmap is None:
27471  */
27472   __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27473   __Pyx_GOTREF(__pyx_t_4);
27474   __pyx_k_22 = __pyx_t_4;
27475   __Pyx_GIVEREF(__pyx_t_4);
27476   __pyx_t_4 = 0;
27477
27478   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1309
27479  * 
27480  * cdef bint __RECURSIVE_STR
27481  * __RECURSIVE_STR = 0 # default: off             # <<<<<<<<<<<<<<
27482  * 
27483  * def enable_recursive_str(on=True):
27484  */
27485   __pyx_v_4lxml_9objectify___RECURSIVE_STR = 0;
27486
27487   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1311
27488  * __RECURSIVE_STR = 0 # default: off
27489  * 
27490  * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
27491  *     u"""enable_recursive_str(on=True)
27492  * 
27493  */
27494   __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27495   __Pyx_GOTREF(__pyx_t_4);
27496   __pyx_k_25 = __pyx_t_4;
27497   __Pyx_GIVEREF(__pyx_t_4);
27498   __pyx_t_4 = 0;
27499
27500   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1385
27501  *     return (__unpickleElementTree, (etree.tostring(obj),))
27502  * 
27503  * _setupPickle(pickleReduceElement, pickleReduceElementTree)             # <<<<<<<<<<<<<<
27504  * del pickleReduceElement, pickleReduceElementTree
27505  * 
27506  */
27507   __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_ui_pickleReduceElement); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27508   __Pyx_GOTREF(__pyx_t_4);
27509   __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_ui_67); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27510   __Pyx_GOTREF(__pyx_t_1);
27511   __pyx_t_2 = __pyx_f_4lxml_9objectify__setupPickle(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27512   __Pyx_GOTREF(__pyx_t_2);
27513   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27514   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27515   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27516
27517   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1386
27518  * 
27519  * _setupPickle(pickleReduceElement, pickleReduceElementTree)
27520  * del pickleReduceElement, pickleReduceElementTree             # <<<<<<<<<<<<<<
27521  * 
27522  * ################################################################################
27523  */
27524   if (__Pyx_DelAttrString(__pyx_m, "pickleReduceElement") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27525   if (__Pyx_DelAttrString(__pyx_m, "pickleReduceElementTree") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27526
27527   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1477
27528  *     return None
27529  * 
27530  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
27531  *              empty_pytype=None):
27532  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
27533  */
27534   __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27535   __Pyx_GOTREF(__pyx_t_2);
27536   __pyx_k_33 = __pyx_t_2;
27537   __Pyx_GIVEREF(__pyx_t_2);
27538   __pyx_t_2 = 0;
27539   __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27540   __Pyx_GOTREF(__pyx_t_2);
27541   __pyx_k_34 = __pyx_t_2;
27542   __Pyx_GIVEREF(__pyx_t_2);
27543   __pyx_t_2 = 0;
27544
27545   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1500
27546  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
27547  * 
27548  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
27549  *                 empty_type=None):
27550  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
27551  */
27552   __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27553   __Pyx_GOTREF(__pyx_t_2);
27554   __pyx_k_35 = __pyx_t_2;
27555   __Pyx_GIVEREF(__pyx_t_2);
27556   __pyx_t_2 = 0;
27557   __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27558   __Pyx_GOTREF(__pyx_t_2);
27559   __pyx_k_36 = __pyx_t_2;
27560   __Pyx_GIVEREF(__pyx_t_2);
27561   __pyx_t_2 = 0;
27562
27563   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1528
27564  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
27565  * 
27566  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
27567  *              empty_pytype=None, empty_type=None, annotate_xsi=0,
27568  *              annotate_pytype=1):
27569  */
27570   __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27571   __Pyx_GOTREF(__pyx_t_2);
27572   __pyx_k_37 = __pyx_t_2;
27573   __Pyx_GIVEREF(__pyx_t_2);
27574   __pyx_t_2 = 0;
27575   __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27576   __Pyx_GOTREF(__pyx_t_2);
27577   __pyx_k_38 = __pyx_t_2;
27578   __Pyx_GIVEREF(__pyx_t_2);
27579   __pyx_t_2 = 0;
27580
27581   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1726
27582  *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
27583  * 
27584  * cdef object _strip_attributes = etree.strip_attributes             # <<<<<<<<<<<<<<
27585  * 
27586  * def deannotate(element_or_tree, *, pytype=True, xsi=True, xsi_nil=False):
27587  */
27588   __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_strip_attributes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27589   __Pyx_GOTREF(__pyx_t_2);
27590   __Pyx_GOTREF(__pyx_v_4lxml_9objectify__strip_attributes);
27591   __Pyx_DECREF(__pyx_v_4lxml_9objectify__strip_attributes);
27592   __Pyx_GIVEREF(__pyx_t_2);
27593   __pyx_v_4lxml_9objectify__strip_attributes = __pyx_t_2;
27594   __pyx_t_2 = 0;
27595
27596   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1728
27597  * cdef object _strip_attributes = etree.strip_attributes
27598  * 
27599  * def deannotate(element_or_tree, *, pytype=True, xsi=True, xsi_nil=False):             # <<<<<<<<<<<<<<
27600  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False)
27601  * 
27602  */
27603   __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27604   __Pyx_GOTREF(__pyx_t_2);
27605   __pyx_k_39 = __pyx_t_2;
27606   __Pyx_GIVEREF(__pyx_t_2);
27607   __pyx_t_2 = 0;
27608   __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27609   __Pyx_GOTREF(__pyx_t_2);
27610   __pyx_k_40 = __pyx_t_2;
27611   __Pyx_GIVEREF(__pyx_t_2);
27612   __pyx_t_2 = 0;
27613   __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27614   __Pyx_GOTREF(__pyx_t_2);
27615   __pyx_k_41 = __pyx_t_2;
27616   __Pyx_GIVEREF(__pyx_t_2);
27617   __pyx_t_2 = 0;
27618
27619   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1759
27620  * 
27621  * cdef object __DEFAULT_PARSER
27622  * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)             # <<<<<<<<<<<<<<
27623  * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() )
27624  * 
27625  */
27626   __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_XMLParser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27627   __Pyx_GOTREF(__pyx_t_2);
27628   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27629   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27630   __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27631   __Pyx_GOTREF(__pyx_t_4);
27632   if (PyDict_SetItem(__pyx_t_1, __pyx_n_ui_remove_blank_text, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27633   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27634   __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27635   __Pyx_GOTREF(__pyx_t_4);
27636   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27637   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27638   __Pyx_GOTREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
27639   __Pyx_DECREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
27640   __Pyx_GIVEREF(__pyx_t_4);
27641   __pyx_v_4lxml_9objectify___DEFAULT_PARSER = __pyx_t_4;
27642   __pyx_t_4 = 0;
27643
27644   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1760
27645  * cdef object __DEFAULT_PARSER
27646  * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)
27647  * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() )             # <<<<<<<<<<<<<<
27648  * 
27649  * cdef object objectify_parser
27650  */
27651   __pyx_t_4 = PyObject_GetAttr(__pyx_v_4lxml_9objectify___DEFAULT_PARSER, __pyx_n_ui_43); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27652   __Pyx_GOTREF(__pyx_t_4);
27653   __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27654   __Pyx_GOTREF(__pyx_t_1);
27655   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27656   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
27657   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
27658   __Pyx_GIVEREF(__pyx_t_1);
27659   __pyx_t_1 = 0;
27660   __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27661   __Pyx_GOTREF(__pyx_t_1);
27662   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27663   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
27664   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27665
27666   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1763
27667  * 
27668  * cdef object objectify_parser
27669  * objectify_parser = __DEFAULT_PARSER             # <<<<<<<<<<<<<<
27670  * 
27671  * def set_default_parser(new_parser = None):
27672  */
27673   __Pyx_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
27674   __Pyx_GOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
27675   __Pyx_DECREF(__pyx_v_4lxml_9objectify_objectify_parser);
27676   __Pyx_GIVEREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
27677   __pyx_v_4lxml_9objectify_objectify_parser = __pyx_v_4lxml_9objectify___DEFAULT_PARSER;
27678
27679   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1810
27680  * 
27681  * cdef object _fromstring
27682  * _fromstring = etree.fromstring             # <<<<<<<<<<<<<<
27683  * 
27684  * def fromstring(xml, parser=None, *, base_url=None):
27685  */
27686   __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_fromstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27687   __Pyx_GOTREF(__pyx_t_1);
27688   __Pyx_GOTREF(__pyx_v_4lxml_9objectify__fromstring);
27689   __Pyx_DECREF(__pyx_v_4lxml_9objectify__fromstring);
27690   __Pyx_GIVEREF(__pyx_t_1);
27691   __pyx_v_4lxml_9objectify__fromstring = __pyx_t_1;
27692   __pyx_t_1 = 0;
27693
27694   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1845
27695  * 
27696  * cdef object _parse
27697  * _parse = etree.parse             # <<<<<<<<<<<<<<
27698  * 
27699  * def parse(f, parser=None, *, base_url=None):
27700  */
27701   __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_parse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27702   __Pyx_GOTREF(__pyx_t_1);
27703   __Pyx_GOTREF(__pyx_v_4lxml_9objectify__parse);
27704   __Pyx_DECREF(__pyx_v_4lxml_9objectify__parse);
27705   __Pyx_GIVEREF(__pyx_t_1);
27706   __pyx_v_4lxml_9objectify__parse = __pyx_t_1;
27707   __pyx_t_1 = 0;
27708
27709   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1863
27710  * 
27711  * cdef dict _DEFAULT_NSMAP
27712  * _DEFAULT_NSMAP = { u"py"  : PYTYPE_NAMESPACE,             # <<<<<<<<<<<<<<
27713  *                    u"xsi" : XML_SCHEMA_INSTANCE_NS,
27714  *                    u"xsd" : XML_SCHEMA_NS}
27715  */
27716   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27717   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27718   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_u_py), __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27719
27720   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1864
27721  * cdef dict _DEFAULT_NSMAP
27722  * _DEFAULT_NSMAP = { u"py"  : PYTYPE_NAMESPACE,
27723  *                    u"xsi" : XML_SCHEMA_INSTANCE_NS,             # <<<<<<<<<<<<<<
27724  *                    u"xsd" : XML_SCHEMA_NS}
27725  * 
27726  */
27727   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_u_xsi), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27728
27729   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1865
27730  * _DEFAULT_NSMAP = { u"py"  : PYTYPE_NAMESPACE,
27731  *                    u"xsi" : XML_SCHEMA_INSTANCE_NS,
27732  *                    u"xsd" : XML_SCHEMA_NS}             # <<<<<<<<<<<<<<
27733  * 
27734  * E = ElementMaker()
27735  */
27736   if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_u_xsd), __pyx_v_4lxml_9objectify_XML_SCHEMA_NS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27737   __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
27738   __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
27739   __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
27740   __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = __pyx_t_1;
27741   __pyx_t_1 = 0;
27742
27743   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1867
27744  *                    u"xsd" : XML_SCHEMA_NS}
27745  * 
27746  * E = ElementMaker()             # <<<<<<<<<<<<<<
27747  * 
27748  * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):
27749  */
27750   __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ElementMaker)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27751   __Pyx_GOTREF(__pyx_t_1);
27752   if (PyObject_SetAttr(__pyx_m, __pyx_n_ui_E, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27753   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27754
27755   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":84
27756  * 
27757  * cdef object __MATCH_PATH_SEGMENT
27758  * __MATCH_PATH_SEGMENT = re.compile(             # <<<<<<<<<<<<<<
27759  *     ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
27760  *     re.U).match
27761  */
27762   __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_re, __pyx_n_ui_compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27763   __Pyx_GOTREF(__pyx_t_1);
27764
27765   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":86
27766  * __MATCH_PATH_SEGMENT = re.compile(
27767  *     ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
27768  *     re.U).match             # <<<<<<<<<<<<<<
27769  * 
27770  * cdef object _RELATIVE_PATH_SEGMENT
27771  */
27772   __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_re, __pyx_n_ui_U); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27773   __Pyx_GOTREF(__pyx_t_2);
27774   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27775   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
27776   __Pyx_INCREF(((PyObject *)__pyx_kp_u_68));
27777   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_68));
27778   __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_68));
27779   PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
27780   __Pyx_GIVEREF(__pyx_t_2);
27781   __pyx_t_2 = 0;
27782   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27783   __Pyx_GOTREF(__pyx_t_2);
27784   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27785   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
27786   __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_ui_match); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27787   __Pyx_GOTREF(__pyx_t_4);
27788   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27789   __Pyx_GOTREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
27790   __Pyx_DECREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
27791   __Pyx_GIVEREF(__pyx_t_4);
27792   __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = __pyx_t_4;
27793   __pyx_t_4 = 0;
27794
27795   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":89
27796  * 
27797  * cdef object _RELATIVE_PATH_SEGMENT
27798  * _RELATIVE_PATH_SEGMENT = (None, None, 0)             # <<<<<<<<<<<<<<
27799  * 
27800  * cdef _parseObjectPathString(path):
27801  */
27802   __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27803   __Pyx_GOTREF(((PyObject *)__pyx_t_4));
27804   __Pyx_INCREF(Py_None);
27805   PyTuple_SET_ITEM(__pyx_t_4, 0, Py_None);
27806   __Pyx_GIVEREF(Py_None);
27807   __Pyx_INCREF(Py_None);
27808   PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None);
27809   __Pyx_GIVEREF(Py_None);
27810   __Pyx_INCREF(__pyx_int_0);
27811   PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_0);
27812   __Pyx_GIVEREF(__pyx_int_0);
27813   __Pyx_GOTREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
27814   __Pyx_DECREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
27815   __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
27816   __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = ((PyObject *)__pyx_t_4);
27817   __pyx_t_4 = 0;
27818
27819   /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/cstd.pxd":2
27820  * 
27821  * cdef extern from "string.h":             # <<<<<<<<<<<<<<
27822  *     cdef int strlen(char* s) nogil
27823  *     cdef char* strstr(char* haystack, char* needle) nogil
27824  */
27825   goto __pyx_L0;
27826   __pyx_L1_error:;
27827   __Pyx_XDECREF(__pyx_t_1);
27828   __Pyx_XDECREF(__pyx_t_2);
27829   __Pyx_XDECREF(__pyx_t_4);
27830   __Pyx_XDECREF(__pyx_t_5);
27831   if (__pyx_m) {
27832     __Pyx_AddTraceback("init lxml.objectify");
27833     Py_DECREF(__pyx_m); __pyx_m = 0;
27834   } else if (!PyErr_Occurred()) {
27835     PyErr_SetString(PyExc_ImportError, "init lxml.objectify");
27836   }
27837   __pyx_L0:;
27838   __Pyx_FinishRefcountContext();
27839   #if PY_MAJOR_VERSION < 3
27840   return;
27841   #else
27842   return __pyx_m;
27843   #endif
27844 }
27845
27846 static const char *__pyx_filenames[] = {
27847   "lxml.objectify.pyx",
27848   "objectpath.pxi",
27849   "python.pxd",
27850   "etreepublic.pxd",
27851 };
27852
27853 /* Runtime support code */
27854
27855 static void __pyx_init_filenames(void) {
27856   __pyx_f = __pyx_filenames;
27857 }
27858
27859 static void __Pyx_RaiseDoubleKeywordsError(
27860     const char* func_name,
27861     PyObject* kw_name)
27862 {
27863     PyErr_Format(PyExc_TypeError,
27864         #if PY_MAJOR_VERSION >= 3
27865         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
27866         #else
27867         "%s() got multiple values for keyword argument '%s'", func_name,
27868         PyString_AS_STRING(kw_name));
27869         #endif
27870 }
27871
27872 static void __Pyx_RaiseArgtupleInvalid(
27873     const char* func_name,
27874     int exact,
27875     Py_ssize_t num_min,
27876     Py_ssize_t num_max,
27877     Py_ssize_t num_found)
27878 {
27879     Py_ssize_t num_expected;
27880     const char *number, *more_or_less;
27881
27882     if (num_found < num_min) {
27883         num_expected = num_min;
27884         more_or_less = "at least";
27885     } else {
27886         num_expected = num_max;
27887         more_or_less = "at most";
27888     }
27889     if (exact) {
27890         more_or_less = "exactly";
27891     }
27892     number = (num_expected == 1) ? "" : "s";
27893     PyErr_Format(PyExc_TypeError,
27894         #if PY_VERSION_HEX < 0x02050000
27895             "%s() takes %s %d positional argument%s (%d given)",
27896         #else
27897             "%s() takes %s %zd positional argument%s (%zd given)",
27898         #endif
27899         func_name, more_or_less, num_expected, number, num_found);
27900 }
27901
27902 static int __Pyx_ParseOptionalKeywords(
27903     PyObject *kwds,
27904     PyObject **argnames[],
27905     PyObject *kwds2,
27906     PyObject *values[],
27907     Py_ssize_t num_pos_args,
27908     const char* function_name)
27909 {
27910     PyObject *key = 0, *value = 0;
27911     Py_ssize_t pos = 0;
27912     PyObject*** name;
27913     PyObject*** first_kw_arg = argnames + num_pos_args;
27914
27915     while (PyDict_Next(kwds, &pos, &key, &value)) {
27916         name = first_kw_arg;
27917         while (*name && (**name != key)) name++;
27918         if (*name) {
27919             values[name-argnames] = value;
27920         } else {
27921             #if PY_MAJOR_VERSION < 3
27922             if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
27923             #else
27924             if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
27925             #endif
27926                 goto invalid_keyword_type;
27927             } else {
27928                 for (name = first_kw_arg; *name; name++) {
27929                     #if PY_MAJOR_VERSION >= 3
27930                     if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
27931                         PyUnicode_Compare(**name, key) == 0) break;
27932                     #else
27933                     if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
27934                         _PyString_Eq(**name, key)) break;
27935                     #endif
27936                 }
27937                 if (*name) {
27938                     values[name-argnames] = value;
27939                 } else {
27940                     /* unexpected keyword found */
27941                     for (name=argnames; name != first_kw_arg; name++) {
27942                         if (**name == key) goto arg_passed_twice;
27943                         #if PY_MAJOR_VERSION >= 3
27944                         if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
27945                             PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
27946                         #else
27947                         if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
27948                             _PyString_Eq(**name, key)) goto arg_passed_twice;
27949                         #endif
27950                     }
27951                     if (kwds2) {
27952                         if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
27953                     } else {
27954                         goto invalid_keyword;
27955                     }
27956                 }
27957             }
27958         }
27959     }
27960     return 0;
27961 arg_passed_twice:
27962     __Pyx_RaiseDoubleKeywordsError(function_name, **name);
27963     goto bad;
27964 invalid_keyword_type:
27965     PyErr_Format(PyExc_TypeError,
27966         "%s() keywords must be strings", function_name);
27967     goto bad;
27968 invalid_keyword:
27969     PyErr_Format(PyExc_TypeError,
27970     #if PY_MAJOR_VERSION < 3
27971         "%s() got an unexpected keyword argument '%s'",
27972         function_name, PyString_AsString(key));
27973     #else
27974         "%s() got an unexpected keyword argument '%U'",
27975         function_name, key);
27976     #endif
27977 bad:
27978     return -1;
27979 }
27980
27981 static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
27982     PyErr_Format(PyExc_ValueError,
27983         #if PY_VERSION_HEX < 0x02050000
27984                  "need more than %d value%s to unpack", (int)index,
27985         #else
27986                  "need more than %zd value%s to unpack", index,
27987         #endif
27988                  (index == 1) ? "" : "s");
27989 }
27990
27991 static INLINE void __Pyx_RaiseTooManyValuesError(void) {
27992     PyErr_SetString(PyExc_ValueError, "too many values to unpack");
27993 }
27994
27995 static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
27996     PyObject *item;
27997     if (!(item = PyIter_Next(iter))) {
27998         if (!PyErr_Occurred()) {
27999             __Pyx_RaiseNeedMoreValuesError(index);
28000         }
28001     }
28002     return item;
28003 }
28004
28005 static int __Pyx_EndUnpack(PyObject *iter) {
28006     PyObject *item;
28007     if ((item = PyIter_Next(iter))) {
28008         Py_DECREF(item);
28009         __Pyx_RaiseTooManyValuesError();
28010         return -1;
28011     }
28012     else if (!PyErr_Occurred())
28013         return 0;
28014     else
28015         return -1;
28016 }
28017
28018 static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
28019     if (!type) {
28020         PyErr_Format(PyExc_SystemError, "Missing type object");
28021         return 0;
28022     }
28023     if (obj == Py_None || PyObject_TypeCheck(obj, type))
28024         return 1;
28025     PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
28026         Py_TYPE(obj)->tp_name, type->tp_name);
28027     return 0;
28028 }
28029
28030
28031 static INLINE int __Pyx_CheckKeywordStrings(
28032     PyObject *kwdict,
28033     const char* function_name,
28034     int kw_allowed)
28035 {
28036     PyObject* key = 0;
28037     Py_ssize_t pos = 0;
28038     while (PyDict_Next(kwdict, &pos, &key, 0)) {
28039         #if PY_MAJOR_VERSION < 3
28040         if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
28041         #else
28042         if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key)))
28043         #endif
28044             goto invalid_keyword_type;
28045     }
28046     if ((!kw_allowed) && unlikely(key))
28047         goto invalid_keyword;
28048     return 1;
28049 invalid_keyword_type:
28050     PyErr_Format(PyExc_TypeError,
28051         "%s() keywords must be strings", function_name);
28052     return 0;
28053 invalid_keyword:
28054     PyErr_Format(PyExc_TypeError,
28055     #if PY_MAJOR_VERSION < 3
28056         "%s() got an unexpected keyword argument '%s'",
28057         function_name, PyString_AsString(key));
28058     #else
28059         "%s() got an unexpected keyword argument '%U'",
28060         function_name, key);
28061     #endif
28062     return 0;
28063 }
28064
28065 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
28066     PyObject *tmp_type, *tmp_value, *tmp_tb;
28067     PyThreadState *tstate = PyThreadState_GET();
28068     *type = tstate->curexc_type;
28069     *value = tstate->curexc_value;
28070     *tb = tstate->curexc_traceback;
28071     tstate->curexc_type = 0;
28072     tstate->curexc_value = 0;
28073     tstate->curexc_traceback = 0;
28074     PyErr_NormalizeException(type, value, tb);
28075     if (PyErr_Occurred())
28076         goto bad;
28077     Py_INCREF(*type);
28078     Py_INCREF(*value);
28079     Py_INCREF(*tb);
28080     tmp_type = tstate->exc_type;
28081     tmp_value = tstate->exc_value;
28082     tmp_tb = tstate->exc_traceback;
28083     tstate->exc_type = *type;
28084     tstate->exc_value = *value;
28085     tstate->exc_traceback = *tb;
28086     /* Make sure tstate is in a consistent state when we XDECREF
28087     these objects (XDECREF may run arbitrary code). */
28088     Py_XDECREF(tmp_type);
28089     Py_XDECREF(tmp_value);
28090     Py_XDECREF(tmp_tb);
28091     return 0;
28092 bad:
28093     Py_XDECREF(*type);
28094     Py_XDECREF(*value);
28095     Py_XDECREF(*tb);
28096     return -1;
28097 }
28098
28099
28100
28101 static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
28102     const char *name, int exact)
28103 {
28104     if (!type) {
28105         PyErr_Format(PyExc_SystemError, "Missing type object");
28106         return 0;
28107     }
28108     if (none_allowed && obj == Py_None) return 1;
28109     else if (exact) {
28110         if (Py_TYPE(obj) == type) return 1;
28111     }
28112     else {
28113         if (PyObject_TypeCheck(obj, type)) return 1;
28114     }
28115     PyErr_Format(PyExc_TypeError,
28116         "Argument '%s' has incorrect type (expected %s, got %s)",
28117         name, type->tp_name, Py_TYPE(obj)->tp_name);
28118     return 0;
28119 }
28120
28121 static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
28122     PyThreadState *tstate = PyThreadState_GET();
28123     *type = tstate->exc_type;
28124     *value = tstate->exc_value;
28125     *tb = tstate->exc_traceback;
28126     Py_XINCREF(*type);
28127     Py_XINCREF(*value);
28128     Py_XINCREF(*tb);
28129 }
28130
28131 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
28132     PyObject *tmp_type, *tmp_value, *tmp_tb;
28133     PyThreadState *tstate = PyThreadState_GET();
28134     tmp_type = tstate->exc_type;
28135     tmp_value = tstate->exc_value;
28136     tmp_tb = tstate->exc_traceback;
28137     tstate->exc_type = type;
28138     tstate->exc_value = value;
28139     tstate->exc_traceback = tb;
28140     Py_XDECREF(tmp_type);
28141     Py_XDECREF(tmp_value);
28142     Py_XDECREF(tmp_tb);
28143 }
28144
28145 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
28146     PyObject *__import__ = 0;
28147     PyObject *empty_list = 0;
28148     PyObject *module = 0;
28149     PyObject *global_dict = 0;
28150     PyObject *empty_dict = 0;
28151     PyObject *list;
28152     __import__ = __Pyx_GetAttrString(__pyx_b, "__import__");
28153     if (!__import__)
28154         goto bad;
28155     if (from_list)
28156         list = from_list;
28157     else {
28158         empty_list = PyList_New(0);
28159         if (!empty_list)
28160             goto bad;
28161         list = empty_list;
28162     }
28163     global_dict = PyModule_GetDict(__pyx_m);
28164     if (!global_dict)
28165         goto bad;
28166     empty_dict = PyDict_New();
28167     if (!empty_dict)
28168         goto bad;
28169     module = PyObject_CallFunctionObjArgs(__import__,
28170         name, global_dict, empty_dict, list, NULL);
28171 bad:
28172     Py_XDECREF(empty_list);
28173     Py_XDECREF(__import__);
28174     Py_XDECREF(empty_dict);
28175     return module;
28176 }
28177
28178 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
28179     PyObject *result;
28180     result = PyObject_GetAttr(dict, name);
28181     if (!result)
28182         PyErr_SetObject(PyExc_NameError, name);
28183     return result;
28184 }
28185
28186 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
28187     Py_XINCREF(type);
28188     Py_XINCREF(value);
28189     Py_XINCREF(tb);
28190     /* First, check the traceback argument, replacing None with NULL. */
28191     if (tb == Py_None) {
28192         Py_DECREF(tb);
28193         tb = 0;
28194     }
28195     else if (tb != NULL && !PyTraceBack_Check(tb)) {
28196         PyErr_SetString(PyExc_TypeError,
28197             "raise: arg 3 must be a traceback or None");
28198         goto raise_error;
28199     }
28200     /* Next, replace a missing value with None */
28201     if (value == NULL) {
28202         value = Py_None;
28203         Py_INCREF(value);
28204     }
28205     #if PY_VERSION_HEX < 0x02050000
28206     if (!PyClass_Check(type))
28207     #else
28208     if (!PyType_Check(type))
28209     #endif
28210     {
28211         /* Raising an instance.  The value should be a dummy. */
28212         if (value != Py_None) {
28213             PyErr_SetString(PyExc_TypeError,
28214                 "instance exception may not have a separate value");
28215             goto raise_error;
28216         }
28217         /* Normalize to raise <class>, <instance> */
28218         Py_DECREF(value);
28219         value = type;
28220         #if PY_VERSION_HEX < 0x02050000
28221             if (PyInstance_Check(type)) {
28222                 type = (PyObject*) ((PyInstanceObject*)type)->in_class;
28223                 Py_INCREF(type);
28224             }
28225             else {
28226                 type = 0;
28227                 PyErr_SetString(PyExc_TypeError,
28228                     "raise: exception must be an old-style class or instance");
28229                 goto raise_error;
28230             }
28231         #else
28232             type = (PyObject*) Py_TYPE(type);
28233             Py_INCREF(type);
28234             if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
28235                 PyErr_SetString(PyExc_TypeError,
28236                     "raise: exception class must be a subclass of BaseException");
28237                 goto raise_error;
28238             }
28239         #endif
28240     }
28241     __Pyx_ErrRestore(type, value, tb);
28242     return;
28243 raise_error:
28244     Py_XDECREF(value);
28245     Py_XDECREF(type);
28246     Py_XDECREF(tb);
28247     return;
28248 }
28249
28250 static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
28251     PyObject *tmp_type, *tmp_value, *tmp_tb;
28252     PyThreadState *tstate = PyThreadState_GET();
28253
28254 #if PY_MAJOR_VERSION >= 3
28255     /* Note: this is a temporary work-around to prevent crashes in Python 3.0 */
28256     if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) {
28257         tmp_type = tstate->exc_type;
28258         tmp_value = tstate->exc_value;
28259         tmp_tb = tstate->exc_traceback;
28260         PyErr_NormalizeException(&type, &value, &tb);
28261         PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb);
28262         tstate->exc_type = 0;
28263         tstate->exc_value = 0;
28264         tstate->exc_traceback = 0;
28265         PyException_SetContext(value, tmp_value);
28266         Py_DECREF(tmp_type);
28267         Py_XDECREF(tmp_tb);
28268     }
28269 #endif
28270
28271     tmp_type = tstate->curexc_type;
28272     tmp_value = tstate->curexc_value;
28273     tmp_tb = tstate->curexc_traceback;
28274     tstate->curexc_type = type;
28275     tstate->curexc_value = value;
28276     tstate->curexc_traceback = tb;
28277     Py_XDECREF(tmp_type);
28278     Py_XDECREF(tmp_value);
28279     Py_XDECREF(tmp_tb);
28280 }
28281
28282 static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
28283     PyThreadState *tstate = PyThreadState_GET();
28284     *type = tstate->curexc_type;
28285     *value = tstate->curexc_value;
28286     *tb = tstate->curexc_traceback;
28287
28288     tstate->curexc_type = 0;
28289     tstate->curexc_value = 0;
28290     tstate->curexc_traceback = 0;
28291 }
28292
28293
28294 static PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
28295     PyObject *r = PyObject_GetAttr(o, n);
28296     if (!r) {
28297         if (!PyErr_ExceptionMatches(PyExc_AttributeError))
28298             goto bad;
28299         PyErr_Clear();
28300         r = d;
28301         Py_INCREF(d);
28302     }
28303     return r;
28304 bad:
28305     return 0;
28306 }
28307
28308 static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
28309     if (sizeof(unsigned char) < sizeof(long)) {
28310         long val = __Pyx_PyInt_AsLong(x);
28311         if (unlikely(val != (long)(unsigned char)val)) {
28312             if (!unlikely(val == -1 && PyErr_Occurred())) {
28313                 PyErr_SetString(PyExc_OverflowError,
28314                     (((unsigned char)-1) > ((unsigned char)0) && unlikely(val < 0)) ?
28315                     "can't convert negative value to unsigned char" :
28316                     "value too large to convert to unsigned char");
28317             }
28318             return (unsigned char)-1;
28319         }
28320         return (unsigned char)val;
28321     }
28322     return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
28323 }
28324
28325 static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
28326     if (sizeof(unsigned short) < sizeof(long)) {
28327         long val = __Pyx_PyInt_AsLong(x);
28328         if (unlikely(val != (long)(unsigned short)val)) {
28329             if (!unlikely(val == -1 && PyErr_Occurred())) {
28330                 PyErr_SetString(PyExc_OverflowError,
28331                     (((unsigned short)-1) > ((unsigned short)0) && unlikely(val < 0)) ?
28332                     "can't convert negative value to unsigned short" :
28333                     "value too large to convert to unsigned short");
28334             }
28335             return (unsigned short)-1;
28336         }
28337         return (unsigned short)val;
28338     }
28339     return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
28340 }
28341
28342 static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
28343     if (sizeof(unsigned int) < sizeof(long)) {
28344         long val = __Pyx_PyInt_AsLong(x);
28345         if (unlikely(val != (long)(unsigned int)val)) {
28346             if (!unlikely(val == -1 && PyErr_Occurred())) {
28347                 PyErr_SetString(PyExc_OverflowError,
28348                     (((unsigned int)-1) > ((unsigned int)0) && unlikely(val < 0)) ?
28349                     "can't convert negative value to unsigned int" :
28350                     "value too large to convert to unsigned int");
28351             }
28352             return (unsigned int)-1;
28353         }
28354         return (unsigned int)val;
28355     }
28356     return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
28357 }
28358
28359 static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
28360     if (sizeof(char) < sizeof(long)) {
28361         long val = __Pyx_PyInt_AsLong(x);
28362         if (unlikely(val != (long)(char)val)) {
28363             if (!unlikely(val == -1 && PyErr_Occurred())) {
28364                 PyErr_SetString(PyExc_OverflowError,
28365                     (((char)-1) > ((char)0) && unlikely(val < 0)) ?
28366                     "can't convert negative value to char" :
28367                     "value too large to convert to char");
28368             }
28369             return (char)-1;
28370         }
28371         return (char)val;
28372     }
28373     return (char)__Pyx_PyInt_AsLong(x);
28374 }
28375
28376 static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
28377     if (sizeof(short) < sizeof(long)) {
28378         long val = __Pyx_PyInt_AsLong(x);
28379         if (unlikely(val != (long)(short)val)) {
28380             if (!unlikely(val == -1 && PyErr_Occurred())) {
28381                 PyErr_SetString(PyExc_OverflowError,
28382                     (((short)-1) > ((short)0) && unlikely(val < 0)) ?
28383                     "can't convert negative value to short" :
28384                     "value too large to convert to short");
28385             }
28386             return (short)-1;
28387         }
28388         return (short)val;
28389     }
28390     return (short)__Pyx_PyInt_AsLong(x);
28391 }
28392
28393 static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
28394     if (sizeof(int) < sizeof(long)) {
28395         long val = __Pyx_PyInt_AsLong(x);
28396         if (unlikely(val != (long)(int)val)) {
28397             if (!unlikely(val == -1 && PyErr_Occurred())) {
28398                 PyErr_SetString(PyExc_OverflowError,
28399                     (((int)-1) > ((int)0) && unlikely(val < 0)) ?
28400                     "can't convert negative value to int" :
28401                     "value too large to convert to int");
28402             }
28403             return (int)-1;
28404         }
28405         return (int)val;
28406     }
28407     return (int)__Pyx_PyInt_AsLong(x);
28408 }
28409
28410 static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
28411     if (sizeof(signed char) < sizeof(long)) {
28412         long val = __Pyx_PyInt_AsLong(x);
28413         if (unlikely(val != (long)(signed char)val)) {
28414             if (!unlikely(val == -1 && PyErr_Occurred())) {
28415                 PyErr_SetString(PyExc_OverflowError,
28416                     (((signed char)-1) > ((signed char)0) && unlikely(val < 0)) ?
28417                     "can't convert negative value to signed char" :
28418                     "value too large to convert to signed char");
28419             }
28420             return (signed char)-1;
28421         }
28422         return (signed char)val;
28423     }
28424     return (signed char)__Pyx_PyInt_AsSignedLong(x);
28425 }
28426
28427 static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
28428     if (sizeof(signed short) < sizeof(long)) {
28429         long val = __Pyx_PyInt_AsLong(x);
28430         if (unlikely(val != (long)(signed short)val)) {
28431             if (!unlikely(val == -1 && PyErr_Occurred())) {
28432                 PyErr_SetString(PyExc_OverflowError,
28433                     (((signed short)-1) > ((signed short)0) && unlikely(val < 0)) ?
28434                     "can't convert negative value to signed short" :
28435                     "value too large to convert to signed short");
28436             }
28437             return (signed short)-1;
28438         }
28439         return (signed short)val;
28440     }
28441     return (signed short)__Pyx_PyInt_AsSignedLong(x);
28442 }
28443
28444 static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
28445     if (sizeof(signed int) < sizeof(long)) {
28446         long val = __Pyx_PyInt_AsLong(x);
28447         if (unlikely(val != (long)(signed int)val)) {
28448             if (!unlikely(val == -1 && PyErr_Occurred())) {
28449                 PyErr_SetString(PyExc_OverflowError,
28450                     (((signed int)-1) > ((signed int)0) && unlikely(val < 0)) ?
28451                     "can't convert negative value to signed int" :
28452                     "value too large to convert to signed int");
28453             }
28454             return (signed int)-1;
28455         }
28456         return (signed int)val;
28457     }
28458     return (signed int)__Pyx_PyInt_AsSignedLong(x);
28459 }
28460
28461 static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
28462 #if PY_VERSION_HEX < 0x03000000
28463     if (likely(PyInt_Check(x))) {
28464         long val = PyInt_AS_LONG(x);
28465         if (((unsigned long)-1) > ((unsigned long)0) && unlikely(val < 0)) {
28466             PyErr_SetString(PyExc_OverflowError,
28467                             "can't convert negative value to unsigned long");
28468             return (unsigned long)-1;
28469         }
28470         return (unsigned long)val;
28471     } else
28472 #endif
28473     if (likely(PyLong_Check(x))) {
28474         if (((unsigned long)-1) > ((unsigned long)0) && unlikely(Py_SIZE(x) < 0)) {
28475             PyErr_SetString(PyExc_OverflowError,
28476                             "can't convert negative value to unsigned long");
28477             return (unsigned long)-1;
28478         }
28479         return (((unsigned long)-1) < ((unsigned long)0)) ?
28480                PyLong_AsLong(x) :
28481                PyLong_AsUnsignedLong(x);
28482     } else {
28483         unsigned long val;
28484         PyObject *tmp = __Pyx_PyNumber_Int(x);
28485         if (!tmp) return (unsigned long)-1;
28486         val = __Pyx_PyInt_AsUnsignedLong(tmp);
28487         Py_DECREF(tmp);
28488         return val;
28489     }
28490 }
28491
28492 static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
28493 #if PY_VERSION_HEX < 0x03000000
28494     if (likely(PyInt_Check(x))) {
28495         long val = PyInt_AS_LONG(x);
28496         if (((unsigned PY_LONG_LONG)-1) > ((unsigned PY_LONG_LONG)0) && unlikely(val < 0)) {
28497             PyErr_SetString(PyExc_OverflowError,
28498                             "can't convert negative value to unsigned PY_LONG_LONG");
28499             return (unsigned PY_LONG_LONG)-1;
28500         }
28501         return (unsigned PY_LONG_LONG)val;
28502     } else
28503 #endif
28504     if (likely(PyLong_Check(x))) {
28505         if (((unsigned PY_LONG_LONG)-1) > ((unsigned PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
28506             PyErr_SetString(PyExc_OverflowError,
28507                             "can't convert negative value to unsigned PY_LONG_LONG");
28508             return (unsigned PY_LONG_LONG)-1;
28509         }
28510         return (((unsigned PY_LONG_LONG)-1) < ((unsigned PY_LONG_LONG)0)) ?
28511                PyLong_AsLongLong(x) :
28512                PyLong_AsUnsignedLongLong(x);
28513     } else {
28514         unsigned PY_LONG_LONG val;
28515         PyObject *tmp = __Pyx_PyNumber_Int(x);
28516         if (!tmp) return (unsigned PY_LONG_LONG)-1;
28517         val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
28518         Py_DECREF(tmp);
28519         return val;
28520     }
28521 }
28522
28523 static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
28524 #if PY_VERSION_HEX < 0x03000000
28525     if (likely(PyInt_Check(x))) {
28526         long val = PyInt_AS_LONG(x);
28527         if (((long)-1) > ((long)0) && unlikely(val < 0)) {
28528             PyErr_SetString(PyExc_OverflowError,
28529                             "can't convert negative value to long");
28530             return (long)-1;
28531         }
28532         return (long)val;
28533     } else
28534 #endif
28535     if (likely(PyLong_Check(x))) {
28536         if (((long)-1) > ((long)0) && unlikely(Py_SIZE(x) < 0)) {
28537             PyErr_SetString(PyExc_OverflowError,
28538                             "can't convert negative value to long");
28539             return (long)-1;
28540         }
28541         return (((long)-1) < ((long)0)) ?
28542                PyLong_AsLong(x) :
28543                PyLong_AsUnsignedLong(x);
28544     } else {
28545         long val;
28546         PyObject *tmp = __Pyx_PyNumber_Int(x);
28547         if (!tmp) return (long)-1;
28548         val = __Pyx_PyInt_AsLong(tmp);
28549         Py_DECREF(tmp);
28550         return val;
28551     }
28552 }
28553
28554 static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
28555 #if PY_VERSION_HEX < 0x03000000
28556     if (likely(PyInt_Check(x))) {
28557         long val = PyInt_AS_LONG(x);
28558         if (((PY_LONG_LONG)-1) > ((PY_LONG_LONG)0) && unlikely(val < 0)) {
28559             PyErr_SetString(PyExc_OverflowError,
28560                             "can't convert negative value to PY_LONG_LONG");
28561             return (PY_LONG_LONG)-1;
28562         }
28563         return (PY_LONG_LONG)val;
28564     } else
28565 #endif
28566     if (likely(PyLong_Check(x))) {
28567         if (((PY_LONG_LONG)-1) > ((PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
28568             PyErr_SetString(PyExc_OverflowError,
28569                             "can't convert negative value to PY_LONG_LONG");
28570             return (PY_LONG_LONG)-1;
28571         }
28572         return (((PY_LONG_LONG)-1) < ((PY_LONG_LONG)0)) ?
28573                PyLong_AsLongLong(x) :
28574                PyLong_AsUnsignedLongLong(x);
28575     } else {
28576         PY_LONG_LONG val;
28577         PyObject *tmp = __Pyx_PyNumber_Int(x);
28578         if (!tmp) return (PY_LONG_LONG)-1;
28579         val = __Pyx_PyInt_AsLongLong(tmp);
28580         Py_DECREF(tmp);
28581         return val;
28582     }
28583 }
28584
28585 static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
28586 #if PY_VERSION_HEX < 0x03000000
28587     if (likely(PyInt_Check(x))) {
28588         long val = PyInt_AS_LONG(x);
28589         if (((signed long)-1) > ((signed long)0) && unlikely(val < 0)) {
28590             PyErr_SetString(PyExc_OverflowError,
28591                             "can't convert negative value to signed long");
28592             return (signed long)-1;
28593         }
28594         return (signed long)val;
28595     } else
28596 #endif
28597     if (likely(PyLong_Check(x))) {
28598         if (((signed long)-1) > ((signed long)0) && unlikely(Py_SIZE(x) < 0)) {
28599             PyErr_SetString(PyExc_OverflowError,
28600                             "can't convert negative value to signed long");
28601             return (signed long)-1;
28602         }
28603         return (((signed long)-1) < ((signed long)0)) ?
28604                PyLong_AsLong(x) :
28605                PyLong_AsUnsignedLong(x);
28606     } else {
28607         signed long val;
28608         PyObject *tmp = __Pyx_PyNumber_Int(x);
28609         if (!tmp) return (signed long)-1;
28610         val = __Pyx_PyInt_AsSignedLong(tmp);
28611         Py_DECREF(tmp);
28612         return val;
28613     }
28614 }
28615
28616 static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
28617 #if PY_VERSION_HEX < 0x03000000
28618     if (likely(PyInt_Check(x))) {
28619         long val = PyInt_AS_LONG(x);
28620         if (((signed PY_LONG_LONG)-1) > ((signed PY_LONG_LONG)0) && unlikely(val < 0)) {
28621             PyErr_SetString(PyExc_OverflowError,
28622                             "can't convert negative value to signed PY_LONG_LONG");
28623             return (signed PY_LONG_LONG)-1;
28624         }
28625         return (signed PY_LONG_LONG)val;
28626     } else
28627 #endif
28628     if (likely(PyLong_Check(x))) {
28629         if (((signed PY_LONG_LONG)-1) > ((signed PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
28630             PyErr_SetString(PyExc_OverflowError,
28631                             "can't convert negative value to signed PY_LONG_LONG");
28632             return (signed PY_LONG_LONG)-1;
28633         }
28634         return (((signed PY_LONG_LONG)-1) < ((signed PY_LONG_LONG)0)) ?
28635                PyLong_AsLongLong(x) :
28636                PyLong_AsUnsignedLongLong(x);
28637     } else {
28638         signed PY_LONG_LONG val;
28639         PyObject *tmp = __Pyx_PyNumber_Int(x);
28640         if (!tmp) return (signed PY_LONG_LONG)-1;
28641         val = __Pyx_PyInt_AsSignedLongLong(tmp);
28642         Py_DECREF(tmp);
28643         return val;
28644     }
28645 }
28646
28647 static void __Pyx_WriteUnraisable(const char *name) {
28648     PyObject *old_exc, *old_val, *old_tb;
28649     PyObject *ctx;
28650     __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
28651     #if PY_MAJOR_VERSION < 3
28652     ctx = PyString_FromString(name);
28653     #else
28654     ctx = PyUnicode_FromString(name);
28655     #endif
28656     __Pyx_ErrRestore(old_exc, old_val, old_tb);
28657     if (!ctx) {
28658         PyErr_WriteUnraisable(Py_None);
28659     } else {
28660         PyErr_WriteUnraisable(ctx);
28661         Py_DECREF(ctx);
28662     }
28663 }
28664
28665 #ifndef __PYX_HAVE_RT_ImportType
28666 #define __PYX_HAVE_RT_ImportType
28667 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
28668     long size)
28669 {
28670     PyObject *py_module = 0;
28671     PyObject *result = 0;
28672     PyObject *py_name = 0;
28673
28674     py_module = __Pyx_ImportModule(module_name);
28675     if (!py_module)
28676         goto bad;
28677     #if PY_MAJOR_VERSION < 3
28678     py_name = PyString_FromString(class_name);
28679     #else
28680     py_name = PyUnicode_FromString(class_name);
28681     #endif
28682     if (!py_name)
28683         goto bad;
28684     result = PyObject_GetAttr(py_module, py_name);
28685     Py_DECREF(py_name);
28686     py_name = 0;
28687     Py_DECREF(py_module);
28688     py_module = 0;
28689     if (!result)
28690         goto bad;
28691     if (!PyType_Check(result)) {
28692         PyErr_Format(PyExc_TypeError, 
28693             "%s.%s is not a type object",
28694             module_name, class_name);
28695         goto bad;
28696     }
28697     if (((PyTypeObject *)result)->tp_basicsize != size) {
28698         PyErr_Format(PyExc_ValueError, 
28699             "%s.%s does not appear to be the correct type object",
28700             module_name, class_name);
28701         goto bad;
28702     }
28703     return (PyTypeObject *)result;
28704 bad:
28705     Py_XDECREF(py_module);
28706     Py_XDECREF(result);
28707     return 0;
28708 }
28709 #endif
28710
28711 #ifndef __PYX_HAVE_RT_ImportModule
28712 #define __PYX_HAVE_RT_ImportModule
28713 static PyObject *__Pyx_ImportModule(const char *name) {
28714     PyObject *py_name = 0;
28715     PyObject *py_module = 0;
28716
28717     #if PY_MAJOR_VERSION < 3
28718     py_name = PyString_FromString(name);
28719     #else
28720     py_name = PyUnicode_FromString(name);
28721     #endif
28722     if (!py_name)
28723         goto bad;
28724     py_module = PyImport_Import(py_name);
28725     Py_DECREF(py_name);
28726     return py_module;
28727 bad:
28728     Py_XDECREF(py_name);
28729     return 0;
28730 }
28731 #endif
28732
28733 #include "compile.h"
28734 #include "frameobject.h"
28735 #include "traceback.h"
28736
28737 static void __Pyx_AddTraceback(const char *funcname) {
28738     PyObject *py_srcfile = 0;
28739     PyObject *py_funcname = 0;
28740     PyObject *py_globals = 0;
28741     PyCodeObject *py_code = 0;
28742     PyFrameObject *py_frame = 0;
28743
28744     #if PY_MAJOR_VERSION < 3
28745     py_srcfile = PyString_FromString(__pyx_filename);
28746     #else
28747     py_srcfile = PyUnicode_FromString(__pyx_filename);
28748     #endif
28749     if (!py_srcfile) goto bad;
28750     if (__pyx_clineno) {
28751         #if PY_MAJOR_VERSION < 3
28752         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
28753         #else
28754         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
28755         #endif
28756     }
28757     else {
28758         #if PY_MAJOR_VERSION < 3
28759         py_funcname = PyString_FromString(funcname);
28760         #else
28761         py_funcname = PyUnicode_FromString(funcname);
28762         #endif
28763     }
28764     if (!py_funcname) goto bad;
28765     py_globals = PyModule_GetDict(__pyx_m);
28766     if (!py_globals) goto bad;
28767     py_code = PyCode_New(
28768         0,            /*int argcount,*/
28769         #if PY_MAJOR_VERSION >= 3
28770         0,            /*int kwonlyargcount,*/
28771         #endif
28772         0,            /*int nlocals,*/
28773         0,            /*int stacksize,*/
28774         0,            /*int flags,*/
28775         __pyx_empty_bytes, /*PyObject *code,*/
28776         __pyx_empty_tuple,  /*PyObject *consts,*/
28777         __pyx_empty_tuple,  /*PyObject *names,*/
28778         __pyx_empty_tuple,  /*PyObject *varnames,*/
28779         __pyx_empty_tuple,  /*PyObject *freevars,*/
28780         __pyx_empty_tuple,  /*PyObject *cellvars,*/
28781         py_srcfile,   /*PyObject *filename,*/
28782         py_funcname,  /*PyObject *name,*/
28783         __pyx_lineno,   /*int firstlineno,*/
28784         __pyx_empty_bytes  /*PyObject *lnotab*/
28785     );
28786     if (!py_code) goto bad;
28787     py_frame = PyFrame_New(
28788         PyThreadState_GET(), /*PyThreadState *tstate,*/
28789         py_code,             /*PyCodeObject *code,*/
28790         py_globals,          /*PyObject *globals,*/
28791         0                    /*PyObject *locals*/
28792     );
28793     if (!py_frame) goto bad;
28794     py_frame->f_lineno = __pyx_lineno;
28795     PyTraceBack_Here(py_frame);
28796 bad:
28797     Py_XDECREF(py_srcfile);
28798     Py_XDECREF(py_funcname);
28799     Py_XDECREF(py_code);
28800     Py_XDECREF(py_frame);
28801 }
28802
28803 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
28804     while (t->p) {
28805         #if PY_MAJOR_VERSION < 3
28806         if (t->is_unicode && (!t->is_identifier)) {
28807             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
28808         } else if (t->intern) {
28809             *t->p = PyString_InternFromString(t->s);
28810         } else {
28811             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
28812         }
28813         #else  /* Python 3+ has unicode identifiers */
28814         if (t->is_identifier || (t->is_unicode && t->intern)) {
28815             *t->p = PyUnicode_InternFromString(t->s);
28816         } else if (t->is_unicode) {
28817             *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
28818         } else {
28819             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
28820         }
28821         #endif
28822         if (!*t->p)
28823             return -1;
28824         ++t;
28825     }
28826     return 0;
28827 }
28828
28829 /* Type Conversion Functions */
28830
28831 static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
28832    if (x == Py_True) return 1;
28833    else if ((x == Py_False) | (x == Py_None)) return 0;
28834    else return PyObject_IsTrue(x);
28835 }
28836
28837 static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
28838   PyNumberMethods *m;
28839   const char *name = NULL;
28840   PyObject *res = NULL;
28841 #if PY_VERSION_HEX < 0x03000000
28842   if (PyInt_Check(x) || PyLong_Check(x))
28843 #else
28844   if (PyLong_Check(x))
28845 #endif
28846     return Py_INCREF(x), x;
28847   m = Py_TYPE(x)->tp_as_number;
28848 #if PY_VERSION_HEX < 0x03000000
28849   if (m && m->nb_int) {
28850     name = "int";
28851     res = PyNumber_Int(x);
28852   }
28853   else if (m && m->nb_long) {
28854     name = "long";
28855     res = PyNumber_Long(x);
28856   }
28857 #else
28858   if (m && m->nb_int) {
28859     name = "int";
28860     res = PyNumber_Long(x);
28861   }
28862 #endif
28863   if (res) {
28864 #if PY_VERSION_HEX < 0x03000000
28865     if (!PyInt_Check(res) && !PyLong_Check(res)) {
28866 #else
28867     if (!PyLong_Check(res)) {
28868 #endif
28869       PyErr_Format(PyExc_TypeError,
28870                    "__%s__ returned non-%s (type %.200s)",
28871                    name, name, Py_TYPE(res)->tp_name);
28872       Py_DECREF(res);
28873       return NULL;
28874     }
28875   }
28876   else if (!PyErr_Occurred()) {
28877     PyErr_SetString(PyExc_TypeError,
28878                     "an integer is required");
28879   }
28880   return res;
28881 }
28882
28883 static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
28884   Py_ssize_t ival;
28885   PyObject* x = PyNumber_Index(b);
28886   if (!x) return -1;
28887   ival = PyInt_AsSsize_t(x);
28888   Py_DECREF(x);
28889   return ival;
28890 }
28891
28892 static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
28893 #if PY_VERSION_HEX < 0x02050000
28894    if (ival <= LONG_MAX)
28895        return PyInt_FromLong((long)ival);
28896    else {
28897        unsigned char *bytes = (unsigned char *) &ival;
28898        int one = 1; int little = (int)*(unsigned char*)&one;
28899        return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
28900    }
28901 #else
28902    return PyInt_FromSize_t(ival);
28903 #endif
28904 }
28905
28906 static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
28907    unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
28908    if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
28909        return (size_t)-1;
28910    } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
28911        PyErr_SetString(PyExc_OverflowError,
28912                        "value too large to convert to size_t");
28913        return (size_t)-1;
28914    }
28915    return (size_t)val;
28916 }
28917
28918
28919 #endif /* Py_PYTHON_H */