From tmaniaci at tracs5.com Fri Jan 2 00:20:10 2004 From: tmaniaci at tracs5.com (Tony Maniaci) Date: Thu Jan 1 23:45:50 2004 Subject: [XML-SIG] PyXML-0.8.3 build Message-ID: <562EA324-3CE3-11D8-9556-0030654DB202@tracs5.com> I ran the build and received the following error with OSX10.3. What am I missing? renata:~/DEsktop/PyXML-0.8.3] tonym% python setup.py build running build running build_py running build_ext building '_xmlplus.parsers.pyexpat' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DXML_NS=1 -DXML_DTD=1 -DBYTEORDER=4321 -DXML_CONTEXT_BYTES=1024 -Iextensions/expat/lib -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c extensions/pyexpat.c -o build/temp.darwin-7.2.0-Power_Macintosh-2.3/extensions/pyexpat.o extensions/pyexpat.c:5:20: Python.h: No such file or directory extensions/pyexpat.c:6:19: ctype.h: No such file or directory extensions/pyexpat.c:8:21: compile.h: No such file or directory extensions/pyexpat.c:9:25: frameobject.h: No such file or directory In file included from extensions/pyexpat.c:10: extensions/expat/lib/expat.h:17:20: stdlib.h: No such file or directory In file included from extensions/pyexpat.c:10: extensions/expat/lib/expat.h:185: parse error before "size" extensions/expat/lib/expat.h:185: warning: function declaration isn't a prototype extensions/expat/lib/expat.h:186: parse error before "size_t" extensions/expat/lib/expat.h:186: warning: function declaration isn't a prototype extensions/expat/lib/expat.h:858: parse error before "size_t" extensions/expat/lib/expat.h:858: warning: function declaration isn't a prototype extensions/expat/lib/expat.h:861: parse error before "size_t" extensions/expat/lib/expat.h:861: warning: function declaration isn't a prototype extensions/pyexpat.c:63: parse error before '*' token extensions/pyexpat.c:63: warning: type defaults to `int' in declaration of `ErrorObject' extensions/pyexpat.c:63: warning: data definition has no type or storage class extensions/pyexpat.c:70: parse error before "PyObject_HEAD" extensions/pyexpat.c:70: warning: no semicolon at end of struct or union extensions/pyexpat.c:83: parse error before '*' token extensions/pyexpat.c:83: warning: type defaults to `int' in declaration of `intern' extensions/pyexpat.c:83: warning: data definition has no type or storage class extensions/pyexpat.c:84: parse error before '*' token extensions/pyexpat.c:84: warning: type defaults to `int' in declaration of `handlers' extensions/pyexpat.c:84: warning: data definition has no type or storage class extensions/pyexpat.c:85: parse error before '}' token extensions/pyexpat.c:85: warning: type defaults to `int' in declaration of `xmlparseobject' extensions/pyexpat.c:85: warning: data definition has no type or storage class extensions/pyexpat.c:89: parse error before "Xmlparsetype" extensions/pyexpat.c:89: warning: type defaults to `int' in declaration of `Xmlparsetype' extensions/pyexpat.c:89: warning: data definition has no type or storage class extensions/pyexpat.c:98: parse error before "PyCodeObject" extensions/pyexpat.c:98: warning: no semicolon at end of struct or union extensions/pyexpat.c:99: warning: type defaults to `int' in declaration of `nameobj' extensions/pyexpat.c:99: warning: data definition has no type or storage class extensions/pyexpat.c:100: parse error before '}' token extensions/pyexpat.c:108: parse error before '*' token extensions/pyexpat.c:109: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `set_error_attr': extensions/pyexpat.c:110: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:110: (Each undeclared identifier is reported only once extensions/pyexpat.c:110: for each function it appears in.) extensions/pyexpat.c:110: `v' undeclared (first use in this function) extensions/pyexpat.c:110: warning: implicit declaration of function `PyInt_FromLong' extensions/pyexpat.c:110: `value' undeclared (first use in this function) extensions/pyexpat.c:112: `NULL' undeclared (first use in this function) extensions/pyexpat.c:112: warning: implicit declaration of function `PyObject_SetAttrString' extensions/pyexpat.c:112: `err' undeclared (first use in this function) extensions/pyexpat.c:112: `name' undeclared (first use in this function) extensions/pyexpat.c:113: warning: implicit declaration of function `Py_DECREF' extensions/pyexpat.c: At top level: extensions/pyexpat.c:122: parse error before '*' token extensions/pyexpat.c:123: parse error before '*' token extensions/pyexpat.c:124: warning: return type defaults to `int' extensions/pyexpat.c:124: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `set_error': extensions/pyexpat.c:125: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:125: `err' undeclared (first use in this function) extensions/pyexpat.c:127: `self' undeclared (first use in this function) extensions/pyexpat.c:133: warning: implicit declaration of function `sprintf' extensions/pyexpat.c:134: `code' undeclared (first use in this function) extensions/pyexpat.c:135: warning: implicit declaration of function `PyObject_CallFunction' extensions/pyexpat.c:137: `NULL' undeclared (first use in this function) extensions/pyexpat.c:140: warning: implicit declaration of function `PyErr_SetObject' extensions/pyexpat.c: At top level: extensions/pyexpat.c:146: parse error before '*' token extensions/pyexpat.c:147: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `have_handler': extensions/pyexpat.c:148: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:148: `handler' undeclared (first use in this function) extensions/pyexpat.c:148: `self' undeclared (first use in this function) extensions/pyexpat.c:148: `type' undeclared (first use in this function) extensions/pyexpat.c:149: `NULL' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:152: parse error before '*' token extensions/pyexpat.c:154: warning: return type defaults to `int' extensions/pyexpat.c: In function `get_handler_name': extensions/pyexpat.c:155: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:155: `name' undeclared (first use in this function) extensions/pyexpat.c:155: dereferencing pointer to incomplete type extensions/pyexpat.c:156: `NULL' undeclared (first use in this function) extensions/pyexpat.c:157: warning: implicit declaration of function `PyString_FromString' extensions/pyexpat.c:157: dereferencing pointer to incomplete type extensions/pyexpat.c:158: dereferencing pointer to incomplete type extensions/pyexpat.c:160: warning: implicit declaration of function `Py_XINCREF' extensions/pyexpat.c: At top level: extensions/pyexpat.c:199: parse error before '*' token extensions/pyexpat.c:201: warning: return type defaults to `int' extensions/pyexpat.c: In function `conv_string_to_utf8': extensions/pyexpat.c:205: `NULL' undeclared (first use in this function) extensions/pyexpat.c:206: warning: implicit declaration of function `Py_INCREF' extensions/pyexpat.c:206: `Py_None' undeclared (first use in this function) extensions/pyexpat.c:209: warning: return makes pointer from integer without a cast extensions/pyexpat.c: At top level: extensions/pyexpat.c:212: parse error before '*' token extensions/pyexpat.c:214: warning: return type defaults to `int' extensions/pyexpat.c: In function `conv_string_len_to_utf8': extensions/pyexpat.c:218: `NULL' undeclared (first use in this function) extensions/pyexpat.c:219: `Py_None' undeclared (first use in this function) extensions/pyexpat.c:222: warning: implicit declaration of function `PyString_FromStringAndSize' extensions/pyexpat.c:222: warning: return makes pointer from integer without a cast extensions/pyexpat.c: At top level: extensions/pyexpat.c:227: parse error before '*' token extensions/pyexpat.c:227: warning: function declaration isn't a prototype extensions/pyexpat.c:243: parse error before '*' token extensions/pyexpat.c:244: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `flag_error': extensions/pyexpat.c:245: `self' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:250: parse error before '*' token extensions/pyexpat.c:252: warning: return type defaults to `int' extensions/pyexpat.c: In function `getcode': extensions/pyexpat.c:253: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:253: `code' undeclared (first use in this function) extensions/pyexpat.c:253: `NULL' undeclared (first use in this function) extensions/pyexpat.c:254: `name' undeclared (first use in this function) extensions/pyexpat.c:255: `nulltuple' undeclared (first use in this function) extensions/pyexpat.c:256: `filename' undeclared (first use in this function) extensions/pyexpat.c:258: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:265: warning: implicit declaration of function `PyTuple_New' extensions/pyexpat.c:269: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:270: warning: implicit declaration of function `PyCode_New' extensions/pyexpat.c:287: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:294: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:296: warning: implicit declaration of function `Py_XDECREF' extensions/pyexpat.c: At top level: extensions/pyexpat.c:303: parse error before '*' token extensions/pyexpat.c:304: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `trace_frame': extensions/pyexpat.c:306: `tstate' undeclared (first use in this function) extensions/pyexpat.c:308: `NULL' undeclared (first use in this function) extensions/pyexpat.c:311: `f' undeclared (first use in this function) extensions/pyexpat.c:311: `code' undeclared (first use in this function) extensions/pyexpat.c:311: `val' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:330: parse error before '*' token extensions/pyexpat.c:331: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `trace_frame_exc': extensions/pyexpat.c:332: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:332: `type' undeclared (first use in this function) extensions/pyexpat.c:332: `value' undeclared (first use in this function) extensions/pyexpat.c:332: `traceback' undeclared (first use in this function) extensions/pyexpat.c:332: `arg' undeclared (first use in this function) extensions/pyexpat.c:332: warning: left-hand operand of comma expression has no effect extensions/pyexpat.c:332: warning: left-hand operand of comma expression has no effect extensions/pyexpat.c:332: warning: left-hand operand of comma expression has no effect extensions/pyexpat.c:335: `tstate' undeclared (first use in this function) extensions/pyexpat.c:335: `NULL' undeclared (first use in this function) extensions/pyexpat.c:338: warning: implicit declaration of function `PyErr_Fetch' extensions/pyexpat.c:340: `Py_None' undeclared (first use in this function) extensions/pyexpat.c:343: warning: implicit declaration of function `Py_BuildValue' extensions/pyexpat.c:345: warning: implicit declaration of function `PyErr_Restore' extensions/pyexpat.c:348: `f' undeclared (first use in this function) extensions/pyexpat.c:348: `PyTrace_EXCEPTION' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:361: parse error before '*' token extensions/pyexpat.c:362: parse error before '*' token extensions/pyexpat.c:363: warning: return type defaults to `int' extensions/pyexpat.c:363: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `call_with_frame': extensions/pyexpat.c:364: `PyThreadState' undeclared (first use in this function) extensions/pyexpat.c:364: `tstate' undeclared (first use in this function) extensions/pyexpat.c:364: warning: implicit declaration of function `PyThreadState_GET' extensions/pyexpat.c:365: `PyFrameObject' undeclared (first use in this function) extensions/pyexpat.c:365: `f' undeclared (first use in this function) extensions/pyexpat.c:366: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:366: `res' undeclared (first use in this function) extensions/pyexpat.c:368: `c' undeclared (first use in this function) extensions/pyexpat.c:368: `NULL' undeclared (first use in this function) extensions/pyexpat.c:371: warning: implicit declaration of function `PyFrame_New' extensions/pyexpat.c:371: warning: implicit declaration of function `PyEval_GetGlobals' extensions/pyexpat.c:376: `PyTrace_CALL' undeclared (first use in this function) extensions/pyexpat.c:376: `Py_None' undeclared (first use in this function) extensions/pyexpat.c:380: warning: implicit declaration of function `PyEval_CallObject' extensions/pyexpat.c:380: `func' undeclared (first use in this function) extensions/pyexpat.c:380: `args' undeclared (first use in this function) extensions/pyexpat.c:383: warning: implicit declaration of function `PyTraceBack_Here' extensions/pyexpat.c:390: `PyTrace_RETURN' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:411: parse error before '*' token extensions/pyexpat.c:412: parse error before '*' token extensions/pyexpat.c:413: warning: return type defaults to `int' extensions/pyexpat.c:413: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `string_intern': extensions/pyexpat.c:414: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:414: `result' undeclared (first use in this function) extensions/pyexpat.c:414: `str' undeclared (first use in this function) extensions/pyexpat.c:415: `value' undeclared (first use in this function) extensions/pyexpat.c:416: `self' undeclared (first use in this function) extensions/pyexpat.c:418: warning: implicit declaration of function `PyDict_GetItem' extensions/pyexpat.c:420: warning: implicit declaration of function `PyDict_SetItem' extensions/pyexpat.c:423: `NULL' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:434: parse error before '*' token extensions/pyexpat.c:435: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `call_character_handler': extensions/pyexpat.c:436: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:436: `args' undeclared (first use in this function) extensions/pyexpat.c:437: `temp' undeclared (first use in this function) extensions/pyexpat.c:440: `NULL' undeclared (first use in this function) extensions/pyexpat.c:447: `len' undeclared (first use in this function) extensions/pyexpat.c:451: `self' undeclared (first use in this function) extensions/pyexpat.c:454: warning: implicit declaration of function `PyTuple_SET_ITEM' extensions/pyexpat.c: At top level: extensions/pyexpat.c:471: parse error before '*' token extensions/pyexpat.c:472: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `flush_character_buffer': extensions/pyexpat.c:474: `self' undeclared (first use in this function) extensions/pyexpat.c:474: `NULL' undeclared (first use in this function) extensions/pyexpat.c: In function `my_CharacterDataHandler': extensions/pyexpat.c:484: `self' undeclared (first use in this function) extensions/pyexpat.c:484: parse error before ')' token extensions/pyexpat.c:485: `NULL' undeclared (first use in this function) extensions/pyexpat.c:502: warning: implicit declaration of function `memcpy' extensions/pyexpat.c: In function `my_StartElementHandler': extensions/pyexpat.c:513: `self' undeclared (first use in this function) extensions/pyexpat.c:513: parse error before ')' token extensions/pyexpat.c:516: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:516: `container' undeclared (first use in this function) extensions/pyexpat.c:516: `rv' undeclared (first use in this function) extensions/pyexpat.c:516: `args' undeclared (first use in this function) extensions/pyexpat.c:516: warning: left-hand operand of comma expression has no effect extensions/pyexpat.c:516: warning: left-hand operand of comma expression has no effect extensions/pyexpat.c:529: `NULL' undeclared (first use in this function) extensions/pyexpat.c:534: warning: implicit declaration of function `PyList_New' extensions/pyexpat.c:536: warning: implicit declaration of function `PyDict_New' extensions/pyexpat.c:542: `n' undeclared (first use in this function) extensions/pyexpat.c:543: `v' undeclared (first use in this function) extensions/pyexpat.c:557: warning: implicit declaration of function `PyList_SET_ITEM' extensions/pyexpat.c: In function `my_EndElementHandler': extensions/pyexpat.c:630: `self' undeclared (first use in this function) extensions/pyexpat.c:630: parse error before ')' token extensions/pyexpat.c:630: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:630: `args' undeclared (first use in this function) extensions/pyexpat.c:630: `NULL' undeclared (first use in this function) extensions/pyexpat.c:630: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_ProcessingInstructionHandler': extensions/pyexpat.c:636: `self' undeclared (first use in this function) extensions/pyexpat.c:636: parse error before ')' token extensions/pyexpat.c:636: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:636: `args' undeclared (first use in this function) extensions/pyexpat.c:636: `NULL' undeclared (first use in this function) extensions/pyexpat.c:636: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_UnparsedEntityDeclHandler': extensions/pyexpat.c:648: `self' undeclared (first use in this function) extensions/pyexpat.c:648: parse error before ')' token extensions/pyexpat.c:648: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:648: `args' undeclared (first use in this function) extensions/pyexpat.c:648: `NULL' undeclared (first use in this function) extensions/pyexpat.c:648: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_EntityDeclHandler': extensions/pyexpat.c:666: `self' undeclared (first use in this function) extensions/pyexpat.c:666: parse error before ')' token extensions/pyexpat.c:666: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:666: `args' undeclared (first use in this function) extensions/pyexpat.c:666: `NULL' undeclared (first use in this function) extensions/pyexpat.c:666: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_XmlDeclHandler': extensions/pyexpat.c:695: `self' undeclared (first use in this function) extensions/pyexpat.c:695: parse error before ')' token extensions/pyexpat.c:695: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:695: `args' undeclared (first use in this function) extensions/pyexpat.c:695: `NULL' undeclared (first use in this function) extensions/pyexpat.c:695: `rv' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:697: parse error before '*' token extensions/pyexpat.c:699: parse error before "PyObject" extensions/pyexpat.c:699: parse error before ')' token extensions/pyexpat.c:702: warning: type defaults to `int' in declaration of `children' extensions/pyexpat.c:702: `model' undeclared here (not in a function) extensions/pyexpat.c:702: warning: initialization makes pointer from integer without a cast extensions/pyexpat.c:702: initializer element is not constant extensions/pyexpat.c:702: warning: data definition has no type or storage class extensions/pyexpat.c:705: parse error before "if" extensions/pyexpat.c:714: warning: type defaults to `int' in declaration of `PyTuple_SET_ITEM' extensions/pyexpat.c:714: warning: parameter names (without types) in function declaration extensions/pyexpat.c:714: warning: data definition has no type or storage class extensions/pyexpat.c:715: parse error before '}' token extensions/pyexpat.c:716: warning: type defaults to `int' in declaration of `result' extensions/pyexpat.c:716: `result' used prior to declaration extensions/pyexpat.c:717: `model' undeclared here (not in a function) extensions/pyexpat.c:717: `model' undeclared here (not in a function) extensions/pyexpat.c:718: `conv_string' undeclared here (not in a function) extensions/pyexpat.c:718: `model' undeclared here (not in a function) extensions/pyexpat.c:718: initializer element is not constant extensions/pyexpat.c:718: warning: data definition has no type or storage class extensions/pyexpat.c:719: parse error before '}' token extensions/pyexpat.c: In function `my_ElementDeclHandler': extensions/pyexpat.c:728: `self' undeclared (first use in this function) extensions/pyexpat.c:728: parse error before ')' token extensions/pyexpat.c:729: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:729: `args' undeclared (first use in this function) extensions/pyexpat.c:729: `NULL' undeclared (first use in this function) extensions/pyexpat.c:732: `rv' undeclared (first use in this function) extensions/pyexpat.c:733: `modelobj' undeclared (first use in this function) extensions/pyexpat.c:733: warning: left-hand operand of comma expression has no effect extensions/pyexpat.c:743: warning: implicit declaration of function `conv_content_model' extensions/pyexpat.c:733: warning: statement with no effect extensions/pyexpat.c: In function `my_AttlistDeclHandler': extensions/pyexpat.c:787: `self' undeclared (first use in this function) extensions/pyexpat.c:787: parse error before ')' token extensions/pyexpat.c:787: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:787: `args' undeclared (first use in this function) extensions/pyexpat.c:787: `NULL' undeclared (first use in this function) extensions/pyexpat.c:787: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_SkippedEntityHandler': extensions/pyexpat.c:795: `self' undeclared (first use in this function) extensions/pyexpat.c:795: parse error before ')' token extensions/pyexpat.c:795: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:795: `args' undeclared (first use in this function) extensions/pyexpat.c:795: `NULL' undeclared (first use in this function) extensions/pyexpat.c:795: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_NotationDeclHandler': extensions/pyexpat.c:806: `self' undeclared (first use in this function) extensions/pyexpat.c:806: parse error before ')' token extensions/pyexpat.c:806: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:806: `args' undeclared (first use in this function) extensions/pyexpat.c:806: `NULL' undeclared (first use in this function) extensions/pyexpat.c:806: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_StartNamespaceDeclHandler': extensions/pyexpat.c:813: `self' undeclared (first use in this function) extensions/pyexpat.c:813: parse error before ')' token extensions/pyexpat.c:813: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:813: `args' undeclared (first use in this function) extensions/pyexpat.c:813: `NULL' undeclared (first use in this function) extensions/pyexpat.c:813: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_EndNamespaceDeclHandler': extensions/pyexpat.c:818: `self' undeclared (first use in this function) extensions/pyexpat.c:818: parse error before ')' token extensions/pyexpat.c:818: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:818: `args' undeclared (first use in this function) extensions/pyexpat.c:818: `NULL' undeclared (first use in this function) extensions/pyexpat.c:818: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_CommentHandler': extensions/pyexpat.c:822: `self' undeclared (first use in this function) extensions/pyexpat.c:822: parse error before ')' token extensions/pyexpat.c:822: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:822: `args' undeclared (first use in this function) extensions/pyexpat.c:822: `NULL' undeclared (first use in this function) extensions/pyexpat.c:822: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_StartCdataSectionHandler': extensions/pyexpat.c:826: `self' undeclared (first use in this function) extensions/pyexpat.c:826: parse error before ')' token extensions/pyexpat.c:826: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:826: `args' undeclared (first use in this function) extensions/pyexpat.c:826: `NULL' undeclared (first use in this function) extensions/pyexpat.c:826: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_EndCdataSectionHandler': extensions/pyexpat.c:830: `self' undeclared (first use in this function) extensions/pyexpat.c:830: parse error before ')' token extensions/pyexpat.c:830: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:830: `args' undeclared (first use in this function) extensions/pyexpat.c:830: `NULL' undeclared (first use in this function) extensions/pyexpat.c:830: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_DefaultHandler': extensions/pyexpat.c:835: `self' undeclared (first use in this function) extensions/pyexpat.c:835: parse error before ')' token extensions/pyexpat.c:835: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:835: `args' undeclared (first use in this function) extensions/pyexpat.c:835: `NULL' undeclared (first use in this function) extensions/pyexpat.c:835: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_DefaultHandlerExpandHandler': extensions/pyexpat.c:839: `self' undeclared (first use in this function) extensions/pyexpat.c:839: parse error before ')' token extensions/pyexpat.c:839: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:839: `args' undeclared (first use in this function) extensions/pyexpat.c:839: `NULL' undeclared (first use in this function) extensions/pyexpat.c:839: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_NotStandaloneHandler': extensions/pyexpat.c:856: `self' undeclared (first use in this function) extensions/pyexpat.c:856: parse error before ')' token extensions/pyexpat.c:856: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:856: `args' undeclared (first use in this function) extensions/pyexpat.c:856: `NULL' undeclared (first use in this function) extensions/pyexpat.c:856: `rv' undeclared (first use in this function) extensions/pyexpat.c:856: warning: implicit declaration of function `PyInt_AsLong' extensions/pyexpat.c: In function `my_ExternalEntityRefHandler': extensions/pyexpat.c:869: `self' undeclared (first use in this function) extensions/pyexpat.c:869: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:869: `args' undeclared (first use in this function) extensions/pyexpat.c:869: `NULL' undeclared (first use in this function) extensions/pyexpat.c:869: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_StartDoctypeDeclHandler': extensions/pyexpat.c:879: `self' undeclared (first use in this function) extensions/pyexpat.c:879: parse error before ')' token extensions/pyexpat.c:879: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:879: `args' undeclared (first use in this function) extensions/pyexpat.c:879: `NULL' undeclared (first use in this function) extensions/pyexpat.c:879: `rv' undeclared (first use in this function) extensions/pyexpat.c: In function `my_EndDoctypeDeclHandler': extensions/pyexpat.c:881: `self' undeclared (first use in this function) extensions/pyexpat.c:881: parse error before ')' token extensions/pyexpat.c:881: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:881: `args' undeclared (first use in this function) extensions/pyexpat.c:881: `NULL' undeclared (first use in this function) extensions/pyexpat.c:881: `rv' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:885: parse error before '*' token extensions/pyexpat.c:886: parse error before '*' token extensions/pyexpat.c:887: warning: return type defaults to `int' extensions/pyexpat.c:887: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `get_parse_result': extensions/pyexpat.c:888: warning: implicit declaration of function `PyErr_Occurred' extensions/pyexpat.c:889: `NULL' undeclared (first use in this function) extensions/pyexpat.c:891: `rv' undeclared (first use in this function) extensions/pyexpat.c:892: `self' undeclared (first use in this function) extensions/pyexpat.c:897: warning: return makes pointer from integer without a cast extensions/pyexpat.c: At top level: extensions/pyexpat.c:904: parse error before '*' token extensions/pyexpat.c:905: parse error before '*' token extensions/pyexpat.c:906: warning: return type defaults to `int' extensions/pyexpat.c:906: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `xmlparse_Parse': extensions/pyexpat.c:911: warning: implicit declaration of function `PyArg_ParseTuple' extensions/pyexpat.c:911: `args' undeclared (first use in this function) extensions/pyexpat.c:912: `NULL' undeclared (first use in this function) extensions/pyexpat.c:914: `self' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:922: parse error before "PyObject" extensions/pyexpat.c:923: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `readinst': extensions/pyexpat.c:924: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:924: `arg' undeclared (first use in this function) extensions/pyexpat.c:924: `NULL' undeclared (first use in this function) extensions/pyexpat.c:925: `bytes' undeclared (first use in this function) extensions/pyexpat.c:926: `str' undeclared (first use in this function) extensions/pyexpat.c:929: `buf_size' undeclared (first use in this function) extensions/pyexpat.c:940: warning: implicit declaration of function `PyObject_CallObject' extensions/pyexpat.c:940: `meth' undeclared (first use in this function) extensions/pyexpat.c:948: warning: implicit declaration of function `PyString_Check' extensions/pyexpat.c:949: warning: implicit declaration of function `PyErr_Format' extensions/pyexpat.c:949: `PyExc_TypeError' undeclared (first use in this function) extensions/pyexpat.c:954: warning: implicit declaration of function `PyString_GET_SIZE' extensions/pyexpat.c:956: `PyExc_ValueError' undeclared (first use in this function) extensions/pyexpat.c:962: `buf' undeclared (first use in this function) extensions/pyexpat.c:962: warning: implicit declaration of function `PyString_AsString' extensions/pyexpat.c:962: warning: passing arg 2 of `memcpy' makes pointer from integer without a cast extensions/pyexpat.c: At top level: extensions/pyexpat.c:973: parse error before '*' token extensions/pyexpat.c:974: parse error before '*' token extensions/pyexpat.c:975: warning: return type defaults to `int' extensions/pyexpat.c:975: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `xmlparse_ParseFile': extensions/pyexpat.c:977: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:977: `f' undeclared (first use in this function) extensions/pyexpat.c:978: `FILE' undeclared (first use in this function) extensions/pyexpat.c:978: `fp' undeclared (first use in this function) extensions/pyexpat.c:979: `readmethod' undeclared (first use in this function) extensions/pyexpat.c:979: `NULL' undeclared (first use in this function) extensions/pyexpat.c:981: `args' undeclared (first use in this function) extensions/pyexpat.c:984: warning: implicit declaration of function `PyFile_Check' extensions/pyexpat.c:985: warning: implicit declaration of function `PyFile_AsFile' extensions/pyexpat.c:989: warning: implicit declaration of function `PyObject_GetAttrString' extensions/pyexpat.c:991: warning: implicit declaration of function `PyErr_Clear' extensions/pyexpat.c:992: warning: implicit declaration of function `PyErr_SetString' extensions/pyexpat.c:992: `PyExc_TypeError' undeclared (first use in this function) extensions/pyexpat.c:999: `self' undeclared (first use in this function) extensions/pyexpat.c:1002: warning: implicit declaration of function `PyErr_NoMemory' extensions/pyexpat.c:1002: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1006: warning: implicit declaration of function `fread' extensions/pyexpat.c:1008: warning: implicit declaration of function `PyErr_SetFromErrno' extensions/pyexpat.c:1008: `PyExc_IOError' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:1036: parse error before '*' token extensions/pyexpat.c:1037: parse error before '*' token extensions/pyexpat.c:1038: warning: return type defaults to `int' extensions/pyexpat.c:1038: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `xmlparse_SetBase': extensions/pyexpat.c:1041: `args' undeclared (first use in this function) extensions/pyexpat.c:1042: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1043: `self' undeclared (first use in this function) extensions/pyexpat.c:1044: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1046: `Py_None' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:1054: parse error before '*' token extensions/pyexpat.c:1055: parse error before '*' token extensions/pyexpat.c:1056: warning: return type defaults to `int' extensions/pyexpat.c:1056: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `xmlparse_GetBase': extensions/pyexpat.c:1057: `args' undeclared (first use in this function) extensions/pyexpat.c:1058: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1060: `self' undeclared (first use in this function) extensions/pyexpat.c:1060: warning: return makes pointer from integer without a cast extensions/pyexpat.c: At top level: extensions/pyexpat.c:1069: parse error before '*' token extensions/pyexpat.c:1070: parse error before '*' token extensions/pyexpat.c:1071: warning: return type defaults to `int' extensions/pyexpat.c:1071: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `xmlparse_GetInputContext': extensions/pyexpat.c:1072: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:1072: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1074: `args' undeclared (first use in this function) extensions/pyexpat.c:1075: `self' undeclared (first use in this function) extensions/pyexpat.c:1083: `Py_None' undeclared (first use in this function) extensions/pyexpat.c:1092: warning: return makes pointer from integer without a cast extensions/pyexpat.c: At top level: extensions/pyexpat.c:1100: parse error before '*' token extensions/pyexpat.c:1101: parse error before '*' token extensions/pyexpat.c:1102: warning: return type defaults to `int' extensions/pyexpat.c:1102: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `xmlparse_ExternalEntityParserCreate': extensions/pyexpat.c:1104: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1105: `new_parser' undeclared (first use in this function) extensions/pyexpat.c:1108: `args' undeclared (first use in this function) extensions/pyexpat.c:1115: warning: implicit declaration of function `PyObject_New' extensions/pyexpat.c:1123: `self' undeclared (first use in this function) extensions/pyexpat.c:1126: warning: implicit declaration of function `malloc' extensions/pyexpat.c:1130: warning: implicit declaration of function `PyObject_Del' extensions/pyexpat.c:1135: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1153: warning: implicit declaration of function `PyObject_GC_Init' extensions/pyexpat.c:1158: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1164: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:1167: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:1167: parse error before ')' token extensions/pyexpat.c:1170: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1175: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:1176: `handler' undeclared (first use in this function) extensions/pyexpat.c:1180: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:1181: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:1184: parse error before ')' token extensions/pyexpat.c: At top level: extensions/pyexpat.c:1195: parse error before '*' token extensions/pyexpat.c:1196: parse error before '*' token extensions/pyexpat.c:1197: warning: return type defaults to `int' extensions/pyexpat.c:1197: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `xmlparse_SetParamEntityParsing': extensions/pyexpat.c:1199: `args' undeclared (first use in this function) extensions/pyexpat.c:1200: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1201: `p' undeclared (first use in this function) extensions/pyexpat.c:1202: warning: return makes pointer from integer without a cast extensions/pyexpat.c: At top level: extensions/pyexpat.c:1215: parse error before '*' token extensions/pyexpat.c:1216: parse error before '*' token extensions/pyexpat.c:1217: warning: return type defaults to `int' extensions/pyexpat.c:1217: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `xmlparse_UseForeignDTD': extensions/pyexpat.c:1218: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:1218: `flagobj' undeclared (first use in this function) extensions/pyexpat.c:1218: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1221: `args' undeclared (first use in this function) extensions/pyexpat.c:1224: warning: implicit declaration of function `PyObject_IsTrue' extensions/pyexpat.c:1225: `self' undeclared (first use in this function) extensions/pyexpat.c:1229: `Py_None' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:1234: elements of array `xmlparse_methods' have incomplete type extensions/pyexpat.c:1235: warning: excess elements in struct initializer extensions/pyexpat.c:1235: warning: (near initialization for `xmlparse_methods[0]') extensions/pyexpat.c:1235: `PyCFunction' undeclared here (not in a function) extensions/pyexpat.c:1235: warning: excess elements in struct initializer extensions/pyexpat.c:1235: warning: (near initialization for `xmlparse_methods[0]') extensions/pyexpat.c:1235: parse error before "xmlparse_Parse" extensions/pyexpat.c:1236: `METH_VARARGS' undeclared here (not in a function) extensions/pyexpat.c:1236: warning: excess elements in struct initializer extensions/pyexpat.c:1236: warning: (near initialization for `xmlparse_methods[0]') extensions/pyexpat.c:1236: warning: excess elements in struct initializer extensions/pyexpat.c:1236: warning: (near initialization for `xmlparse_methods[0]') extensions/pyexpat.c:1237: warning: excess elements in struct initializer extensions/pyexpat.c:1237: warning: (near initialization for `xmlparse_methods[1]') extensions/pyexpat.c:1237: `PyCFunction' undeclared here (not in a function) extensions/pyexpat.c:1237: warning: excess elements in struct initializer extensions/pyexpat.c:1237: warning: (near initialization for `xmlparse_methods[1]') extensions/pyexpat.c:1237: parse error before "xmlparse_ParseFile" extensions/pyexpat.c:1238: `METH_VARARGS' undeclared here (not in a function) extensions/pyexpat.c:1238: warning: excess elements in struct initializer extensions/pyexpat.c:1238: warning: (near initialization for `xmlparse_methods[1]') extensions/pyexpat.c:1238: warning: excess elements in struct initializer extensions/pyexpat.c:1238: warning: (near initialization for `xmlparse_methods[1]') extensions/pyexpat.c:1239: warning: excess elements in struct initializer extensions/pyexpat.c:1239: warning: (near initialization for `xmlparse_methods[2]') extensions/pyexpat.c:1239: `PyCFunction' undeclared here (not in a function) extensions/pyexpat.c:1239: warning: excess elements in struct initializer extensions/pyexpat.c:1239: warning: (near initialization for `xmlparse_methods[2]') extensions/pyexpat.c:1239: parse error before "xmlparse_SetBase" extensions/pyexpat.c:1240: `METH_VARARGS' undeclared here (not in a function) extensions/pyexpat.c:1240: warning: excess elements in struct initializer extensions/pyexpat.c:1240: warning: (near initialization for `xmlparse_methods[2]') extensions/pyexpat.c:1240: warning: excess elements in struct initializer extensions/pyexpat.c:1240: warning: (near initialization for `xmlparse_methods[2]') extensions/pyexpat.c:1241: warning: excess elements in struct initializer extensions/pyexpat.c:1241: warning: (near initialization for `xmlparse_methods[3]') extensions/pyexpat.c:1241: `PyCFunction' undeclared here (not in a function) extensions/pyexpat.c:1241: warning: excess elements in struct initializer extensions/pyexpat.c:1241: warning: (near initialization for `xmlparse_methods[3]') extensions/pyexpat.c:1241: parse error before "xmlparse_GetBase" extensions/pyexpat.c:1242: `METH_VARARGS' undeclared here (not in a function) extensions/pyexpat.c:1242: warning: excess elements in struct initializer extensions/pyexpat.c:1242: warning: (near initialization for `xmlparse_methods[3]') extensions/pyexpat.c:1242: warning: excess elements in struct initializer extensions/pyexpat.c:1242: warning: (near initialization for `xmlparse_methods[3]') extensions/pyexpat.c:1243: warning: excess elements in struct initializer extensions/pyexpat.c:1243: warning: (near initialization for `xmlparse_methods[4]') extensions/pyexpat.c:1243: `PyCFunction' undeclared here (not in a function) extensions/pyexpat.c:1243: warning: excess elements in struct initializer extensions/pyexpat.c:1243: warning: (near initialization for `xmlparse_methods[4]') extensions/pyexpat.c:1243: parse error before "xmlparse_ExternalEntityParserCreate" extensions/pyexpat.c:1244: `METH_VARARGS' undeclared here (not in a function) extensions/pyexpat.c:1244: warning: excess elements in struct initializer extensions/pyexpat.c:1244: warning: (near initialization for `xmlparse_methods[4]') extensions/pyexpat.c:1244: warning: excess elements in struct initializer extensions/pyexpat.c:1244: warning: (near initialization for `xmlparse_methods[4]') extensions/pyexpat.c:1245: warning: excess elements in struct initializer extensions/pyexpat.c:1245: warning: (near initialization for `xmlparse_methods[5]') extensions/pyexpat.c:1245: `PyCFunction' undeclared here (not in a function) extensions/pyexpat.c:1245: warning: excess elements in struct initializer extensions/pyexpat.c:1245: warning: (near initialization for `xmlparse_methods[5]') extensions/pyexpat.c:1245: parse error before "xmlparse_SetParamEntityParsing" extensions/pyexpat.c:1246: `METH_VARARGS' undeclared here (not in a function) extensions/pyexpat.c:1246: warning: excess elements in struct initializer extensions/pyexpat.c:1246: warning: (near initialization for `xmlparse_methods[5]') extensions/pyexpat.c:1246: warning: excess elements in struct initializer extensions/pyexpat.c:1246: warning: (near initialization for `xmlparse_methods[5]') extensions/pyexpat.c:1247: warning: excess elements in struct initializer extensions/pyexpat.c:1247: warning: (near initialization for `xmlparse_methods[6]') extensions/pyexpat.c:1247: `PyCFunction' undeclared here (not in a function) extensions/pyexpat.c:1247: warning: excess elements in struct initializer extensions/pyexpat.c:1247: warning: (near initialization for `xmlparse_methods[6]') extensions/pyexpat.c:1247: parse error before "xmlparse_GetInputContext" extensions/pyexpat.c:1248: `METH_VARARGS' undeclared here (not in a function) extensions/pyexpat.c:1248: warning: excess elements in struct initializer extensions/pyexpat.c:1248: warning: (near initialization for `xmlparse_methods[6]') extensions/pyexpat.c:1248: warning: excess elements in struct initializer extensions/pyexpat.c:1248: warning: (near initialization for `xmlparse_methods[6]') extensions/pyexpat.c:1250: warning: excess elements in struct initializer extensions/pyexpat.c:1250: warning: (near initialization for `xmlparse_methods[7]') extensions/pyexpat.c:1250: `PyCFunction' undeclared here (not in a function) extensions/pyexpat.c:1250: warning: excess elements in struct initializer extensions/pyexpat.c:1250: warning: (near initialization for `xmlparse_methods[7]') extensions/pyexpat.c:1250: parse error before "xmlparse_UseForeignDTD" extensions/pyexpat.c:1251: `METH_VARARGS' undeclared here (not in a function) extensions/pyexpat.c:1251: warning: excess elements in struct initializer extensions/pyexpat.c:1251: warning: (near initialization for `xmlparse_methods[7]') extensions/pyexpat.c:1251: warning: excess elements in struct initializer extensions/pyexpat.c:1251: warning: (near initialization for `xmlparse_methods[7]') extensions/pyexpat.c:1253: `NULL' undeclared here (not in a function) extensions/pyexpat.c:1253: warning: excess elements in struct initializer extensions/pyexpat.c:1253: warning: (near initialization for `xmlparse_methods[8]') extensions/pyexpat.c:1253: `NULL' undeclared here (not in a function) extensions/pyexpat.c:1253: warning: excess elements in struct initializer extensions/pyexpat.c:1253: warning: (near initialization for `xmlparse_methods[8]') extensions/pyexpat.c:1312: parse error before '*' token extensions/pyexpat.c:1313: parse error before "PyObject" extensions/pyexpat.c:1314: warning: return type defaults to `int' extensions/pyexpat.c:1314: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `newxmlparseobject': extensions/pyexpat.c:1316: `self' undeclared (first use in this function) extensions/pyexpat.c:1324: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1341: `namespace_separator' undeclared (first use in this function) extensions/pyexpat.c:1342: `encoding' undeclared (first use in this function) extensions/pyexpat.c:1355: `PyExc_RuntimeError' undeclared (first use in this function) extensions/pyexpat.c:1366: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:1369: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:1369: parse error before ')' token extensions/pyexpat.c:1372: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1376: parse error before ')' token extensions/pyexpat.c: At top level: extensions/pyexpat.c:1381: parse error before '*' token extensions/pyexpat.c:1382: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `xmlparse_dealloc': extensions/pyexpat.c:1387: warning: implicit declaration of function `PyObject_GC_Fini' extensions/pyexpat.c:1387: `self' undeclared (first use in this function) extensions/pyexpat.c:1389: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1394: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:1394: `temp' undeclared (first use in this function) extensions/pyexpat.c:1395: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:1400: warning: implicit declaration of function `free' extensions/pyexpat.c: In function `handlername2int': extensions/pyexpat.c:1421: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:1421: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1422: warning: implicit declaration of function `strcmp' extensions/pyexpat.c:1422: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c: At top level: extensions/pyexpat.c:1429: parse error before '*' token extensions/pyexpat.c:1431: warning: return type defaults to `int' extensions/pyexpat.c: In function `get_pybool': extensions/pyexpat.c:1432: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:1432: `Py_True' undeclared (first use in this function) extensions/pyexpat.c:1432: `Py_False' undeclared (first use in this function) extensions/pyexpat.c:1434: warning: return makes pointer from integer without a cast extensions/pyexpat.c: At top level: extensions/pyexpat.c:1437: parse error before '*' token extensions/pyexpat.c:1438: parse error before '*' token extensions/pyexpat.c:1439: warning: return type defaults to `int' extensions/pyexpat.c:1439: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `xmlparse_getattr': extensions/pyexpat.c:1440: `name' undeclared (first use in this function) extensions/pyexpat.c:1443: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:1443: `self' undeclared (first use in this function) extensions/pyexpat.c:1444: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1445: `Py_None' undeclared (first use in this function) extensions/pyexpat.c:1447: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1452: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1455: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1458: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1461: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1465: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1469: warning: return makes pointer from integer without a cast extensions/pyexpat.c:1500: `rc' undeclared (first use in this function) extensions/pyexpat.c:1501: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:1502: `o' undeclared (first use in this function) extensions/pyexpat.c:1502: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:1504: warning: implicit declaration of function `PyList_Append' extensions/pyexpat.c:1523: warning: implicit declaration of function `Py_FindMethod' extensions/pyexpat.c:1523: parse error before ')' token extensions/pyexpat.c: At top level: extensions/pyexpat.c:1527: parse error before '*' token extensions/pyexpat.c:1528: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `sethandler': extensions/pyexpat.c:1529: `name' undeclared (first use in this function) extensions/pyexpat.c:1531: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1532: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:1532: `temp' undeclared (first use in this function) extensions/pyexpat.c:1532: `self' undeclared (first use in this function) extensions/pyexpat.c:1534: `v' undeclared (first use in this function) extensions/pyexpat.c:1534: `Py_None' undeclared (first use in this function) extensions/pyexpat.c:1538: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:1542: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c: At top level: extensions/pyexpat.c:1549: parse error before '*' token extensions/pyexpat.c:1550: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `xmlparse_setattr': extensions/pyexpat.c:1552: `v' undeclared (first use in this function) extensions/pyexpat.c:1552: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1553: `PyExc_RuntimeError' undeclared (first use in this function) extensions/pyexpat.c:1556: `name' undeclared (first use in this function) extensions/pyexpat.c:1558: `self' undeclared (first use in this function) extensions/pyexpat.c:1593: `PyExc_ValueError' undeclared (first use in this function) extensions/pyexpat.c:1623: `PyExc_AttributeError' undeclared (first use in this function) extensions/pyexpat.c: At top level: extensions/pyexpat.c:1654: parse error before "Xmlparsetype" extensions/pyexpat.c:1654: warning: type defaults to `int' in declaration of `Xmlparsetype' extensions/pyexpat.c:1655: warning: implicit declaration of function `PyObject_HEAD_INIT' extensions/pyexpat.c:1655: `NULL' undeclared here (not in a function) extensions/pyexpat.c:1656: initializer element is not constant extensions/pyexpat.c:1656: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1656: parse error before numeric constant extensions/pyexpat.c:1657: warning: excess elements in scalar initializer extensions/pyexpat.c:1657: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1658: `PyGC_HEAD_SIZE' undeclared here (not in a function) extensions/pyexpat.c:1658: warning: excess elements in scalar initializer extensions/pyexpat.c:1658: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1659: warning: excess elements in scalar initializer extensions/pyexpat.c:1659: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1661: `destructor' undeclared here (not in a function) extensions/pyexpat.c:1661: warning: excess elements in scalar initializer extensions/pyexpat.c:1661: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1661: parse error before "xmlparse_dealloc" extensions/pyexpat.c:1662: `printfunc' undeclared here (not in a function) extensions/pyexpat.c:1662: warning: excess elements in scalar initializer extensions/pyexpat.c:1662: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1662: parse error before numeric constant extensions/pyexpat.c:1663: `getattrfunc' undeclared here (not in a function) extensions/pyexpat.c:1663: warning: excess elements in scalar initializer extensions/pyexpat.c:1663: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1663: parse error before "xmlparse_getattr" extensions/pyexpat.c:1664: `setattrfunc' undeclared here (not in a function) extensions/pyexpat.c:1664: warning: excess elements in scalar initializer extensions/pyexpat.c:1664: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1664: parse error before "xmlparse_setattr" extensions/pyexpat.c:1665: `cmpfunc' undeclared here (not in a function) extensions/pyexpat.c:1665: warning: excess elements in scalar initializer extensions/pyexpat.c:1665: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1665: parse error before numeric constant extensions/pyexpat.c:1666: `reprfunc' undeclared here (not in a function) extensions/pyexpat.c:1666: warning: excess elements in scalar initializer extensions/pyexpat.c:1666: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1666: parse error before numeric constant extensions/pyexpat.c:1667: warning: excess elements in scalar initializer extensions/pyexpat.c:1667: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1668: warning: excess elements in scalar initializer extensions/pyexpat.c:1668: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1669: warning: excess elements in scalar initializer extensions/pyexpat.c:1669: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1670: `hashfunc' undeclared here (not in a function) extensions/pyexpat.c:1670: warning: excess elements in scalar initializer extensions/pyexpat.c:1670: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1670: parse error before numeric constant extensions/pyexpat.c:1671: `ternaryfunc' undeclared here (not in a function) extensions/pyexpat.c:1671: warning: excess elements in scalar initializer extensions/pyexpat.c:1671: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1671: parse error before numeric constant extensions/pyexpat.c:1672: `reprfunc' undeclared here (not in a function) extensions/pyexpat.c:1672: warning: excess elements in scalar initializer extensions/pyexpat.c:1672: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1672: parse error before numeric constant extensions/pyexpat.c:1673: warning: excess elements in scalar initializer extensions/pyexpat.c:1673: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1674: warning: excess elements in scalar initializer extensions/pyexpat.c:1674: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1675: warning: excess elements in scalar initializer extensions/pyexpat.c:1675: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1679: `Py_TPFLAGS_DEFAULT' undeclared here (not in a function) extensions/pyexpat.c:1679: `Py_TPFLAGS_GC' undeclared here (not in a function) extensions/pyexpat.c:1679: warning: excess elements in scalar initializer extensions/pyexpat.c:1679: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1681: warning: excess elements in scalar initializer extensions/pyexpat.c:1681: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1686: warning: excess elements in scalar initializer extensions/pyexpat.c:1686: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1688: warning: excess elements in scalar initializer extensions/pyexpat.c:1688: warning: (near initialization for `Xmlparsetype') extensions/pyexpat.c:1688: warning: data definition has no type or storage class extensions/pyexpat.c:1697: parse error before '*' token extensions/pyexpat.c:1698: parse error before '*' token extensions/pyexpat.c:1699: warning: return type defaults to `int' extensions/pyexpat.c:1699: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `pyexpat_ParserCreate': extensions/pyexpat.c:1700: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1702: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:1706: initializer element is not constant extensions/pyexpat.c:1706: (near initialization for `kwlist[3]') extensions/pyexpat.c:1708: warning: implicit declaration of function `PyArg_ParseTupleAndKeywords' extensions/pyexpat.c:1708: `args' undeclared (first use in this function) extensions/pyexpat.c:1708: `kw' undeclared (first use in this function) extensions/pyexpat.c:1712: warning: implicit declaration of function `strlen' extensions/pyexpat.c:1713: `PyExc_ValueError' undeclared (first use in this function) extensions/pyexpat.c:1720: `Py_None' undeclared (first use in this function) extensions/pyexpat.c:1723: warning: assignment makes pointer from integer without a cast extensions/pyexpat.c:1728: warning: implicit declaration of function `PyDict_Check' extensions/pyexpat.c:1729: `PyExc_TypeError' undeclared (first use in this function) extensions/pyexpat.c:1733: warning: assignment makes integer from pointer without a cast extensions/pyexpat.c:1737: warning: return makes pointer from integer without a cast extensions/pyexpat.c: At top level: extensions/pyexpat.c:1744: parse error before '*' token extensions/pyexpat.c:1745: parse error before '*' token extensions/pyexpat.c:1746: warning: return type defaults to `int' extensions/pyexpat.c:1746: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `pyexpat_ErrorString': extensions/pyexpat.c:1749: `args' undeclared (first use in this function) extensions/pyexpat.c:1750: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1751: warning: return makes pointer from integer without a cast extensions/pyexpat.c: At top level: extensions/pyexpat.c:1756: elements of array `pyexpat_methods' have incomplete type extensions/pyexpat.c:1757: warning: excess elements in struct initializer extensions/pyexpat.c:1757: warning: (near initialization for `pyexpat_methods[0]') extensions/pyexpat.c:1757: `PyCFunction' undeclared here (not in a function) extensions/pyexpat.c:1757: warning: excess elements in struct initializer extensions/pyexpat.c:1757: warning: (near initialization for `pyexpat_methods[0]') extensions/pyexpat.c:1757: parse error before "pyexpat_ParserCreate" extensions/pyexpat.c:1758: `METH_VARARGS' undeclared here (not in a function) extensions/pyexpat.c:1758: `METH_KEYWORDS' undeclared here (not in a function) extensions/pyexpat.c:1758: warning: excess elements in struct initializer extensions/pyexpat.c:1758: warning: (near initialization for `pyexpat_methods[0]') extensions/pyexpat.c:1758: warning: excess elements in struct initializer extensions/pyexpat.c:1758: warning: (near initialization for `pyexpat_methods[0]') extensions/pyexpat.c:1759: warning: excess elements in struct initializer extensions/pyexpat.c:1759: warning: (near initialization for `pyexpat_methods[1]') extensions/pyexpat.c:1759: `PyCFunction' undeclared here (not in a function) extensions/pyexpat.c:1759: warning: excess elements in struct initializer extensions/pyexpat.c:1759: warning: (near initialization for `pyexpat_methods[1]') extensions/pyexpat.c:1759: parse error before "pyexpat_ErrorString" extensions/pyexpat.c:1760: `METH_VARARGS' undeclared here (not in a function) extensions/pyexpat.c:1760: warning: excess elements in struct initializer extensions/pyexpat.c:1760: warning: (near initialization for `pyexpat_methods[1]') extensions/pyexpat.c:1760: warning: excess elements in struct initializer extensions/pyexpat.c:1760: warning: (near initialization for `pyexpat_methods[1]') extensions/pyexpat.c:1762: `NULL' undeclared here (not in a function) extensions/pyexpat.c:1762: warning: excess elements in struct initializer extensions/pyexpat.c:1762: warning: (near initialization for `pyexpat_methods[2]') extensions/pyexpat.c:1762: `PyCFunction' undeclared here (not in a function) extensions/pyexpat.c:1762: warning: excess elements in struct initializer extensions/pyexpat.c:1762: warning: (near initialization for `pyexpat_methods[2]') extensions/pyexpat.c:1762: parse error before "NULL" extensions/pyexpat.c:1762: warning: excess elements in struct initializer extensions/pyexpat.c:1762: warning: (near initialization for `pyexpat_methods[2]') extensions/pyexpat.c:1762: `NULL' undeclared here (not in a function) extensions/pyexpat.c:1762: warning: excess elements in struct initializer extensions/pyexpat.c:1762: warning: (near initialization for `pyexpat_methods[2]') extensions/pyexpat.c:1775: parse error before '*' token extensions/pyexpat.c:1777: warning: return type defaults to `int' extensions/pyexpat.c: In function `get_version_string': extensions/pyexpat.c:1782: warning: implicit declaration of function `isdigit' extensions/pyexpat.c:1787: warning: return makes pointer from integer without a cast extensions/pyexpat.c: In function `initpyexpat': extensions/pyexpat.c:1813: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:1813: `m' undeclared (first use in this function) extensions/pyexpat.c:1813: `d' undeclared (first use in this function) extensions/pyexpat.c:1813: warning: left-hand operand of comma expression has no effect extensions/pyexpat.c:1814: `errmod_name' undeclared (first use in this function) extensions/pyexpat.c:1815: `errors_module' undeclared (first use in this function) extensions/pyexpat.c:1816: `modelmod_name' undeclared (first use in this function) extensions/pyexpat.c:1817: `model_module' undeclared (first use in this function) extensions/pyexpat.c:1818: `sys_modules' undeclared (first use in this function) extensions/pyexpat.c:1820: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1826: request for member `ob_type' in something not a structure or union extensions/pyexpat.c:1826: `PyType_Type' undeclared (first use in this function) extensions/pyexpat.c:1829: warning: implicit declaration of function `Py_InitModule3' extensions/pyexpat.c:1834: warning: implicit declaration of function `PyErr_NewException' extensions/pyexpat.c:1835: warning: assignment makes pointer from integer without a cast extensions/pyexpat.c:1840: warning: implicit declaration of function `PyModule_AddObject' extensions/pyexpat.c:1844: parse error before ')' token extensions/pyexpat.c:1847: warning: implicit declaration of function `PyModule_AddStringConstant' extensions/pyexpat.c:1867: warning: implicit declaration of function `PySys_GetObject' extensions/pyexpat.c:1868: warning: implicit declaration of function `PyModule_GetDict' extensions/pyexpat.c:1871: warning: implicit declaration of function `PyModule_New' extensions/pyexpat.c:1896: `list' undeclared (first use in this function) extensions/pyexpat.c:1904: `item' undeclared (first use in this function) extensions/pyexpat.c:1957: warning: implicit declaration of function `PyModule_AddIntConstant' extensions/pyexpat.c: At top level: extensions/pyexpat.c:1981: parse error before '*' token extensions/pyexpat.c:1982: warning: function declaration isn't a prototype extensions/pyexpat.c: In function `clear_handlers': extensions/pyexpat.c:1984: `PyObject' undeclared (first use in this function) extensions/pyexpat.c:1984: `temp' undeclared (first use in this function) extensions/pyexpat.c:1986: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c:1986: `NULL' undeclared (first use in this function) extensions/pyexpat.c:1987: `initial' undeclared (first use in this function) extensions/pyexpat.c:1988: `self' undeclared (first use in this function) extensions/pyexpat.c:1993: invalid use of undefined type `struct HandlerInfo' extensions/pyexpat.c: At top level: extensions/pyexpat.c:1998: elements of array `handler_info' have incomplete type extensions/pyexpat.c:1999: warning: excess elements in struct initializer extensions/pyexpat.c:1999: warning: (near initialization for `handler_info[0]') extensions/pyexpat.c:2000: warning: excess elements in struct initializer extensions/pyexpat.c:2000: warning: (near initialization for `handler_info[0]') extensions/pyexpat.c:2001: warning: excess elements in struct initializer extensions/pyexpat.c:2001: warning: (near initialization for `handler_info[0]') extensions/pyexpat.c:2002: warning: excess elements in struct initializer extensions/pyexpat.c:2002: warning: (near initialization for `handler_info[1]') extensions/pyexpat.c:2003: warning: excess elements in struct initializer extensions/pyexpat.c:2003: warning: (near initialization for `handler_info[1]') extensions/pyexpat.c:2004: warning: excess elements in struct initializer extensions/pyexpat.c:2004: warning: (near initialization for `handler_info[1]') extensions/pyexpat.c:2005: warning: excess elements in struct initializer extensions/pyexpat.c:2005: warning: (near initialization for `handler_info[2]') extensions/pyexpat.c:2006: warning: excess elements in struct initializer extensions/pyexpat.c:2006: warning: (near initialization for `handler_info[2]') extensions/pyexpat.c:2007: warning: excess elements in struct initializer extensions/pyexpat.c:2007: warning: (near initialization for `handler_info[2]') extensions/pyexpat.c:2008: warning: excess elements in struct initializer extensions/pyexpat.c:2008: warning: (near initialization for `handler_info[3]') extensions/pyexpat.c:2009: warning: excess elements in struct initializer extensions/pyexpat.c:2009: warning: (near initialization for `handler_info[3]') extensions/pyexpat.c:2010: warning: excess elements in struct initializer extensions/pyexpat.c:2010: warning: (near initialization for `handler_info[3]') extensions/pyexpat.c:2011: warning: excess elements in struct initializer extensions/pyexpat.c:2011: warning: (near initialization for `handler_info[4]') extensions/pyexpat.c:2012: warning: excess elements in struct initializer extensions/pyexpat.c:2012: warning: (near initialization for `handler_info[4]') extensions/pyexpat.c:2013: warning: excess elements in struct initializer extensions/pyexpat.c:2013: warning: (near initialization for `handler_info[4]') extensions/pyexpat.c:2014: warning: excess elements in struct initializer extensions/pyexpat.c:2014: warning: (near initialization for `handler_info[5]') extensions/pyexpat.c:2015: warning: excess elements in struct initializer extensions/pyexpat.c:2015: warning: (near initialization for `handler_info[5]') extensions/pyexpat.c:2016: warning: excess elements in struct initializer extensions/pyexpat.c:2016: warning: (near initialization for `handler_info[5]') extensions/pyexpat.c:2017: warning: excess elements in struct initializer extensions/pyexpat.c:2017: warning: (near initialization for `handler_info[6]') extensions/pyexpat.c:2018: warning: excess elements in struct initializer extensions/pyexpat.c:2018: warning: (near initialization for `handler_info[6]') extensions/pyexpat.c:2019: warning: excess elements in struct initializer extensions/pyexpat.c:2019: warning: (near initialization for `handler_info[6]') extensions/pyexpat.c:2020: warning: excess elements in struct initializer extensions/pyexpat.c:2020: warning: (near initialization for `handler_info[7]') extensions/pyexpat.c:2021: warning: excess elements in struct initializer extensions/pyexpat.c:2021: warning: (near initialization for `handler_info[7]') extensions/pyexpat.c:2022: warning: excess elements in struct initializer extensions/pyexpat.c:2022: warning: (near initialization for `handler_info[7]') extensions/pyexpat.c:2023: warning: excess elements in struct initializer extensions/pyexpat.c:2023: warning: (near initialization for `handler_info[8]') extensions/pyexpat.c:2024: warning: excess elements in struct initializer extensions/pyexpat.c:2024: warning: (near initialization for `handler_info[8]') extensions/pyexpat.c:2025: warning: excess elements in struct initializer extensions/pyexpat.c:2025: warning: (near initialization for `handler_info[8]') extensions/pyexpat.c:2026: warning: excess elements in struct initializer extensions/pyexpat.c:2026: warning: (near initialization for `handler_info[9]') extensions/pyexpat.c:2027: warning: excess elements in struct initializer extensions/pyexpat.c:2027: warning: (near initialization for `handler_info[9]') extensions/pyexpat.c:2028: warning: excess elements in struct initializer extensions/pyexpat.c:2028: warning: (near initialization for `handler_info[9]') extensions/pyexpat.c:2029: warning: excess elements in struct initializer extensions/pyexpat.c:2029: warning: (near initialization for `handler_info[10]') extensions/pyexpat.c:2030: warning: excess elements in struct initializer extensions/pyexpat.c:2030: warning: (near initialization for `handler_info[10]') extensions/pyexpat.c:2031: warning: excess elements in struct initializer extensions/pyexpat.c:2031: warning: (near initialization for `handler_info[10]') extensions/pyexpat.c:2032: warning: excess elements in struct initializer extensions/pyexpat.c:2032: warning: (near initialization for `handler_info[11]') extensions/pyexpat.c:2033: warning: excess elements in struct initializer extensions/pyexpat.c:2033: warning: (near initialization for `handler_info[11]') extensions/pyexpat.c:2034: warning: excess elements in struct initializer extensions/pyexpat.c:2034: warning: (near initialization for `handler_info[11]') extensions/pyexpat.c:2035: warning: excess elements in struct initializer extensions/pyexpat.c:2035: warning: (near initialization for `handler_info[12]') extensions/pyexpat.c:2036: warning: excess elements in struct initializer extensions/pyexpat.c:2036: warning: (near initialization for `handler_info[12]') extensions/pyexpat.c:2037: warning: excess elements in struct initializer extensions/pyexpat.c:2037: warning: (near initialization for `handler_info[12]') extensions/pyexpat.c:2038: warning: excess elements in struct initializer extensions/pyexpat.c:2038: warning: (near initialization for `handler_info[13]') extensions/pyexpat.c:2039: warning: excess elements in struct initializer extensions/pyexpat.c:2039: warning: (near initialization for `handler_info[13]') extensions/pyexpat.c:2040: warning: excess elements in struct initializer extensions/pyexpat.c:2040: warning: (near initialization for `handler_info[13]') extensions/pyexpat.c:2041: warning: excess elements in struct initializer extensions/pyexpat.c:2041: warning: (near initialization for `handler_info[14]') extensions/pyexpat.c:2042: warning: excess elements in struct initializer extensions/pyexpat.c:2042: warning: (near initialization for `handler_info[14]') extensions/pyexpat.c:2043: warning: excess elements in struct initializer extensions/pyexpat.c:2043: warning: (near initialization for `handler_info[14]') extensions/pyexpat.c:2044: warning: excess elements in struct initializer extensions/pyexpat.c:2044: warning: (near initialization for `handler_info[15]') extensions/pyexpat.c:2045: warning: excess elements in struct initializer extensions/pyexpat.c:2045: warning: (near initialization for `handler_info[15]') extensions/pyexpat.c:2046: warning: excess elements in struct initializer extensions/pyexpat.c:2046: warning: (near initialization for `handler_info[15]') extensions/pyexpat.c:2047: warning: excess elements in struct initializer extensions/pyexpat.c:2047: warning: (near initialization for `handler_info[16]') extensions/pyexpat.c:2048: warning: excess elements in struct initializer extensions/pyexpat.c:2048: warning: (near initialization for `handler_info[16]') extensions/pyexpat.c:2049: warning: excess elements in struct initializer extensions/pyexpat.c:2049: warning: (near initialization for `handler_info[16]') extensions/pyexpat.c:2050: warning: excess elements in struct initializer extensions/pyexpat.c:2050: warning: (near initialization for `handler_info[17]') extensions/pyexpat.c:2051: warning: excess elements in struct initializer extensions/pyexpat.c:2051: warning: (near initialization for `handler_info[17]') extensions/pyexpat.c:2052: warning: excess elements in struct initializer extensions/pyexpat.c:2052: warning: (near initialization for `handler_info[17]') extensions/pyexpat.c:2053: warning: excess elements in struct initializer extensions/pyexpat.c:2053: warning: (near initialization for `handler_info[18]') extensions/pyexpat.c:2054: warning: excess elements in struct initializer extensions/pyexpat.c:2054: warning: (near initialization for `handler_info[18]') extensions/pyexpat.c:2055: warning: excess elements in struct initializer extensions/pyexpat.c:2055: warning: (near initialization for `handler_info[18]') extensions/pyexpat.c:2056: warning: excess elements in struct initializer extensions/pyexpat.c:2056: warning: (near initialization for `handler_info[19]') extensions/pyexpat.c:2057: warning: excess elements in struct initializer extensions/pyexpat.c:2057: warning: (near initialization for `handler_info[19]') extensions/pyexpat.c:2058: warning: excess elements in struct initializer extensions/pyexpat.c:2058: warning: (near initialization for `handler_info[19]') extensions/pyexpat.c:2059: warning: excess elements in struct initializer extensions/pyexpat.c:2059: warning: (near initialization for `handler_info[20]') extensions/pyexpat.c:2060: warning: excess elements in struct initializer extensions/pyexpat.c:2060: warning: (near initialization for `handler_info[20]') extensions/pyexpat.c:2061: warning: excess elements in struct initializer extensions/pyexpat.c:2061: warning: (near initialization for `handler_info[20]') extensions/pyexpat.c:2063: warning: excess elements in struct initializer extensions/pyexpat.c:2063: warning: (near initialization for `handler_info[21]') extensions/pyexpat.c:2064: warning: excess elements in struct initializer extensions/pyexpat.c:2064: warning: (near initialization for `handler_info[21]') extensions/pyexpat.c:2065: warning: excess elements in struct initializer extensions/pyexpat.c:2065: warning: (near initialization for `handler_info[21]') extensions/pyexpat.c:2068: `NULL' undeclared here (not in a function) extensions/pyexpat.c:2068: warning: excess elements in struct initializer extensions/pyexpat.c:2068: warning: (near initialization for `handler_info[22]') extensions/pyexpat.c:2068: `NULL' undeclared here (not in a function) extensions/pyexpat.c:2068: warning: excess elements in struct initializer extensions/pyexpat.c:2068: warning: (near initialization for `handler_info[22]') extensions/pyexpat.c:2068: `NULL' undeclared here (not in a function) extensions/pyexpat.c:2068: warning: excess elements in struct initializer extensions/pyexpat.c:2068: warning: (near initialization for `handler_info[22]') extensions/pyexpat.c:1998: storage size of `handler_info' isn't known error: command 'gcc' failed with exit status 1 [renata:~/DEsktop/PyXML-0.8.3] tonym% From Martina at Oefelein.de Fri Jan 2 05:11:33 2004 From: Martina at Oefelein.de (Martina Oefelein) Date: Fri Jan 2 05:11:43 2004 Subject: [XML-SIG] PyXML-0.8.3 build In-Reply-To: <562EA324-3CE3-11D8-9556-0030654DB202@tracs5.com> References: <562EA324-3CE3-11D8-9556-0030654DB202@tracs5.com> Message-ID: <0AE2D5A2-3D0C-11D8-8A50-000A957DBE94@Oefelein.de> Hi Tony, > extensions/pyexpat.c:5:20: Python.h: No such file or directory > extensions/pyexpat.c:6:19: ctype.h: No such file or directory > extensions/pyexpat.c:8:21: compile.h: No such file or directory > extensions/pyexpat.c:9:25: frameobject.h: No such file or directory > In file included from extensions/pyexpat.c:10: > extensions/expat/lib/expat.h:17:20: stdlib.h: No such file or directory Apparently it doesn't find any header files, neither Python-specific nor standard headers. Looks like your installation of the Developer Tools is broken in a weird way. Maybe you should just reinstall Developer Tools. ciao Martina From andyjmaclean at hotmail.com Mon Jan 5 07:54:19 2004 From: andyjmaclean at hotmail.com (Andrew Maclean) Date: Mon Jan 5 07:54:23 2004 Subject: [XML-SIG] (no subject) Message-ID: Dear sir, I'm having a problem with xmlproc. Eventually I hope to use this product to validate xml files against a schema but in the meantime I'm trying to get to grips with basic functionality. My problem is with the command "parse_resource", which results in a SystemExit error. The test xml file I use can be opened as a file and I can use the "feed" command within a while loop to do some simple parsing of it (this tells me it finds the file and links my XMLProcessor object to the MyApp object) but the minute I try and use "parse_resource('C:/test.xml')" it shuts down my Zope instance. The relevant section of code is below, I took it from an example I found on the internet: file = 'C:/Andy/XSL/test.xml' p = xmlproc.XMLProcessor() p.set_application(MyApp()) try: p.parse_resource(file) except IOError, (errno, strerror): print "I/O error(%s): %s" % (errno, strerror) except ValueError: print "Could not convert data to an integer." except: print "Unexpected error:", sys.exc_info()[0] raise print #prints "Unexpected error:SystemExit" before disappearing, the guilty line is the call to parse_resource I'm running on Windows XP. The pyXml modules are all installed properly because I'm using Silva Zope (0.9.1). Can you please help? Thanks, Andy Maclean _________________________________________________________________ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger From larsga at ontopia.net Mon Jan 5 10:34:47 2004 From: larsga at ontopia.net (Lars Marius Garshol) Date: Mon Jan 5 10:34:51 2004 Subject: [XML-SIG] (no subject) In-Reply-To: References: Message-ID: * Andrew Maclean | | My problem is with the command "parse_resource", which results in a | SystemExit error. The test xml file I use can be opened as a file | and I can use the "feed" command within a while loop to do some | simple parsing of it (this tells me it finds the file and links my | XMLProcessor object to the MyApp object) but the minute I try and | use "parse_resource('C:/test.xml')" it shuts down my Zope instance. There is only one call to sys.exit() in the xmlproc source code, and that's in the default ErrorHandler. Probably the problem is that you are passing an XML document that is not well-formed to xmlproc. Try adding this to your source code # -------------------------------------------------- class MyErrorHandler: def __init__(self,locator): self.locator=locator def set_locator(self,loc): self.locator=loc def get_locator(self): return self.locator def warning(self,msg): "Handles a non-fatal error message." pass def error(self,msg): self.fatal(msg) def fatal(self,msg): "Handles a fatal error message." if self.locator==None: print "ERROR: "+msg else: print "ERROR: "+msg+" at %s:%d:%d" % (self.locator.get_current_sysid(),\ self.locator.get_line(),\ self.locator.get_column()) print "TEXT: '%s'" % (self.locator.data[self.locator.pos:\ self.locator.pos+10]) # -------------------------------------------------- Then change the script as following: | file = 'C:/Andy/XSL/test.xml' | p = xmlproc.XMLProcessor() | p.set_application(MyApp()) p.set_error_handler(MyErrorHandler()) | try: | p.parse_resource(file) | except IOError, (errno, strerror): | print "I/O error(%s): %s" % (errno, strerror) | except ValueError: | print "Could not convert data to an integer." | except: | print "Unexpected error:", sys.exc_info()[0] | raise | print That should give you an error message when parsing stops because of the error, and it should take away the sys.exit() call. You can change where the error message is printed to, of course, if you want. -- Lars Marius Garshol, Ontopian GSM: +47 98 21 55 50 From andyjmaclean at hotmail.com Wed Jan 7 04:02:00 2004 From: andyjmaclean at hotmail.com (Andrew Maclean) Date: Wed Jan 7 04:02:04 2004 Subject: [XML-SIG] (no subject) Message-ID: Dear sir, Thanks for the reply, but I'm still no further forward. I actually have two problems: The first is my original problem. I've checked my test xml document and it IS well formed, but still a call to my my Zope-External-method results in the screen: Site Error An error was encountered while publishing this resource. exceptions.SystemExit again, the guilty line is the call to "parse_resource". Secondly, I copied over the code for "MyErrorhandler" and I included the line: p.set_error_handler(MyErrorHandler()) What happens now is that I get the error: Error Type: TypeError Error Value: __init__() takes exactly 2 arguments (1 given) It would seem that the constructor for MyErrorHandler needs another parameter but I don't know what to give it (a "locator"?) Thanks for your patience, Andrew Maclean _________________________________________________________________ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger From andyjmaclean at hotmail.com Wed Jan 7 08:26:00 2004 From: andyjmaclean at hotmail.com (Andrew Maclean) Date: Wed Jan 7 08:26:04 2004 Subject: [XML-SIG] parse_resource - I can't get it to work Message-ID: Hello again, I'm still having problems with the "parse_resource" command. I've got the ErrorHandling interface working but it's still coming up with a fatal error. The error handler does this: def fatal(self,msg): print "fatal" "Handles a fatal error message." if self.locator==None: print "ERROR: "+msg else: print self.locator print "ERROR: "+msg+" at %s:%d:%d" % (self.locator.get_current_sysid(), self.locator.get_line(), self.locator.get_column()) print "TEXT: '%s'" % (self.locator.data[self.locator.pos: self.locator.pos+10]) In the console window for Zope I get the text: init fatal Unexpected error : exceptions.AttributeError and the browser window shows the text: Site Error An error was encountered while publishing this resource. Error Type: AttributeError Error Value: get_current_sysid My test XML file is completely valid, here it is in all it's glory: hhh ...and the script I use to parse it is of the simplest kind: file = 'C:/Andy/XSL/test.xml' p = xmlproc.XMLProcessor() p.set_application(MyApp()) p.set_error_handler(MyErrorHandler(self)) try: p.parse_resource(file) except IOError, (errno, strerror): print "I/O error(%s): %s" % (errno, strerror) except ValueError: print "Could not convert data to an integer." except: print "Unexpected error:", sys.exc_info()[0] dbFile.write("Unexpected error:" + str(sys.exc_info()[0])); dbFile.close(); pass raise Can anyone please help? _________________________________________________________________ Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger From tpassin at comcast.net Wed Jan 7 09:29:40 2004 From: tpassin at comcast.net (Thomas B. Passin) Date: Wed Jan 7 09:29:30 2004 Subject: [XML-SIG] (no subject) In-Reply-To: References: Message-ID: <3FFC17D4.1070808@comcast.net> Andrew Maclean wrote: > I'm having a problem with xmlproc. Eventually I hope to use this > product to validate xml files against a schema but in the meantime I'm > trying to get to grips with basic functionality. > > My problem is with the command "parse_resource", which results in a > SystemExit error. The test xml file I use can be opened as a file and I > can use the "feed" command within a while loop to do some simple parsing > of it (this tells me it finds the file and links my XMLProcessor object > to the MyApp object) but the minute I try and use > "parse_resource('C:/test.xml')" it shuts down my Zope instance. > That's because your path is not legal on Windows. You want to use file = r'C:\Andy\XSL\test.xml' The 'r', for "raw" lets you use single backslashes, otherwise they would have to be doubled. parse_resource is not finding the file because of the bad path, and so you get an error (too bad the error is not more informative). Cheers, Tom P From list-matt at reprocessed.org Thu Jan 8 11:19:12 2004 From: list-matt at reprocessed.org (Matt Patterson) Date: Thu Jan 8 11:19:20 2004 Subject: [XML-SIG] Schema validation Message-ID: <6585016B-41F6-11D8-865E-000393CBB978@reprocessed.org> Hello all, I realise that asking about schema validation on Christmas Eve was asking for trouble, so I'll ask again. Is there a validating parser with Python wrappers that can use Schemas to validate, and does that parser allow arbitrary association of the schema with the document? Thanks, Matt Patterson From chrish at cryptocard.com Thu Jan 8 16:21:32 2004 From: chrish at cryptocard.com (Chris Herborth) Date: Thu Jan 8 16:20:21 2004 Subject: [XML-SIG] Possible DTD parsing bug Message-ID: <3FFDC9DC.8030401@cryptocard.com> I've switched to using a validating parser for my XML processor, and I've just run into something that I _think_ might be a bug with PyXML 0.8.3... In my DTD, I have something like this: ... ... When parsing my XML docs, I get a warning that "foo" and "bar" are being defined again. I expanded %target.foo; and %target.bar; by hand to get this: and it parses without errors or warnings. Is this a bug or operator error? -- Chris Herborth chrish@cryptocard.com Documentation Overlord, CRYPTOCard Corp. http://www.cryptocard.com/ Never send a monster to do the work of an evil scientist. From KSBeattie at lbl.gov Thu Jan 8 17:22:18 2004 From: KSBeattie at lbl.gov (Keith Beattie) Date: Thu Jan 8 17:23:02 2004 Subject: [XML-SIG] question about setAttributeNS() Message-ID: <3FFDD81A.7080104@lbl.gov> Hello, When adding an attribute within a new namespace to an element, you need to make two calls to setAttributeNS() in order for the namespace definition to be added to the element (one for the new namespace and one for the new attribute). This is different than createElementNS() which adds the namespace attribute for you, when creating a new element in a new namespace. It seems odd to me that creating a new attribute in new namespaces take two calls, while creating new elements in a new namespace takes only one call. Am I missing something and is there a reason for this, or is this just an idiosyncrasy of the DOM API? Thanks, ksb From and-xml at doxdesk.com Thu Jan 8 18:20:14 2004 From: and-xml at doxdesk.com (Andrew Clover) Date: Thu Jan 8 18:40:16 2004 Subject: [XML-SIG] question about setAttributeNS() In-Reply-To: <3FFDD81A.7080104@lbl.gov> References: <3FFDD81A.7080104@lbl.gov> Message-ID: <20040108232014.GA5322@doxdesk.com> Keith Beattie wrote: > When adding an attribute within a new namespace to an element, you need to > make two calls to setAttributeNS() in order for the namespace definition to > be added to the element (one for the new namespace and one for the new > attribute). Not really, in DOM API terms. If you do: x= document.createElement('x') x.setAttributeNS('newNS', 'new:attr', 'value') Then x.getAttributeNodeNS('newNS', 'attr').namespaceURI already evaluates to 'newNS', despite the lack of an xmlns:new attribute to support it. The only problem comes when you serialise this. Most Python implementations don't automatically write the xmlns:new="newNS" attribute you would need for a serialised version to be namespace-well-formed. And that's perfectly reasonable because the standard they are based on (DOM Level 2 Core) has absolutely nothing to say about how documents should be serialised. This changes in DOM Level 3 (currently only supported by pxdom). If you use a default Level 3 LS serialiser object, eg.: document.implementation.createLSSerializer().writeToString(document) then the output must have the required extra attributes for namespace-well- formedness added to it automatically. The same is true with the new Level 3 Core method Document.normalizeDocument(). (You can disable this behaviour by calling setParameter('namespaces', False) on the LSSerializer.config or Document.domConfig concerned.) > This is different than createElementNS() which adds the namespace > attribute for you, when creating a new element in a new namespace. ? This is not part of the standard DOM API, and I know of no Python implementation that does it. What software are you using? -- Andrew Clover mailto:and@doxdesk.com http://www.doxdesk.com/ From lalleman at mfps.com Thu Jan 8 18:41:59 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 8 18:42:09 2004 Subject: [XML-SIG] Possible DTD parsing bug Message-ID: <2F7747120C62D211AD4100805FA78E1AE6983D@mail2.mfps.com> Martin, I found the same thing and asked about on this list (copied below). It looks like the short answer is a problem with the underlining XML parser. Hopefully it will be helpful to you. I'm not sure what underlining parser is being used or how to change it. I decided to use a different approach, so I didn't end up using DTD parsing and I haven't looked into this further. Maybe this can point you in the right direction. Good luck, Lowell Alleman -----Original Message----- From: martin@v.loewis.de [mailto:martin@v.loewis.de] Sent: Thursday, December 11, 2003 4:07 PM To: Alleman, Lowell Cc: 'Alexandre Fayolle'; xml-sig@python.org Subject: Re: [XML-SIG] Working with non-compliant XML utilities "Alleman, Lowell" writes: > The order that the attributes should appear happens to be the same order > that they are listed in the in the DTD. I've tried to pull out > the DTD info using 4DOM and minidom, but haven't had much success. You should explicitly use xmlproc, and install a DTDListener. The add_attribute callbacks will come in the order of attribute declaration. > I did notice that 4DOM seemed to choke on ENTITY references ( %entity_ref; ) > when the DTD was inline. Can anyone confirm that? No. 4DOM only uses some underlying parser, so it will never choke itself - if something chokes, it is the underlying parser. Regards, Martin -----Original Message----- From: Chris Herborth [mailto:chrish@cryptocard.com] Sent: Thursday, January 08, 2004 4:22 PM To: XML-Sig Subject: [XML-SIG] Possible DTD parsing bug I've switched to using a validating parser for my XML processor, and I've just run into something that I _think_ might be a bug with PyXML 0.8.3... In my DTD, I have something like this: ... ... When parsing my XML docs, I get a warning that "foo" and "bar" are being defined again. I expanded %target.foo; and %target.bar; by hand to get this: and it parses without errors or warnings. Is this a bug or operator error? -- Chris Herborth chrish@cryptocard.com Documentation Overlord, CRYPTOCard Corp. http://www.cryptocard.com/ Never send a monster to do the work of an evil scientist. _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig From and-xml at doxdesk.com Thu Jan 8 19:10:39 2004 From: and-xml at doxdesk.com (Andrew Clover) Date: Thu Jan 8 19:30:39 2004 Subject: [XML-SIG] Possible DTD parsing bug In-Reply-To: <3FFDC9DC.8030401@cryptocard.com> References: <3FFDC9DC.8030401@cryptocard.com> Message-ID: <20040109001039.GB5322@doxdesk.com> Chris Herborth wrote: > ... > > %attrs.control; > > > When parsing my XML docs, I get a warning that "foo" and "bar" are being > defined again. I cannot get this to happen given your example, on PyXML 0.8.3 or 0.8, without declaring a second ATTLIST on 'something', or referencing attrs.control twice. Suspect there may be more lurking in the "> ..." we can't see - could you post a simplified but (non-)working test case with the Python you'Re trying to use to parse it? -- Andrew Clover mailto:and@doxdesk.com http://www.doxdesk.com/ From KSBeattie at lbl.gov Thu Jan 8 19:56:02 2004 From: KSBeattie at lbl.gov (Keith Beattie) Date: Thu Jan 8 19:56:48 2004 Subject: [XML-SIG] question about setAttributeNS() In-Reply-To: <20040108232014.GA5322@doxdesk.com> References: <3FFDD81A.7080104@lbl.gov> <20040108232014.GA5322@doxdesk.com> Message-ID: <3FFDFC22.2050605@lbl.gov> Andrew Clover wrote: > The only problem comes when you serialise this. Most Python implementations > don't automatically write the xmlns:new="newNS" attribute you would need for > a serialised version to be namespace-well-formed. And that's perfectly > reasonable because the standard they are based on (DOM Level 2 Core) has > absolutely nothing to say about how documents should be serialised. Ugh. I guess I was making the (apparently unsafe) assumption that serializers would produce well-formed xml. So, according to DOM Level 2 Core, serializers could always produce the empty string and be correct? :) >>This is different than createElementNS() which adds the namespace >>attribute for you, when creating a new element in a new namespace. > > > ? This is not part of the standard DOM API, and I know of no Python > implementation that does it. What software are you using? 4Suite. I thought minidom did this too, but upon checking, it doesn't and works as you describe (though as you point out this is a 'feature' of the serializers and not createElementNS (which is part of DOM Level 2 spec certainly)) Here's a 4Suite example: $ python Python 2.3.3 (#1, Dec 24 2003, 01:29:00) [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4 Type "help", "copyright", "credits" or "license" for more information. >>> from Ft.Xml import Domlette >>> dom = Domlette.NonvalidatingReader.parseString("", "memory://") >>> el = dom.createElementNS("http://example.org/ns1", "ns1:Y") >>> Domlette.Print(el) >>> Thanks, ksb From and-xml at doxdesk.com Thu Jan 8 19:50:23 2004 From: and-xml at doxdesk.com (Andrew Clover) Date: Thu Jan 8 20:10:25 2004 Subject: [XML-SIG] Schema validation In-Reply-To: <6585016B-41F6-11D8-865E-000393CBB978@reprocessed.org> References: <6585016B-41F6-11D8-865E-000393CBB978@reprocessed.org> Message-ID: <20040109005023.GC5322@doxdesk.com> Matt Patterson wrote: > Is there a validating parser with Python wrappers that can use Schemas > to validate, and does that parser allow arbitrary association of the > schema with the document? (More awkward silence.) IOW: not that I know of. There is XSV, which is written in Python - http://www.ltg.ed.ac.uk/~ht/xsv-status.html But it's a validator application (built on top of the LTXML parser and PyLTXML bindings) rather than a parser in itself; it doesn't give you a DOM or SAX output, but there's nothing stopping you running it as a pre-parse step. -- Andrew Clover mailto:and@doxdesk.com http://www.doxdesk.com/ From and at doxdesk.com Thu Jan 8 20:25:54 2004 From: and at doxdesk.com (Andrew Clover) Date: Thu Jan 8 20:45:59 2004 Subject: [XML-SIG] question about setAttributeNS() In-Reply-To: <3FFDFC22.2050605@lbl.gov> References: <3FFDD81A.7080104@lbl.gov> <20040108232014.GA5322@doxdesk.com> <3FFDFC22.2050605@lbl.gov> Message-ID: <20040109012554.GD5322@doxdesk.com> Keith Beattie wrote: > Ugh. I guess I was making the (apparently unsafe) assumption that > serializers would produce well-formed xml. It's well-formed, but not 'namespace-well-formed' as defined by 'Namespaces in XML 1.1'. (The output is a perfectly fine XML-without-namespaces document.) The ability to do namespace fixup is actually a fairly recent idea; you'll notice the language of the Level 2 spec (1.1.8.) kind of avoids the issue, saying that it can't be naively serialised, perhaps the implementation can do something about it, perhaps the application will have to. Level 3, on the other hand, presents a complete algorithm. > 4Suite. Ah, you're right! I hadn't checked cDomlette 1.0x. 4Suite's XmlWriter seems to largely reconstitute namespace declarations as it goes; for example if you have an attribute that's a redundant namespace declaration that will disappear in the Domlette.Printed version. This process has has the side-effect of doing element namespace fixup (but not attribute name fixup which is a more complicated affair). You learn something new every day. Not necessarily always something terribly interesting, mind. -- Andrew Clover mailto:and@doxdesk.com http://www.doxdesk.com/ From tpassin at comcast.net Thu Jan 8 22:16:32 2004 From: tpassin at comcast.net (Thomas B. Passin) Date: Thu Jan 8 22:16:13 2004 Subject: [XML-SIG] Schema validation In-Reply-To: <20040109005023.GC5322@doxdesk.com> References: <6585016B-41F6-11D8-865E-000393CBB978@reprocessed.org> <20040109005023.GC5322@doxdesk.com> Message-ID: <3FFE1D10.6040509@comcast.net> Andrew Clover wrote: > Matt Patterson wrote: > > >>Is there a validating parser with Python wrappers that can use Schemas >>to validate, and does that parser allow arbitrary association of the >>schema with the document? > > > (More awkward silence.) > > IOW: not that I know of. There is XSV, which is written in Python - > > http://www.ltg.ed.ac.uk/~ht/xsv-status.html > > But it's a validator application (built on top of the LTXML parser and > PyLTXML bindings) rather than a parser in itself; it doesn't give you a > DOM or SAX output, but there's nothing stopping you running it as a > pre-parse step. Or you could use Jython and run Xerxes. Also, Pirxx wraps Xerxes-C for Python, and this ought to let you to XML Schema validation (though I do not know for sure) - http://pirxx.sourceforge.net Cheers, Tom P From andyjmaclean at hotmail.com Fri Jan 9 03:22:18 2004 From: andyjmaclean at hotmail.com (Andrew Maclean) Date: Fri Jan 9 03:22:22 2004 Subject: [XML-SIG] validator crash during target reading Message-ID: Dear all, I read George's problem with the validator crash and I read Henry's reply. I have now fully qualified my path names withthe prefix file but it still crashes on me. Can anyone tell me what else I have missed? The code is below. Also, the example available at http://uche.ogbuji.net/tech/akara/nodes/2003-03-24/wxs-xsv didn't seem to run. I inserted some curly braces in the "printme" command and at least now it half-runs. # THE SCRIPT >>>from XSV.driver import runit >>>import sys >>>xmlfile = "file:///C:/myxmlfile.xml" >>>schemafile = "file:///C:/myxsdfile.xsd" >>>res = runit( xmlfile, [schemafile] ) >>>res[0].printme(sys.stdout, {}, {}, {}) validator crash during target reading # THE SCHEMA # THE TEST FILE Andy Maclean Thanks, Mr Andrew Maclean _________________________________________________________________ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger From ht at cogsci.ed.ac.uk Fri Jan 9 04:31:41 2004 From: ht at cogsci.ed.ac.uk (Henry S. Thompson) Date: Fri Jan 9 04:31:45 2004 Subject: [XML-SIG] validator crash during target reading In-Reply-To: (Andrew Maclean's message of "Fri, 09 Jan 2004 08:22:18 +0000") References: Message-ID: Your schema document is not well-formed XML, so the low-level XML parser has barfed on it. Uche's XSV driver does not surface that information, but it is available within XSV. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam] From chrish at cryptocard.com Fri Jan 9 11:34:12 2004 From: chrish at cryptocard.com (Chris Herborth) Date: Fri Jan 9 11:31:12 2004 Subject: [XML-SIG] Possible DTD parsing bug In-Reply-To: <20040109001039.GB5322@doxdesk.com> References: <3FFDC9DC.8030401@cryptocard.com> <20040109001039.GB5322@doxdesk.com> Message-ID: <3FFED804.9080503@cryptocard.com> Andrew Clover wrote: >>When parsing my XML docs, I get a warning that "foo" and "bar" are being >>defined again. > > I cannot get this to happen given your example, on PyXML 0.8.3 or 0.8, > without declaring a second ATTLIST on 'something', or referencing > attrs.control twice. And now I can't get it to happen; I also can't see anything in a diff of my DTD vs. its previous version that would make this go away. Strange... -- Chris Herborth chrish@cryptocard.com Documentation Overlord, CRYPTOCard Corp. http://www.cryptocard.com/ Never send a monster to do the work of an evil scientist. From list-matt at reprocessed.org Fri Jan 9 13:26:26 2004 From: list-matt at reprocessed.org (Matt Patterson) Date: Fri Jan 9 13:26:33 2004 Subject: [XML-SIG] Schema validation In-Reply-To: <3FFE1D10.6040509@comcast.net> References: <6585016B-41F6-11D8-865E-000393CBB978@reprocessed.org> <20040109005023.GC5322@doxdesk.com> <3FFE1D10.6040509@comcast.net> Message-ID: <56090BE6-42D1-11D8-865E-000393CBB978@reprocessed.org> On 9 Jan 2004, at 03:16, Thomas B. Passin wrote: > Andrew Clover wrote: > >> Matt Patterson wrote: >>> Is there a validating parser with Python wrappers that can use >>> Schemas to validate >> (More awkward silence.) Ah. >> IOW: not that I know of. There is XSV, which is written in Python - >> http://www.ltg.ed.ac.uk/~ht/xsv-status.html >> But it's a validator application (built on top of the LTXML parser and >> PyLTXML bindings) rather than a parser in itself; it doesn't give you >> a >> DOM or SAX output, but there's nothing stopping you running it as a >> pre-parse step. I seem to remember running into problems with XSV / Xerces not agreeing on validity: The schema I'm having to use has a lot of type constraints, and the production system which processes the XML files which I'm building a simple tester for (I'm working on the system which produces the XML in the first place, not the end storage and processing system - that's a different company (and project)) uses Xerces to validate our XML before it will process it. > Or you could use Jython and run Xerxes. Also, Pirxx wraps Xerxes-C > for Python, and this ought to let you to XML Schema validation (though > I do not know for sure) - At first sight Pirxx doesn't seem to have the right hooks, but Jython seems like a good prospect. I think for the moment I'll just continue to invoke a Xerces sample app which validates... Thanks, Matt -- Matt Patterson | Typographer | http://www.emdash.co.uk/ | http://reprocessed.org/ From andyjmaclean at hotmail.com Mon Jan 12 02:45:43 2004 From: andyjmaclean at hotmail.com (Andrew Maclean) Date: Mon Jan 12 02:45:49 2004 Subject: [XML-SIG] XSV / Zope - help needed Message-ID: Dear all, I need to validate XML files from within Zope (Silva Zope) against a schema. I have been trying this with XSV, the basic functionality of which I'm getting to grips with when accessed through scripts external to Zope. My problem is that Zope uses Python21 and XSV uses Python 22. I've tried to compile the XSV source unser Python 21 (to then smuggle it somehow into Zope) but first the compiler couldn't find cl.exe, then after installing Visual Studio it couldn't find stdlib.h.... Changing strategy, I went ahead with XSV compiled under Python2.2 thinking that I could use External Methods to obtain results from XSV-interacting scripts compiled under Python22, but to my horror and woe, I see that Zope recompiles the files that my External Method calls to. The python file: C:/NotInZope/talkToXSV.py is recompiled by Zope, which not understanding the XSV imports, strips the methods that reference them from the resulting .pyc All I wanted to do was validate an XML file from within Zope. Why is it so complicated? Before I change strategy (again) I was wondering if anyone can tell me where I could get hold of XSV prec-compiled under Python2.1 If they could also advise me on how to get these files inserted safely into my Silva-Zope installation I would be very, very grateful. Thanks Mr Andrew Maclean _________________________________________________________________ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo From ht at cogsci.ed.ac.uk Mon Jan 12 04:44:29 2004 From: ht at cogsci.ed.ac.uk (Henry S. Thompson) Date: Mon Jan 12 04:44:38 2004 Subject: [XML-SIG] XSV / Zope - help needed In-Reply-To: (Andrew Maclean's message of "Mon, 12 Jan 2004 07:45:43 +0000") References: Message-ID: I find it _very_ hard to believe that Zope is stuck at Python 2.1 -- a quick Google and browse of zope.org doesn't report that dependency. Surely the right way to solve this problem is to use a Python 2.2 version of Zope (Zope for the 21st century :-) Failing that, you _might_ find that using either ftp://ftp.cogsci.ed.ac.uk/pub/LTXML/PyLTXML125.EXE or ftp://ftp.cogsci.ed.ac.uk/pub/LTXML/PyLTXML124.EXE you _might_ be able to get XSV running with Python 2.1 You might also need to roll back XSV to make this work, to e.g. ftp://ftp.cogsci.ed.ac.uk/pub/XSV/XSV-2.0.tar.gz or ftp://ftp.cogsci.ed.ac.uk/pub/XSV/XSV-1.197-101.tar.gz But getting a 2.2 Zope is really a much better bet. I'm sorry, XSV is a one-man effort, and I really can't be responsible for keeping out-of-date versions working. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam] From fdrake at acm.org Mon Jan 12 07:27:20 2004 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Mon Jan 12 07:27:27 2004 Subject: [XML-SIG] XSV / Zope - help needed In-Reply-To: References: Message-ID: <16386.37544.613754.399884@sftp.fdrake.net> Andrew Maclean writes: > My problem is that Zope uses Python21 and XSV uses Python 22. I've Zope 2.6.x officially uses Python 2.1.x, but... we use Python 2.3.x for pretty much everything now, including Zope 2.6.3. I'd suggest picking up the just-released Zope 2.6.3 and testing it with your site, because that's what we'd use, if we didn't use Zope 2.7 (for which we support Python 2.3.3 to begin with). Information on the Zope 2.6.3 release is available at: http://zope.org/Products/Zope/2.6.3/zope_2_6_3_announce -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From andyjmaclean at hotmail.com Mon Jan 12 09:14:04 2004 From: andyjmaclean at hotmail.com (Andrew Maclean) Date: Mon Jan 12 09:14:08 2004 Subject: [XML-SIG] XSV / Zope - help needed Message-ID: Dear Fred, Thanks for the suggestion but it doesn't work. I tried to make the external mthod call a file in C:/test/XSVcode.py with the result that Zope (yes, the latest version) recompiled the XSVcode.py for me, after initially refusing to recognise the statement from XSV.driver import runit I then copied the folders "PyLTXML" and "XSV" from the Python22 installation to the folder C:\Program Files\Zope\lib\python This time the (Script)Python I used to test came up with a message in the browser to the effect of the Python22 .dlls used conflict with what Zope is using. I would have used pyLTXML / XSV / LTXML files copiled uder Python2.1 but I just can't get them to compile. The only way I ever got pyLTXML to compile under 2.2 was by using a .exe file for it. All attempts at doing it with the command prompt came up with "file something or other not found". I'm now looking at getting Xerces to work with Python but I'm finding nothing straightforward here either. What on earth should I do? Someone else out there must have validated XML using Zope (with Python 2.1) I'd be grateful for any ideas at all at this point, Mr Andrew Maclean _________________________________________________________________ Tired of 56k? Get a FREE BT Broadband connection http://www.msn.co.uk/specials/btbroadband From jbmaciokas at ucdavis.edu Mon Jan 12 13:41:55 2004 From: jbmaciokas at ucdavis.edu (James Maciokas) Date: Mon Jan 12 13:42:06 2004 Subject: [XML-SIG] install problem Message-ID: <200401121841.i0CIftN29796@citheronia.ucdavis.edu> On Thu, 18 Sep 2003 paul.boddie at ementor.no wrote: >> I checked around on my system and "/usr/lib/python2.3/config/" does not >> exist ("/usr/lib/python2.3/" does). >> >> Is this not one of those RPM issues where you have to install the >> python-devel package as well as the python one? I do wonder how useful it is >> for the distribution vendors in question to split Python up in this way. >Turns out that it is... thx. And no, it really isn't very useful, >especially not in cases like python, perl, ruby e.t.c. I mean when would >you not want the *-devel package? >Thanks for the helpful replies, >-- >kind regards >Henrik So how does one go about installing the python-devel package as well as the python one? James From tpassin at comcast.net Mon Jan 12 20:13:52 2004 From: tpassin at comcast.net (Thomas B. Passin) Date: Mon Jan 12 20:13:23 2004 Subject: [XML-SIG] XSV / Zope - help needed In-Reply-To: References: Message-ID: <40034650.6030704@comcast.net> Andrew Maclean wrote: > Dear Fred, > > Thanks for the suggestion but it doesn't work. I tried to make the > external mthod call a file in > > C:/test/XSVcode.py > > with the result that Zope (yes, the latest version) recompiled the > XSVcode.py for me, after initially refusing to recognise the statement > > from XSV.driver import runit > > I then copied the folders "PyLTXML" and "XSV" from the Python22 > installation to the folder > > C:\Program Files\Zope\lib\python > > This time the (Script)Python I used to test came up with a message in > the browser to the effect of the Python22 .dlls used conflict with what > Zope is using. > Well, .pyc files may have absolute paths in them, and don't always work if you move them to different directories. You need to get Zope itself working with Python 2.2 (if that is the version of xsv you have). Then you need to get the xsv packages into the Python path (I like to use .pth files, and you have to make sure they are in Zope's Python path - it is not uncommon to think that the Python path is set right, but it turns out to be the path of some other Pyton installation instead of Zope's). I would then delete any .pyc or .pyo files that may be in the xsv directories. Then restart Zope. You could load Zope's Python 2.2 interpreter from the command line and make sure that it can import the right xsv packages. At this point, your external method should be able to load your code. Cheers, Tom P From andyjmaclean at hotmail.com Tue Jan 13 07:46:07 2004 From: andyjmaclean at hotmail.com (Andrew Maclean) Date: Tue Jan 13 07:46:10 2004 Subject: [XML-SIG] XSV / Zope - help needed Message-ID: Dear all, in response to my last mail Thomas B Passin advised me "You need to get Zope itself working with Python 2.2". I would love to do this but have no idea how to. I need Zope to make a simple call to a file that uses XSV package (compiled under Python2.2) and after days of fiddling around can't get there. Some reports on the internet tell me it's possible. Others tell me it's not. I'm sure someone out there has managed to use XSV through a Zope application. I would be really, really grateful if that someone could tell me how they did it. Thanks, Mr Andrew Maclean _________________________________________________________________ Sign-up for a FREE BT Broadband connection today! http://www.msn.co.uk/specials/btbroadband From Alexandre.Fayolle at logilab.fr Tue Jan 13 09:10:25 2004 From: Alexandre.Fayolle at logilab.fr (Alexandre Fayolle) Date: Tue Jan 13 09:10:31 2004 Subject: [XML-SIG] sgmlop and html parsing Message-ID: <20040113141024.GD10235@calvin> Hello, I got a bug report about ns_parse.py in demo/xbel The problem is when, parsing a netscape bookmark file with &#xNN; character entities where xNN > x7F because this causes a ValueError in sgmlop: Traceback (most recent call last): File "/usr/bin/ns_parse", line 142, in ? the_parser.parse(file) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/drivers2/drv_sgmlop.py", line 50, in parse self.feed(buffer) ValueError: character reference ä exceeds ASCII range I've looked in the code, and I'm not sure how I can handle this, because encoding issues in drv_sgmlop.py only seem to be handled in the callback methods, and this problem occurs during before callbacks get called. Any help welcome. -- Alexandre Fayolle LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org D?veloppement logiciel avanc? - Intelligence Artificielle - Formations From ht at cogsci.ed.ac.uk Tue Jan 13 09:18:03 2004 From: ht at cogsci.ed.ac.uk (Henry S. Thompson) Date: Tue Jan 13 09:18:09 2004 Subject: [XML-SIG] XSV / Zope - help needed In-Reply-To: <16386.37544.613754.399884@sftp.fdrake.net> (Fred L. Drake, Jr.'s message of "Mon, 12 Jan 2004 07:27:20 -0500") References: <16386.37544.613754.399884@sftp.fdrake.net> Message-ID: "Fred L. Drake, Jr." writes: > Andrew Maclean writes: > > My problem is that Zope uses Python21 and XSV uses Python 22. I've > > Zope 2.6.x officially uses Python 2.1.x, but... we use Python 2.3.x > for pretty much everything now, including Zope 2.6.3. I'd suggest > picking up the just-released Zope 2.6.3 and testing it with your site, > because that's what we'd use, if we didn't use Zope 2.7 (for which we > support Python 2.3.3 to begin with). Information on the Zope 2.6.3 > release is available at: I'm trying to help Andrew with his problem, but finding information about building/installing Zope 2.6.3 with Python 2.2 (or 2.3) under Windows hard to come by -- the information in the release for building/running was pretty nearly invisible. So I tried unpacking the source distribution, then > python setup.py install which didn't fail, at great length :-), then > python z2.py which exited silently after a while, with no sign of a server running. Any advice on how to help out here would be welcome. Oops, I spoke too soon. Tried a bit harder, discovered that although w_pcgi.py assumed I was running under un*x and tried to do run configure, wo_pcgi.py was a bit better -- some problems with the space in Program Files paths. It crashed trying to run setup.py build_ext -i, so I did that by hand, commented it out, and it completed. Now I could do > python z2.py and get prompted to login when I try to browse to localhost:8080/manage as directed. However, server immediately crashes with a 130 error code. Launching it again, however, and trying just localhost:8080 seems to work! I would strongly suggest that someone on the Zope team package up a cleaned up/approved version of the above sequence of steps and include them in the release documentation, for those of us stuck running on Windoz. Further advice on how to do this better/cleaner of course still welcome -- next I'll try adding XSV. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam] From tpassin at comcast.net Tue Jan 13 09:59:05 2004 From: tpassin at comcast.net (Thomas B. Passin) Date: Tue Jan 13 09:58:30 2004 Subject: [XML-SIG] XSV / Zope - help needed In-Reply-To: References: <16386.37544.613754.399884@sftp.fdrake.net> Message-ID: <400407B9.50606@comcast.net> Henry S. Thompson wrote: > So I tried unpacking the source distribution, then > > > python setup.py install > > which didn't fail, at great length :-), then > > > python z2.py > > which exited silently after a while, with no sign of a server running. > > Any advice on how to help out here would be welcome. I just installed the binary distribution of the current 2.7 beta on Windows 2000 with no problems. Its own installer worked perfectly. I wouldn't try to compile from source on Windows, myself (although I did succeed in compiling an earlier version of Python under Cygwin). Cheers, Tom P From ht at inf.ed.ac.uk Tue Jan 13 10:04:30 2004 From: ht at inf.ed.ac.uk (Henry S. Thompson) Date: Tue Jan 13 10:04:33 2004 Subject: [XML-SIG] XSV / Zope - help needed In-Reply-To: <400407B9.50606@comcast.net> (Thomas B. Passin's message of "Tue, 13 Jan 2004 09:59:05 -0500") References: <16386.37544.613754.399884@sftp.fdrake.net> <400407B9.50606@comcast.net> Message-ID: "Thomas B. Passin" writes: > I just installed the binary distribution of the current 2.7 beta on > Windows 2000 with no problems. Its own installer worked perfectly. > I wouldn't try to compile from source on Windows, myself (although I > did succeed in compiling an earlier version of Python under Cygwin). I _believe_ that for the purposes I'm pursuing this, a source installation using the pre-resident Python 2.2 installation is required, so a binary install won't do. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam] From andyjmaclean at hotmail.com Tue Jan 13 10:17:39 2004 From: andyjmaclean at hotmail.com (Andrew Maclean) Date: Tue Jan 13 10:17:48 2004 Subject: [XML-SIG] External methods in Zope 2.7 Message-ID: Dear all, my quest to bring XSL functionality to my Zope interface has led me to Zope 2.7, which comes with Python 2.3 installed. But there's a problem! I can't get an ANY External Methods to work on it, even the simple string returning ones. The minute I click on "Add" the 404 page comes up in the main frame. Even if I'm saving to the wrong Extensions directory (I use the one in 'skel' but I've also tried the others) that shouldn't happen. Does anyone else have the same problem? Does anyone know the solution? Thank you everyone. Mr Andrew Maclean _________________________________________________________________ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger From andyjmaclean at hotmail.com Tue Jan 13 10:32:32 2004 From: andyjmaclean at hotmail.com (Andrew Maclean) Date: Tue Jan 13 11:57:11 2004 Subject: [XML-SIG] External Methods in Zope 2.7 Message-ID: Dear all, please ignore my last posting "External Methods in Zope 2.7". I know, I know. I'm tired, and forgot to "RTFM" cheers, Mr Andrew Maclean _________________________________________________________________ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo From andyjmaclean at hotmail.com Tue Jan 13 10:41:13 2004 From: andyjmaclean at hotmail.com (Andrew Maclean) Date: Tue Jan 13 11:57:13 2004 Subject: [XML-SIG] apologise Message-ID: Dear all, please do ignore the last thing that I posted - I hadn't RTFM-ed. I know...I'm tired. Cheers, Andy _________________________________________________________________ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger From dieter at handshake.de Tue Jan 13 13:31:50 2004 From: dieter at handshake.de (Dieter Maurer) Date: Tue Jan 13 13:52:06 2004 Subject: [XML-SIG] XSV / Zope - help needed In-Reply-To: References: Message-ID: <16388.14742.232931.466239@gargle.gargle.HOWL> Andrew Maclean wrote at 2004-1-13 12:46 +0000: >in response to my last mail Thomas B Passin advised me "You need to get Zope >itself working with Python 2.2". I would love to do this but have no idea >how to. I need Zope to make a simple call to a file that uses XSV package >(compiled under Python2.2) and after days of fiddling around can't get >there. Some reports on the internet tell me it's possible. Others tell me >it's not. I'm sure someone out there has managed to use XSV through a Zope >application. I would be really, really grateful if that someone could tell >me how they did it. Read "/doc/INSTALL.txt". You will need a C development system and "development information" for your "Python" (makefile, config file, ...). -- Dieter From martin at v.loewis.de Tue Jan 13 15:31:36 2004 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Tue Jan 13 15:31:53 2004 Subject: [XML-SIG] sgmlop and html parsing In-Reply-To: <20040113141024.GD10235@calvin> References: <20040113141024.GD10235@calvin> Message-ID: <400455A8.3090008@v.loewis.de> Alexandre Fayolle wrote: > I've looked in the code, and I'm not sure how I can handle this, because > encoding issues in drv_sgmlop.py only seem to be handled in the callback > methods, and this problem occurs during before callbacks get called. This should happen only if self->unicode is false. This is XML parsing, right? If so, you should enable self->unicode, and it will give you a unicode character (in handle_data). If you want to fix it in sgmlop instead of in the application, you could do what the comment suggests: encode the charref as UTF-8, and pass a byte string. This is error-prone, though: the application may not expect UTF-8. As another alternative, in the application, you could activate the handle_charref callback - it is actually considered *before* sgmlop tries to deal with the character reference itself. I'm not quite sure why drv_sgmlop creates a SGMLParser though - shouldn't it rather create an XMLParser? If not, implementing handle_charref would be the way to go - but only if there are convincing arguments why drv_sgmlop need to continue favouring SGML. Regards, Martin From derekfountain at yahoo.co.uk Tue Jan 13 21:24:52 2004 From: derekfountain at yahoo.co.uk (Derek Fountain) Date: Tue Jan 13 21:21:30 2004 Subject: [XML-SIG] 4Suite XSLT usage Message-ID: <200401141024.52950.derekfountain@yahoo.co.uk> I have an XML file with an associated XSLT file. 2nd line of the XML is: When using libxml2's xsltproc the XSLT stylesheet is correctly picked up and used when the tool is given just the XML filename. Does 4xslt have this functionality? The help suggests it does because it has a flag to "Ignore instructions", but when I leave the stylesheet name out of the command line I get a "No stylesheets to process." error. Did I do something wrong, or does the 4suite tool not do this? -- > eatapple core dump From derekfountain at yahoo.co.uk Tue Jan 13 21:49:27 2004 From: derekfountain at yahoo.co.uk (Derek Fountain) Date: Tue Jan 13 21:46:06 2004 Subject: [XML-SIG] 4Suite XSLT usage In-Reply-To: <200401141024.52950.derekfountain@yahoo.co.uk> References: <200401141024.52950.derekfountain@yahoo.co.uk> Message-ID: <200401141049.27910.derekfountain@yahoo.co.uk> On Wednesday 14 January 2004 10:24, Derek Fountain wrote: > I have an XML file with an associated XSLT file. 2nd line of the XML is: > > > > When using libxml2's xsltproc the XSLT stylesheet is correctly picked up > and used when the tool is given just the XML filename. Does 4xslt have this > functionality? The help suggests it does because it has a flag to "Ignore > instructions", but when I leave the stylesheet name > out of the command line I get a "No stylesheets to process." error. > > Did I do something wrong, or does the 4suite tool not do this? Oh look - it's a FAQ. Ahem... Sorry, don't mind me... :o} -- > eatapple core dump From amit.shah at iflexsolutions.com Tue Jan 13 22:43:40 2004 From: amit.shah at iflexsolutions.com (amit.shah@iflexsolutions.com) Date: Tue Jan 13 22:35:15 2004 Subject: [XML-SIG] suscription Message-ID: pls. unsuscribe. member Amit Shah DISCLAIMER: This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20040114/2786be34/attachment.html From mike at skew.org Wed Jan 14 00:50:54 2004 From: mike at skew.org (Mike Brown) Date: Wed Jan 14 00:50:53 2004 Subject: [XML-SIG] 4Suite XSLT usage In-Reply-To: <200401141049.27910.derekfountain@yahoo.co.uk> "from Derek Fountain at Jan 14, 2004 10:49:27 am" Message-ID: <200401140550.i0E5osW8042067@chilled.skew.org> Derek Fountain wrote: > On Wednesday 14 January 2004 10:24, Derek Fountain wrote: > > I have an XML file with an associated XSLT file. 2nd line of the XML is: > > > > > > > > When using libxml2's xsltproc the XSLT stylesheet is correctly picked up > > and used when the tool is given just the XML filename. Does 4xslt have this > > functionality? The help suggests it does because it has a flag to "Ignore > > instructions", but when I leave the stylesheet name > > out of the command line I get a "No stylesheets to process." error. > > > > Did I do something wrong, or does the 4suite tool not do this? > > Oh look - it's a FAQ. Ahem... Sorry, don't mind me... :o} Yep. Also, we don't encourage it, but you can add text/xsl to the recognized types. You can do this only if you're invoking the processor from Python rather than using the 4xslt command-line tool. To do it, do # import the Processor module from Ft.Xml.Xslt import Processor # modify the module-level constant XSLT_IMT before # instantiating the Processor class Processor.XSLT_IMT.append('text/xsl') proc = Processor.Processor() # proceed as normal with the processor instance # ... And as you already discovered, you should direct your 4Suite questions to the general 4suite mailing list. -Mike From Alexandre.Fayolle at logilab.fr Wed Jan 14 04:08:58 2004 From: Alexandre.Fayolle at logilab.fr (Alexandre Fayolle) Date: Wed Jan 14 04:09:09 2004 Subject: [XML-SIG] sgmlop and html parsing In-Reply-To: <400455A8.3090008@v.loewis.de> References: <20040113141024.GD10235@calvin> <400455A8.3090008@v.loewis.de> Message-ID: <20040114090857.GA2014@calvin> On Tue, Jan 13, 2004 at 09:31:36PM +0100, "Martin v. L?wis" wrote: > Alexandre Fayolle wrote: > > >I've looked in the code, and I'm not sure how I can handle this, because > >encoding issues in drv_sgmlop.py only seem to be handled in the callback > >methods, and this problem occurs during before callbacks get called. > > This should happen only if self->unicode is false. This is XML parsing, > right? If so, you should enable self->unicode, and it will give you > a unicode character (in handle_data). This is netscape bookmark parsing, so this is not well formed XML (lots of tags are not closed). demo/xbel/ns_parse.py calls sax2exts.SGMLParserFactory.make_parser(), so I expect it to return an SGML parser, and not an XML reader. > If you want to fix it in sgmlop instead of in the application, you could > do what the comment suggests: encode the charref as UTF-8, and pass a > byte string. This is error-prone, though: the application may not expect > UTF-8. I'm not too keen on this approach. > As another alternative, in the application, you could activate the > handle_charref callback - it is actually considered *before* sgmlop > tries to deal with the character reference itself. I'll give this a try, and keep the list posted. Thanks for your quick answer. -- Alexandre Fayolle LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org D?veloppement logiciel avanc? - Intelligence Artificielle - Formations From Alexandre.Fayolle at logilab.fr Wed Jan 14 05:49:06 2004 From: Alexandre.Fayolle at logilab.fr (Alexandre Fayolle) Date: Wed Jan 14 05:49:11 2004 Subject: [XML-SIG] sgmlop and html parsing In-Reply-To: <20040114090857.GA2014@calvin> References: <20040113141024.GD10235@calvin> <400455A8.3090008@v.loewis.de> <20040114090857.GA2014@calvin> Message-ID: <20040114104906.GB2014@calvin> Here's the patch I came up with. It fixes the bug that was reported on Debian (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=227219), but I'd like to have some feedback before committing the change to the CVS. diff -u -r1.7 drv_sgmlop.py --- xml/sax/drivers2/drv_sgmlop.py 21 Jan 2003 12:42:28 -0000 1.7 +++ xml/sax/drivers2/drv_sgmlop.py 14 Jan 2004 10:40:00 -0000 @@ -99,6 +99,29 @@ if self._lexical_handler is not None: self._lexical_handler.comment(to_xml_string(data,self._encoding)) + def handle_charref(self, name): + try: + if name[0] == 'x': + n = int(name[1:], 16) + else: + n = int(name) + except ValueError: + self.unknown_charref(name) + return + try: + unichar = unichr(n) + except NameError: + if not 0 <= n <= 255: + self.unknown_charref(name) + return + self.handle_data(chr(n)) + else: + prev_encoding = self.getProperty(handler.property_encoding) + self.setProperty(handler.property_encoding, 'utf-8') + self.handle_data(unichar.encode('utf-8')) + self.setProperty(handler.property_encoding, prev_encoding) + + def setProperty(self,name,value): if name == handler.property_lexical_handler: self._lexical_handler = value @@ -113,6 +136,7 @@ return self._encoding raise SAXNotRecognizedException("Property '%s' not recognized" % name) + ## def getFeature(self, name): ## if name == handler.feature_namespaces: ## return self._namespaces -- Alexandre Fayolle LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org D?veloppement logiciel avanc? - Intelligence Artificielle - Formations From walter at livinglogic.de Wed Jan 14 08:04:41 2004 From: walter at livinglogic.de (=?ISO-8859-1?Q?Walter_D=F6rwald?=) Date: Wed Jan 14 08:04:48 2004 Subject: [XML-SIG] sgmlop and html parsing In-Reply-To: <20040114104906.GB2014@calvin> References: <20040113141024.GD10235@calvin> <400455A8.3090008@v.loewis.de> <20040114090857.GA2014@calvin> <20040114104906.GB2014@calvin> Message-ID: <40053E69.3020405@livinglogic.de> Alexandre Fayolle wrote: > Here's the patch I came up with. It fixes the bug that was reported on > Debian (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=227219), but > I'd like to have some feedback before committing the change to the CVS. Wouldn't it make sense to implement an SGMLParser that supports unicode? The best solution would be to have the encoding as an accessible attribute in the parser. This would make it possible for the application to set the encoding, when is encountered. Bye, Walter D?rwald From tpassin at comcast.net Wed Jan 14 09:26:17 2004 From: tpassin at comcast.net (Thomas B. Passin) Date: Wed Jan 14 09:25:45 2004 Subject: [XML-SIG] sgmlop and html parsing In-Reply-To: <20040114090857.GA2014@calvin> References: <20040113141024.GD10235@calvin> <400455A8.3090008@v.loewis.de> <20040114090857.GA2014@calvin> Message-ID: <40055189.7060904@comcast.net> Alexandre Fayolle wrote: >> >>This should happen only if self->unicode is false. This is XML parsing, >>right? If so, you should enable self->unicode, and it will give you >>a unicode character (in handle_data). > > > This is netscape bookmark parsing, so this is not well formed XML (lots > of tags are not closed). > > demo/xbel/ns_parse.py calls sax2exts.SGMLParserFactory.make_parser(), so > I expect it to return an SGML parser, and not an XML reader. I took a different approach. To parse Netscape bookmark files, I just take the default parser, and handle the encoding downstream using a few patches in the downstream code to handle encoding. (I have found that setting the encoding to utf-8 works reliably in Mozilla-derived browsers on Windows 2000. Here is the relevant part of my modification to ns_parse.py - import codecs ENCODING = 'utf-8' (encoder,decoder,reader,writer) = codecs.lookup(ENCODING) ns_handler=NetscapeHandler() the_parser = sax2exts.SGMLParserFactory.make_parser() the_parser.setContentHandler(ns_handler) the_parser.setProperty(handler.property_encoding, ENCODING) file = open(sys.argv[1], 'r') the_parser.parse(file) bms = ns_handler.bms if len(sys.argv)==3: out=writer(open(sys.argv[2],"w")) bms.dump_xbel(out,ENCODING) out.close() else: out = writer(sys.stdout) bms.dump_xbel(out,ENCODING) You need to pass an ENCODING along so that the eventual serializer can put it into the xml declaration. Here, with utf-8, the declaration could be omitted, but I seem to need to use iso-8859-1 for IE, so it is needed. Oh, yes, I escape characters in the serializer, too. These changes only require small changes to the existing code, but they are really needed. Example - def dump_xbel(self,out,encoding): if self.id: ID = ' id="%s"' % self.id else: ID = "" out.write('\n\n' % (encoding,ID)) if self.title: title_str = " %s\n" % escape(self.title) out.write(title_str) # ... etc. In a year, I have not had one failure with my Mozilla, Firebird, and IE bookmarks. After serializing to XBEL format, I run the files through several xslt stylesheets, so any encoding problems would surface at that point. Before I added encoding and escaping to the code, I was being driven nuts by encoding problems. Cheers, Tom P From Alexandre.Fayolle at logilab.fr Wed Jan 14 09:36:52 2004 From: Alexandre.Fayolle at logilab.fr (Alexandre Fayolle) Date: Wed Jan 14 09:36:58 2004 Subject: [XML-SIG] sgmlop and html parsing In-Reply-To: <40055189.7060904@comcast.net> References: <20040113141024.GD10235@calvin> <400455A8.3090008@v.loewis.de> <20040114090857.GA2014@calvin> <40055189.7060904@comcast.net> Message-ID: <20040114143652.GG2014@calvin> On Wed, Jan 14, 2004 at 09:26:17AM -0500, Thomas B. Passin wrote: > Alexandre Fayolle wrote: > >> > >>This should happen only if self->unicode is false. This is XML parsing, > >>right? If so, you should enable self->unicode, and it will give you > >>a unicode character (in handle_data). > > > > > >This is netscape bookmark parsing, so this is not well formed XML (lots > >of tags are not closed). > > > >demo/xbel/ns_parse.py calls sax2exts.SGMLParserFactory.make_parser(), so > >I expect it to return an SGML parser, and not an XML reader. > > I took a different approach. To parse Netscape bookmark files, I just > take the default parser, and handle the encoding downstream using a few > patches in the downstream code to handle encoding. (I have found that > setting the encoding to utf-8 works reliably in Mozilla-derived browsers > on Windows 2000. Would you mind committing your changes to the CVS so that they can ship in pyxml 0.8.4 ? Your patch are likely to be better than mine since you seem to be using the tools on a daily basis. -- Alexandre Fayolle LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org D?veloppement logiciel avanc? - Intelligence Artificielle - Formations From martin at v.loewis.de Wed Jan 14 13:55:52 2004 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Wed Jan 14 13:56:28 2004 Subject: [XML-SIG] sgmlop and html parsing In-Reply-To: <20040114104906.GB2014@calvin> References: <20040113141024.GD10235@calvin> <400455A8.3090008@v.loewis.de> <20040114090857.GA2014@calvin> <20040114104906.GB2014@calvin> Message-ID: <400590B8.6080201@v.loewis.de> Alexandre Fayolle wrote: > + prev_encoding = self.getProperty(handler.property_encoding) > + self.setProperty(handler.property_encoding, 'utf-8') > + self.handle_data(unichar.encode('utf-8')) > + self.setProperty(handler.property_encoding, prev_encoding) I think you should not set property_encoding if you can avoid that. Instead, you should try to encode the character in self._encoding. Converting to UTF-8 would then become necessary as a fallback - or you should invoke unknown_charref. Also, it is questionable whether the character reference really *does* denote a Unicode character. In SGML, the DTD (or some such) determines the document character set, and it could be anything. Of course, if you happen to know that you are parsing HTML, then the character set would be Latin-1. Dunno what it is for bookmarks (probably Unicode). Regards, Martin From martin at v.loewis.de Wed Jan 14 14:03:35 2004 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Wed Jan 14 14:03:48 2004 Subject: [XML-SIG] sgmlop and html parsing In-Reply-To: <40053E69.3020405@livinglogic.de> References: <20040113141024.GD10235@calvin> <400455A8.3090008@v.loewis.de> <20040114090857.GA2014@calvin> <20040114104906.GB2014@calvin> <40053E69.3020405@livinglogic.de> Message-ID: <40059287.3040303@v.loewis.de> Walter D?rwald wrote: > Wouldn't it make sense to implement an SGMLParser that supports > unicode? No. In SGML, the SGML declaration defines the document encoding, e.g. CHARSET BASESET "ISO 646:1983//CHARSET International Reference Version (IRV)//ESC 2/5 4/0" DESCSET 0 9 UNUSED 9 2 9 11 2 UNUSED 13 1 13 14 18 UNUSED 32 95 32 127 1 UNUSED BASESET "ISO Registration Number 100//CHARSET ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1" DESCSET 128 32 UNUSED 160 96 32 So to understand a character reference, you have to know the SGML declaration. It is Unicode only if the declaration says CHARSET BASESET "ISO Registration Number 177//CHARSET ISO/IEC 10646-1:1993 UCS-4 with implementation level 3//ESC 2/5 2/15 4/6" Regards, Martin From walter at livinglogic.de Wed Jan 14 14:32:56 2004 From: walter at livinglogic.de (=?ISO-8859-1?Q?Walter_D=F6rwald?=) Date: Wed Jan 14 14:33:04 2004 Subject: [XML-SIG] sgmlop and html parsing In-Reply-To: <40059287.3040303@v.loewis.de> References: <20040113141024.GD10235@calvin> <400455A8.3090008@v.loewis.de> <20040114090857.GA2014@calvin> <20040114104906.GB2014@calvin> <40053E69.3020405@livinglogic.de> <40059287.3040303@v.loewis.de> Message-ID: <40059968.7000008@livinglogic.de> Martin v. L?wis wrote: > Walter D?rwald wrote: > >> Wouldn't it make sense to implement an SGMLParser that supports >> unicode? > > No. In SGML, the SGML declaration defines the document encoding, e.g. > [...] > So to understand a character reference, you have to know the SGML > declaration. It is Unicode only if the declaration says > [...] At least it would help for parsing HTML. Setting the encoding attribute to None would return 8bit strings from the parser, so it's the job of the application to decode them. Bye, Walter D?rwald From martin at v.loewis.de Wed Jan 14 14:39:54 2004 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Wed Jan 14 14:40:24 2004 Subject: [XML-SIG] sgmlop and html parsing In-Reply-To: <40059968.7000008@livinglogic.de> References: <20040113141024.GD10235@calvin> <400455A8.3090008@v.loewis.de> <20040114090857.GA2014@calvin> <20040114104906.GB2014@calvin> <40053E69.3020405@livinglogic.de> <40059287.3040303@v.loewis.de> <40059968.7000008@livinglogic.de> Message-ID: <40059B0A.9030005@v.loewis.de> Walter D?rwald wrote: > At least it would help for parsing HTML. Setting the encoding > attribute to None would return 8bit strings from the parser, > so it's the job of the application to decode them. Certainly. Feel free to commit a patch; you would then need to expose the feature to drv_sgmlop (probably as a SAX feature), and then maybe make use of the feature in XBEL. Regards, Martin From tpassin at comcast.net Wed Jan 14 19:54:04 2004 From: tpassin at comcast.net (Thomas B. Passin) Date: Wed Jan 14 19:53:25 2004 Subject: [XML-SIG] sgmlop and html parsing In-Reply-To: <20040114143652.GG2014@calvin> References: <20040113141024.GD10235@calvin> <400455A8.3090008@v.loewis.de> <20040114090857.GA2014@calvin> <40055189.7060904@comcast.net> <20040114143652.GG2014@calvin> Message-ID: <4005E4AC.70707@comcast.net> Alexandre Fayolle wrote: > On Wed, Jan 14, 2004 at 09:26:17AM -0500, Thomas B. Passin wrote: >>I took a different approach. To parse Netscape bookmark files, I just >>take the default parser, and handle the encoding downstream using a few >>patches in the downstream code to handle encoding. (I have found that >>setting the encoding to utf-8 works reliably in Mozilla-derived browsers >>on Windows 2000. > > > Would you mind committing your changes to the CVS so that they can ship > in pyxml 0.8.4 ? Your patch are likely to be better than mine since you > seem to be using the tools on a daily basis. > I am agreeable if no one objects and if I can get the commit working. I used to have problems, but now that I am committing to my TM4JScript project, I can probably work out how to do it. Cheers, Tom P From jedp at ilm.com Fri Jan 16 20:09:31 2004 From: jedp at ilm.com (Jed Parsons) Date: Fri Jan 16 20:09:39 2004 Subject: [XML-SIG] 4suite and python2.3.2? Message-ID: <20040116170931.A16076@ilm.com> Hello - I had it working fine with python 2.1, but I'm having trouble getting 4suite working with python 2.3.2. I've installed PyXML-0.8.3, and have tried 4Suite-1.0a1, 2, and 3. Some things work, some things do not. In particular, I can't get the xslt tools to work: > python Python 2.3.2 (#1, Oct 13 2003, 14:53:27) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Ft.Xml >>> from Ft.Xml import InputSource >>> st = InputSource.DefaultFactory.fromString("", 'no-uri') >>> from Ft.Xml.Xslt.Processor import Processor # hangs forever, but can be interrupted with ctrl-c ... Same thing happens from the command line. At the command line, when I hit ctrl-c, the usage messages get flushed and printed as the program terminates. (If that's any help.) Many thanks for any advice, or any documentation anyone could point me to. Jed -- Jed Parsons / Industrial Light + Magic : 415.448.2974 grep(do{for(ord){$o+=$_&7;grep(vec($j,+$o++,1)=1,5..($_>>3||print"$j\n"))}}, (split(//,"))*))2+29*2:.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:\7Glug!"))); From hinsen at cnrs-orleans.fr Sun Jan 18 13:44:11 2004 From: hinsen at cnrs-orleans.fr (Konrad Hinsen) Date: Sun Jan 18 13:44:17 2004 Subject: [XML-SIG] DTD parsing error Message-ID: <4E45FF15-49E6-11D8-B219-000A95AB5F10@cnrs-orleans.fr> I am trying to work on a DocBook file (XML version 4.1) using Python 2.2 or 2.3 and PyXML 0.8.3 (xml.ext.reader.Sax2). I get the error message ERROR: Construct started, but never completed at /sw/share/xml/dtd/docbookx/4.1/docbook.cat:59:79 TEXT: ' ' Position 79 of line 59 is the end of the file. The same script worked fine a year ago, using some earlier PyXML release. Any idea what's going wrong? Konrad. From matt at reprocessed.org Mon Jan 19 11:11:50 2004 From: matt at reprocessed.org (Matt Patterson) Date: Mon Jan 19 11:12:02 2004 Subject: [XML-SIG] Python bindings for Berkeley DB XML Message-ID: <30452B84-4A9A-11D8-B342-000393CBB978@reprocessed.org> Hello, I've just built and installed all the bits for DB XML, except the Python bindings. Mindful of the report at the DB XML blog about Python 2.3 ( http://www.merrells.com/john/dbxml/archives/cat_faq.html#000228 ) problems, with clashes with the installed bsddb module and DB 4.1. I've tried installing pybsddb3 but I get Fatal Python error: Interpreter not initialized (version mismatch?) when I try to run its test.py Has anyone managed to successfully install DB XML and the python bindings on Python 2.3.3 with DB XML 1.2 and DB 4.2.52 (on OS X would be even better!) and if so, how did they do it? Thanks, Matt From santee_sawant at yahoo.co.in Wed Jan 21 01:55:59 2004 From: santee_sawant at yahoo.co.in (=?iso-8859-1?q?santosh=20sawant?=) Date: Wed Jan 21 01:56:04 2004 Subject: [XML-SIG] PyXml-0.8.1 installation help required... Message-ID: <20040121065559.19933.qmail@web8205.mail.in.yahoo.com> Hi, Please help me out in installing pyXml-0.8.1. I am newbies at zope development. I want to install ParsedXML 1.3.1 on Zope 2.6.3, on windows 2000 server. Python 2.1 is installed at c:\ and zope is installed inside program files folder of c: drive. I don't know how to, where to install pyxml. As you have written in Readme text file, to compile 1) Run "python setup.py build" to copy *.py files and compile the C extensions. 2) To install everything in the site-packages directory as an xml/ package, run "python setup.py install". But where from I should compile those file, and should I move any folder inside zope developement folder. Plz let me know ASAP. Thanks. Regards, Santee ________________________________________________________________________ Yahoo! India Mobile: Download the latest polyphonic ringtones. Go to http://in.mobile.yahoo.com From dieter at handshake.de Wed Jan 21 15:00:52 2004 From: dieter at handshake.de (Dieter Maurer) Date: Wed Jan 21 15:26:16 2004 Subject: [XML-SIG] PyXml-0.8.1 installation help required... In-Reply-To: <20040121065559.19933.qmail@web8205.mail.in.yahoo.com> References: <20040121065559.19933.qmail@web8205.mail.in.yahoo.com> Message-ID: <16398.55924.247169.482739@gargle.gargle.HOWL> santosh sawant wrote at 2004-1-21 06:55 +0000: >Please help me out in installing pyXml-0.8.1. >I am newbies at zope development. >I want to install ParsedXML 1.3.1 on Zope 2.6.3, on >windows 2000 server. Python 2.1 is installed at c:\ >and zope is installed inside program files folder of >c: drive. > >I don't know how to, where to install pyxml. >As you have written in Readme text file, to compile > >1) Run "python setup.py build" to copy *.py files and >compile the C extensions. > >2) To install everything in the site-packages >directory as an xml/ package, run "python setup.py >install". > >But where from I should compile those file, and should >I move any folder inside zope developement folder. Do this with the "python" you use to run Zope. This python should know where to place the package such that all applications using this interpreter should be able to access it. However, you may need to have a C compiler on your computer to build the "C" extensions yourself. They tend to be expensive... There probably is a "PyXML" binary for Windows and you should probably install this (rather than trying to build the extensions yourself). Find the binary installer and read its instructions... -- Dieter From matt at reprocessed.org Thu Jan 22 16:10:49 2004 From: matt at reprocessed.org (Matt Patterson) Date: Thu Jan 22 16:10:58 2004 Subject: [XML-SIG] Bug in DOM Range support in pyXML 0.8.3 Message-ID: <745E710B-4D1F-11D8-B1B3-000393CBB978@reprocessed.org> Hello, I've been using DOM Range to slice XML into arbitrary 'pages', but have run across what seems to be a bug. The range.commonAncestorContainer() method doesn't return the common ancestor of the range: it returns the parent of whichever of the boundary points is closest to the document root (in terms of the tree). If both boundary points share the same parent then it appears to perform correctly. The documentFragment returned by cloneContents()/extractContents() is exactly right though. I'm running Python 2.3.3 and PyXML 0.8.3, all built from source on Mac OS X 10.3. I created the DOM tree with xml.dom.ext.reader.Sax2, so I assume it's a 4DOM problem. I have a simple example demonstrating this, so I'll report it at Sourceforge and post the files there. I'm not sure if I should report this to PyXML or 4suite. If anyone wants the files (a .py and 4 sample .xmls) then drop me a line. Thanks, Matt -- Matt Patterson | Typographer | http://www.emdash.co.uk/ | http://reprocessed.org/ From bf at ypsilon.net Fri Jan 23 14:34:17 2004 From: bf at ypsilon.net (Bart Frackiewicz) Date: Fri Jan 23 14:26:40 2004 Subject: [XML-SIG] xml.marshal and Unicode Message-ID: <40117739.3000304@ypsilon.net> Hi, i get an error, when i try to use xml.marshal (pyXML 0.8.3) on a http-response, which i hold in a variable (i[1]). response = i[1] print generic.loads(response) Traceback (most recent call last): [snip] File "/usr/lib/python2.3/site-packages/_xmlplus/sax/drivers/drv_pyexpat.py", line 45, in startElement self.doc_handler.startElement(name,saxutils.AttributeMap(at)) File "/usr/lib/python2.3/site-packages/_xmlplus/marshal/generic.py", line 369, in startElement sm, em = self.unmarshal_meth[name] exceptions.KeyError: u'RESPONSE_CONVERSATION' The response is unicode, okay, but this should not be a problem. Any idea, where i have the mistake? TIA, Bart From bauer at mit.edu Fri Jan 23 18:00:57 2004 From: bauer at mit.edu (bauer@mit.edu) Date: Fri Jan 23 18:01:01 2004 Subject: [XML-SIG] great python xml frustrations Message-ID: <20040123230057.GB31888@mit.edu> I am probably lacking a big clue here, but I have been fighting with this for a bit and thought perhaps someone could enlighten me. I want to add elements from different documents to create a new dom. A simple example: test.py: -------------------------------- from xml.dom import Document import xml.dom.minidom doc = xml.dom.minidom.parseString("Test Document") newdoc = Document.Document(None) newelement = newdoc.createElement("Element1") importedNode = newdoc.importNode(doc.childNodes[0],1) newelement.appendChild(importedNode) -------------------------------- When I run this program though I get the following error: [prompt:] python test.py Traceback (most recent call last): File "test.py", line 7, in ? importedNode = newdoc.importNode(doc.childNodes[0],1) File "/usr/local/lib/python2.3/site-packages/_xmlplus/dom/Document.py", line 163, in importNode return importedNode.cloneNode(deep, newOwner=self) TypeError: cloneNode() got an unexpected keyword argument 'newOwner' I am running python 2.3.3, and have PyXML-0.8.3 and 4Suite installed. Not sure where the problem actually is so I have tried a number of different versions of 4Suite. Any help would be greatly appreciated. Thanks, Steve From and-xml at doxdesk.com Fri Jan 23 18:33:30 2004 From: and-xml at doxdesk.com (Andrew Clover) Date: Fri Jan 23 18:54:19 2004 Subject: [XML-SIG] great python xml frustrations In-Reply-To: <20040123230057.GB31888@mit.edu> References: <20040123230057.GB31888@mit.edu> Message-ID: <20040123233330.GA15045@doxdesk.com> bauer@mit.edu wrote: > I want to add elements from different documents to create > a new dom. > from xml.dom import Document > import xml.dom.minidom Look out! You aren't just using different documents there - you're using different DOM implementations. xml.dom.Document comes from 4DOM, an implementation unconnected to minidom (other than them both being distributed in the _xmlplus package). The DOM standard does not guarantee that it should be possible to import a node from one implementation to another. It's technically possible to implement, but neither minidom nor 4DOM do so for now. > newdoc = Document.Document(None) Instantiating a class directly like this isn't generally a good idea: constructors are not a part of the DOM standard, so what they do is implementation-specific and can cause unforeseen problems in Python DOMs. Instead, use the createDocument method on a DOMImplementation. For example, to create a new minidom Document: imp= xml.dom.minidom.getDOMImplementation() doc= imp.createDocument(None, 'rootelname', None) See also xml.dom.domreg. -- Andrew Clover mailto:and@doxdesk.com http://www.doxdesk.com/ From martin at v.loewis.de Sun Jan 25 03:51:21 2004 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Sun Jan 25 03:51:40 2004 Subject: [XML-SIG] xml.marshal and Unicode In-Reply-To: <40117739.3000304@ypsilon.net> References: <40117739.3000304@ypsilon.net> Message-ID: <40138389.3000604@v.loewis.de> Bart Frackiewicz wrote: > Traceback (most recent call last): > [snip] File > "/usr/lib/python2.3/site-packages/_xmlplus/sax/drivers/drv_pyexpat.py", > line 45, in startElement > self.doc_handler.startElement(name,saxutils.AttributeMap(at)) > File "/usr/lib/python2.3/site-packages/_xmlplus/marshal/generic.py", > line 369, in startElement > sm, em = self.unmarshal_meth[name] > exceptions.KeyError: u'RESPONSE_CONVERSATION' > > The response is unicode, okay, but this should not be a problem. Any > idea, where i have the mistake? There is no unmarshal method for RESPONSE_CONVERSATION defined. Regards, Martin From noreply at sourceforge.net Mon Jan 26 09:06:32 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Mon Jan 26 09:06:35 2004 Subject: [XML-SIG] [ pyxml-Bugs-884766 ] xpath misclassifies "*" after "(", "[", "+" Message-ID: Bugs item #884766, was opened at 2004-01-26 14:06 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=884766&group_id=6473 Category: 4Suite (inactive) Group: None Status: Open Resolution: None Priority: 5 Submitted By: Dieter Maurer (dmaurer) Assigned to: Nobody/Anonymous (nobody) Summary: xpath misclassifies "*" after "(", "[", "+" Initial Comment: xpath (PyXML 0.8.3) classifies "*" as "multiplication operator" after "(", "[" and "+". It should instead be a node test. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=884766&group_id=6473 From chrish at cryptocard.com Mon Jan 26 14:43:38 2004 From: chrish at cryptocard.com (Chris Herborth) Date: Mon Jan 26 14:39:13 2004 Subject: [XML-SIG] entity handling Message-ID: <40156DEA.4050607@cryptocard.com> I'm currently creating DOMs from my documents thusly: from xml.dom.ext.reader import Sax2 from FindEntities import FindEntities reader = Sax2.Reader( validate = True ) reader.parser.setEntityResolver( FindEntities() ) def getDOM( filename, error_output = None ): """ Return the processed DOM for the given XML file. error_output - a string or file object; errors/warnings will be written there... default is stderr. """ setErrorHandler( error_output ) return reader.fromStream( file( filename ) ) This is working well and validating properly. I want to be able to handle entities myself in my DOM application instead of having their data automatically converted to whatever text they have in the entity declaration. Unfortunately, I haven't been able to figure out _how_ to do this, despite digging through the maze of twisty passages (PyXML 0.8.3) for a few hours. I've tried adding this bits: class MyHandler( Sax2.XmlDomGenerator ): def __init__( self, keepAllWs=0, implementation=implementation ): Sax2.XmlDomGenerator.__init__( self, keepAllWs, implementation ) def skippedEntity( self, name ): """ Found an entity, preserve it... """ print "===> &%s;" % ( name, ) self._completeTextNode() self._nodeStack[-1].appendChild(\ self._ownerDoc.createEntityReference( name ) ) and using this to create the reader: reader = Sax2.Reader( validate = True, saxHandlerClass = MyHandler ) reader.parser.setFeature( xml.sax.handler.feature_external_ges, 0 ) This gives me a "feature not supported" exception at the setFeature() call. Is having entities in the DOM contrary to "proper" DOM application design or something? To me, this seems like something that should be reasonably easy to do... Any clues greatly appreciated! -- Chris Herborth chrish@cryptocard.com Documentation Overlord, CRYPTOCard Corp. http://www.cryptocard.com/ Never send a monster to do the work of an evil scientist. From jlee17 at cs.uiuc.edu Mon Jan 26 14:59:08 2004 From: jlee17 at cs.uiuc.edu (Jonghyun Lee) Date: Mon Jan 26 14:59:11 2004 Subject: [XML-SIG] how can I install PyXML in my local directory? Message-ID: Hello. I don't have a root password, and would like to install PyXML in my local directory instead. How can I specify the install path? Thanks. Regards, Jonghyun Lee From dieter at handshake.de Tue Jan 27 14:34:52 2004 From: dieter at handshake.de (Dieter Maurer) Date: Tue Jan 27 15:06:44 2004 Subject: [XML-SIG] how can I install PyXML in my local directory? In-Reply-To: References: Message-ID: <16406.48476.360620.253401@gargle.gargle.HOWL> Jonghyun Lee wrote at 2004-1-26 13:59 -0600: >I don't have a root password, and would like to install PyXML in my local >directory instead. How can I specify the install path? You should probably read the "distutils" documentation. ("distutils" is a Python package used to build and install "PyXML" this applied to Unix-like os-es. I know nothing about Windows). -- Dieter From morillas at posta.unizar.es Tue Jan 27 16:36:58 2004 From: morillas at posta.unizar.es (luis miguel morillas) Date: Tue Jan 27 16:18:13 2004 Subject: [XML-SIG] how can I install PyXML in my local directory? In-Reply-To: References: Message-ID: <20040127213658.GA1700@marmota> Asunto: [XML-SIG] how can I install PyXML in my local directory? Fecha: lun, ene 26, 2004 at 01:59:08 -0600 Citando a Jonghyun Lee (jlee17@cs.uiuc.edu): > Hello. > > I don't have a root password, and would like to install PyXML in my local > directory instead. How can I specify the install path? > I think $ python setup.py install --home= You have more doc at [1] and [2], and an example (with 4suite) at [3] [1] http://www.python.org/doc/current/inst/ [2] http://www.python.org/doc/current/inst/config-syntax.html [3] http://uche.ogbuji.net/uche.ogbuji.net/tech/akara/?xslt=irc.xslt&date=2003-12-24#04:10:53 -- Luis Miguel No a las patentes de software en Europa EuropeSwPatentFree http://EuropeSwPatentFree.hispalinux.es From schluep at iha.bepr.ethz.ch Thu Jan 29 03:54:44 2004 From: schluep at iha.bepr.ethz.ch (Samuel Schluep) Date: Thu Jan 29 03:54:51 2004 Subject: [XML-SIG] PyXML 0.8.3 Windows Installer for Python 2.1? Message-ID: <4018CA54.50400@iha.bepr.ethz.ch> Dear List I am working with Silva, a Zope-based CMS on Windows. Silva requires PyXML, and Zope is still based on Python 2.1.3. It seems still to take some time until Silva and Zope are recommended to run with Python 2.2. There are some flaws using Silva with PyXML 0.8.1. Would it be possible to release a PyXML 0.8.3 Windows Installer for Python 2.1 (PyXML-0.8.3.win32-py2.1.exe )? Best regards Sam -- Samuel Schluep, Institut f?r Hygiene und Arbeitsphysiologie, ETH Z?rich +41 1 632 74 24 | schluep@iha.bepr.ethz.ch | http://www.iha.bepr.ethz.ch From list-matt at reprocessed.org Thu Jan 29 06:40:21 2004 From: list-matt at reprocessed.org (Matt Patterson) Date: Thu Jan 29 06:40:29 2004 Subject: [XML-SIG] node identity with libxml2 Message-ID: Hello, I'm using libxml2 and I'm trying to determine the intersection of two lists of nodes, where each list is a leaf-to-root chain of ancestors. The lists do have a point of intersection. printing the trees shows this: tree1: [, ] tree2: [, ] (I've snipped the ends of the lists for clarity.) Now, I know that the in each list are references to the same node: There's only one element in the entire document. However, if I do tree1[1] == tree2[1] it returns false, which is a problem. tree1[1]: tree2[1]: tree1[1] == tree2[1]: False The leaf points of tree1 and tree2 and and respectively. Is there any way to test nodes for identity? Thanks, Matt -- Matt Patterson | Typographer | http://www.emdash.co.uk/ | http://reprocessed.org/ From veillard at redhat.com Thu Jan 29 06:56:22 2004 From: veillard at redhat.com (Daniel Veillard) Date: Thu Jan 29 06:56:51 2004 Subject: [XML-SIG] node identity with libxml2 In-Reply-To: References: Message-ID: <20040129115622.GH5529@redhat.com> On Thu, Jan 29, 2004 at 11:40:21AM +0000, Matt Patterson wrote: > Hello, > > I'm using libxml2 and I'm trying to determine the intersection of two > lists of nodes, where each list is a leaf-to-root chain of ancestors. > The lists do have a point of intersection. > > printing the trees shows this: > > tree1: [, 0x6de18>] > tree2: [, 0x6df08>] > > (I've snipped the ends of the lists for clarity.) > > Now, I know that the in each list are > references to the same node: There's only one element in the > entire document. However, if I do tree1[1] == tree2[1] it returns > false, which is a problem. right, the underlying C object are the same but new wrappers are build on the fly. The equality should be defined by testing the C objects pointers, I don't know how to do this, Daniel -- Daniel Veillard | Red Hat Network https://rhn.redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From Stefan.Sieber at de.bosch.com Thu Jan 29 07:11:45 2004 From: Stefan.Sieber at de.bosch.com (Sieber Stefan (AE-DA/EPS5)) Date: Thu Jan 29 07:13:16 2004 Subject: [XML-SIG] Access Nodes Directly Message-ID: <7807E7B9823DF8469D01DB969FC4DD9208D78CB8@si-mail99.de.bosch.com> Hello, I write a little python-scritp in which I first create a XML-Tree. (xml.dom.minidom) Afterwards I try to populate the tree with some text-nodes. Now my problem is, my little class I wrote only remembers the last 'todo'-node I created. However, I try to access the first node first. I tryed to use something like this: "self.example.todo[0].addChild()" but it doesn't work. Isn't there a way to access a specific node directly? Or only by "node = doc.getElementsByTagName('description')" ?? But then I never know, which node I got! Since 'description' appears in several levels! I use python 2.3 on Win2000 with installed win32all-163 Thx Stefan ================================= Stefan Sieber stefan.sieber@de.bosch.com ================================= From mal at egenix.com Thu Jan 29 07:27:37 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 29 07:29:18 2004 Subject: [XML-SIG] node identity with libxml2 In-Reply-To: <20040129115622.GH5529@redhat.com> References: <20040129115622.GH5529@redhat.com> Message-ID: <4018FC39.5080901@egenix.com> Daniel Veillard wrote: > On Thu, Jan 29, 2004 at 11:40:21AM +0000, Matt Patterson wrote: > >>Hello, >> >>I'm using libxml2 and I'm trying to determine the intersection of two >>lists of nodes, where each list is a leaf-to-root chain of ancestors. >>The lists do have a point of intersection. >> >>printing the trees shows this: >> >>tree1: [, >0x6de18>] >>tree2: [, >0x6df08>] >> >>(I've snipped the ends of the lists for clarity.) >> >>Now, I know that the in each list are >>references to the same node: There's only one element in the >>entire document. However, if I do tree1[1] == tree2[1] it returns >>false, which is a problem. > > > right, the underlying C object are the same but new wrappers are build > on the fly. The equality should be defined by testing the C objects pointers, > I don't know how to do this, If you implement the wrappers in Python and have access to the underlying C object pointers, you can implement this by overriding: def __cmp__(self, other): if isinstance(other, self.__class__): return cmp(self._cobject, other._cobject) else: raise TypeError The same is possible at C level by providing the tp_compare slot. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jan 29 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From list-matt at reprocessed.org Thu Jan 29 08:13:13 2004 From: list-matt at reprocessed.org (Matt Patterson) Date: Thu Jan 29 08:13:21 2004 Subject: [XML-SIG] node identity with libxml2 In-Reply-To: <4018FC39.5080901@egenix.com> References: <20040129115622.GH5529@redhat.com> <4018FC39.5080901@egenix.com> Message-ID: On 29 Jan 2004, at 12:27, M.-A. Lemburg wrote: > Daniel Veillard wrote: >> right, the underlying C object are the same but new wrappers are build >> on the fly. The equality should be defined by testing the C objects >> pointers, >> I don't know how to do this, > > If you implement the wrappers in Python and have access to the > underlying C object pointers, you can implement this by overriding: > > def __cmp__(self, other): > if isinstance(other, self.__class__): > return cmp(self._cobject, other._cobject) > else: > raise TypeError Is this something I can do in my code, or does libxml's wrapper need to be patched? I tried adding def __cmp__(self, other): if isinstance(other, self.__class__): return cmp(self._o, other. _o) else: raise TypeError into class xmlCore, but that didn't seem to alter anything. Should I stop fiddling and switch to PyXML for the time being? Thanks, Matt From bruce.jewell at symmetron.com Fri Jan 30 12:39:09 2004 From: bruce.jewell at symmetron.com (Bruce Jewell) Date: Fri Jan 30 12:39:13 2004 Subject: [XML-SIG] DOM memory problem Message-ID: All, I am a newb to Python and I have been getting data from xml files. I am tyring to read an xml file using the PYXML scripts on my XP machine. The script starts something like this. import sys from xml.dom.ext.reader.Sax2 import FromXmlStream doc = FromXmlStream(sys.stdin) this is straight out of the O'Reilly book Jones/Drake, assuming this is the Drake. My problem is that this threw an exception IOError:[Errno 12]Not enough space. I have a 512 MB of memory, of which 100 MB of physical memory is available. The file is about 105k and when I got the error i reduced it to 17k. Can anyone help ? Thanks, Bruce Jewell Symmetron, Inc. From stella at solarenergenex.com Fri Jan 30 14:02:23 2004 From: stella at solarenergenex.com (Stella Rockford) Date: Fri Jan 30 14:02:21 2004 Subject: [XML-SIG] setup.py on OS X 10.2.8 Message-ID: I'm having difficulty installing PyXML into both my 2.2 and 2.3.3 pythons I've tried sudo and root user installs and attempted builds as well I have the latest GCC installed and haven't had any problems installing other software here is the last 40 lines or so....apologies for any extraneous text -Stella gcc -bundle -bundle_loader /usr/local/bin/python2.3 build/temp.darwin-6.8-Power_Macintosh-2.3/extensions/pyexpat.o build/temp.darwin-6.8-Power_Macintosh-2.3/extensions/expat/lib/ xmlparse.o build/temp.darwin-6.8-Power_Macintosh-2.3/extensions/expat/lib/ xmlrole.o build/temp.darwin-6.8-Power_Macintosh-2.3/extensions/expat/lib/xmltok.o -o build/lib.darwin-6.8-Power_Macintosh-2.3/_xmlplus/parsers/pyexpat.so -flat_namespace ld: Undefined symbols: _PyArg_ParseTuple _PyArg_ParseTupleAndKeywords _PyCode_New _PyDict_GetItem _PyDict_New _PyDict_SetItem _PyDict_Type _PyErr_Clear _PyErr_Fetch _PyErr_Format _PyErr_NewException _PyErr_NoMemory _PyErr_Occurred _PyErr_Restore _PyErr_SetFromErrno _PyErr_SetObject _PyErr_SetString _PyEval_CallObjectWithKeywords _PyEval_GetGlobals _PyExc_AttributeError _PyExc_IOError _PyExc_RuntimeError _PyExc_TypeError _PyExc_ValueError _PyFile_AsFile _PyFile_Type _PyFrame_New _PyInt_AsLong _PyInt_FromLong _PyList_Append _PyList_New _PyModule_AddIntConstant _PyModule_AddObject _PyModule_AddStringConstant _PyModule_GetDict _PyModule_New _PyObject_Call _PyObject_CallFunction _PyObject_GC_Del _PyObject_GC_Track _PyObject_GC_UnTrack _PyObject_GetAttrString _PyObject_IsTrue _PyObject_SetAttrString _PyString_AsString _PyString_FromString _PyString_FromStringAndSize _PyString_Type _PySys_GetObject _PyTraceBack_Here _PyTuple_New _PyType_IsSubtype _PyType_Type _PyUnicodeUCS2_Decode _PyUnicodeUCS2_DecodeUTF8 _Py_BuildValue _Py_FindMethod _Py_InitModule4 __PyObject_GC_New __PyThreadState_Current __Py_NoneStruct __Py_TrueStruct __Py_ZeroStruct error: command 'gcc' failed with exit status 1 From sag at hydrosphere.com Fri Jan 30 17:03:35 2004 From: sag at hydrosphere.com (sag@hydrosphere.com) Date: Fri Jan 30 17:04:26 2004 Subject: [XML-SIG] XSLT and anchor tag indentation problem Message-ID: <401A8E67.6961.5781C672@localhost> I am using Python 2.2.1 on Red Hat 8. I have a python module that uses the cgitb XSLT processor to apply an XSLT transformation to an XML page to create an HTML page. Part of the HTML output must be tab-delimited values, so I must use the
 tags to preserve the tabs in the data.  The data are a long 
list of measurements and their dates.  I want an anchor at each 
section that starts a new year.  I keep getting unexpected new lines 
and space characters whenever I put in the anchor section.

As an example of what is happening,  create a simple XSLT with html 
output, with the following entry.

Line 1


My output as viewed in source of browser is
Line 1
 
 
 
(note leading space before the anchors, and they are on their own 
lines)

However, if the entry is
Line 1
T

the output is
Line 1
 TU
(note the new line and leading blank for the first anchor, but not 
before the second one). 

You must have some char in the  section - an empty 
 segment doesn't remove the NL and space behavior.  
Also, puttng in another HTML tag, such as 
doesn't prevent the newline either. I don't want the newline and indented space from the first case in my
 section, since it messes up the display of the data.

Is this a bug in the processor?  Does anyone know how I can get the 
output to all be on one line?

I am not on the list, so please email replies to sag@hydrosphere.com

Thanks

sue