From tim.fornoville at web.de Tue Jan 7 22:25:56 2003 From: tim.fornoville at web.de (tim fornoville) Date: Tue Jan 7 16:27:03 2003 Subject: [Expat-discuss] example for nested expatpp???? Message-ID: <200301072125.h07LPuO28851@mailgate5.cinetic.de> hi, can somebody help me, I'm looking for an example how to use the nested expatparser... thx tim ______________________________________________________________________________ Ent- oder weder? Nein! Wer den nicht kauft, der platzt vor Neid: M E D I O N - PC P4 2.4 kompl. nur 969,- http://www.mempag.de/xmas3.php From swapnel.shrivastava at mentorix.com Mon Jan 13 10:52:07 2003 From: swapnel.shrivastava at mentorix.com (Swapnel) Date: Mon Jan 13 00:17:34 2003 Subject: [Expat-discuss] Message-ID: Hi All, We are using Expat 1.95.5 with our 'C' language application for parsing the XML file. The problem is we do not know in advance which encoding standard is used and in which editor it is saved. For Eg: the file can be created using windows-95 notepad or win-2000 notepad.exe wherin you specify which encoding to use.. Kindly help in solving this problem.. Regards, Swapnel Shrivastava Mentorix Learning Technologies Pvt. Ltd. www.mentorix.com Phone : 022-56930202 Ext-429 From karl at waclawek.net Mon Jan 13 09:26:16 2003 From: karl at waclawek.net (Karl Waclawek) Date: Mon Jan 13 09:26:24 2003 Subject: [Expat-discuss] References: Message-ID: <001d01c2bb0f$bb925c30$9e539696@citkwaclaww2k> ----- Original Message ----- From: "Swapnel" To: Sent: Monday, January 13, 2003 12:22 AM Subject: [Expat-discuss] > Hi All, > We are using Expat 1.95.5 with our 'C' language application for parsing the > XML file. The problem is we do not know in advance which encoding standard > is used and in which editor it is saved. > For Eg: the file can be created using windows-95 notepad or win-2000 > notepad.exe wherin you specify which encoding to use.. > Kindly help in solving this problem.. By default Expat supports these encodings: a.. UTF-8 b.. UTF-16 c.. ISO-8859-1 d.. US-ASCII which can be extended using the UnknownEncoding handler. So, as long as your XML files are well-formed and encoded with one of the above, you should not have to do anything special. Karl From swapnel.shrivastava at mentorix.com Tue Jan 14 11:16:23 2003 From: swapnel.shrivastava at mentorix.com (Swapnel) Date: Tue Jan 14 00:41:48 2003 Subject: [Expat-discuss] Message-ID: Dear All, The problem is : If the Encoding scheme specified in XML document is "windows=1252" . and the file is saved using Notepad of win-2000 stating encoding scheme as Unicode then Expat doesnot parse the document. But the same file if saved by notepad setting encoding "ANSI" or "UTF-8" then process is carried out smoothly. Eg: XML document : . The editor used to saved this document is win-2000 notepad with encoding option as unicode. Expat is not able to parse this document. Is there any way by which expat can cnvert the XML document saved with Encoding scheme UNICODE to ANSI or UTF-8 and then it takes for parsing? I hope I am able to explain the problem corrrectly!!!!!!! Regards, Swapnel Shrivastava Mentorix Learning Technologies Pvt. Ltd. www.mentorix.com Phone : 022-56930202 Ext-429 From fdrake at acm.org Tue Jan 14 09:48:15 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Tue Jan 14 09:48:51 2003 Subject: [Expat-discuss] Windows-1252 and Latin-1 In-Reply-To: References: Message-ID: <15908.9007.537441.609585@grendel.zope.com> Swapnel writes: > Dear All, > The problem is : If the Encoding scheme specified in XML document is > "windows=1252" . and the file is saved using Notepad of win-2000 stating > encoding scheme as Unicode then Expat doesnot parse the document. But the > same file if saved by notepad setting encoding "ANSI" or "UTF-8" then > process is carried out smoothly. > > Eg: > XML document : . > The editor used to saved this document is win-2000 notepad with encoding > option as unicode. Expat is not able to parse this document. Hmm. According to this page: http://www.microsoft.com/globaldev/reference/sbcs/1252.htm "Windows-1252" is a synonym for Latin-1, or ISO-8859-1 (I didn't compare the table codepoint-by-codepoint, just trusting the text of the page). If you use ISO-8859-1 in the XML declaration, Expat should be perfectly happy. The issue is that Windows-1252 is a non-standard name for the encoding. We should consider adding "windows-1252" to the list of supported encodings for Expat since it is (supposedly) identical with Latin-1. > Is there any way by which expat can cnvert the XML document saved with > Encoding scheme UNICODE to ANSI or UTF-8 and then it takes for parsing? In general, you can tell Expat to assume the data is in a particular encoding by specifying the encoding in the call to XML_ParserCreate(), and then re-encode the input yourself. Another option is to use the facilities Expat provides to hook in additional decoders; see the reference.html file that comes with Expat for API information. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From blew at medis.nl Tue Jan 14 16:02:31 2003 From: blew at medis.nl (Baldur van Lew) Date: Tue Jan 14 10:04:25 2003 Subject: [Expat-discuss] Windows-1252 and Latin-1 Message-ID: Unfortunately 1252 isn't the same as Latin-1 (ISO-8859-1) - this is a constant source of confusion. Specifically in the range 80-9F Windows 1252 has a number of characters defined which do not appear in 8859-1 "EUR'f"...??^?SoezY" - if you're running windows check the Character Map application with subset Windows Characters. I assume you have to define your own encoding table to handle this (extended latin1 table?). Baldur van Lew -----Original Message----- From: Fred L. Drake, Jr. [mailto:fdrake@acm.org] Sent: Tuesday, January 14, 2003 3:48 PM To: swapnel.shrivastava@mentorix.com Cc: expat-discuss@libexpat.org Subject: Re: [Expat-discuss] Windows-1252 and Latin-1 Swapnel writes: > Dear All, > The problem is : If the Encoding scheme specified in XML document is > "windows=1252" . and the file is saved using Notepad of win-2000 stating > encoding scheme as Unicode then Expat doesnot parse the document. But the > same file if saved by notepad setting encoding "ANSI" or "UTF-8" then > process is carried out smoothly. > > Eg: > XML document : . > The editor used to saved this document is win-2000 notepad with encoding > option as unicode. Expat is not able to parse this document. Hmm. According to this page: http://www.microsoft.com/globaldev/reference/sbcs/1252.htm "Windows-1252" is a synonym for Latin-1, or ISO-8859-1 (I didn't compare the table codepoint-by-codepoint, just trusting the text of the page). If you use ISO-8859-1 in the XML declaration, Expat should be perfectly happy. The issue is that Windows-1252 is a non-standard name for the encoding. We should consider adding "windows-1252" to the list of supported encodings for Expat since it is (supposedly) identical with Latin-1. > Is there any way by which expat can cnvert the XML document saved with > Encoding scheme UNICODE to ANSI or UTF-8 and then it takes for parsing? In general, you can tell Expat to assume the data is in a particular encoding by specifying the encoding in the call to XML_ParserCreate(), and then re-encode the input yourself. Another option is to use the facilities Expat provides to hook in additional decoders; see the reference.html file that comes with Expat for API information. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation _______________________________________________ Expat-discuss mailing list Expat-discuss@libexpat.org http://mail.libexpat.org/mailman/listinfo/expat-discuss From carlos at pehoe.civil.ist.utl.pt Tue Jan 14 15:03:47 2003 From: carlos at pehoe.civil.ist.utl.pt (Carlos Pereira) Date: Tue Jan 14 10:11:21 2003 Subject: [Expat-discuss] Windows-1252 and Latin-1 Message-ID: <200301141503.h0EF3lT04885@pehoe.civil.ist.utl.pt> >We should consider adding "windows-1252" to the list of supported >encodings for Expat since it is (supposedly) identical with Latin-1. I respectfully disagree >The issue is that Windows-1252 is a non-standard >name for the encoding. because of this. Carlos From fdrake at acm.org Tue Jan 14 10:42:53 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Tue Jan 14 10:43:33 2003 Subject: [Expat-discuss] Windows-1252 and Latin-1 In-Reply-To: References: Message-ID: <15908.12285.416610.215554@grendel.zope.com> Baldur van Lew writes: > Unfortunately 1252 isn't the same as Latin-1 (ISO-8859-1) - this is a > constant source of confusion. Given that I was relying on Microsoft's own documentation, I can see where that would spring up. ;-( > Specifically in the range 80-9F Windows 1252 has a number of characters > defined which do not appear in 8859-1 > > "EUR'f"...??^?SoezY" - if you're running windows check > the Character Map application with subset Windows Characters. I've got it on my home box (unfortunately), which is about 7 hours away. ;-) > I assume you have to define your own encoding table to handle this (extended > latin1 table?). Yes. There is a defined API to allow this to be done. Our long-term roadmap includes providing an additional library that supports many additional encodings such as these weird Windows code pages), but we really haven't had time to spend on that at this point. Day jobs and all that, you know. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From bcrowley at mystudyweb.com Wed Jan 15 01:00:26 2003 From: bcrowley at mystudyweb.com (Brian Crowley) Date: Tue Jan 14 12:00:39 2003 Subject: [Expat-discuss] Re: Expat-discuss Digest, Vol 34, Issue 3 Message-ID: <774834189@mail.mystudyweb.com> ****** This is an auto respone to your mail ******* Thanksyou for sending an e-mail to Brian Crowley . I will reply your mail as soon as possible From miallen at eskimo.com Wed Jan 15 02:44:10 2003 From: miallen at eskimo.com (Michael B. Allen) Date: Wed Jan 15 02:41:24 2003 Subject: [Expat-discuss] Parsing External Entities Message-ID: <20030115024410.6c252432.miallen@eskimo.com> I have two questions regarding parsing external entities. First I have an XML file: ]> The entity is: &E; and the DTD it references has one useless ELEMENT declaration: Now this may be my ignorace of XML but when I run this through my dump program which just regurgitates XML the ExternalEntityRefHandler runs OK and as you can see from the dialog below it completed parsing the DOCTYPE definition however it is not resolving the internal entity 'E'. If I remove 'SYSTEM "err.dtd"' the entity is resolved properly and the program completes successfully. Why does this happen? ]> expatdump.c:270:parse: An XML parser error occured: line 6 col 15 off 40: undefined entity: eneral entity"> ]> The entity is: &E; ^ expatdump.c:352:expatdump: expatdump.c:380:main: Failure Also, using the external entity XML_Parser created with XML_ExternalEntityParserCreate my dump program segfaults if I attempt to free it with XML_ParserFree. I suppose this parser is simply the same parser in a different state and therefore I need not free it? Thanks, Mike -- A program should be written to model the concepts of the task it performs rather than the physical world or a process because this maximizes the potential for it to be applied to tasks that are conceptually similar and, more important, to tasks that have not yet been conceived. From karl at waclawek.net Wed Jan 15 09:11:51 2003 From: karl at waclawek.net (Karl Waclawek) Date: Wed Jan 15 09:11:58 2003 Subject: [Expat-discuss] Parsing External Entities References: <20030115024410.6c252432.miallen@eskimo.com> Message-ID: <001101c2bca0$0ca22f60$9e539696@citkwaclaww2k> ----- Original Message ----- From: "Michael B. Allen" To: Sent: Wednesday, January 15, 2003 2:44 AM > Now this may be my ignorace of XML but when I run this through my > dump program which just regurgitates XML the ExternalEntityRefHandler > runs OK and as you can see from the dialog below it completed parsing > the DOCTYPE definition however it is not resolving the internal entity > 'E'. If I remove 'SYSTEM "err.dtd"' the entity is resolved properly and > the program completes successfully. Why does this happen? > > > > > ]> > expatdump.c:270:parse: An XML parser error occured: line 6 col 15 off 40: undefined entity: > eneral entity"> ]> The entity is: &E; > ^ > expatdump.c:352:expatdump: > expatdump.c:380:main: Failure This should work. You should provide more detail about how you are setting up and calling Expat. Reduce it to a short code example and post it. > > Also, using the external entity XML_Parser created with > XML_ExternalEntityParserCreate my dump program segfaults if I attempt > to free it with XML_ParserFree. I suppose this parser is simply the same > parser in a different state and therefore I need not free it? No, you must free it. Need more detail. Which version of Expat are you using? Karl From karl at waclawek.net Wed Jan 15 10:38:52 2003 From: karl at waclawek.net (Karl Waclawek) Date: Wed Jan 15 10:38:55 2003 Subject: [Expat-discuss] New API: XML_FreeContentModel Message-ID: <005201c2bcac$348b0cc0$9e539696@citkwaclaww2k> When using the element declaration handler, typedef void (*XML_ElementDeclHandler)(void *userData, const XML_Char *name, XML_Content *model); it is the application's responsibility to free the content model argument. The only way to do this from languages other than C/C++ is to create a parser instance passing it application supplied memory management function pointers (with XML_ParserCreate_MM). This makes it hard or impossible to use Expat from languages that cannot supply such C-compatible (signature *and* semantics) memory handlers, but can access a Dll or shared library otherwise (like VB). For that purpose I suggest adding a new API to Expat: XMLPARSEAPI(void) XML_FreeContentModel(XML_Parser parser, XML_Content *model); This not only solves the problem above, but is also better from a design perspective, since currently the application using Expat has to know that Expat allocated the content model in one contiguous chunk of memory. The API above hides that implementation detail. As an alternative solution we have also had a request to add an API that returns the memory handling suite of function pointers, like XMLPARSEAPI(const XML_Memory_Handling_Suite *) XML_GetMemSuite(XML_Parser parser); allowing the application to free the content model natively. However, this would not hide the implementation details of how the content model is allocated. Feedback welcome, Karl From bcrowley at mystudyweb.com Thu Jan 16 01:00:13 2003 From: bcrowley at mystudyweb.com (Brian Crowley) Date: Wed Jan 15 12:00:22 2003 Subject: [Expat-discuss] Re: Expat-discuss Digest, Vol 34, Issue 4 Message-ID: <774899718@mail.mystudyweb.com> ****** This is an auto respone to your mail ******* Thanksyou for sending an e-mail to Brian Crowley . I will reply your mail as soon as possible From whitemar at us.ibm.com Wed Jan 15 15:04:46 2003 From: whitemar at us.ibm.com (Marc White) Date: Wed Jan 15 15:06:44 2003 Subject: [Expat-discuss] Expat and 4-byte wchar_t Message-ID: Hi all. My team is currently using expat version 1.2. In the header file xmlparse.h, there is a comment that says XML_UNICODE_WCHAR_T will only work if sizeof(wchar_t) == 2. Does this restriction still apply to the latest version (1.95.5)? I was unable to find the same comment indicating that it would not work, although our tests with this version with a 4-byte wchar_t, have not been successful so far. Thanks. -Marc From karl at waclawek.net Wed Jan 15 15:22:16 2003 From: karl at waclawek.net (Karl Waclawek) Date: Wed Jan 15 15:22:23 2003 Subject: [Expat-discuss] Expat and 4-byte wchar_t References: Message-ID: <006801c2bcd3$cc4a54e0$9e539696@citkwaclaww2k> ----- Original Message ----- From: "Marc White" To: Sent: Wednesday, January 15, 2003 3:04 PM Subject: [Expat-discuss] Expat and 4-byte wchar_t > Hi all. > > My team is currently using expat version 1.2. In the header file > xmlparse.h, there is a comment that says XML_UNICODE_WCHAR_T will only > work if sizeof(wchar_t) == 2. Does this restriction still apply to the > latest version (1.95.5)? I was unable to find the same comment indicating > that it would not work, although our tests with this version with a 4-byte > wchar_t, have not been successful so far. Even if it worked, this would produce incorrect output, since the code unit size for UTF-16 is 2 bytes,and Expat only produces UTF-8 or UTF-16 output. However, if your compiler supports changing the size of wchar_t (newer versions of gcc do) then you should be OK. If not, do not define XML_UNICODE_WCHAR_T, but define XML_UNICODE. Expat will then produce output as unsigned short * (except for error and version strings, which will be char *). Karl From jeremy.kloth at fourthought.com Wed Jan 15 14:03:27 2003 From: jeremy.kloth at fourthought.com (Jeremy Kloth) Date: Wed Jan 15 16:05:17 2003 Subject: [Expat-discuss] 1.95.6? Message-ID: <1042664617.18691.42.camel@hades> I was wondering when 1.95.6 is planned on being released. The CVS no longer causes segfaults in our project (Fourthought's 4Suite), however I would rather use a released version. Thanks, Jeremy Kloth From karl at waclawek.net Wed Jan 15 16:22:18 2003 From: karl at waclawek.net (Karl Waclawek) Date: Wed Jan 15 16:22:22 2003 Subject: [Expat-discuss] 1.95.6? References: <1042664617.18691.42.camel@hades> Message-ID: <007d01c2bcdc$2eed3600$9e539696@citkwaclaww2k> ----- Original Message ----- From: "Jeremy Kloth" To: Sent: Wednesday, January 15, 2003 4:03 PM > > I was wondering when 1.95.6 is planned on being released. The CVS no > longer causes segfaults in our project (Fourthought's 4Suite), however I > would rather use a released version. This is a matter of having the time to wrap it all up. Fred is behind a little - wink,wink. ;-) Karl From fdrake at acm.org Thu Jan 16 02:18:48 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Thu Jan 16 02:19:13 2003 Subject: [Expat-discuss] Re: Expat release In-Reply-To: <200301151147.h0FBllsX010915@mira.informatik.hu-berlin.de> References: <1042664617.18691.42.camel@hades> <007d01c2bcdc$2eed3600$9e539696@citkwaclaww2k> <200301151147.h0FBllsX010915@mira.informatik.hu-berlin.de> Message-ID: <15910.23768.399502.566935@grendel.zope.com> Martin v. L?wis writes: > Do you think an Expat release might be forthcoming? Jeremy Kloth writes: > I was wondering when 1.95.6 is planned on being released. The CVS no > longer causes segfaults in our project (Fourthought's 4Suite), however I > would rather use a released version. Martin, Jeremy, Yes, we're planning a 1.95.6 release in the near future. The catch is... Karl Waclawek writes: > This is a matter of having the time to wrap it all up. > Fred is behind a little - wink,wink. ;-) ...that Karl is a master of understatement! I don't think there's a lot that needs to be done, but I do want to bring up some API issues on the expat-discuss list related to the XML_GetMemSuite() proposal. I started to write up the issues I see, but haven't had time to finish that and send it to the list. I'll take your gentle prods to mean I need to spend an evening finishing that up and getting it to the list, so we can decide what needs to be done for 1.95.6 and what should be done later. Sorry for the delays; there's definately a need to get 1.95.6 out the door! -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From miallen at eskimo.com Thu Jan 16 02:27:45 2003 From: miallen at eskimo.com (Michael B. Allen) Date: Thu Jan 16 02:25:05 2003 Subject: [Expat-discuss] Parsing External Entities In-Reply-To: <001101c2bca0$0ca22f60$9e539696@citkwaclaww2k> References: <20030115024410.6c252432.miallen@eskimo.com> <001101c2bca0$0ca22f60$9e539696@citkwaclaww2k> Message-ID: <20030116022745.2e94cba8.miallen@eskimo.com> On Wed, 15 Jan 2003 09:11:51 -0500 "Karl Waclawek" wrote: > > Now this may be my ignorace of XML but when I run this through my > > dump program which just regurgitates XML the ExternalEntityRefHandler > > runs OK and as you can see from the dialog below it completed parsing > > the DOCTYPE definition however it is not resolving the internal entity > > 'E'. If I remove 'SYSTEM "err.dtd"' the entity is resolved properly and > > the program completes successfully. Why does this happen? > > > > > > > > > > > ]> > > expatdump.c:270:parse: An XML parser error occured: line 6 col 15 off 40: undefined entity: > > eneral entity"> ]> The entity is: &E; > > ^ > > expatdump.c:352:expatdump: > > expatdump.c:380:main: Failure > > This should work. > You should provide more detail about how you are setting up > and calling Expat. Reduce it to a short code example and post it. Ok. Attached err.c with err.xml and err.dtd gives me: [miallen@miallen3 tests]$ ./err.o err.xml DOCTYPE err [ ENTITY E ELEMENT employeeId ] Error parsing external entity: undefined entity Failure > > > > > Also, using the external entity XML_Parser created with > > XML_ExternalEntityParserCreate my dump program segfaults if I attempt > > to free it with XML_ParserFree. I suppose this parser is simply the same > > parser in a different state and therefore I need not free it? > > No, you must free it. Need more detail. > Which version of Expat are you using? 1.95.2-2 RPM from RH 7.3 Also, to what extent do we free the XML_Content model in element declaration handlers? Is that one chunk of memory? Otherwise if I try to recursively free children I segfault. Thanks for your help, Mike -- A program should be written to model the concepts of the task it performs rather than the physical world or a process because this maximizes the potential for it to be applied to tasks that are conceptually similar and, more important, to tasks that have not yet been conceived. -------------- next part -------------- A non-text attachment was scrubbed... Name: err.c Type: application/octet-stream Size: 4625 bytes Desc: not available Url : http://mail.libexpat.org/pipermail/expat-discuss/attachments/20030116/f4102bba/err.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: err.xml Type: text/xml Size: 191 bytes Desc: not available Url : http://mail.libexpat.org/pipermail/expat-discuss/attachments/20030116/f4102bba/err.xml -------------- next part -------------- A non-text attachment was scrubbed... Name: err.dtd Type: application/octet-stream Size: 45 bytes Desc: not available Url : http://mail.libexpat.org/pipermail/expat-discuss/attachments/20030116/f4102bba/err-0001.obj From karl at waclawek.net Thu Jan 16 09:52:11 2003 From: karl at waclawek.net (Karl Waclawek) Date: Thu Jan 16 09:52:14 2003 Subject: [Expat-discuss] Parsing External Entities References: <20030115024410.6c252432.miallen@eskimo.com><001101c2bca0$0ca22f60$9e539696@citkwaclaww2k> <20030116022745.2e94cba8.miallen@eskimo.com> Message-ID: <001901c2bd6e$d9619b20$9e539696@citkwaclaww2k> ----- Original Message ----- From: "Michael B. Allen" To: "Karl Waclawek" Cc: Sent: Thursday, January 16, 2003 2:27 AM Subject: Re: [Expat-discuss] Parsing External Entities > > > Also, using the external entity XML_Parser created with > > > XML_ExternalEntityParserCreate my dump program segfaults if I attempt > > > to free it with XML_ParserFree. I suppose this parser is simply the same > > > parser in a different state and therefore I need not free it? > > > > No, you must free it. Need more detail. > > Which version of Expat are you using? > > 1.95.2-2 RPM from RH 7.3 Please try the current CVS release. We have really done a lot of fixing. A few bugs and a lot of conformance and feature completion like UTF-16 output and NS triplets are working now. > Also, to what extent do we free the XML_Content model in element > declaration handlers? Is that one chunk of memory? Otherwise if I try > to recursively free children I segfault. This was mentioned in a very recent message on this list. It is one chunk, but we are thinking to add either an XML_FreeContentModel function or an XML_GetMemSuite function to the API. Karl From miallen at eskimo.com Thu Jan 16 10:38:53 2003 From: miallen at eskimo.com (Michael B. Allen) Date: Thu Jan 16 10:37:44 2003 Subject: [Expat-discuss] Parsing External Entities In-Reply-To: <001901c2bd6e$d9619b20$9e539696@citkwaclaww2k> References: <20030115024410.6c252432.miallen@eskimo.com> <001101c2bca0$0ca22f60$9e539696@citkwaclaww2k> <20030116022745.2e94cba8.miallen@eskimo.com> <001901c2bd6e$d9619b20$9e539696@citkwaclaww2k> Message-ID: <20030116103853.4a68ee29.miallen@eskimo.com> On Thu, 16 Jan 2003 09:52:11 -0500 "Karl Waclawek" wrote: > > ----- Original Message ----- > From: "Michael B. Allen" > To: "Karl Waclawek" > Cc: > Sent: Thursday, January 16, 2003 2:27 AM > Subject: Re: [Expat-discuss] Parsing External Entities > > > > > > Also, using the external entity XML_Parser created with > > > > XML_ExternalEntityParserCreate my dump program segfaults if I attempt > > > > to free it with XML_ParserFree. I suppose this parser is simply the same > > > > parser in a different state and therefore I need not free it? > > > > > > No, you must free it. Need more detail. > > > Which version of Expat are you using? > > > > 1.95.2-2 RPM from RH 7.3 > > Please try the current CVS release. We have really done a lot of fixing. > A few bugs and a lot of conformance and feature completion > like UTF-16 output and NS triplets are working now. I do not need external entity parsing explicitly. I was just trying to get Expat to do whatever it can so that I can expose the functionality in my DOM ("DOMC"). I don't want users to be required to use a bleeding edge Expat. I will just punt on external entites for now. But it seems strange that these functions are available and do not work as advertised. Is this really the case that you simply cannot parse external entities with 1.95.2? > > > Also, to what extent do we free the XML_Content model in element > > declaration handlers? Is that one chunk of memory? Otherwise if I try > > to recursively free children I segfault. > > This was mentioned in a very recent message on this list. > It is one chunk, but we are thinking to add either an XML_FreeContentModel > function or an XML_GetMemSuite function to the API. > > Karl > -- A program should be written to model the concepts of the task it performs rather than the physical world or a process because this maximizes the potential for it to be applied to tasks that are conceptually similar and, more important, to tasks that have not yet been conceived. From karl at waclawek.net Thu Jan 16 11:02:36 2003 From: karl at waclawek.net (Karl Waclawek) Date: Thu Jan 16 11:02:54 2003 Subject: [Expat-discuss] Parsing External Entities References: <20030115024410.6c252432.miallen@eskimo.com><001101c2bca0$0ca22f60$9e539696@citkwaclaww2k><20030116022745.2e94cba8.miallen@eskimo.com><001901c2bd6e$d9619b20$9e539696@citkwaclaww2k> <20030116103853.4a68ee29.miallen@eskimo.com> Message-ID: <003901c2bd78$afbd9e40$9e539696@citkwaclaww2k> ----- Original Message ----- From: "Michael B. Allen" To: "Karl Waclawek" Cc: Sent: Thursday, January 16, 2003 10:38 AM Subject: Re: [Expat-discuss] Parsing External Entities > > > > No, you must free it. Need more detail. > > > > Which version of Expat are you using? > > > > > > 1.95.2-2 RPM from RH 7.3 > > > > Please try the current CVS release. We have really done a lot of fixing. > > A few bugs and a lot of conformance and feature completion > > like UTF-16 output and NS triplets are working now. > > I do not need external entity parsing explicitly. I was just trying to > get Expat to do whatever it can so that I can expose the functionality in > my DOM ("DOMC"). I don't want users to be required to use a bleeding edge > Expat. In this case bleeding edge means: better, not necessarily riskier. > I will just punt on external entites for now. But it seems strange > that these functions are available and do not work as advertised. Is > this really the case that you simply cannot parse external entities with > 1.95.2? I joined the team after the 1.95.2 release, but there have been a lot of improvements for external entity parsing. However, your example should work. Here is what my testing on MS VC++ shows: There is a problem with free(model) - I get an invalid heap pointer exception. Possibly the Expat Dll and the app are using different memory managers/heaps. Your subsequent problem with XML_ParserFree may have been caused indirectly by free(model). Try using XML_ParserCreate_MM or linking Expat statically. When I use the (not yet released) XML_FreeContentModel, then I have no problem. I can also use XML_ParserFree on the external entity parser without problems. So, with XML_FreeContentModel, your example works fine for me. Let me know if using XML_ParserCreate_MM supplying your own free,malloc, etc.helps. Karl From bcrowley at mystudyweb.com Fri Jan 17 00:03:03 2003 From: bcrowley at mystudyweb.com (Brian Crowley) Date: Thu Jan 16 11:04:34 2003 Subject: [Expat-discuss] Re: Expat-discuss Digest, Vol 34, Issue 5 Message-ID: <774963297@mail.mystudyweb.com> ****** This is an auto respone to your mail ******* Thanksyou for sending an e-mail to Brian Crowley . I will reply your mail as soon as possible From karl at waclawek.net Thu Jan 16 11:08:49 2003 From: karl at waclawek.net (Karl Waclawek) Date: Thu Jan 16 11:08:58 2003 Subject: [Expat-discuss] Parsing External Entities References: <20030115024410.6c252432.miallen@eskimo.com><001101c2bca0$0ca22f60$9e539696@citkwaclaww2k><20030116022745.2e94cba8.miallen@eskimo.com><001901c2bd6e$d9619b20$9e539696@citkwaclaww2k> <20030116103853.4a68ee29.miallen@eskimo.com> Message-ID: <000b01c2bd79$8e7fd530$9e539696@citkwaclaww2k> ----- Original Message ----- From: "Michael B. Allen" To: "Karl Waclawek" Cc: Sent: Thursday, January 16, 2003 10:38 AM > I do not need external entity parsing explicitly. I was just trying to > get Expat to do whatever it can so that I can expose the functionality in > my DOM ("DOMC"). So, you want to build a DOM on top of Expat? If it helps: Expat can do pretty much everything that is defined in SAX2 with all currently defined extensions. Karl From bcrowley at mystudyweb.com Fri Jan 17 01:46:16 2003 From: bcrowley at mystudyweb.com (Brian Crowley) Date: Thu Jan 16 12:46:24 2003 Subject: [Expat-discuss] Re: Expat-discuss Digest, Vol 34, Issue 6 Message-ID: <774966728@mail.mystudyweb.com> ****** This is an auto respone to your mail ******* Thanksyou for sending an e-mail to Brian Crowley . I will reply your mail as soon as possible From jeremy.kloth at fourthought.com Thu Jan 16 10:53:02 2003 From: jeremy.kloth at fourthought.com (Jeremy Kloth) Date: Thu Jan 16 12:53:32 2003 Subject: [Expat-discuss] New API: XML_FreeContentModel In-Reply-To: <005201c2bcac$348b0cc0$9e539696@citkwaclaww2k> References: <005201c2bcac$348b0cc0$9e539696@citkwaclaww2k> Message-ID: <1042739588.32146.64.camel@hades> On Wed, 2003-01-15 at 08:38, Karl Waclawek wrote: > When using the element declaration handler, > > typedef void > (*XML_ElementDeclHandler)(void *userData, > const XML_Char *name, > XML_Content *model); > > it is the application's responsibility to free the content model argument. > > The only way to do this from languages other than C/C++ is to create > a parser instance passing it application supplied memory management > function pointers (with XML_ParserCreate_MM). > > This makes it hard or impossible to use Expat from languages that cannot > supply such C-compatible (signature *and* semantics) memory handlers, > but can access a Dll or shared library otherwise (like VB). > > For that purpose I suggest adding a new API to Expat: > > XMLPARSEAPI(void) > XML_FreeContentModel(XML_Parser parser, XML_Content *model); > > This not only solves the problem above, but is also better from > a design perspective, since currently the application using Expat > has to know that Expat allocated the content model in one contiguous > chunk of memory. The API above hides that implementation detail. > +1 for this > As an alternative solution we have also had a request to add an API > that returns the memory handling suite of function pointers, like > > XMLPARSEAPI(const XML_Memory_Handling_Suite *) > XML_GetMemSuite(XML_Parser parser); > > allowing the application to free the content model natively. > However, this would not hide the implementation details of > how the content model is allocated. > -1 for using this to free the content model. +0 otherwise Instead of returning the memsuite, how about a trio of functions like XMLPARSEAPI(void *) XML_MemMalloc(XML_Parser parser, size_t size); XMLPARSEAPI(void *) XML_MemRealloc(XML_Parser parser, void *ptr, size_t size); XMLPARSEAPI(void) XML_MemFree(XML_Parser parser, void *ptr); Jeremy Kloth From fdrake at acm.org Thu Jan 16 13:05:04 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Thu Jan 16 13:06:59 2003 Subject: [Expat-discuss] New API: XML_FreeContentModel In-Reply-To: <1042739588.32146.64.camel@hades> References: <005201c2bcac$348b0cc0$9e539696@citkwaclaww2k> <1042739588.32146.64.camel@hades> Message-ID: <15910.62544.76872.790261@grendel.zope.com> On Wed, 2003-01-15 at 08:38, Karl Waclawek wrote: > XMLPARSEAPI(void) > XML_FreeContentModel(XML_Parser parser, XML_Content *model); > > This not only solves the problem above, but is also better from > a design perspective, since currently the application using Expat > has to know that Expat allocated the content model in one contiguous > chunk of memory. The API above hides that implementation detail. Jeremy Kloth writes: > +1 for this +1 here also. Karl: > As an alternative solution we have also had a request to add an API > that returns the memory handling suite of function pointers, like > > XMLPARSEAPI(const XML_Memory_Handling_Suite *) > XML_GetMemSuite(XML_Parser parser); > > allowing the application to free the content model natively. > However, this would not hide the implementation details of > how the content model is allocated. Jeremy: > -1 for using this to free the content model. -1 here as well, for this use of the returned mem-suite thingie. > Instead of returning the memsuite, how about a trio of functions like > > XMLPARSEAPI(void *) > XML_MemMalloc(XML_Parser parser, size_t size); > > XMLPARSEAPI(void *) > XML_MemRealloc(XML_Parser parser, void *ptr, size_t size); > > XMLPARSEAPI(void) > XML_MemFree(XML_Parser parser, void *ptr); +1. This is much better as far as I'm concerned, and alleviates the issues I had with the XML_GetMemSuite() approach. Since it solves all the use cases I know of, I'd be happy to see this done as part of 1.95.6. It also allows Expat to add a layer between the memory suite functions and what it returns if that proves reasonable (for example, by using some sort or arena-based allocator which gets arenas from the memory suite, but does everything else internally). I should be able to implement this sometime this weekend if Karl doesn't beat me to it. ;-) 1.95.6 might not be too far off! -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From karl at waclawek.net Thu Jan 16 13:59:01 2003 From: karl at waclawek.net (Karl Waclawek) Date: Thu Jan 16 13:59:11 2003 Subject: [Expat-discuss] New API: XML_FreeContentModel References: <005201c2bcac$348b0cc0$9e539696@citkwaclaww2k><1042739588.32146.64.camel@hades> <15910.62544.76872.790261@grendel.zope.com> Message-ID: <004701c2bd91$54ffe800$9e539696@citkwaclaww2k> > > XMLPARSEAPI(void) > > XML_FreeContentModel(XML_Parser parser, XML_Content *model); > > > > This not only solves the problem above, but is also better from > > a design perspective, since currently the application using Expat > > has to know that Expat allocated the content model in one contiguous > > chunk of memory. The API above hides that implementation detail. > > Jeremy Kloth writes: > > +1 for this > > +1 here also. > > > XMLPARSEAPI(const XML_Memory_Handling_Suite *) > > XML_GetMemSuite(XML_Parser parser); > > > > allowing the application to free the content model natively. > > However, this would not hide the implementation details of > > how the content model is allocated. > > Jeremy: > > -1 for using this to free the content model. > > -1 here as well, for this use of the returned mem-suite thingie. > > > Instead of returning the memsuite, how about a trio of functions like > > > > XMLPARSEAPI(void *) > > XML_MemMalloc(XML_Parser parser, size_t size); > > > > XMLPARSEAPI(void *) > > XML_MemRealloc(XML_Parser parser, void *ptr, size_t size); > > > > XMLPARSEAPI(void) > > XML_MemFree(XML_Parser parser, void *ptr); > > +1. Does thise mean you guys want both? XML_FreeContentModel and the memory functions? > This is much better as far as I'm concerned, and alleviates the issues > I had with the XML_GetMemSuite() approach. Since it solves all the > use cases I know of, Which use cases did you think of? And what were your issues? > I'd be happy to see this done as part of 1.95.6. > It also allows Expat to add a layer between the memory suite functions > and what it returns if that proves reasonable (for example, by using > some sort or arena-based allocator which gets arenas from the memory > suite, but does everything else internally). I just remembered we discussed another memory handling related topic a while back. The goal was to find a way for Expat to track memory allocations in order to be able to counteract one of those "a million laughs" XML attacks. However, I believe we found that we would have to add an XML_Parser parameter to the memory (de)allocation calls to be able to track this on a per instance basis. Any thoughts? Should this be considered? > I should be able to implement this sometime this weekend if Karl > doesn't beat me to it. ;-) 1.95.6 might not be too far off! So, just to make sure: what is the final proposal? Karl From jeremy.kloth at fourthought.com Thu Jan 16 13:36:56 2003 From: jeremy.kloth at fourthought.com (Jeremy Kloth) Date: Thu Jan 16 15:37:45 2003 Subject: [Expat-discuss] New API: XML_FreeContentModel In-Reply-To: <004701c2bd91$54ffe800$9e539696@citkwaclaww2k> References: <005201c2bcac$348b0cc0$9e539696@citkwaclaww2k><1042739588.32146.64.camel@had es> <15910.62544.76872.790261@grendel.zope.com> <004701c2bd91$54ffe800$9e539696@citkwaclaww2k> Message-ID: <1042749422.18691.70.camel@hades> On Thu, 2003-01-16 at 11:59, Karl Waclawek wrote: > > Does thise mean you guys want both? XML_FreeContentModel and the > memory functions? > Since there was a request to gain access to the memory allocation routines, I would say yes. I look at this as two different things, the content model API and the memory API. Jeremy Kloth From fdrake at acm.org Thu Jan 16 15:40:59 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Thu Jan 16 15:41:27 2003 Subject: [Expat-discuss] New API: XML_FreeContentModel In-Reply-To: <1042749422.18691.70.camel@hades> References: <005201c2bcac$348b0cc0$9e539696@citkwaclaww2k> <15910.62544.76872.790261@grendel.zope.com> <004701c2bd91$54ffe800$9e539696@citkwaclaww2k> <1042749422.18691.70.camel@hades> Message-ID: <15911.6363.318522.148959@grendel.zope.com> Jeremy Kloth writes: > Since there was a request to gain access to the memory allocation > routines, I would say yes. I look at this as two different things, the > content model API and the memory API. Same here. Both are the right thing to do. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From fdrake at acm.org Thu Jan 16 15:51:08 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Thu Jan 16 15:51:43 2003 Subject: [Expat-discuss] New API: XML_FreeContentModel In-Reply-To: <004701c2bd91$54ffe800$9e539696@citkwaclaww2k> References: <005201c2bcac$348b0cc0$9e539696@citkwaclaww2k> <1042739588.32146.64.camel@hades> <15910.62544.76872.790261@grendel.zope.com> <004701c2bd91$54ffe800$9e539696@citkwaclaww2k> Message-ID: <15911.6972.743058.354472@grendel.zope.com> Karl Waclawek writes: > Does thise mean you guys want both? XML_FreeContentModel and the > memory functions? Yes. > > This is much better as far as I'm concerned, and alleviates the issues > > I had with the XML_GetMemSuite() approach. Since it solves all the > > use cases I know of, > > Which use cases did you think of? And what were your issues? I was thinking of the original use case someone had asked for this feature for; I don't remember the details, but the requestor wanted to layer some functionality into the handlers and therefore share the same allocator. The big issue I had was that we'd have yet another XML_Get*() function, but still the gets and sets would be very asymetric. Defining functionality-oriented functions (XML_MemAlloc(), etc.) avoids the weird, haphazard API that was evolving with get functions. > I just remembered we discussed another memory handling related > topic a while back. The goal was to find a way for Expat to track > memory allocations in order to be able to counteract one > of those "a million laughs" XML attacks. However, I believe we > found that we would have to add an XML_Parser parameter to > the memory (de)allocation calls to be able to track this on > a per instance basis. > > Any thoughts? Should this be considered? I think not for 1.x. *Maybe* for 2.0. There didn't seem to be much concern about the "million laughs" attack on this list, so I don't see a lot of pressure to deal with it. If I'm wrong on this, our users need to tell us, and indicate whether this solution would actually make sense for them. > So, just to make sure: what is the final proposal? - Add XML_FreeContentModel(), as you proposed. - Add XML_MemAlloc(), XML_MemRealloc(), XML_MemFree(), as Jeremy proposed. - I'll write the docs. ;-) -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From carlos at pehoe.civil.ist.utl.pt Thu Jan 16 15:59:35 2003 From: carlos at pehoe.civil.ist.utl.pt (Carlos Pereira) Date: Thu Jan 16 17:54:58 2003 Subject: [Expat-discuss] Parsing External Entities Message-ID: <200301161559.h0GFxZ208897@pehoe.civil.ist.utl.pt> > > > > > Also, using the external entity XML_Parser created with > > > > > XML_ExternalEntityParserCreate my dump program segfaults if I attempt > > > > > to free it with XML_ParserFree. I suppose this parser is simply the same > > > > > parser in a different state and therefore I need not free it? > > > > > > > > No, you must free it. Need more detail. > > > > Which version of Expat are you using? > > > > > > 1.95.2-2 RPM from RH 7.3 > > > > Please try the current CVS release. We have really done a lot of fixing. > > A few bugs and a lot of conformance and feature completion > > like UTF-16 output and NS triplets are working now. > I do not need external entity parsing explicitly. I was just trying to > get Expat to do whatever it can so that I can expose the functionality in > my DOM ("DOMC"). I don't want users to be required to use a bleeding edge > Expat. I will just punt on external entites for now. But it seems strange > that these functions are available and do not work as advertised. Is > this really the case that you simply cannot parse external entities with > 1.95.2? I have been using external entities in my code with Expat 1.95.2, using XML_ExternalEntityParserCreate and XML_ParserFree etc. without any problem. I have files that include other files which in turn include other files, without any obvious nesting limit, and everything works just fine, with this essentially recursive code. Carlos From lshen at cisco.com Thu Jan 16 14:58:21 2003 From: lshen at cisco.com (Lin Shen) Date: Thu Jan 16 17:56:21 2003 Subject: [Expat-discuss] Customize Expat Message-ID: <00b701c2bdb2$c4993b00$738b6b80@lshen> Hi, We're porting Expat(1.95.5) onto a set of devices which have very different memory budgets. I'm wondering if there is an easy way to customize Expat so that it can have different footprint sizes. We're willing to take out some features. And does anyone know what's the footprint size of a minimum Expat parser? Lin Shen Cisco System From karl at waclawek.net Thu Jan 16 20:05:58 2003 From: karl at waclawek.net (Karl Waclawek) Date: Thu Jan 16 20:03:19 2003 Subject: [Expat-discuss] Customize Expat References: <00b701c2bdb2$c4993b00$738b6b80@lshen> Message-ID: <002301c2bdc4$984a6fd0$0207a8c0@karl> ----- Original Message ----- From: "Lin Shen" To: Sent: Thursday, January 16, 2003 5:58 PM > We're porting Expat(1.95.5) onto a set of devices which have very different > memory budgets. I'm wondering if there is an easy way to customize Expat so > that it can have different footprint sizes. We're willing to take out some > features. And does anyone know what's the footprint size of a minimum Expat > parser? Try playing around with the feature macros XML_DTD and XML_MIN_SIZE, maybe also XML_CONTEXT_BYTES and XML_NS. I really don't have experience using these other than with their default settings. Karl From karl at waclawek.net Thu Jan 16 20:07:01 2003 From: karl at waclawek.net (Karl Waclawek) Date: Thu Jan 16 20:03:56 2003 Subject: [Expat-discuss] Parsing External Entities References: <200301161559.h0GFxZ208897@pehoe.civil.ist.utl.pt> Message-ID: <002901c2bdc4$bfd2d420$0207a8c0@karl> ----- Original Message ----- From: "Carlos Pereira" To: Sent: Thursday, January 16, 2003 10:59 AM > I have been using external entities in my code with Expat 1.95.2, > using XML_ExternalEntityParserCreate and XML_ParserFree etc. without > any problem. I have files that include other files which in turn > include other files, without any obvious nesting limit, and everything > works just fine, with this essentially recursive code. Did you use nested parameter entities a lot? Karl From bcrowley at mystudyweb.com Fri Jan 17 09:04:07 2003 From: bcrowley at mystudyweb.com (Brian Crowley) Date: Thu Jan 16 20:04:33 2003 Subject: [Expat-discuss] Re: Expat-discuss Digest, Vol 34, Issue 7 Message-ID: <774981763@mail.mystudyweb.com> ****** This is an auto respone to your mail ******* Thanksyou for sending an e-mail to Brian Crowley . I will reply your mail as soon as possible From miallen at eskimo.com Fri Jan 17 03:09:12 2003 From: miallen at eskimo.com (Michael B. Allen) Date: Fri Jan 17 03:06:31 2003 Subject: [Expat-discuss] Parsing External Entities In-Reply-To: <003901c2bd78$afbd9e40$9e539696@citkwaclaww2k> References: <20030115024410.6c252432.miallen@eskimo.com> <001101c2bca0$0ca22f60$9e539696@citkwaclaww2k> <20030116022745.2e94cba8.miallen@eskimo.com> <001901c2bd6e$d9619b20$9e539696@citkwaclaww2k> <20030116103853.4a68ee29.miallen@eskimo.com> <003901c2bd78$afbd9e40$9e539696@citkwaclaww2k> Message-ID: <20030117030912.4abaa908.miallen@eskimo.com> On Thu, 16 Jan 2003 11:02:36 -0500 "Karl Waclawek" wrote: > > ----- Original Message ----- > From: "Michael B. Allen" > To: "Karl Waclawek" > Cc: > Sent: Thursday, January 16, 2003 10:38 AM > Subject: Re: [Expat-discuss] Parsing External Entities > > > > > > > No, you must free it. Need more detail. > > > > > Which version of Expat are you using? > > > > > > > > 1.95.2-2 RPM from RH 7.3 > > > > > > Please try the current CVS release. We have really done a lot of fixing. > > > A few bugs and a lot of conformance and feature completion > > > like UTF-16 output and NS triplets are working now. > > > > I do not need external entity parsing explicitly. I was just trying to > > get Expat to do whatever it can so that I can expose the functionality in > > my DOM ("DOMC"). I don't want users to be required to use a bleeding edge > > Expat. > > In this case bleeding edge means: better, not necessarily riskier. > > > I will just punt on external entites for now. But it seems strange > > that these functions are available and do not work as advertised. Is > > this really the case that you simply cannot parse external entities with > > 1.95.2? > > I joined the team after the 1.95.2 release, but there have been a lot of > improvements for external entity parsing. However, your example should work. > > Here is what my testing on MS VC++ shows: > > There is a problem with free(model) - I get an invalid heap pointer exception. > Possibly the Expat Dll and the app are using different memory managers/heaps. > Your subsequent problem with XML_ParserFree may have been caused indirectly by > free(model). Well I took that out and saw no change in behavior. > Try using XML_ParserCreate_MM or linking Expat statically. Nope. Still the same result. > When I use the (not yet released) XML_FreeContentModel, then I have no problem. > > > I can also use XML_ParserFree on the external entity parser without problems. > So, with XML_FreeContentModel, your example works fine for me. > > Let me know if using XML_ParserCreate_MM supplying your own free,malloc, etc.helps. Well I tried using it will the regular malloc, realloc, and free without a difference. Otherwise I do not have an alternative mm implementation available. No biggie. I just wait on external entities with expat for now. Thanks, Mike -- A program should be written to model the concepts of the task it performs rather than the physical world or a process because this maximizes the potential for it to be applied to tasks that are conceptually similar and, more important, to tasks that have not yet been conceived. From karl at waclawek.net Fri Jan 17 09:04:12 2003 From: karl at waclawek.net (Karl Waclawek) Date: Fri Jan 17 09:04:38 2003 Subject: [Expat-discuss] Parsing External Entities References: <20030115024410.6c252432.miallen@eskimo.com><001101c2bca0$0ca22f60$9e539696@citkwaclaww2k><20030116022745.2e94cba8.miallen@eskimo.com><001901c2bd6e$d9619b20$9e539696@citkwaclaww2k><20030116103853.4a68ee29.miallen@eskimo.com><003901c2bd78$afbd9e40$9e539696@citkwaclaww2k> <20030117030912.4abaa908.miallen@eskimo.com> Message-ID: <000f01c2be31$506338b0$9e539696@citkwaclaww2k> ----- Original Message ----- From: "Michael B. Allen" To: "Karl Waclawek" Cc: ; Sent: Friday, January 17, 2003 3:09 AM > > Try using XML_ParserCreate_MM or linking Expat statically. > > Nope. Still the same result. > > > When I use the (not yet released) XML_FreeContentModel, then I have no problem. > > > > > > I can also use XML_ParserFree on the external entity parser without problems. > > So, with XML_FreeContentModel, your example works fine for me. > > > > Let me know if using XML_ParserCreate_MM supplying your own free,malloc, etc.helps. > > Well I tried using it will the regular malloc, realloc, and free > without a difference. Otherwise I do not have an alternative mm > implementation available. > > No biggie. I just wait on external entities with expat for now. I am sorry nothing helped you. Expat 1.95.2 was released July 2001, so it is quite old. We are currently wrapping up the release of 1.95.6. However, we have no control over what RedHat puts into its distributions. There are no major changes between 1.95.5 and 1.95.6, just bug/build fixes and a few API additions. 1.95.5 has been downloaded more than 80,000 times and there have been barely any complaints. Karl From carlos at pehoe.civil.ist.utl.pt Fri Jan 17 15:09:06 2003 From: carlos at pehoe.civil.ist.utl.pt (Carlos Pereira) Date: Fri Jan 17 10:05:44 2003 Subject: [Expat-discuss] Parsing External Entities Message-ID: <200301171509.h0HF96811077@pehoe.civil.ist.utl.pt> >> I have been using external entities in my code with Expat 1.95.2, >> using XML_ExternalEntityParserCreate and XML_ParserFree etc. without >> any problem. I have files that include other files which in turn >> include other files, without any obvious nesting limit, and everything >> works just fine, with this essentially recursive code. >Did you use nested parameter entities a lot? No, not really, I did it for the sake of elegance and completeness, so I can write in the manual that users can use an unlimited number of nested levels when including files, though they are discouraged of actually doing it. Although I wrote this code about one year, so some details may be missing from my memory recollection, I think that using External Entities in Expat is easy, as long as people grasp a few notions, and this should be valid for every version of Expat: When entering a new file (external entity), a new parser must be allocated, without destroying the previous parsers; when leaving that file the parser must be removed, forget about malloc and such, you must use only the functions provided by Expat only! This is copy and paste from my own (recursive) code: ----------------------------------------------- gml->parser = XML_ExternalEntityParserCreate (parser, context, NULL); gml->valid = static_import (system_id, gml); XML_ParserFree(gml->parser); ----------------------------------------------- So if you have, say, 5 nested levels, you will have this structure: parser1 = XML_ExternalEntityParserCreate parse_file1(parser1); ... parser2 = XML_ExternalEntityParserCreate parse_file2(parser2); ... parser3 = XML_ExternalEntityParserCreate parse_file3(parser3); ... parser4 = XML_ExternalEntityParserCreate parse_file4(parser4); ... parser5 = XML_ExternalEntityParserCreate parse_file5(parser5); ... XML_ParserFree(parser5); XML_ParserFree(parser4); XML_ParserFree(parser3); XML_ParserFree(parser2); XML_ParserFree(parser1); Of course, the only way to do this with elegance and generality is to make the code recursive, so there is one and only one function that creates and destroys parsers, that is called recursively, everytime a new external entity is found by Expat, this way it is easy to provide an unlimited number of nested levels. If someone actually wants to implement this and is still having trouble after this explanation, I offer to help. Carlos From effenberg at terra.com.br Fri Jan 17 22:38:15 2003 From: effenberg at terra.com.br (Effenberg) Date: Sat Jan 18 00:01:47 2003 Subject: [Expat-discuss] Newbie need very basic help on creating a xml file using EXPAT Message-ID: <000e01c2be89$e5cb5420$1e38b7c8@terra.com.br> Could anyone give me a simple example on how to use EXPAT to create a very simple xml file? All I read on EXPAT site is a little to techie for me, I am looking for something clearer. Just for learning purposes, I am trying to use it by creating a C+Win32 program that gets the system time (hh:mm:ss) every 10 minutes and writes it to a .xml doc like: Although all the C and the Win32 part of this test app work perfectly, I had absolutely no success on creating/writting the xml doc until now, any help will be fantastic, Thanks! From fdrake at acm.org Sat Jan 18 00:50:58 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Sat Jan 18 00:51:22 2003 Subject: [Expat-discuss] Newbie need very basic help on creating a xml file using EXPAT In-Reply-To: <000e01c2be89$e5cb5420$1e38b7c8@terra.com.br> References: <000e01c2be89$e5cb5420$1e38b7c8@terra.com.br> Message-ID: <15912.60226.668314.76624@grendel.zope.com> Effenberg writes: > Could anyone give me a simple example on how to use EXPAT to create > a very simple xml file? All I read on EXPAT site is a little to > techie for me, I am looking for something clearer. Just for > learning purposes, I am trying to use it by creating a C+Win32 > program that gets the system time (hh:mm:ss) every 10 minutes and > writes it to a .xml doc like: Expat provides no facilities for generating XML. From C, you probably want to use a function like fprintf(). -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From fdrake at acm.org Tue Jan 21 01:24:46 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Tue Jan 21 01:25:32 2003 Subject: [Expat-discuss] Approaching 1.95.6 Message-ID: <15916.59310.259416.412634@grendel.zope.com> We're approaching the release of Expat 1.95.6 (finally!). There are still a number of issues listed in the tracker; it's not clear to me that many of those that remain will be fixed in this release, mostly because many are platform-specific build issues. If there are any remaining issues that you care about, please take a look at them in the issue trackers and see if you can provide any information or other assistance in fixing the problems. This is also a really good time to test the CVS version of the code with your favorite application(s), and let us know if something new shows up. Information on Expat, including a link to the bug tracker, can be found at: http://www.libexpat.org/ Thanks! -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From mrodrigu at xmltwig.com Tue Jan 21 17:11:21 2003 From: mrodrigu at xmltwig.com (Michel Rodriguez) Date: Tue Jan 21 11:19:56 2003 Subject: [Expat-discuss] CVS version status Message-ID: Hi, I check the current CVS version on a linux (2.4.20-2mdk - i686) machine: make check reports that it can't find check.h and subsequently unleashes a flurry of errors at my poor stdout once xmlwf is installed in /usr/bin xmlwf -v insists on trying to create a /usr/bin/.lib directory... and can't if I am not root Apart from those 2 minor glitches XML::Parser installs and tests fine both with perl 5.6.1 and 5.8.0 (I only tested XML::Parser 2.31 so far), and so does XML::Twig, so no complaint here ;--) Michel Rodriguez Perl & XML http://www.xmltwig.com From fdrake at acm.org Tue Jan 21 11:27:23 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Tue Jan 21 11:28:06 2003 Subject: [Expat-discuss] CVS version status In-Reply-To: References: Message-ID: <15917.29931.5516.602763@grendel.zope.com> Michel Rodriguez writes: > make check reports that it can't find check.h and subsequently unleashes a > flurry of errors at my poor stdout This is a known problem: http://mail.libexpat.org/mailman/admindb/expat-discuss > once xmlwf is installed in /usr/bin xmlwf -v insists on trying to create a > /usr/bin/.lib directory... and can't if I am not root Ugh. Not sure what's going on here; I hope this isn't libtool biting us again. ;-( > Apart from those 2 minor glitches XML::Parser installs and tests fine both > with perl 5.6.1 and 5.8.0 (I only tested XML::Parser 2.31 so far), and so > does XML::Twig, so no complaint here ;--) Excellent! We've heard very little from the Perl community about the current status of the Perl bindings. Is there a maintainer for XML::Parser at this time? Thanks for checking the CVS version out! -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From gstein at lyra.org Tue Jan 21 15:06:14 2003 From: gstein at lyra.org (Greg Stein) Date: Tue Jan 21 18:18:31 2003 Subject: [Expat-discuss] CVS version status In-Reply-To: <15917.29931.5516.602763@grendel.zope.com>; from fdrake@acm.org on Tue, Jan 21, 2003 at 11:27:23AM -0500 References: <15917.29931.5516.602763@grendel.zope.com> Message-ID: <20030121150613.A24163@lyra.org> On Tue, Jan 21, 2003 at 11:27:23AM -0500, Fred L. Drake, Jr. wrote: > Michel Rodriguez writes: >... > > once xmlwf is installed in /usr/bin xmlwf -v insists on trying to create a > > /usr/bin/.lib directory... and can't if I am not root > > Ugh. Not sure what's going on here; I hope this isn't libtool biting > us again. ;-( Did you manually copy xmlwf? Or did you use "make install" ? At install time, libtool is supposed to get rid of all traces of itself. But that doesn't work if you manually copy xmlwf. Cheers, -g -- Greg Stein, http://www.lyra.org/ From mrodrigu at xmltwig.com Wed Jan 22 15:44:08 2003 From: mrodrigu at xmltwig.com (mirod) Date: Wed Jan 22 09:44:48 2003 Subject: [Expat-discuss] CVS version status In-Reply-To: <20030121150613.A24163@lyra.org> Message-ID: On Tue, 21 Jan 2003, Greg Stein wrote: > On Tue, Jan 21, 2003 at 11:27:23AM -0500, Fred L. Drake, Jr. wrote: > > Michel Rodriguez writes: > >... > > > once xmlwf is installed in /usr/bin xmlwf -v insists on trying to create a > > > /usr/bin/.lib directory... and can't if I am not root > > > > Ugh. Not sure what's going on here; I hope this isn't libtool biting > > us again. ;-( > > Did you manually copy xmlwf? Or did you use "make install" ? > > At install time, libtool is supposed to get rid of all traces of itself. But > that doesn't work if you manually copy xmlwf. No, I used make install. It looks to me that /usr/bin/.libs is probably not the appropriate directory to store temp data, but I might have missed a config option that would control this. Michel Rodriguez Perl & XML http://www.xmltwig.com From miallen at eskimo.com Fri Jan 24 03:44:27 2003 From: miallen at eskimo.com (Michael B. Allen) Date: Fri Jan 24 03:42:18 2003 Subject: [Expat-discuss] Parsing Entity Values Into Entity Children Message-ID: <20030124034427.7272b415.miallen@eskimo.com> If I am interpreting the DOM recommendation correctly the value of an Entity is represented by it's children. So how do I parse the value parameter passed to the XML_EntityDeclHandler? -- A program should be written to model the concepts of the task it performs rather than the physical world or a process because this maximizes the potential for it to be applied to tasks that are conceptually similar and, more important, to tasks that have not yet been conceived. From fdrake at acm.org Fri Jan 24 13:47:26 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Fri Jan 24 13:48:07 2003 Subject: [Expat-discuss] Expat 1.95.6 tagged in CVS Message-ID: <15921.35390.856070.180884@grendel.zope.com> I've tagged Expat 1.95.6 in the CVS repository; I'll make the release tonight. If anyone needs to get the version of the code to be released from CVS, use the tag "R_1_95_6". -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From fdrake at acm.org Sat Jan 25 02:29:12 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Sat Jan 25 02:30:59 2003 Subject: [Expat-discuss] Expat 1.95.6 re-tagged in CVS Message-ID: <15922.15560.102516.129011@grendel.zope.com> I've moved the tag for Expat 1.95.6 in the CVS repository so that the fix for the recently uncovered error in namespace processing will be part of this release. I'd like to thank Karl for figuring out the right fix while feeling the presure of the pending release, and Jeremy Kloth for making sure we can conform to an annoying nit in the "Namespaces in XML" specification. Hopefully that's the end of the delays; I'll be performing some tests with this tag in applications and plan on releasing Expat tomorrow night. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From antonio.soares at nomadsoft.com Mon Jan 27 11:43:34 2003 From: antonio.soares at nomadsoft.com (antonio.soares@nomadsoft.com) Date: Mon Jan 27 08:10:24 2003 Subject: [Expat-discuss] CdataSectionHandler's Message-ID: All, I am trying to use the CdataSectionHandler's in th efollowing way: Either: XML_SetStartCdataSectionHandler(p_xml_parser,start_Cdata); XML_SetEndCdataSectionHandler(p_xml_parser,end_Cdata); Or: XML_SetCdataSectionHandler(p_xml_parser,start_Cdata,end_Cdata); where start_Cdata() and end_Cdata() are something like: printf("HELLO"); return; I cannot obtain any results if parsing something like This is my text Perhaps I am misundertanding how it should work, but shouldn't I get my "HELLO" prints Just before the 'T' in "This" and just after the last 't' in "text" ? i I Can't make it work ! By the way, , XML_SetCharacterDataHandler(p_xml_parser, xml_data) works fine ..., i.e., I CAN get to "This is my text" Any ideas ? Thanks Ant?nio ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ant?nio Soares Nomad Software Ltd Developer 186 Regent Street Tel: +44 (0)20 7292 2429 London W1B 5TN Fax: +44 (0)20 7734 3363 Email: asoares@nomadsoft.co.uk --------------------------------------------------------------------------------------------------------- This e-mail (including attachments) is confidential and is intended solely for the addressee. Unless authorised you may not read, copy, use or store this e-mail in any way, or permit others to do so. If you have received it in error, please contact Nomad Software on +44 (0) 20 7292 2400. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From fdrake at acm.org Mon Jan 27 09:42:44 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Mon Jan 27 09:43:23 2003 Subject: [Expat-discuss] CdataSectionHandler's In-Reply-To: References: Message-ID: <15925.17764.725401.789825@grendel.zope.com> antonio.soares@nomadsoft.com writes: > I am trying to use the CdataSectionHandler's in th efollowing way: > > Either: > XML_SetStartCdataSectionHandler(p_xml_parser,start_Cdata); > XML_SetEndCdataSectionHandler(p_xml_parser,end_Cdata); > Or: > XML_SetCdataSectionHandler(p_xml_parser,start_Cdata,end_Cdata); ... > I cannot obtain any results if parsing something like > > This is my text It appears that you're missing a little bit about what a CDATA section is; this example doesn't have one. This does: and would produce the results you're expecting. Chances are what you want are the element handlers (see XML_SetElementHandler()) and the character data handler (see XML_SetCharacterDataHandler()). How you would use those depends on your application. Most XML consumers do not need the CDATA callbacks; those are more useful if you need to produce a new XML stream from the old data, with as much preserved from the original as possible. > By the way, , XML_SetCharacterDataHandler(p_xml_parser, xml_data) works > fine ..., i.e., I CAN get to "This is my text" -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From fdrake at acm.org Tue Jan 28 01:35:10 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Tue Jan 28 01:35:37 2003 Subject: [Expat-discuss] Expat 1.95.6 released! Message-ID: <15926.9374.984002.600750@grendel.zope.com> Expat 1.95.6 has been released. The following changes have been made since the 1.95.5 release: - Added XML_FreeContentModel(). - Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree(). - Fixed a variety of bugs: see SF issues 615606, 616863, 618199, 653180, 673791. - Enhanced the regression test suite. - Man page improvements: includes SF issue 632146. If you're using any of the 1.95.x releases, it's probably worth updating to 1.95.6. Thanks to the Expat community for providing excellent bug reports; your continued feedback helps us improve the software! -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From carlos at pehoe.civil.ist.utl.pt Tue Jan 28 13:43:36 2003 From: carlos at pehoe.civil.ist.utl.pt (Carlos Pereira) Date: Tue Jan 28 08:54:36 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released Message-ID: <200301281343.h0SDhad09488@pehoe.civil.ist.utl.pt> >Expat 1.95.6 has been released. Many thanks for your work on Expat! >The following changes have been made >since the 1.95.5 release: >- Added XML_FreeContentModel(). >- Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree(). Three questions: - Are there API changes, incompatible with 1.95.2? (a given function does not work anymore) - Are there API changes, that represent improvements over 1.95.2? (a given function works but there are better ways to do it) - The Expat manual was updated to document the relevant API changes? Carlos From carlos at pehoe.civil.ist.utl.pt Tue Jan 28 13:43:36 2003 From: carlos at pehoe.civil.ist.utl.pt (Carlos Pereira) Date: Tue Jan 28 08:54:49 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released Message-ID: <200301281343.h0SDhad09488@pehoe.civil.ist.utl.pt> >Expat 1.95.6 has been released. Many thanks for your work on Expat! >The following changes have been made >since the 1.95.5 release: >- Added XML_FreeContentModel(). >- Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree(). Three questions: - Are there API changes, incompatible with 1.95.2? (a given function does not work anymore) - Are there API changes, that represent improvements over 1.95.2? (a given function works but there are better ways to do it) - The Expat manual was updated to document the relevant API changes? Carlos From fdrake at acm.org Tue Jan 28 10:20:48 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Tue Jan 28 10:21:14 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released In-Reply-To: <200301281343.h0SDhad09488@pehoe.civil.ist.utl.pt> References: <200301281343.h0SDhad09488@pehoe.civil.ist.utl.pt> Message-ID: <15926.40912.937760.513987@grendel.zope.com> Carlos Pereira writes: > Many thanks for your work on Expat! You're welcome! > >The following changes have been made > >since the 1.95.5 release: > >- Added XML_FreeContentModel(). > >- Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree(). > > Three questions: > > - Are there API changes, incompatible with 1.95.2? > (a given function does not work anymore) I don't think we've introduced any real incompatibilities since then; if so, it should probably be considered a bug. The one thing that you might want to be careful about are the functions XML_Parse(), XML_ParseBuffer(), XML_SetEncoding(), and XML_SetBase() functions. These all were defined to return the integer 0 to indicate failure and a non-zero to indicate success. This changed slightly in 1.95.4. Starting in that version, Expat uses values defined by the XML_Status enum. For client code, there's no immediate change, but we strongly recommend testing the return values against the XML_STATUS_OK and XML_STATUS_ERROR constants instead of treating them as booleans; some possible routes of API evolution may introduce additional values into this enumeration. In practice, Expat 1.95.x has alwas returned one of these two values (and earlier versions may have, I just haven't checked those), but documented them as booleans. It is safe to convert any code that uses 1.95.x to use the defined values, if you ensure that they are defined in the client code. You can use this to define them in the application: #ifndef XML_STATUS_OK #define XML_STATUS_OK 1 #define XML_STATUS_ERROR 0 #endif The documentation reflects the current version of the interface; it's likely that some additional documentation is needed to help people migrate. I've filed an issue for this and assigned it to myself: http://sourceforge.net/tracker/index.php?func=detail&aid=676131&group_id=10127&atid=110127 > - Are there API changes, that represent improvements over 1.95.2? > (a given function works but there are better ways to do it) There is a handful of new functions; these are all documented in doc/reference.html, included with the source distribution (Doc\reference.html in the Windows installation). > - The Expat manual was updated to document the relevant API changes? The manual (doc/reference.html) includes information on the current API. It does not include the API history. For that, review the comments in the file "Changes" ("Changes.txt" if you used the Windows installer). -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From carlos at pehoe.civil.ist.utl.pt Tue Jan 28 18:53:02 2003 From: carlos at pehoe.civil.ist.utl.pt (Carlos Pereira) Date: Tue Jan 28 15:02:16 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released Message-ID: <200301281853.h0SIr2409756@pehoe.civil.ist.utl.pt> Thanks! Carlos >I don't think we've introduced any real incompatibilities since then; >if so, it should probably be considered a bug. >There is a handful of new functions; these are all documented in >doc/reference.html, included with the source distribution >(Doc\reference.html in the Windows installation). >The manual (doc/reference.html) includes information on the current >API. From T.A.Meyer at massey.ac.nz Wed Jan 29 12:49:53 2003 From: T.A.Meyer at massey.ac.nz (Meyer, Tony) Date: Tue Jan 28 19:45:36 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released! Message-ID: <1ED4ECF91CDED24C8D012BCF2B034F1318D3B2@its-xchg4.massey.ac.nz> When I swap to using expat.h in 1.95.6 (from 1.95.5) I get a compilation error (gcc 3.2 w/ cygwin). [Summarising] Line 657 of expat.h uses the enum XML_Status, but it is not defined until line 735. Is this _a_ problem, or _my_ problem? Thanks, Tony Meyer From fdrake at acm.org Tue Jan 28 21:17:52 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Tue Jan 28 21:18:11 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released! In-Reply-To: <1ED4ECF91CDED24C8D012BCF2B034F1318D3B2@its-xchg4.massey.ac.nz> References: <1ED4ECF91CDED24C8D012BCF2B034F1318D3B2@its-xchg4.massey.ac.nz> Message-ID: <15927.14800.721639.263717@grendel.zope.com> Meyer, Tony writes: > When I swap to using expat.h in 1.95.6 (from 1.95.5) I get a > compilation error (gcc 3.2 w/ cygwin). > > [Summarising] Line 657 of expat.h uses the enum XML_Status, but it > is not defined until line 735. > > Is this _a_ problem, or _my_ problem? Is this an error or a warning? I can certainly make this go away for the next release. If this is an error rather than a warning tells us how strong the motivation for the next release should be. ;-) This is a side effect of using the enum in parts of the API where it wasn't used before. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From T.A.Meyer at massey.ac.nz Wed Jan 29 15:19:43 2003 From: T.A.Meyer at massey.ac.nz (Meyer, Tony) Date: Tue Jan 28 21:20:18 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released! Message-ID: <1ED4ECF91CDED24C8D012BCF2B034F1318D3C7@its-xchg4.massey.ac.nz> [Tony Meyer] > > When I swap to using expat.h in 1.95.6 (from 1.95.5) I get a > > compilation error (gcc 3.2 w/ cygwin). > > > > [Summarising] Line 657 of expat.h uses the enum XML_Status, but it > > is not defined until line 735. [Fred] > Is this an error or a warning? Error. (Sorry). =Tony Meyer From fdrake at acm.org Tue Jan 28 21:44:56 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Tue Jan 28 21:45:13 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released! In-Reply-To: <1ED4ECF91CDED24C8D012BCF2B034F1318D3C7@its-xchg4.massey.ac.nz> References: <1ED4ECF91CDED24C8D012BCF2B034F1318D3C7@its-xchg4.massey.ac.nz> Message-ID: <15927.16424.112221.901100@grendel.zope.com> Meyer, Tony writes: > Error. (Sorry). This is now fixed in CVS. Could you please test the CVS version on your system? I'd really appreciate a complete test on that platform; our Cygwin expert has been occupied elsewhere lately. Thanks for letting us know about this issue! -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From T.A.Meyer at massey.ac.nz Wed Jan 29 15:55:20 2003 From: T.A.Meyer at massey.ac.nz (Meyer, Tony) Date: Tue Jan 28 21:55:55 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released! Message-ID: <1ED4ECF91CDED24C8D012BCF2B034F1318CD36@its-xchg4.massey.ac.nz> [Fred] > This is now fixed in CVS. Could you please test the CVS version on > your system? It compiles fine now, thanks. > I'd really appreciate a complete test on that platform; > our Cygwin expert has been occupied elsewhere lately. What needs to be done for a complete test? > Thanks for letting us know about this issue! Thanks for all the work on expat :) =Tony Meyer From fdrake at acm.org Wed Jan 29 01:07:03 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Wed Jan 29 01:07:19 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released! In-Reply-To: <1ED4ECF91CDED24C8D012BCF2B034F1318CD36@its-xchg4.massey.ac.nz> References: <1ED4ECF91CDED24C8D012BCF2B034F1318CD36@its-xchg4.massey.ac.nz> Message-ID: <15927.28551.880499.227885@grendel.zope.com> Meyer, Tony writes: > What needs to be done for a complete test? It's hard to remember. ;-) Essentially, you'd just need to install the "check" unit testing library and run "make check" at the top level of the Expat CVS checkout. Its just been a while since I've tried doing anything with Cygwin that I don't recall how well check and Cygwin get along; there was a point where it wasn't smooth. I don't have Cygwin installed now; perhaps I'll have time to try again over the weekend. There's not much chance of that happening before then, at any rate. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From T.A.Meyer at massey.ac.nz Thu Jan 30 13:45:41 2003 From: T.A.Meyer at massey.ac.nz (Meyer, Tony) Date: Wed Jan 29 19:46:18 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released! Message-ID: <1ED4ECF91CDED24C8D012BCF2B034F1318D3E1@its-xchg4.massey.ac.nz> > Meyer, Tony writes: > > What needs to be done for a complete test? > It's hard to remember. ;-) :) > Essentially, you'd just need to install > the "check" unit testing library Done. > and run "make check" at the top level > of the Expat CVS checkout. I haven't made expat before (I've been using the prebuilt win32 binaries), so forgive me if these are overly newbie: * I had to follow the process outlined in before I could run configure successfully. Is it meant to be that way? * make check could not find the check library (which was in /usr/local/lib) when making tests/runtests. I manually edited the makefile, adding -L$(libdir) and it then compiled * runtests had errors because I was running in a path with a space in it (shame on me) - lots of paths were incorrect (I moved the directory) Once these were resolved I got: tests/runtests Expat version expat_1.95.6 Running suite(s): basic 100%: Checks:44, Failures: 0, Errors:0 Is this what I should have got? =Tony Meyer From fdrake at acm.org Thu Jan 30 11:12:47 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Thu Jan 30 11:13:26 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released! In-Reply-To: <1ED4ECF91CDED24C8D012BCF2B034F1318D3E1@its-xchg4.massey.ac.nz> References: <1ED4ECF91CDED24C8D012BCF2B034F1318D3E1@its-xchg4.massey.ac.nz> Message-ID: <15929.20223.110699.340371@grendel.zope.com> Meyer, Tony writes: > > and run "make check" at the top level > > of the Expat CVS checkout. > I haven't made expat before (I've been using the prebuilt win32 > binaries), so forgive me if these are overly newbie: > > * I had to follow the process outlined in > > before I could run configure successfully. Is it meant to be that way? No, but that's how it is on Cygwin these days. ;-( I suspect libtool will have to be removed, since it's probably causing the real problems to be more difficult to solve. > * make check could not find the check library (which was in > /usr/local/lib) when making tests/runtests. I manually edited > the makefile, adding -L$(libdir) and it then compiled Ok. > * runtests had errors because I was running in a path with a space > in it (shame on me) - lots of paths were incorrect (I moved the > directory) Please let me know what these were; I don't know of anything from Expat that should be sensitive to that. > Once these were resolved I got: > tests/runtests > Expat version expat_1.95.6 > Running suite(s): basic > 100%: Checks:44, Failures: 0, Errors:0 > > Is this what I should have got? Yes, that's the expected output. It looks good, thanks! -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From lshen at cisco.com Thu Jan 30 09:09:28 2003 From: lshen at cisco.com (Lin Shen) Date: Thu Jan 30 12:13:05 2003 Subject: [Expat-discuss] regression test suite Message-ID: <002601c2c882$594282f0$02c8a8c0@C1893659A> Hi, Does anyone know where to find the regression test suite? thanks lin From fdrake at acm.org Thu Jan 30 12:18:56 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Thu Jan 30 12:19:48 2003 Subject: [Expat-discuss] regression test suite In-Reply-To: <002601c2c882$594282f0$02c8a8c0@C1893659A> References: <002601c2c882$594282f0$02c8a8c0@C1893659A> Message-ID: <15929.24192.490832.484027@grendel.zope.com> Lin Shen writes: > Does anyone know where to find the regression test suite? Sorry I haven't responded to your earlier note yet; I've been a little swamped. There's a directory in the source distribution, tests/, which contains a number of unit tests. There's also a script there to run Expat over the OASIS test suite; see the Makefile that gets generated at the top level (on Unix/Linux) for information on running it. Perhaps someone who uses Windows can explain how to run the OASIS tests on Windows; the unit tests currently rely on a library only available for Unix. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From T.A.Meyer at massey.ac.nz Fri Jan 31 12:08:26 2003 From: T.A.Meyer at massey.ac.nz (Meyer, Tony) Date: Thu Jan 30 18:09:29 2003 Subject: [Expat-discuss] Re: Expat 1.95.6 released! Message-ID: <1ED4ECF91CDED24C8D012BCF2B034F1318CD3C@its-xchg4.massey.ac.nz> > > * runtests had errors because I was running in a path with a space > > in it (shame on me) - lots of paths were incorrect (I moved the > > directory) > > Please let me know what these were; I don't know of anything from > Expat that should be sensitive to that. Well, it's not really expat itself, just the runtests script. I'm not sure what generates this script and I didn't keep the old one. I can duplicate it if you want. I think there are two lines in particular - the relink_command= line at the top, and the "# Add the dll search path components to the executable PATH" line towards the end. Both of these had "D:\CVS Modules\expat\", which didn't work because of the space. Moving the directory into / changed it to "/expat", which did. Thinking about it, there are two things here - one is that the directory name included a space, and the other was that it was outside of my normal cygwin structure (although '/cygdrive/d/CVS\ Modules/expat/' isn't). Let me know if you want me to do any other testing. > > Is this what I should have got? > Yes, that's the expected output. It looks good, thanks! No worries, glad it all works. =Tony Meyer From karl at waclawek.net Fri Jan 31 08:53:11 2003 From: karl at waclawek.net (Karl Waclawek) Date: Fri Jan 31 08:54:25 2003 Subject: [Expat-discuss] regression test suite References: <002601c2c882$594282f0$02c8a8c0@C1893659A> <15929.24192.490832.484027@grendel.zope.com> Message-ID: <000e01c2c930$18389610$9e539696@citkwaclaww2k> > Perhaps someone who uses Windows can explain how to run the OASIS > tests on Windows; the unit tests currently rely on a library only > available for Unix. I use Cygwin to run the test suite. Karl From ashifig at hotmail.com Fri Jan 31 22:10:30 2003 From: ashifig at hotmail.com (Ashifi Gogo) Date: Sat Feb 1 01:11:10 2003 Subject: [Expat-discuss] Installing expat Message-ID: Hi, I'm trying to build Gnome 2 on my iBook and I have to install the expat library. But I've got it and I can't figure out how to install it / where to put it. Please help me out. Thanks. Ashifi http://www.ashifigogo.info _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail