From fdrake at acm.org Wed Jun 22 19:30:31 2005 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Wed, 22 Jun 2005 13:30:31 -0400 Subject: [Expat-discuss] Test message 3 Message-ID: <200506221330.31823.fdrake@acm.org> This is a test message. Please disregard. -Fred -- Fred L. Drake, Jr. From rpjday at mindspring.com Wed Jun 22 21:30:57 2005 From: rpjday at mindspring.com (Robert P. J. Day) Date: Wed, 22 Jun 2005 15:30:57 -0400 (EDT) Subject: [Expat-discuss] how to cross-compile expat to get shared lib? Message-ID: i can't seem to cross-compile the latest version of "expat" to get a shared ".so" library -- i just get the archive library. i want to cross-compile for the PPC, and i have the ELDK 3.1.1 PPC cross-compiler installed, and ppc_8xx-gcc os on the search path, and i ran the following: $ ./configure --host=ppc --enable-shared CC=ppc_8xx-gcc some of the relevant output lines from that command: checking build system type... i686-pc-linux-gnu checking host system type... powerpc-unknown-none checking for ppc-gcc... ppc_8xx-gcc ... checking whether the C compiler works... yes checking whether we are cross compiling... yes ... checking whether the ppc_8xx-gcc linker (/usr/local/eldk3.1.1/usr/ppc-linux/bin/ld) supports shared libraries... yes ... checking if libtool supports shared libraries... no checking whether to build shared libraries... no checking whether to build static libraries... yes ????? so libtool doesn't support shared libs and that's why it chooses not to build them? or how should i read this? thanks. rday  From downunderoli at hotmail.com Fri Jun 24 08:53:58 2005 From: downunderoli at hotmail.com (Oliver Mueller) Date: Fri, 24 Jun 2005 08:53:58 +0200 Subject: [Expat-discuss] how to handle empty elements Message-ID: Hi I'm using EXPAT on Red Hat Linux to import XML data into a database. I found out, if there is an empty element ( or ), the character data handler does not get called. This causes problems because of not well formed SQL insert statement (missing value). I intended to solve the problem as follows: (1) set a flag false in the start element handler (2) set the flag true in the character data handler (3) if the flag is false in the end element handler, do an action (4) set the flag false in the end element handler Is not calling the "character data handler" normal EXPAT behaviour if an element is empty? Has anyone made similar experience and got a better solution than my tinkered one? Thanks for your help. Oliver From karl at waclawek.net Fri Jun 24 14:56:52 2005 From: karl at waclawek.net (Karl Waclawek) Date: Fri, 24 Jun 2005 08:56:52 -0400 Subject: [Expat-discuss] how to handle empty elements In-Reply-To: References: Message-ID: <42BC0314.6030100@waclawek.net> Oliver Mueller wrote: > Hi > > > > I'm using EXPAT on Red Hat Linux to import XML data into a database. I found out, if there is an empty element ( or ), the character data handler does not get called. > > This causes problems because of not well formed SQL insert statement (missing value). > > I intended to solve the problem as follows: > > > > (1) set a flag false in the start element handler > > (2) set the flag true in the character data handler > > (3) if the flag is false in the end element handler, do an action > > (4) set the flag false in the end element handler > > > > Is not calling the "character data handler" normal EXPAT behaviour if an element is empty? > > Has anyone made similar experience and got a better solution than my tinkered one? Normally, if you handle character data properly you would not need such a flag. As you probably know, Expat might use multiple character data call-backs to report one contiguous string of characters, so you need to accumulate them in a buffer anyway. That means, in the start element call-back you clear the buffer, in the character data call-backs you accumulate data, and in the end element call-back you use the buffer. In this case, detecting an empty element is as simple as checking for an empty buffer. Karl From paraveen at samsung.com Mon Jun 27 15:25:54 2005 From: paraveen at samsung.com (Praveen Kumar H) Date: Mon, 27 Jun 2005 18:55:54 +0530 Subject: [Expat-discuss] Expat parser is a validating parser? Message-ID: <021b01c57b1b$c128fef0$be076c6b@sisodomain.com> Hi, I am using expat parser version 1.95.8 downloaded from http://expat.sourceforge.net/. Can anyone please let me know if I can validate a dtd document using this parser?(i.e., is expat is a validating parser? or just checks for well formedness?) Also can any one share details how functionality of XML_SetParamEntityParsing( ) can be used? Thanks in advance. Best Regards, Praveen ---------------------------------------------- Lead Engineer, #67, Samsung Electronics India Software Operations Ltd., Infantry Road, Bangalore - 560001 India From fdrake at acm.org Tue Jun 28 08:19:46 2005 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Tue, 28 Jun 2005 02:19:46 -0400 Subject: [Expat-discuss] Expat parser is a validating parser? In-Reply-To: <021b01c57b1b$c128fef0$be076c6b@sisodomain.com> References: <021b01c57b1b$c128fef0$be076c6b@sisodomain.com> Message-ID: <200506280219.47135.fdrake@acm.org> On Monday 27 June 2005 09:25, Praveen Kumar H wrote: > I am using expat parser version 1.95.8 downloaded from > http://expat.sourceforge.net/. Can anyone please let me know if I can > validate a dtd document using this parser?(i.e., is expat is a validating > parser? or just checks for well formedness?) Expat is not a validating parser; it checks for well-formedness only. > Also can any one share details how functionality of > XML_SetParamEntityParsing( ) can be used? What question about it did you have that wasn't covered in the documentation? (doc/reference.html in the source distribution). -Fred -- Fred L. Drake, Jr. From v.brach at smie.com Tue Jun 28 11:04:16 2005 From: v.brach at smie.com (BRACH Vincent) Date: Tue, 28 Jun 2005 11:04:16 +0200 Subject: [Expat-discuss] cross compil expat on ARM7 Message-ID: <1119949456.9981.27.camel@zoul> Hello all, I'm trying to cross-compil expat (just librarie static & shared) from my host (i686-pc-linux-gnu) for an ARM7 target (S3C44B0X running on uClinux) I fixed the environnement variables follow : export CC="arm-elf-gcc" export CFLAGS="-DUNIX=1 -DMWPIXEL_FORMAT=MWPF_TRUECOLOR0888 -O2 -fomit-frame-pointer -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED -fno-builtin -I/home/vincent/uClinux-dist/linux-2.4.x/include -I." export LDFLAGS="-Wl,-elf2flt -nostartfiles /home/vincent/uClinux-dist/lib/uClibc/lib/crt0.o /home/vincent/uClinux-dist/lib/uClibc/lib/crti.o /home/vincent/uClinux-dist/lib/uClibc/lib/crtn.o -L/home/vincent/uClinux-dist/lib/uClibc/. -L/home/vincent/uClinux-dist/lib/uClibc/lib" When I try to run the ./configure like this " ./configure --prefix=/home/vincent/uClinux-dist/lib/libexpat " I have normaly the messages : "checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'." But I don't know what I must give for argument "host" ??? I try " ./configure --prefix=/home/vincent/uClinux-dist/lib/libexpat --host=arm " but I don't think it's the good way ! Like this the Makefile are generated , my sample program compiled and linked well (with the static libexpat.a) but doesn't work on the target .... :( Is anyboday can help me ?? (I'm not yet subscriber of mailing list "expat-discuss at libexpat.org" please just mail me to v.brach at smie.com (or reply)) Thanks lot V. BRACH