From rcraig at beavisinformatics.ca Thu May 4 22:50:12 2006 From: rcraig at beavisinformatics.ca (Rob Craig) Date: Thu, 04 May 2006 15:50:12 -0500 Subject: [Expat-discuss] Intel MAC Message-ID: <445A6904.4040504@beavisinformatics.ca> Hello, We have a c++ program that uses the Expat libraries to parse a number of XML files. When run on an Intel MAC, the program reports that the libraries can be found but they are of the wrong architecture. Any ideas? Thanks. Rob -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.392 / Virus Database: 268.5.3/331 - Release Date: 5/3/2006 From reid at x10sys.com Sat May 6 02:47:33 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 05 May 2006 17:47:33 -0700 Subject: [Expat-discuss] Intel MAC In-Reply-To: <445A6904.4040504@beavisinformatics.ca> References: <445A6904.4040504@beavisinformatics.ca> Message-ID: <1146876453.31023.160.camel@bashful.x10sys.com> On Thu, 2006-05-04 at 15:50 -0500, Rob Craig wrote: > Hello, > > We have a c++ program that uses the Expat libraries to parse a > number of XML files. When run on an Intel MAC, the program reports that > the libraries can be found but they are of the wrong architecture. Any > ideas? You probably need to build expat from source on the Intel MAC. The i386 binary distributions are not targeted for Mac which has a different object file format. If you can find a binary distribution labelled "Mac" or "Darwin", that might do the trick, but probably compiling from source is the safest bet. Its pretty easy. Just follow the directions. Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.libexpat.org/pipermail/expat-discuss/attachments/20060505/3490e3ce/attachment.pgp From joe at switchgearsoftware.com Wed May 17 20:29:24 2006 From: joe at switchgearsoftware.com (Joe Stacy) Date: Wed, 17 May 2006 11:29:24 -0700 Subject: [Expat-discuss] darwin and expat Message-ID: <178DEE5324A3B549893CB8ECEFFFAD1D4C1F@piken.SwitchGearSoftware.plaza> I'm trying to build expat on Darwin in a cross platform project. Since I'm further wrapping expat with a DOM, I'm trying to keep my wrapping code platform independent and it's all Unicode. I have XML_UNICODE and XML_UNICODE_WCHAR_T macros defined and it appears that the file xmlwf/unixfilemap.c does not implement a wchar_t flavor of the filemap() function. Is there something I'm missing or have configured incorrectly or is it a simple matter of functionality that needs implemented? Joe From karl at waclawek.net Thu May 18 16:19:19 2006 From: karl at waclawek.net (Karl Waclawek) Date: Thu, 18 May 2006 10:19:19 -0400 Subject: [Expat-discuss] darwin and expat In-Reply-To: <178DEE5324A3B549893CB8ECEFFFAD1D4C1F@piken.SwitchGearSoftware.plaza> References: <178DEE5324A3B549893CB8ECEFFFAD1D4C1F@piken.SwitchGearSoftware.plaza> Message-ID: <446C8267.9040300@waclawek.net> Joe Stacy wrote: > I'm trying to build expat on Darwin in a cross platform project. Since > I'm further wrapping expat with a DOM, I'm trying to keep my wrapping > code platform independent and it's all Unicode. I have XML_UNICODE and > XML_UNICODE_WCHAR_T macros defined and it appears that the file > xmlwf/unixfilemap.c does not implement a wchar_t flavor of the filemap() > function. Is there something I'm missing or have configured incorrectly > or is it a simple matter of functionality that needs implemented? > These are two different issues. XML_UNICODE and XML_UNICODE_WCHAR_T merely define which encoding Expat uses to report back to the application. It does not force all of your application to be wchar_t based, although that would be a good idea. Btw, regardless of how you build Expat, it always uses Unicode. Its just the encoding that can vary, that is: UTF-8 or UTF-16. So, what problem are you running into? xmlwf is not necessary for an application to use Expat. Its just a helper program, you don't need to build it. Karl From joe at switchgearsoftware.com Thu May 18 19:40:19 2006 From: joe at switchgearsoftware.com (Joe Stacy) Date: Thu, 18 May 2006 10:40:19 -0700 Subject: [Expat-discuss] darwin and expat In-Reply-To: <446C8267.9040300@waclawek.net> Message-ID: <178DEE5324A3B549893CB8ECEFFFAD1D4C25@piken.SwitchGearSoftware.plaza> I do want the rest of my app to be Unicode - apologies if I implied otherwise. Specifically, building in Darwin with these macros defined, I get an error with xmlwf/unixfilemap.c due to conflicting definitions of filemap(). Filemap.h selects the wchar_t signature while unixfilemap.c uses char. If xmlwf is not required, is there a proper way to remove it from the build or should I just yank it from the makefile? -----Original Message----- From: Karl Waclawek [mailto:karl at waclawek.net] Sent: Thursday, May 18, 2006 7:19 AM To: Joe Stacy Cc: expat-discuss at libexpat.org Subject: Re: [Expat-discuss] darwin and expat Joe Stacy wrote: > I'm trying to build expat on Darwin in a cross platform project. Since > I'm further wrapping expat with a DOM, I'm trying to keep my wrapping > code platform independent and it's all Unicode. I have XML_UNICODE and > XML_UNICODE_WCHAR_T macros defined and it appears that the file > xmlwf/unixfilemap.c does not implement a wchar_t flavor of the filemap() > function. Is there something I'm missing or have configured incorrectly > or is it a simple matter of functionality that needs implemented? > These are two different issues. XML_UNICODE and XML_UNICODE_WCHAR_T merely define which encoding Expat uses to report back to the application. It does not force all of your application to be wchar_t based, although that would be a good idea. Btw, regardless of how you build Expat, it always uses Unicode. Its just the encoding that can vary, that is: UTF-8 or UTF-16. So, what problem are you running into? xmlwf is not necessary for an application to use Expat. Its just a helper program, you don't need to build it. Karl From karl at waclawek.net Thu May 18 20:26:03 2006 From: karl at waclawek.net (Karl Waclawek) Date: Thu, 18 May 2006 14:26:03 -0400 Subject: [Expat-discuss] darwin and expat In-Reply-To: <178DEE5324A3B549893CB8ECEFFFAD1D4C25@piken.SwitchGearSoftware.plaza> References: <178DEE5324A3B549893CB8ECEFFFAD1D4C25@piken.SwitchGearSoftware.plaza> Message-ID: <446CBC3B.7040508@waclawek.net> Joe Stacy wrote: > I do want the rest of my app to be Unicode - apologies if I implied > otherwise. > > Specifically, building in Darwin with these macros defined, I get an > error with xmlwf/unixfilemap.c due to conflicting definitions of > filemap(). Filemap.h selects the wchar_t signature while unixfilemap.c > uses char. > You are right, there is a bug. Clearly, no one has ever built Expat for a UTF-16 based application on a Unix system. Filemap.h is incomplete, as it does not differentiate between wchar_t and ushort, as the rest of Expat does. unixfilemap.c should provide two version of the filemap function, but I am not sure if open(), mmap() and munmap() have UTF-16 versions. I suggest you file a bug report, and if you so feel inclined, provide a patch. Its a community supported project after all. > If xmlwf is not required, is there a proper way to remove it from the > build or should I just yank it from the makefile? > I think you can just build the libs using the buildlib and installlib targets. Karl From davidsmoot at gmail.com Thu May 25 17:48:49 2006 From: davidsmoot at gmail.com (David Smoot) Date: Thu, 25 May 2006 10:48:49 -0500 Subject: [Expat-discuss] Expat and C++ ? Message-ID: I have poked in the archives and have found some but not all my answers. I started trying to use expat in a class with member methods as parsers. This did not work obviously and it was explained here: http://mail.libexpat.org/pipermail/expat-discuss/2002-November/000770.html But on the homepage of libexpat.org it states that one of the changes in Expat 2.0 is: "Fixed headers for use from C++." Does this mean I can use member methods as parsers? If so, are there any examples? Thank you, David Smoot From benski at nullsoft.com Thu May 25 18:03:04 2006 From: benski at nullsoft.com (Ben Allison) Date: Thu, 25 May 2006 12:03:04 -0400 Subject: [Expat-discuss] Expat and C++ ? In-Reply-To: References: Message-ID: <4475D538.9000504@nullsoft.com> Use a pointer to your object as the user data when you create the parser. e.g. if (parser) { XML_ParserReset(parser, 0); XML_SetUserData(parser, this); // give our object pointer as context XML_SetElementHandler(parser, DStartTag, DEndTag); // set the tag callbacks XML_SetCharacterDataHandler(parser, DTextHandler); // set the text callbacks } then just create stub functions to call back into your class e.g. void XMLCALL DStartTag(void *data, const XML_Char *name, const XML_Char **atts) { ((XMLReader *)data)->StartTag(name, atts); } -Ben Allison David Smoot wrote on 5/25/2006, 11:48 AM: > I have poked in the archives and have found some but not all my answers. > > I started trying to use expat in a class with member methods as parsers. > This did not work obviously and it was explained here: > http://mail.libexpat.org/pipermail/expat-discuss/2002-November/000770.html > > > But on the homepage of libexpat.org it states that one of the changes in > Expat 2.0 is: "Fixed headers for use from C++." > > Does this mean I can use member methods as parsers? > > If so, are there any examples? > > Thank you, > David Smoot > _______________________________________________ > Expat-discuss mailing list > Expat-discuss at libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > From vincente13 at gmail.com Fri May 26 18:14:17 2006 From: vincente13 at gmail.com (ChuanJiang Lo) Date: Sat, 27 May 2006 00:14:17 +0800 Subject: [Expat-discuss] Using expat without compilation Message-ID: Hi all, I understand that using Perl XML::Parser requires the expat c library to be installed. However due to portabilty issues, im unable to install the expat library. Right now, i have the binary version of expat c library for my aix machine. Has anyone successfully linked up XML::Parser with expat c library using the binary version? Appreciate any help. From Mario.Widmer at thomson.com Mon May 29 10:35:22 2006 From: Mario.Widmer at thomson.com (Mario.Widmer at thomson.com) Date: Mon, 29 May 2006 10:35:22 +0200 Subject: [Expat-discuss] expat/sablotron on Solaris 10 Message-ID: <8D8D5C193740B04894FA6AA9F767A4E5019C3675@tlrchbermbx01.ERF.THOMSON.COM> Hi, i am new in this discussion forum. I got the mission to install expat/sablotron on sun/solaris 10 with preinstalled php, apache, mysql, gcc Installing expat is no problem but sablotron produces errors unimportant whether I use version 2.xxx or 1.95.xxx. Installing the same on Solaris 9 works problemless. Is anybody out there who did install the same and is willing to help. I will send details later because IF expat/sablotron is generally NOT working on Solaris 10 yet, It makes no sense to write lot of lines for nothing. Perhaps this discussion has already been made my others? How can I find it? Thanks a lot in advance Thomson Corp Switzerland AG Mario Widmer Unix/Oracle Admin/Dev Laupenstr. 18a 3008 Bern 031 3849686 mario.widmer at thomson.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 2300 bytes Desc: image001.jpg Url : http://mail.libexpat.org/pipermail/expat-discuss/attachments/20060529/e65ce720/attachment.jpe From peter.teichert at gmail.com Mon May 29 15:27:57 2006 From: peter.teichert at gmail.com (Peter Teichert) Date: Mon, 29 May 2006 15:27:57 +0200 Subject: [Expat-discuss] Howto combine tags with different context via XML::Parser Message-ID: <316c5a5d0605290627h3144f0e3odf4f7b62e0149746@mail.gmail.com> Hi XML::Parser Users I am new to XML parsing with the XML::Parser. Maybe some of you know the solution to the following problem: Description I want to generate one htmlpage (site) with links to other html pages (site1, site2) which will also be created while parsing the following XML file: The issue is how to detect on which htmlpage (site1 or site 2) the will be inserted I am using the stream style of XML::PARSER and put the following code in starttag: if ($starttag eq "tag1" ) { print $site "tag1"; } How can I detect the variable $site, whether it is site1 or site2 ? best regards Peter From maxb1 at ukf.net Tue May 30 16:01:54 2006 From: maxb1 at ukf.net (Max Bowsher) Date: Tue, 30 May 2006 15:01:54 +0100 Subject: [Expat-discuss] Missing feature: Inability to request the use of SkippedEntityHandler through code alone. Message-ID: <447C5052.9040309@ukf.net> For applications which need to reproduce the parsed XML with minimal representational change (e.g., so that the modified document can be reasonably diff-ed against the original), it is critical to know about entities themselves, rather than what they represent. However, even if the application provides a SkippedEntityHandler, expat ignores it, prefering to raise an error, unless the document itself contains a DTD including a parameter entity reference. It should be possible for the application using expat to request that all undefined entities be reported to the SkippedEntityHandler regardless of the document itself. Thanks, Max. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 188 bytes Desc: OpenPGP digital signature Url : http://mail.libexpat.org/pipermail/expat-discuss/attachments/20060530/67106e2c/attachment.pgp From karl at waclawek.net Wed May 31 01:32:12 2006 From: karl at waclawek.net (Karl Waclawek) Date: Tue, 30 May 2006 19:32:12 -0400 Subject: [Expat-discuss] Missing feature: Inability to request the use of SkippedEntityHandler through code alone. In-Reply-To: <447C5052.9040309@ukf.net> References: <447C5052.9040309@ukf.net> Message-ID: <447CD5FC.5050007@waclawek.net> Max Bowsher wrote: > For applications which need to reproduce the parsed XML with minimal > representational change (e.g., so that the modified document can be > reasonably diff-ed against the original), it is critical to know about > entities themselves, rather than what they represent. > > However, even if the application provides a SkippedEntityHandler, expat > ignores it, prefering to raise an error, unless the document itself > contains a DTD including a parameter entity reference. > In specific circumstances the XML spec requires the parser to return an error. Here is a comment from expat.h regarding the skipped entity handler : /* This is called in two situations: 1) An entity reference is encountered for which no declaration has been read *and* this is not an error. 2) An internal entity reference is read, but not expanded, because XML_SetDefaultHandler has been called. Note: skipped parameter entities in declarations and skipped general entities in attribute values cannot be reported, because the event would be out of sync with the reporting of the declarations or attribute values */ > It should be possible for the application using expat to request that > all undefined entities be reported to the SkippedEntityHandler > regardless of the document itself. > That would not conform to the XML spec. Maybe what you need can be approximated with the use of the default handler, and maybe by inserting a standalone declaration or by calling XML_SetParamEntityParsing with an appropriate value. Karl