From sales at scale18.com Sat Feb 2 19:34:23 2008 From: sales at scale18.com (Kevin's Hobbies - www.scale18.com) Date: Sat, 02 Feb 2008 10:34:23 -0800 Subject: [Expat-discuss] newbie question: I want libexpat.a but it's building libexpat.la Message-ID: <47A4B7AF.1000701@scale18.com> I am trying to build "libexpat.a" on a iMac with System X10.3.9, when I run "./configure --disable-shared --enable-static" and then run "make" it generates "libexpat.la", all the other packages that I am using generate "libxxx.a", and I don't know what a ".la" is. I'm using g++ to generate my program, is there a way to use the ".la" file with it or do I need to somehow convert it to a ".a" file? Thanks very much, Kevin From dbn.lists at gmail.com Sat Feb 2 22:44:40 2008 From: dbn.lists at gmail.com (Dan Nicholson) Date: Sat, 2 Feb 2008 13:44:40 -0800 Subject: [Expat-discuss] newbie question: I want libexpat.a but it's building libexpat.la In-Reply-To: <47A4B7AF.1000701@scale18.com> References: <47A4B7AF.1000701@scale18.com> Message-ID: <91705d080802021344w31f072b5ge8b1270ff347bb62@mail.gmail.com> On Feb 2, 2008 10:34 AM, Kevin's Hobbies - www.scale18.com wrote: > I am trying to build "libexpat.a" on a iMac with System X10.3.9, when I > run "./configure --disable-shared --enable-static" and then run "make" > it generates "libexpat.la", all the other packages that I am using > generate "libxxx.a", and I don't know what a ".la" is. > > I'm using g++ to generate my program, is there a way to use the ".la" > file with it or do I need to somehow convert it to a ".a" file? There is a static library, libexpat.a, it's just hidden underneath the .la file in the .libs directory. If you do "make install", you'll see that both the .a and .la files get installed. Alternatively, you can just do the libtool install manually: libtool --mode=install install libexpat.la /where/you/want/the/lib/ The .la file is not strictly necessary, but other packages that use libtool can make use of it, especially if you've installed your library to a non-standard location. -- Dan From jthemis at ti.com Fri Feb 8 17:17:28 2008 From: jthemis at ti.com (Themis, Jim) Date: Fri, 8 Feb 2008 10:17:28 -0600 Subject: [Expat-discuss] Handling Error Conditions in Callbacks Message-ID: <24ECDEE66BE09748A964D73C404099E4016BDD3A@dlee11.ent.ti.com> I am working on my first XML project, therefore my first experience with expat. I had a question how other are dealing with error conditions within their callback handlers. Since the callbacks provide no return value, I assume, one could use the UserData to store the error condition and pop that up the callback stack. Just wanted to make sure I wasn't missing any functionality within expat. Thanks, Jim From nickmacd at gmail.com Fri Feb 8 19:43:07 2008 From: nickmacd at gmail.com (Nick MacDonald) Date: Fri, 8 Feb 2008 13:43:07 -0500 Subject: [Expat-discuss] Handling Error Conditions in Callbacks In-Reply-To: <24ECDEE66BE09748A964D73C404099E4016BDD3A@dlee11.ent.ti.com> References: <24ECDEE66BE09748A964D73C404099E4016BDD3A@dlee11.ent.ti.com> Message-ID: Jim: User Data is just for code written by you, the user. It is not examined in any way by the eXpat parsing routines. If you find an error in your code that is being called to interpret the data (you don't like the input, but it is still valid, well formed XML) then you will need to set your own error handling variables and your own routines will need to ignore the input. For example, say you are in the middle of reading tag and a sub tag is wrong, and you want to ignore tag and all the sub tags, you need to code logic to tell all the call back routines to ignore input until you see the proper close tag. If the XML is not valid, eXpat will inform your code via call backs and error returns. You don't have to do anything special here, other than clean up your data at the end (if you don't intend to act on partial/invalid data.) If you want to abort processing in the middle because you don't like the input so far, then there is an eXpat function you can call from a call back that will achieve this for you. Good luck, Nick On Feb 8, 2008 11:17 AM, Themis, Jim wrote: > I am working on my first XML project, therefore my first experience with > expat. I had a question how other are dealing with error conditions > within their callback handlers. Since the callbacks provide no return > value, I assume, one could use the UserData to store the error condition > and pop that up the callback stack. Just wanted to make sure I wasn't > missing any functionality within expat. From caoj at purdue.edu Mon Feb 18 19:05:47 2008 From: caoj at purdue.edu (caoj at purdue.edu) Date: Mon, 18 Feb 2008 13:05:47 -0500 Subject: [Expat-discuss] makefile to use expat Message-ID: <1203357947.47b9c8fba7c6b@webmail.purdue.edu> Hi: I am a new user of expat, my linux cluster system admistrator have installed expat in the directory /opt/osg/expat/. What kind of commands do I have to include in my makefile to use expat? Could somebody post a simple makefile example to use it? Thanks. Jun From caoj at purdue.edu Mon Feb 18 21:32:39 2008 From: caoj at purdue.edu (Jun Cao) Date: Mon, 18 Feb 2008 15:32:39 -0500 Subject: [Expat-discuss] makefile to use expat In-Reply-To: <47B9EBA7.7070602@hartwork.org> References: <1203357947.47b9c8fba7c6b@webmail.purdue.edu> <47B9EBA7.7070602@hartwork.org> Message-ID: <6ECC1883FFC94751B08C6B32E2E1C2D5@JunCaoPC> I use the following makefile: CC = gcc GSL_LIB = -L/opt/osg/expat/lib GSL_INC = -I/opt/osg/expat/include LIBS = ${GSL_LIB} -lexpat CFLAGS = ${GSL_INC} OBJS = model.o all: ${OBJS} project project: ${OBJS} ${CC} -o $@ ${OBJS} ${LIBS} run: ./project I pass the compilation, but I got the folllowing error: -bash-3.00$ ./project ./project: error while loading shared libraries: libexpat.so.1: cannot open shared object file: No such file or directory Jun ----- Original Message ----- From: "Sebastian Pipping" To: Cc: Sent: Monday, February 18, 2008 3:33 PM Subject: Re: [Expat-discuss] makefile to use expat > caoj at purdue.edu wrote: >> I am a new user of expat, my linux cluster system admistrator have >> installed expat in the directory /opt/osg/expat/. What kind of commands >> do I have to include in my makefile to use expat? Could somebody post a >> simple makefile example to use it? Thanks. > > What do you have so far? What errors do you get? > > > > Sebastian > > From dbn.lists at gmail.com Mon Feb 18 21:51:04 2008 From: dbn.lists at gmail.com (Dan Nicholson) Date: Mon, 18 Feb 2008 12:51:04 -0800 Subject: [Expat-discuss] makefile to use expat In-Reply-To: <6ECC1883FFC94751B08C6B32E2E1C2D5@JunCaoPC> References: <1203357947.47b9c8fba7c6b@webmail.purdue.edu> <47B9EBA7.7070602@hartwork.org> <6ECC1883FFC94751B08C6B32E2E1C2D5@JunCaoPC> Message-ID: <91705d080802181251g7e4730c3peb44e4e95505165b@mail.gmail.com> On Feb 18, 2008 12:32 PM, Jun Cao wrote: > I use the following makefile: > > CC = gcc > > GSL_LIB = -L/opt/osg/expat/lib This should be two parts since you're not actually passing the library to link to: GSL_LDFLAGS = -L/opt/osg/expat/lib GSL_LIB = -lexpat > GSL_INC = -I/opt/osg/expat/include > > LIBS = ${GSL_LIB} -lexpat LIBS = $(GSL_LIB) > CFLAGS = ${GSL_INC} LDFLAGS = $(GSL_LDFLAGS) > OBJS = model.o > > all: ${OBJS} project > > project: ${OBJS} > ${CC} -o $@ ${OBJS} ${LIBS} $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) > run: > ./project > > I pass the compilation, but I got the folllowing error: > -bash-3.00$ ./project > ./project: error while loading shared libraries: libexpat.so.1: cannot open > shared object file: No such file or directory Here the problem is that the dynamic linker doesn't know to look in /opt/osg/expat/lib at runtime. You can set the environment variable LD_LIBRARY_PATH: export LD_LIBRARY_PATH=/opt/osg/expat/lib ./project or encode the path into the executable by setting a rpath. There are various ways to do this, but the way to do this with the GNU linker is the -rpath switch: GSL_LDFLAGS = -L/opt/osg/expat/lib -Wl,-rpath,/opt/osg/expat/lib Then the runtime linker will always look in that directory first for any libraries the project program needs. You can then see the path in the executable by using readelf: readelf -d project | grep RPATH -- Dan From webmaster at hartwork.org Mon Feb 18 21:33:43 2008 From: webmaster at hartwork.org (Sebastian Pipping) Date: Mon, 18 Feb 2008 21:33:43 +0100 Subject: [Expat-discuss] makefile to use expat In-Reply-To: <1203357947.47b9c8fba7c6b@webmail.purdue.edu> References: <1203357947.47b9c8fba7c6b@webmail.purdue.edu> Message-ID: <47B9EBA7.7070602@hartwork.org> caoj at purdue.edu wrote: > I am a new user of expat, my linux cluster system admistrator have installed > expat in the directory /opt/osg/expat/. What kind of commands do I have to > include in my makefile to use expat? Could somebody post a simple makefile > example to use it? Thanks. What do you have so far? What errors do you get? Sebastian From bbomeli at gmail.com Tue Feb 19 16:47:04 2008 From: bbomeli at gmail.com (benoit bomeli) Date: Tue, 19 Feb 2008 16:47:04 +0100 Subject: [Expat-discuss] EXPAT Problem with external entity Message-ID: <000001c8730e$ae5bd750$0b1385f0$@com> Hi I have 2xml files The first //-------------------------------------------------------------------------- ---------------------- //-------------------------------------------------------------------------- ---------------------- And //-------------------------------------------------------------------------- ---------------------- Change color //-------------------------------------------------------------------------- ---------------------- And my code XML_Parser prs; int stat; FILE * doc; int cnt; void *buff; prs = XML_ParserCreate(NULL); XML_SetElementHandler(prs, start, end); XML_SetCharacterDataHandler(prs, text); while (! feof(doc)) { buff = XML_GetBuffer(prs, XMLBUFSIZE); if (! buff) return -1; cnt = fread(buff, 1, XMLBUFSIZE, doc); NoErreur = XML_GetErrorCode(prs); stat = XML_ParseBuffer(prs, cnt, 0); NoErreur = XML_GetErrorCode(prs); if (NoErreur > 0) return -1; if (! stat) return -1; } fclose(doc); stat = XML_ParseBuffer(prs, 0, 1); if (! stat) return -1; XML_ParserFree(prs); return 1; but when expat see "&TOOLTIP_CHANGE_COLOR;" , XML_GetErrorCode(prs) return XML_ERROR_UNDEFINED_ENTITY I don't understand can you explain me please? (I work with expat for wince) Thanks From mi+kde at aldan.algebra.com Sat Feb 16 21:56:35 2008 From: mi+kde at aldan.algebra.com (Mikhail T.) Date: Sat, 16 Feb 2008 15:56:35 -0500 Subject: [Expat-discuss] XML_SetDefaultExpandInternalEntities? Message-ID: <200802161556.36477@aldan> Hello! I'm trying to port a piece of software (tclxml's tclexpat.c) to use the modern expat-2.x instead of the ancient version, that's bundled with tclxml. It almost works already, except for the missing function: XML_SetDefaultExpandInternalEntities() tclxml is supposed to allow to alter an existing parser switching the expansion of entities on and off on the fly: case EXPAT_DEFAULTEXPANDINTERNALENTITIES: if (Tcl_GetBooleanFromObj(expat->interp, valuePtr, &bool) != TCL_OK) { return TCL_ERROR; } XML_SetDefaultExpandInternalEntities(expat->parser, bool); break; Unfortunately, the function is not present in the expat-2.0.0 -- it used to follow XML_SetDefaultHandlerExpand (which is still there) in xmlparse.c. What's the right replacement? Thanks! -mi From nickmacd at gmail.com Wed Feb 20 17:35:03 2008 From: nickmacd at gmail.com (Nick MacDonald) Date: Wed, 20 Feb 2008 11:35:03 -0500 Subject: [Expat-discuss] EXPAT Problem with external entity In-Reply-To: <000001c8730e$ae5bd750$0b1385f0$@com> References: <000001c8730e$ae5bd750$0b1385f0$@com> Message-ID: I believe your usage of "&" in XML makes your XML file not well formed. & is reserved for introducing special sequences. You need to escape it, so try replacing the "&" with & and see if works the way you expect... On Feb 19, 2008 10:47 AM, benoit bomeli wrote: > but when expat see "&TOOLTIP_CHANGE_COLOR;" , XML_GetErrorCode(prs) return > XML_ERROR_UNDEFINED_ENTITY > I don't understand can you explain me please? From bbomeli at gmail.com Wed Feb 20 18:15:14 2008 From: bbomeli at gmail.com (benoit bomeli) Date: Wed, 20 Feb 2008 18:15:14 +0100 Subject: [Expat-discuss] EXPAT Problem with external entity Message-ID: <000101c873e4$2a0de2f0$7e29a8d0$@com> Hi Thanks for you answer but I would like replace "&TOOLTIP_CHANGE_COLOR;" by Change color (Change color entity extern) Regards >Hi >I know & but i want replace reference"&TOOLTIP_CHANGE_COLOR;" by Change color (Change color) >thanks >-----Message d'origine----- >De : Nick MacDonald [mailto:nickmacd at gmail.com] Envoy? : mercredi 20 f?vrier 2008 17:35 ? : expat-discuss at libexpat.org Cc : benoit bomeli Objet : >Re: [Expat-discuss] EXPAT Problem with external entity >I believe your usage of "&" in XML makes your XML file not well formed. & is reserved for introducing special sequences. You need to escape it, >so try replacing the "&" with & and see if works the way you expect... On Feb 19, 2008 10:47 AM, benoit bomeli < bbomeli at gmail.com> wrote: > but when expat see "&TOOLTIP_CHANGE_COLOR;" , XML_GetErrorCode(prs) > return XML_ERROR_UNDEFINED_ENTITY > I don't understand can you explain me please? From bbomeli at gmail.com Wed Feb 20 18:16:00 2008 From: bbomeli at gmail.com (benoit bomeli) Date: Wed, 20 Feb 2008 18:16:00 +0100 Subject: [Expat-discuss] EXPAT Problem with external entity Message-ID: <000601c873e4$44b17f40$ce147dc0$@com> Hi Thanks for you answer but I would like replace "&TOOLTIP_CHANGE_COLOR;" by Change color (Change color entity extern) Regards De : benoit bomeli [mailto:bbomeli at gmail.com] Envoy? : mercredi 20 f?vrier 2008 18:15 ? : 'expat-discuss at libexpat.org' Objet : EXPAT Problem with external entity Hi Thanks for you answer but I would like replace "&TOOLTIP_CHANGE_COLOR;" by Change color (Change color entity extern) Regards >Hi >I know & but i want replace reference"&TOOLTIP_CHANGE_COLOR;" by Change color (Change color) >thanks >-----Message d'origine----- >De : Nick MacDonald [mailto:nickmacd at gmail.com] Envoy? : mercredi 20 f?vrier 2008 17:35 ? : expat-discuss at libexpat.org Cc : benoit bomeli Objet : >Re: [Expat-discuss] EXPAT Problem with external entity >I believe your usage of "&" in XML makes your XML file not well formed. & is reserved for introducing special sequences. You need to escape it, >so try replacing the "&" with & and see if works the way you expect... On Feb 19, 2008 10:47 AM, benoit bomeli < bbomeli at gmail.com> wrote: > but when expat see "&TOOLTIP_CHANGE_COLOR;" , XML_GetErrorCode(prs) > return XML_ERROR_UNDEFINED_ENTITY > I don't understand can you explain me please? From karl at waclawek.net Thu Feb 21 01:05:44 2008 From: karl at waclawek.net (Karl Waclawek) Date: Wed, 20 Feb 2008 19:05:44 -0500 Subject: [Expat-discuss] XML_SetDefaultExpandInternalEntities? In-Reply-To: <200802161556.36477@aldan> References: <200802161556.36477@aldan> Message-ID: <47BCC058.4050408@waclawek.net> Mikhail T. wrote: > Hello! > > I'm trying to port a piece of software (tclxml's tclexpat.c) to use the modern > expat-2.x instead of the ancient version, that's bundled with tclxml. > > It almost works already, except for the missing function: > > XML_SetDefaultExpandInternalEntities() > > tclxml is supposed to allow to alter an existing parser switching the > expansion of entities on and off on the fly: > > case EXPAT_DEFAULTEXPANDINTERNALENTITIES: > if (Tcl_GetBooleanFromObj(expat->interp, valuePtr, &bool) != TCL_OK) { > return TCL_ERROR; > } > XML_SetDefaultExpandInternalEntities(expat->parser, bool); > break; > > Unfortunately, the function is not present in the expat-2.0.0 -- it used to > follow XML_SetDefaultHandlerExpand (which is still there) in xmlparse.c. > > What's the right replacement? Thanks! > If you read the docs (reference.html) about XML_SetDefaultHandler() and XML_SetDefaultHandlerExpand(), you might find a way to duplicate the old logic. Karl From jzhang at ximpleware.com Mon Feb 25 20:37:49 2008 From: jzhang at ximpleware.com (jimmy Zhang) Date: Mon, 25 Feb 2008 11:37:49 -0800 Subject: [Expat-discuss] vtd-xml 2.3 References: Message-ID: <00cd01c877e5$e7d2b0e0$0402a8c0@your55e5f9e3d2> VTD-XML 2.3 is now released. To download the latest version please visit http://sourceforge.net/project/showfiles.php?group_id=110612&package_id=120172. Below is a list of new features and enhancements in this version. a.. VTDException is now introduced as the root class for all other VTD-XML's exception classes (per suggestion of Max Rahder). b.. Transcoding capability is now added for inter-document cut and paste. You can cut a chuck of bytes in a UTF-8 encoded document and paste it into a UTF-16 encoded document and the output document is still well-formed. c.. ISO-8859-10, ISO-8859-11, ISO-8859-12, ISO-8859-13, ISO-8859-14 and ISO-8859-15 support has now been added d.. Zero length Text node is now possible. e.. Ability to dump in-memory copy of text is added. f.. Various code cleanup, enhancement and bug fixes. Below are some new articles related to VTD-XML a.. Index XML documents with VTD-XML http://xml.sys-con.com/read/453082.htm b.. Manipulate XML content the Ximple Way http://www.devx.com/xml/Article/36379 c.. VTD-XML: A new vision of XML http://www.developer.com/xml/article.php/3714051 d.. VTD-XML: XML Processing for the future http://www.codeproject.com/KB/cs/vtd-xml_examples.aspx If you (or someone you know) like the concept of VTD-XML, think that it can help solve enterprises' XML processing related issues (particularly those related to SOA), and would like to directly influence and contribute to the development of the future of Internet, please email me crackeur at comcast.net). We are looking for open source software developers and project management people to take VTD-XML to the next level.