From clruganda at yahoo.com Tue Nov 2 23:44:03 2004 From: clruganda at yahoo.com (Charles Read) Date: Tue Nov 2 23:44:05 2004 Subject: [Expat-discuss] expat - port to xbox or ps2? Message-ID: <20041102224403.27873.qmail@web53208.mail.yahoo.com> Has expat been ported to either an Xbox or PlayStation 2? Thanks. --------------------------------- Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com/a From Bhavna.Muraleedharan at Lntinfotech.com Mon Nov 8 13:22:21 2004 From: Bhavna.Muraleedharan at Lntinfotech.com (Bhavna Muraleedharan) Date: Mon Nov 8 13:23:29 2004 Subject: [Expat-discuss] Complete expat documentation with the all functions description Message-ID: I want to know the expat functionality in detail. i.e. i want to know how flows goes from module to module or flow in the form of functionality blocks. Also i am in search of documentation of all the expat functions in detail i.e. what it does, when it get called. I am bit new to xml so i dont know the meanings of structure like "BINDING", "prefix" or the meaning of the term. Can anyone help me in this regard?? Thanks in advance. Waiting for a reply. Warm Regards, K.Bhavna Muraleedharan (SET) L&T Infotech, Plot No. EL 200, TTC Electronics Zone, Shil Mahape Road,Navi Mumbai ,India- 400 701. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tel. No. : 55934180. ================================================ The information contained in this email has been classified: [ ] L&T Infotech General Business [x] L&T Infotech Internal Use [ ] L&T Infotech Confidential [ ] L&T Infotech Proprietary This email may contain confidential or privileged information for the intended recipient(s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. This email may contain confidential or privileged information for the intended recipient(s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. Thanks ______________________________________________________________________ From Bhavna.Muraleedharan at Lntinfotech.com Mon Nov 8 13:10:35 2004 From: Bhavna.Muraleedharan at Lntinfotech.com (Bhavna Muraleedharan) Date: Tue Nov 9 08:02:20 2004 Subject: [Expat-discuss] Complete expat documentation with the all functions description Message-ID: I want to know the expat functionality in detail. i.e. i want to know how flows goes from module to module or flow in the form of functionality blocks. Also i am in search of documentation of all the expat functions in detail i.e. what it does, when it get called. I am bit new to xml so i dont know the meanings of structure like "BINDING", "prefix" or the meaning of the term. Can anyone help me in this regard?? thanks in advance waiting for reply Warm Regards, K.Bhavna Muraleedharan (SET) L&T Infotech, Plot No. EL 200, TTC Electronics Zone, Shil Mahape Road,Navi Mumbai ,India- 400 701. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tel. No. : 55934180. ================================================ The information contained in this email has been classified: [ ] L&T Infotech General Business [x] L&T Infotech Internal Use [ ] L&T Infotech Confidential [ ] L&T Infotech Proprietary This email may contain confidential or privileged information for the intended recipient(s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. This email may contain confidential or privileged information for the intended recipient(s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. Thanks ______________________________________________________________________ From SpamTrap at gmx.de Wed Nov 10 12:26:25 2004 From: SpamTrap at gmx.de (Hendrik Schober) Date: Wed Nov 10 12:26:54 2004 Subject: [Expat-discuss] Re: DoS exploit? References: <001301c4b833$2babf8b0$0200a8c0@karlglen188> Message-ID: Karl Waclawek wrote: > [...] > > Search google for the "million laughs xml" attack. > This is a DoS attack that every conforming XML parser > is susceptible too. Its based on how entities declared > in a DTD are expanded. There is no known bug in Expat > related to DoS attacks. Sorry for taking so long to follow up. Thanks for your answer! This solved the isuue for the customer. > Karl Schobi -- SpamTrap@gmx.de is never read I'm Schobi at suespammers dot org "The presence of those seeking the truth is infinitely to be prefered to those thinking they've found it." Terry Pratchett From agandfr at yahoo.com Fri Nov 12 00:55:10 2004 From: agandfr at yahoo.com (Dean Agan) Date: Fri Nov 12 00:55:13 2004 Subject: [Expat-discuss] Expat cannot parse this xml file Message-ID: <20041111235510.87041.qmail@web52809.mail.yahoo.com> Hi! I have the xml file below: "" I noticed that expat cannot detect "Java" in my xml file. So I did this, " " Then, I saw that expat can now read the element "Java". Why is this? Is there a fix to this? --------------------------------- Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com From opengeometry at yahoo.ca Fri Nov 12 03:15:33 2004 From: opengeometry at yahoo.ca (William Park) Date: Fri Nov 12 03:15:39 2004 Subject: [Expat-discuss] Expat cannot parse this xml file In-Reply-To: <20041111235510.87041.qmail@web52809.mail.yahoo.com> References: <20041111235510.87041.qmail@web52809.mail.yahoo.com> Message-ID: <20041112021533.GA464@node1.opengeometry.net> On Thu, Nov 11, 2004 at 03:55:10PM -0800, Dean Agan wrote: > Hi! > I have the xml file below: > > "" > > I noticed that expat cannot detect "Java" in my xml file. So I did this, > > " > > > > " > > > Then, I saw that expat can now read the element "Java". Why is this? > Is there a fix to this? I works fine here (Expat-1.95.8). From Christian.Crowhurst at eca.co.uk Fri Nov 12 13:55:36 2004 From: Christian.Crowhurst at eca.co.uk (Crowhurst,Christian) Date: Fri Nov 12 14:00:32 2004 Subject: [Expat-discuss] Running from the command line Message-ID: <9ED2AB025F1CAB4EA2E8B7628E4208CC03AFBF@orpex01.eca.domain> Hi, I'm having trouble running expat (vs1.2) from the command line. All I'm trying to do is parse and generate a canonical equivalent xml file from an input xml file that I know is well formed. Here's the help provided on James Clark's site (http://www.jclark.com/xml/expat.html): The arguments to xmlwf are one or more files which are each to be checked for well-formedness. An option -d dir can be specified; for each well-formed input file the corresponding canonical XML will be written to dir/f, where f is the filename (without any path) of the input file. I've tried the two command lines without success (where JournalExample.xml is the input file and D:\XMLOutput is an existing directory): D:\XML_Parser\expat\bin\xmlwf.exe D:\XML_Practice\JournalExample.xml -d D:\XMLOutput JournalExample.xml D:\XML_Parser\expat\bin\xmlwf.exe D:\XML_Practice\JournalExample.xml -d D:\XMLOutput\JournalExample.xml I get the following error message from both command line calls: -d: The system cannot find the file specified. D:\XMLOutput: Access is denied. JournalExample.xml: The system cannot find the file specified. Can anyone tell me what I'm doing wrong. Thanks in advance Christian This e-mail, and any attachment, is confidential and is intended only for the use of the individual to which it is addressed. If you have received it in error, please delete it from your system, do not use or disclose the information in any way. The contents of this message may contain personal views which are not the views of the ECA Group, unless specifically stated. From ceo at absoft-net.com Sun Nov 14 17:51:35 2004 From: ceo at absoft-net.com (Golibasku) Date: Sun Nov 14 17:51:40 2004 Subject: [Expat-discuss] undefined entity - how can i fix it ? Message-ID: <002f01c4ca6a$34315950$0100a8c0@alexcd9t4f0rbw> Dear all, in my xml document, there is a line which contains "©" - no = quote. Expat told me "undefined entity at line ...". It is the copyright = symbol. How can i parse the document successfully ? From karl at waclawek.net Sun Nov 14 18:35:02 2004 From: karl at waclawek.net (Karl Waclawek) Date: Sun Nov 14 18:35:01 2004 Subject: [Expat-discuss] undefined entity - how can i fix it ? References: <002f01c4ca6a$34315950$0100a8c0@alexcd9t4f0rbw> Message-ID: <000801c4ca70$46410270$0200a8c0@karlglen188> Did you declare this entity in the DTD? If not, that is what you need to do, since in XML there are only very few predefined entities. ----- Original Message ----- From: "Golibasku" To: Sent: Sunday, November 14, 2004 11:51 AM Subject: [Expat-discuss] undefined entity - how can i fix it ? Dear all, in my xml document, there is a line which contains "©" - no quote. Expat told me "undefined entity at line ...". It is the copyright symbol. How can i parse the document successfully ? _______________________________________________ Expat-discuss mailing list Expat-discuss@libexpat.org http://mail.libexpat.org/mailman/listinfo/expat-discuss From savvas.socratous at student.manchester.ac.uk Sun Nov 14 22:10:24 2004 From: savvas.socratous at student.manchester.ac.uk (Savvas Socratous) Date: Sun Nov 14 23:14:51 2004 Subject: [Expat-discuss] Problems with expat and handler functions-HEEEEELP!!! Message-ID: <000e01c4ca8e$5bf49960$17e05882@E26B> Greetings people, I realise that this is not a troubleshooting list but I'm desperate.I'm a University student using expat for my final year project and I've run into problems.I haven't found any other mailing list that deals with help on expat(if you know of one please,please let me know:)) so I subscribed in the hope that I will find a solution to my problem.. I am using Visual Studio to compile my C program and for some reason the compiler cannot pick up the handler functions-functions like the start and end element handlers etc. Even though they are declared as static, the compiler throws "undeclared" identifier errors when it encounters something like XML_SetElementHandler(parser,start,end). In other words it can't find the methods "start" or "end" -but they are in the same file!! Please if anyone has any suggrestions on how to fix this, I would be most grateful Thanks, Savvas Socratous-Manchester From ceo at absoft-net.com Mon Nov 15 05:13:34 2004 From: ceo at absoft-net.com (Golibasku) Date: Mon Nov 15 05:13:42 2004 Subject: [Expat-discuss] undefined entity - how can i fix it ? References: <002f01c4ca6a$34315950$0100a8c0@alexcd9t4f0rbw> <000801c4ca70$46410270$0200a8c0@karlglen188> Message-ID: <053701c4cac9$7c84c610$0100a8c0@alexcd9t4f0rbw> Can you give me more information ? My XML don't have any DTD, i just want to use expat to get the content from it. > Did you declare this entity in the DTD? > If not, that is what you need to do, since in XML there are only > very few predefined entities. > > ----- Original Message ----- > Subject: [Expat-discuss] undefined entity - how can i fix it ? > > Dear all, > in my xml document, there is a line which contains "©" - no quote. > Expat told me "undefined entity at line ...". It is the copyright symbol. > How can i parse the document successfully ? From karl at waclawek.net Mon Nov 15 06:12:02 2004 From: karl at waclawek.net (Karl Waclawek) Date: Mon Nov 15 06:12:02 2004 Subject: [Expat-discuss] undefined entity - how can i fix it ? References: <002f01c4ca6a$34315950$0100a8c0@alexcd9t4f0rbw><000801c4ca70$46410270$0200a8c0@karlglen188> <053701c4cac9$7c84c610$0100a8c0@alexcd9t4f0rbw> Message-ID: <000e01c4cad1$a4a7c310$0200a8c0@karlglen188> If your file does not have a DTD then obviously it is missing the entity declaration and is therefore not well-formed. This means - strictly speaking - it does not conform to the definition of an XML document, and no conforming parser will accept it. ----- Original Message ----- From: "Golibasku" To: Sent: Sunday, November 14, 2004 11:13 PM Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > Can you give me more information ? My XML don't have any DTD, i just want to > use expat to get the content from it. > >> Did you declare this entity in the DTD? >> If not, that is what you need to do, since in XML there are only >> very few predefined entities. >> >> ----- Original Message ----- >> Subject: [Expat-discuss] undefined entity - how can i fix it ? >> >> Dear all, >> in my xml document, there is a line which contains "©" - no quote. >> Expat told me "undefined entity at line ...". It is the copyright symbol. >> How can i parse the document successfully ? > > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > From ceo at absoft-net.com Mon Nov 15 06:30:25 2004 From: ceo at absoft-net.com (Golibasku) Date: Mon Nov 15 06:30:31 2004 Subject: [Expat-discuss] undefined entity - how can i fix it ? References: <002f01c4ca6a$34315950$0100a8c0@alexcd9t4f0rbw><000801c4ca70$46410270$0200a8c0@karlglen188> <053701c4cac9$7c84c610$0100a8c0@alexcd9t4f0rbw> <000e01c4cad1$a4a7c310$0200a8c0@karlglen188> Message-ID: <001301c4cad4$369b6e50$0100a8c0@alexcd9t4f0rbw> Are you sure ? all the RSS in the Internet don't have DTD declared in the xml file (internal / external). But all the xml parser (of course the parser don't have critical bugs) can parse them without error. I think well-formed XML document doesn't need to have a DTD. A "VALID" XML document need to have DTD. But anyway, I am not a student or teacher. I am not teaching XML 101. That's why I don't want to argue on the definition problem. I only need to write a program to parse the xml file. Is there any example in expat which show how to parse such XML document.? ----- Original Message ----- From: "Karl Waclawek" To: "Golibasku" ; Sent: Monday, November 15, 2004 1:12 PM Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > If your file does not have a DTD then obviously it is missing > the entity declaration and is therefore not well-formed. > This means - strictly speaking - it does not conform > to the definition of an XML document, and no conforming > parser will accept it. > > ----- Original Message ----- > From: "Golibasku" > To: > Sent: Sunday, November 14, 2004 11:13 PM > Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > > >> Can you give me more information ? My XML don't have any DTD, i just want >> to use expat to get the content from it. >> >>> Did you declare this entity in the DTD? >>> If not, that is what you need to do, since in XML there are only >>> very few predefined entities. >>> >>> ----- Original Message ----- >>> Subject: [Expat-discuss] undefined entity - how can i fix it ? >>> >>> Dear all, >>> in my xml document, there is a line which contains "©" - no >>> quote. Expat told me "undefined entity at line ...". It is the copyright >>> symbol. How can i parse the document successfully ? >> >> _______________________________________________ >> Expat-discuss mailing list >> Expat-discuss@libexpat.org >> http://mail.libexpat.org/mailman/listinfo/expat-discuss >> > From karl at waclawek.net Mon Nov 15 06:36:31 2004 From: karl at waclawek.net (Karl Waclawek) Date: Mon Nov 15 06:36:31 2004 Subject: [Expat-discuss] undefined entity - how can i fix it ? References: <002f01c4ca6a$34315950$0100a8c0@alexcd9t4f0rbw><000801c4ca70$46410270$0200a8c0@karlglen188><053701c4cac9$7c84c610$0100a8c0@alexcd9t4f0rbw><000e01c4cad1$a4a7c310$0200a8c0@karlglen188> <001301c4cad4$369b6e50$0100a8c0@alexcd9t4f0rbw> Message-ID: <001301c4cad5$10599e50$0200a8c0@karlglen188> You are right, in general, an XML document does not need a DTD. However, in order to declare an entity, you must do this in the DTD (internal or external subset). The document you are trying to parse is simply not well-formed and you won't be able to parse it with any conforming XML parser. All I can say is: fix the document. Karl ----- Original Message ----- From: "Golibasku" To: Sent: Monday, November 15, 2004 12:30 AM Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > Are you sure ? all the RSS in the Internet don't have DTD declared in the > xml file (internal / external). But all the xml parser (of course the parser > don't have critical bugs) can parse them without error. I think well-formed > XML document doesn't need to have a DTD. A "VALID" XML document need to have > DTD. > > But anyway, I am not a student or teacher. I am not teaching XML 101. That's > why I don't want to argue on the definition problem. I only need to write a > program to parse the xml file. Is there any example in expat which show how > to parse such XML document.? > > > ----- Original Message ----- > From: "Karl Waclawek" > To: "Golibasku" ; > Sent: Monday, November 15, 2004 1:12 PM > Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > > >> If your file does not have a DTD then obviously it is missing >> the entity declaration and is therefore not well-formed. >> This means - strictly speaking - it does not conform >> to the definition of an XML document, and no conforming >> parser will accept it. >> >> ----- Original Message ----- >> From: "Golibasku" >> To: >> Sent: Sunday, November 14, 2004 11:13 PM >> Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? >> >> >>> Can you give me more information ? My XML don't have any DTD, i just want >>> to use expat to get the content from it. >>> >>>> Did you declare this entity in the DTD? >>>> If not, that is what you need to do, since in XML there are only >>>> very few predefined entities. >>>> >>>> ----- Original Message ----- >>>> Subject: [Expat-discuss] undefined entity - how can i fix it ? >>>> >>>> Dear all, >>>> in my xml document, there is a line which contains "©" - no >>>> quote. Expat told me "undefined entity at line ...". It is the copyright >>>> symbol. How can i parse the document successfully ? >>> >>> _______________________________________________ >>> Expat-discuss mailing list >>> Expat-discuss@libexpat.org >>> http://mail.libexpat.org/mailman/listinfo/expat-discuss >>> >> > > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > From karl at waclawek.net Mon Nov 15 06:54:30 2004 From: karl at waclawek.net (Karl Waclawek) Date: Mon Nov 15 06:54:28 2004 Subject: [Expat-discuss] undefined entity - how can i fix it ? References: <002f01c4ca6a$34315950$0100a8c0@alexcd9t4f0rbw><000801c4ca70$46410270$0200a8c0@karlglen188><053701c4cac9$7c84c610$0100a8c0@alexcd9t4f0rbw><000e01c4cad1$a4a7c310$0200a8c0@karlglen188> <001301c4cad4$369b6e50$0100a8c0@alexcd9t4f0rbw> Message-ID: <001c01c4cad7$931f06c0$0200a8c0@karlglen188> To add to the preceding discussion: I did a little googling, and found that there is a DTD for RSS defined - search for "RSS DTD 0.91". Strictly speaking, your document should have a Doctype declaration pointing to that DTD. Since it does not, you can still apply the DTD (one you have downloaded it) to that document by using the XML_UseForeignDTD() API in Expat, which is documented in reference.html. Karl ----- Original Message ----- From: "Golibasku" To: Sent: Monday, November 15, 2004 12:30 AM Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > Are you sure ? all the RSS in the Internet don't have DTD declared in the > xml file (internal / external). But all the xml parser (of course the parser > don't have critical bugs) can parse them without error. I think well-formed > XML document doesn't need to have a DTD. A "VALID" XML document need to have > DTD. > > But anyway, I am not a student or teacher. I am not teaching XML 101. That's > why I don't want to argue on the definition problem. I only need to write a > program to parse the xml file. Is there any example in expat which show how > to parse such XML document.? > > > ----- Original Message ----- > From: "Karl Waclawek" > To: "Golibasku" ; > Sent: Monday, November 15, 2004 1:12 PM > Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > > >> If your file does not have a DTD then obviously it is missing >> the entity declaration and is therefore not well-formed. >> This means - strictly speaking - it does not conform >> to the definition of an XML document, and no conforming >> parser will accept it. >> >> ----- Original Message ----- >> From: "Golibasku" >> To: >> Sent: Sunday, November 14, 2004 11:13 PM >> Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? >> >> >>> Can you give me more information ? My XML don't have any DTD, i just want >>> to use expat to get the content from it. >>> >>>> Did you declare this entity in the DTD? >>>> If not, that is what you need to do, since in XML there are only >>>> very few predefined entities. >>>> >>>> ----- Original Message ----- >>>> Subject: [Expat-discuss] undefined entity - how can i fix it ? >>>> >>>> Dear all, >>>> in my xml document, there is a line which contains "©" - no >>>> quote. Expat told me "undefined entity at line ...". It is the copyright >>>> symbol. How can i parse the document successfully ? >>> >>> _______________________________________________ >>> Expat-discuss mailing list >>> Expat-discuss@libexpat.org >>> http://mail.libexpat.org/mailman/listinfo/expat-discuss >>> >> > > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > From Tony.Ku at reuters.com Mon Nov 15 01:43:30 2004 From: Tony.Ku at reuters.com (Tony Ku) Date: Mon Nov 15 15:42:20 2004 Subject: [Expat-discuss] Query on UTF8 encoded data in a CDATA section. Message-ID: <323AF161E207114F970D9C52777D36912B2604@SYDSMSXM01.apac.ime.reuters.com> Hi Karl, I have an XML file in which there are some Japanese characters encoded in UTF8 format inside a section. However I noticed if there is an opening bracket '[' as one of the leading bytes in the UTF8 data, then the parser complains, saying it cannot find the corresponding closing bracket. I thought everything inside the CDATA section should be ignore? Wonder if you are able shed some light on this. Thanks. Regards, Tony ----------------------------------------------------------------- Visit our Internet site at http://www.reuters.com Get closer to the financial markets with Reuters Messaging - for more information and to register, visit http://www.reuters.com/messaging Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd. From karl at waclawek.net Mon Nov 15 15:47:58 2004 From: karl at waclawek.net (Karl Waclawek) Date: Mon Nov 15 15:48:08 2004 Subject: [Expat-discuss] Query on UTF8 encoded data in a CDATA section. References: <323AF161E207114F970D9C52777D36912B2604@SYDSMSXM01.apac.ime.reuters.com> Message-ID: <001d01c4cb22$1985c420$9e539696@torstar.net> I think a correct CDATA section looks like this: which is different from what you quoted below. Could that be the reason? Karl ----- Original Message ----- From: "Tony Ku" To: Sent: Sunday, November 14, 2004 7:43 PM Subject: [Expat-discuss] Query on UTF8 encoded data in a CDATA section. Hi Karl, I have an XML file in which there are some Japanese characters encoded in UTF8 format inside a section. However I noticed if there is an opening bracket '[' as one of the leading bytes in the UTF8 data, then the parser complains, saying it cannot find the corresponding closing bracket. I thought everything inside the CDATA section should be ignore? Wonder if you are able shed some light on this. Thanks. Regards, Tony ----------------------------------------------------------------- Visit our Internet site at http://www.reuters.com Get closer to the financial markets with Reuters Messaging - for more information and to register, visit http://www.reuters.com/messaging Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd. _______________________________________________ Expat-discuss mailing list Expat-discuss@libexpat.org http://mail.libexpat.org/mailman/listinfo/expat-discuss From ceo at absoft-net.com Mon Nov 15 17:49:35 2004 From: ceo at absoft-net.com (Golibasku) Date: Mon Nov 15 17:49:40 2004 Subject: [Expat-discuss] undefined entity - how can i fix it ? References: <002f01c4ca6a$34315950$0100a8c0@alexcd9t4f0rbw><000801c4ca70$46410270$0200a8c0@karlglen188><053701c4cac9$7c84c610$0100a8c0@alexcd9t4f0rbw><000e01c4cad1$a4a7c310$0200a8c0@karlglen188> <001301c4cad4$369b6e50$0100a8c0@alexcd9t4f0rbw> <001c01c4cad7$931f06c0$0200a8c0@karlglen188> Message-ID: <00aa01c4cb33$172ecc10$0100a8c0@alexcd9t4f0rbw> After reading the reference.html many times, I still don;t know how to use the DTD file. I have the following problems. 1. After calling XML_UseForeignDTD(...), the special characters is removed. They will not appear in parameter of my handlers. 2. When will expat use the DTD file ? How can I pass the DTD file to expat ? ----- Original Message ----- From: "Karl Waclawek" To: "Golibasku" ; Sent: Monday, November 15, 2004 1:54 PM Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > To add to the preceding discussion: I did a little googling, and found > that there is a DTD for RSS defined - search for "RSS DTD 0.91". > > Strictly speaking, your document should have a Doctype declaration > pointing to that DTD. Since it does not, you can still apply the DTD > (one you have downloaded it) to that document by using the > XML_UseForeignDTD() API in Expat, which is documented in reference.html. > > Karl > > ----- Original Message ----- > From: "Golibasku" > To: > Sent: Monday, November 15, 2004 12:30 AM > Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > > >> Are you sure ? all the RSS in the Internet don't have DTD declared in the >> xml file (internal / external). But all the xml parser (of course the >> parser don't have critical bugs) can parse them without error. I think >> well-formed XML document doesn't need to have a DTD. A "VALID" XML >> document need to have DTD. >> >> But anyway, I am not a student or teacher. I am not teaching XML 101. >> That's why I don't want to argue on the definition problem. I only need >> to write a program to parse the xml file. Is there any example in expat >> which show how to parse such XML document.? >> >> >> ----- Original Message ----- >> From: "Karl Waclawek" >> To: "Golibasku" ; >> Sent: Monday, November 15, 2004 1:12 PM >> Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? >> >> >>> If your file does not have a DTD then obviously it is missing >>> the entity declaration and is therefore not well-formed. >>> This means - strictly speaking - it does not conform >>> to the definition of an XML document, and no conforming >>> parser will accept it. >>> >>> ----- Original Message ----- >>> From: "Golibasku" >>> To: >>> Sent: Sunday, November 14, 2004 11:13 PM >>> Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? >>> >>> >>>> Can you give me more information ? My XML don't have any DTD, i just >>>> want to use expat to get the content from it. >>>> >>>>> Did you declare this entity in the DTD? >>>>> If not, that is what you need to do, since in XML there are only >>>>> very few predefined entities. >>>>> >>>>> ----- Original Message ----- >>>>> Subject: [Expat-discuss] undefined entity - how can i fix it ? >>>>> >>>>> Dear all, >>>>> in my xml document, there is a line which contains "©" - no >>>>> quote. Expat told me "undefined entity at line ...". It is the >>>>> copyright symbol. How can i parse the document successfully ? >>>> >>>> _______________________________________________ >>>> Expat-discuss mailing list >>>> Expat-discuss@libexpat.org >>>> http://mail.libexpat.org/mailman/listinfo/expat-discuss >>>> >>> >> >> _______________________________________________ >> Expat-discuss mailing list >> Expat-discuss@libexpat.org >> http://mail.libexpat.org/mailman/listinfo/expat-discuss >> > From karl at waclawek.net Mon Nov 15 18:07:09 2004 From: karl at waclawek.net (Karl Waclawek) Date: Mon Nov 15 18:08:08 2004 Subject: [Expat-discuss] undefined entity - how can i fix it ? References: <002f01c4ca6a$34315950$0100a8c0@alexcd9t4f0rbw><000801c4ca70$46410270$0200a8c0@karlglen188><053701c4cac9$7c84c610$0100a8c0@alexcd9t4f0rbw><000e01c4cad1$a4a7c310$0200a8c0@karlglen188><001301c4cad4$369b6e50$0100a8c0@alexcd9t4f0rbw><001c01c4cad7$931f06c0$0200a8c0@karlglen188> <00aa01c4cb33$172ecc10$0100a8c0@alexcd9t4f0rbw> Message-ID: <003c01c4cb35$97b56810$9e539696@torstar.net> > 2. When will expat use the DTD file ? How can I pass the DTD file to expat ? To pass the DTD file you need to write an ExternalEntityRefhandler. The handler gets the system and public identifiers passed and has to load the corresponding file and use an instance of an Expat parser (created with XML_ExternalEntityParserCreate()) to parse the external file - using the same kind of parsing loop you would use for the document. The xmlwf application included with the Expat distribution uses most of the Expat API, so it is useful to study it. > 1. After calling XML_UseForeignDTD(...), the special characters is removed. > They will not appear in parameter of my handlers. Under certain conditions it is legal to skip a reference to an undeclared entity. Btw, when turning on the UseForeignDTD flag, and the document does not have a Doctype declaration, then the ExternalEntityRefhandler will be called with both systemid and publicid NULL. Karl ----- Original Message ----- From: "Golibasku" To: Sent: Monday, November 15, 2004 11:49 AM Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > After reading the reference.html many times, I still don;t know how to use > the DTD file. I have the following problems. > 1. After calling XML_UseForeignDTD(...), the special characters is removed. > They will not appear in parameter of my handlers. > 2. When will expat use the DTD file ? How can I pass the DTD file to expat ? > > ----- Original Message ----- > From: "Karl Waclawek" > To: "Golibasku" ; > Sent: Monday, November 15, 2004 1:54 PM > Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > > > > To add to the preceding discussion: I did a little googling, and found > > that there is a DTD for RSS defined - search for "RSS DTD 0.91". > > > > Strictly speaking, your document should have a Doctype declaration > > pointing to that DTD. Since it does not, you can still apply the DTD > > (one you have downloaded it) to that document by using the > > XML_UseForeignDTD() API in Expat, which is documented in reference.html. > > > > Karl > > > > ----- Original Message ----- > > From: "Golibasku" > > To: > > Sent: Monday, November 15, 2004 12:30 AM > > Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > > > > > >> Are you sure ? all the RSS in the Internet don't have DTD declared in the > >> xml file (internal / external). But all the xml parser (of course the > >> parser don't have critical bugs) can parse them without error. I think > >> well-formed XML document doesn't need to have a DTD. A "VALID" XML > >> document need to have DTD. > >> > >> But anyway, I am not a student or teacher. I am not teaching XML 101. > >> That's why I don't want to argue on the definition problem. I only need > >> to write a program to parse the xml file. Is there any example in expat > >> which show how to parse such XML document.? > >> > >> > >> ----- Original Message ----- > >> From: "Karl Waclawek" > >> To: "Golibasku" ; > >> Sent: Monday, November 15, 2004 1:12 PM > >> Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > >> > >> > >>> If your file does not have a DTD then obviously it is missing > >>> the entity declaration and is therefore not well-formed. > >>> This means - strictly speaking - it does not conform > >>> to the definition of an XML document, and no conforming > >>> parser will accept it. > >>> > >>> ----- Original Message ----- > >>> From: "Golibasku" > >>> To: > >>> Sent: Sunday, November 14, 2004 11:13 PM > >>> Subject: Re: [Expat-discuss] undefined entity - how can i fix it ? > >>> > >>> > >>>> Can you give me more information ? My XML don't have any DTD, i just > >>>> want to use expat to get the content from it. > >>>> > >>>>> Did you declare this entity in the DTD? > >>>>> If not, that is what you need to do, since in XML there are only > >>>>> very few predefined entities. > >>>>> > >>>>> ----- Original Message ----- > >>>>> Subject: [Expat-discuss] undefined entity - how can i fix it ? > >>>>> > >>>>> Dear all, > >>>>> in my xml document, there is a line which contains "©" - no > >>>>> quote. Expat told me "undefined entity at line ...". It is the > >>>>> copyright symbol. How can i parse the document successfully ? > >>>> > >>>> _______________________________________________ > >>>> Expat-discuss mailing list > >>>> Expat-discuss@libexpat.org > >>>> http://mail.libexpat.org/mailman/listinfo/expat-discuss > >>>> > >>> > >> > >> _______________________________________________ > >> Expat-discuss mailing list > >> Expat-discuss@libexpat.org > >> http://mail.libexpat.org/mailman/listinfo/expat-discuss > >> > > > > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > From support at absoft-net.com Mon Nov 15 17:15:42 2004 From: support at absoft-net.com (Paugoert [Customer Support]) Date: Mon Nov 15 20:28:40 2004 Subject: [Expat-discuss] any hints about foreign DTD Message-ID: <009301c4cb2e$5e5d1830$0100a8c0@alexcd9t4f0rbw> Dear all, After reading the manual many times and google, I still dont know how to use foreign DTD. If i parse a RSS file, the file contains ©. After I call XML_UseForeignDTD(m_parser, TRUE) before parsing, the error disappear. But the © is removed. All the handlers don't have parameters which contains the ©. What should I do in order to get the ©. regards From karl at waclawek.net Mon Nov 15 21:58:22 2004 From: karl at waclawek.net (Karl Waclawek) Date: Mon Nov 15 21:59:00 2004 Subject: [Expat-discuss] any hints about foreign DTD References: <009301c4cb2e$5e5d1830$0100a8c0@alexcd9t4f0rbw> Message-ID: <000f01c4cb55$deb77440$9e539696@torstar.net> Did you write an ExternalEntityRefHandler that parses the RSS DTD? ----- Original Message ----- From: "Paugoert [Customer Support]" To: Sent: Monday, November 15, 2004 11:15 AM Subject: [Expat-discuss] any hints about foreign DTD > Dear all, > After reading the manual many times and google, I still dont know how to > use foreign DTD. If i parse a RSS file, the file contains ©. After I > call XML_UseForeignDTD(m_parser, TRUE) before parsing, the error disappear. > But the © is removed. All the handlers don't have parameters which > contains the ©. What should I do in order to get the ©. > > regards > > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > From sb at dod.no Mon Nov 15 23:28:56 2004 From: sb at dod.no (Steinar Bang) Date: Mon Nov 15 23:29:02 2004 Subject: [Expat-discuss] Re: Conflict with two expat shared libraries References: <871xhpajm5.fsf@dod.no> <002101c48e3d$3bc7b6f0$0300a8c0@karlglen188> <87brgnykyx.fsf@dod.no> <000f01c491c8$dba0c610$9e539696@citkwaclaww2k> <871xfyl68h.fsf@dod.no> <036901c4b3c8$32875ea0$0300a8c0@karlglen188> <87oej1kbjc.fsf@dod.no> <001301c4b451$665825a0$0200a8c0@karlglen188> <87k6tpjhhu.fsf@dod.no> <001801c4b48a$3fbffdd0$097ca8c0@karlglen188> <87brf1j9dp.fsf@dod.no> <002701c4b49d$1a5b6940$097ca8c0@karlglen188> <874qkqbnlw.fsf@dod.no> <001b01c4b605$cff09a00$057ca8c0@karlglen188> <87zn2ia24t.fsf@dod.no> <001d01c4b61f$a39aa940$047ca8c0@karlglen188> Message-ID: <87brdy4uhj.fsf@dod.no> >>>>> "Karl Waclawek" : > ----- Original Message ----- From: "Steinar Bang" Sent: Tuesday, October 19, 2004 4:23 PM >> I think the enhancement request below would fix at least this >> particular problem: >> http://sourceforge.net/tracker/index.php?func=detail&aid=1048448&group_id=10127&atid=110127 >> This would be similar to the "A" and "W" suffixes used on different >> versions of the Win32 API calls. > I guess it would break existing code, but it is in principle a > reasonable approach. If you put it into a major version number change, there's a hope that eg. linux package maintainers of the expat library won't expect binary compatibility, and therefore won't scream too much. > The other one would be, of course, to control what is exported, to > avoid the need for the -Bsymbolic flag. I don't think there is any way of controlling that in ELF, except by making the functions you don't wish to export, static. That may not be easily done, if they are used across several C source files. From lee at puddledock.net Sun Nov 21 23:27:16 2004 From: lee at puddledock.net (Lee Brown) Date: Sun Nov 21 23:27:16 2004 Subject: [Expat-discuss] numeric entities Message-ID: <000c01c4d019$418b3b20$0200a8c0@GLOUCESTER> The handling of numeric entities changed between releases 1.95.5 and 1.95.8, such that in 1.95.8 numeric entities seem to be ignored during output. Example XSL file: @ & Example XML input file: line one line two line three I'm using Sablotron's sabcmd. When linked with expat 1.95.5 each output line is followed by an at-sign (#64) and an ampersand. When linked with expat 1.95.8 each line is followed only by an ampersand. Is this intentional? Or am I the only one experiencing this (I have my own port of expat built from source)? Anyone know how to write out the value of a numeric entity? Thanks, Lee From karl at waclawek.net Mon Nov 22 00:04:42 2004 From: karl at waclawek.net (Karl Waclawek) Date: Mon Nov 22 00:04:40 2004 Subject: [Expat-discuss] numeric entities References: <000c01c4d019$418b3b20$0200a8c0@GLOUCESTER> Message-ID: <001501c4d01e$7c94a850$0200a8c0@karlglen188> I suggest you test this with Expat directly. Karl ----- Original Message ----- From: "Lee Brown" To: Sent: Sunday, November 21, 2004 5:27 PM Subject: [Expat-discuss] numeric entities The handling of numeric entities changed between releases 1.95.5 and 1.95.8, such that in 1.95.8 numeric entities seem to be ignored during output. Example XSL file: @ & Example XML input file: line one line two line three I'm using Sablotron's sabcmd. When linked with expat 1.95.5 each output line is followed by an at-sign (#64) and an ampersand. When linked with expat 1.95.8 each line is followed only by an ampersand. Is this intentional? Or am I the only one experiencing this (I have my own port of expat built from source)? Anyone know how to write out the value of a numeric entity? Thanks, Lee _______________________________________________ Expat-discuss mailing list Expat-discuss@libexpat.org http://mail.libexpat.org/mailman/listinfo/expat-discuss From lee at puddledock.net Mon Nov 22 02:32:28 2004 From: lee at puddledock.net (Lee Brown) Date: Mon Nov 22 02:32:28 2004 Subject: [Expat-discuss] numeric entities References: <000c01c4d019$418b3b20$0200a8c0@GLOUCESTER> <001501c4d01e$7c94a850$0200a8c0@karlglen188> Message-ID: <000801c4d033$2119b960$0200a8c0@GLOUCESTER> Okay, I used xmlwf from 1.95.8 this way: xmlwf -c -m -d tmp < test.xsl test.xsl looks like this: BEFORE@&AFTER The output file looks like this: Notice the strings "BEFORE" and "AFTER" in the input file, which are separated by a numeric entity (the value of the at-sign) and a standard entity. The standard entity is repeated as a character value in the xmlwf output, but the numeric entity is discarded. But, if I do not use the -m option, I do see an exact copy of my input file. This is the behavior I might expect for external entities, but it is my understanding that numeric entities should work like the "standard" pre-defined entities. It is important to repeat that this appears to be a change in the behavior from an earlier release. Is this a bug that everyone sees, or is it a bug in my port (in which case are there any suggestions about where to look), or is my XML file incorrect (in which case, what would be correct)? P.S., the xmlwf man page asks why anyone would want to use the -c, -m, and -d options. I found them quite useful to see if expat would indeed make an exact copy of the input. Thanks, Lee ----- Original Message ----- From: "Karl Waclawek" To: Sent: Sunday, November 21, 2004 6:04 PM Subject: Re: [Expat-discuss] numeric entities > I suggest you test this with Expat directly. > > Karl > > ----- Original Message ----- > From: "Lee Brown" > To: > Sent: Sunday, November 21, 2004 5:27 PM > Subject: [Expat-discuss] numeric entities > > > The handling of numeric entities changed between releases 1.95.5 and 1.95.8, such that in 1.95.8 > numeric entities seem to be ignored during output. > > Example XSL file: > > > > > > > > @ > & > > > > > Example XML input file: > > > > line one > line two > line three > > > I'm using Sablotron's sabcmd. When linked with expat 1.95.5 each output line is followed by an > at-sign (#64) and an ampersand. When linked with expat 1.95.8 each line is followed only by an > ampersand. > > Is this intentional? Or am I the only one experiencing this (I have my own port of expat built from > source)? Anyone know how to write out the value of a numeric entity? > > Thanks, > Lee > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > From karl at waclawek.net Mon Nov 22 04:09:06 2004 From: karl at waclawek.net (Karl Waclawek) Date: Mon Nov 22 04:09:04 2004 Subject: [Expat-discuss] numeric entities References: <000c01c4d019$418b3b20$0200a8c0@GLOUCESTER><001501c4d01e$7c94a850$0200a8c0@karlglen188> <000801c4d033$2119b960$0200a8c0@GLOUCESTER> Message-ID: <000c01c4d040$a0d1e0d0$0200a8c0@karlglen188> I ran xmlwf -m -d tmp < test.xsl just like you (the -c is superfluous in this case) and my output is: I am running Expat built from current CVS on VS C++ 6.0. I can't recall a recent bug regarding character references. Maybe you should try the pre-built distribution, and if that one works for you, have a look at your Expat build. Karl ----- Original Message ----- From: "Lee Brown" To: Sent: Sunday, November 21, 2004 8:32 PM Subject: Re: [Expat-discuss] numeric entities > Okay, I used xmlwf from 1.95.8 this way: > > xmlwf -c -m -d tmp < test.xsl > > test.xsl looks like this: > > > > BEFORE@&AFTER > > > The output file looks like this: > > > > > > > > > > > > > > > Notice the strings "BEFORE" and "AFTER" in the input file, which are > separated by a numeric entity (the value of the at-sign) and a standard > entity. The standard entity is repeated as a character value in the xmlwf > output, but the numeric entity is discarded. > > But, if I do not use the -m option, I do see an exact copy of my input file. > > This is the behavior I might expect for external entities, but it is my > understanding that numeric entities should work like the "standard" > pre-defined entities. > > It is important to repeat that this appears to be a change in the behavior > from an earlier release. Is this a bug that everyone sees, or is it a bug > in my port (in which case are there any suggestions about where to look), or > is my XML file incorrect (in which case, what would be correct)? > > P.S., the xmlwf man page asks why anyone would want to use the -c, -m, > and -d options. I found them quite useful to see if expat would indeed make > an exact copy of the input. > > Thanks, > Lee > > > ----- Original Message ----- > From: "Karl Waclawek" > To: > Sent: Sunday, November 21, 2004 6:04 PM > Subject: Re: [Expat-discuss] numeric entities > > >> I suggest you test this with Expat directly. >> >> Karl >> >> ----- Original Message ----- >> From: "Lee Brown" >> To: >> Sent: Sunday, November 21, 2004 5:27 PM >> Subject: [Expat-discuss] numeric entities >> >> >> The handling of numeric entities changed between releases 1.95.5 and > 1.95.8, such that in 1.95.8 >> numeric entities seem to be ignored during output. >> >> Example XSL file: >> >> >> version="1.0"> >> >> >> >> >> @ >> & >> >> >> >> >> Example XML input file: >> >> >> >> line one >> line two >> line three >> >> >> I'm using Sablotron's sabcmd. When linked with expat 1.95.5 each output > line is followed by an >> at-sign (#64) and an ampersand. When linked with expat 1.95.8 each line > is followed only by an >> ampersand. >> >> Is this intentional? Or am I the only one experiencing this (I have my > own port of expat built from >> source)? Anyone know how to write out the value of a numeric entity? >> >> Thanks, >> Lee >> _______________________________________________ >> Expat-discuss mailing list >> Expat-discuss@libexpat.org >> http://mail.libexpat.org/mailman/listinfo/expat-discuss >> >> _______________________________________________ >> Expat-discuss mailing list >> Expat-discuss@libexpat.org >> http://mail.libexpat.org/mailman/listinfo/expat-discuss >> > > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > From rolf at pointsman.de Mon Nov 22 04:35:11 2004 From: rolf at pointsman.de (rolf@pointsman.de) Date: Mon Nov 22 04:37:43 2004 Subject: [Expat-discuss] numeric entities In-Reply-To: <000801c4d033$2119b960$0200a8c0@GLOUCESTER> Message-ID: <20041122033514.9BFBA7F5AB@pointsman.pointsman.de> On 21 Nov, Lee Brown wrote: > It is important to repeat that this appears to be a change in the behavior > from an earlier release. Is this a bug that everyone sees, or is it a bug > in my port (in which case are there any suggestions about where to look), or > is my XML file incorrect (in which case, what would be correct)? I checked your xsl example data mailed in your previous post with my expat 1.95.8 using code and didn't saw your problem - I got the '@', no problem with numeric character entities. Your xml looks OK. hth rolf From lee at puddledock.net Mon Nov 22 06:30:19 2004 From: lee at puddledock.net (Lee Brown) Date: Mon Nov 22 06:30:18 2004 Subject: [Expat-discuss] numeric entities References: <000c01c4d019$418b3b20$0200a8c0@GLOUCESTER><001501c4d01e$7c94a850$0200a8c0@karlglen188> <000801c4d033$2119b960$0200a8c0@GLOUCESTER> <000c01c4d040$a0d1e0d0$0200a8c0@karlglen188> Message-ID: <002301c4d054$5ad2c810$0200a8c0@GLOUCESTER> So my problem appears to be a problem with my port to Unixware 2.1.3. The parameters passed into XmlUtf8Encode were corrupted on entry to the function. I changed internal.h to define the FASTCALL macro and the other macros of that group as empty strings and then I got the behavior I wanted. Thanks Karl and Rolf, Lee ----- Original Message ----- From: "Karl Waclawek" To: "Lee Brown" ; Sent: Sunday, November 21, 2004 10:09 PM Subject: Re: [Expat-discuss] numeric entities > I ran xmlwf -m -d tmp < test.xsl just like you > (the -c is superfluous in this case) and my output is: > > > > > > > > > > > > > > > I am running Expat built from current CVS on VS C++ 6.0. > I can't recall a recent bug regarding character references. > > Maybe you should try the pre-built distribution, and if that > one works for you, have a look at your Expat build. > > Karl > > ----- Original Message ----- > From: "Lee Brown" > To: > Sent: Sunday, November 21, 2004 8:32 PM > Subject: Re: [Expat-discuss] numeric entities > > > > Okay, I used xmlwf from 1.95.8 this way: > > > > xmlwf -c -m -d tmp < test.xsl > > > > test.xsl looks like this: > > > > > > > > BEFORE@&AFTER > > > > > > The output file looks like this: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Notice the strings "BEFORE" and "AFTER" in the input file, which are > > separated by a numeric entity (the value of the at-sign) and a standard > > entity. The standard entity is repeated as a character value in the xmlwf > > output, but the numeric entity is discarded. > > > > But, if I do not use the -m option, I do see an exact copy of my input file. > > > > This is the behavior I might expect for external entities, but it is my > > understanding that numeric entities should work like the "standard" > > pre-defined entities. > > > > It is important to repeat that this appears to be a change in the behavior > > from an earlier release. Is this a bug that everyone sees, or is it a bug > > in my port (in which case are there any suggestions about where to look), or > > is my XML file incorrect (in which case, what would be correct)? > > > > P.S., the xmlwf man page asks why anyone would want to use the -c, -m, > > and -d options. I found them quite useful to see if expat would indeed make > > an exact copy of the input. > > > > Thanks, > > Lee > > > > > > ----- Original Message ----- > > From: "Karl Waclawek" > > To: > > Sent: Sunday, November 21, 2004 6:04 PM > > Subject: Re: [Expat-discuss] numeric entities > > > > > >> I suggest you test this with Expat directly. > >> > >> Karl > >> > >> ----- Original Message ----- > >> From: "Lee Brown" > >> To: > >> Sent: Sunday, November 21, 2004 5:27 PM > >> Subject: [Expat-discuss] numeric entities > >> > >> > >> The handling of numeric entities changed between releases 1.95.5 and > > 1.95.8, such that in 1.95.8 > >> numeric entities seem to be ignored during output. > >> > >> Example XSL file: > >> > >> > >> > version="1.0"> > >> > >> > >> > >> > >> @ > >> & > >> > >> > >> > >> > >> Example XML input file: > >> > >> > >> > >> line one > >> line two > >> line three > >> > >> > >> I'm using Sablotron's sabcmd. When linked with expat 1.95.5 each output > > line is followed by an > >> at-sign (#64) and an ampersand. When linked with expat 1.95.8 each line > > is followed only by an > >> ampersand. > >> > >> Is this intentional? Or am I the only one experiencing this (I have my > > own port of expat built from > >> source)? Anyone know how to write out the value of a numeric entity? > >> > >> Thanks, > >> Lee > >> _______________________________________________ > >> Expat-discuss mailing list > >> Expat-discuss@libexpat.org > >> http://mail.libexpat.org/mailman/listinfo/expat-discuss > >> > >> _______________________________________________ > >> Expat-discuss mailing list > >> Expat-discuss@libexpat.org > >> http://mail.libexpat.org/mailman/listinfo/expat-discuss > >> > > > > _______________________________________________ > > Expat-discuss mailing list > > Expat-discuss@libexpat.org > > http://mail.libexpat.org/mailman/listinfo/expat-discuss > > From karl at waclawek.net Mon Nov 22 14:59:24 2004 From: karl at waclawek.net (Karl Waclawek) Date: Mon Nov 22 14:59:29 2004 Subject: [Expat-discuss] numeric entities References: <000c01c4d019$418b3b20$0200a8c0@GLOUCESTER><001501c4d01e$7c94a850$0200a8c0@karlglen188><000801c4d033$2119b960$0200a8c0@GLOUCESTER><000c01c4d040$a0d1e0d0$0200a8c0@karlglen188> <002301c4d054$5ad2c810$0200a8c0@GLOUCESTER> Message-ID: <001201c4d09b$79778200$9e539696@torstar.net> I am not a build specialist, but can our build process take that into account? Which C compiler are you using? When you build, the symbol __GNUC__ obviously gets defined, but I guess it should not. Karl ----- Original Message ----- From: "Lee Brown" To: Sent: Monday, November 22, 2004 12:30 AM Subject: Re: [Expat-discuss] numeric entities > So my problem appears to be a problem with my port to Unixware 2.1.3. The > parameters passed into XmlUtf8Encode were corrupted on entry to the > function. I changed internal.h to define the FASTCALL macro and the other > macros of that group as empty strings and then I got the behavior I wanted. > > Thanks Karl and Rolf, > Lee > > ----- Original Message ----- > From: "Karl Waclawek" > To: "Lee Brown" ; > Sent: Sunday, November 21, 2004 10:09 PM > Subject: Re: [Expat-discuss] numeric entities > > > > I ran xmlwf -m -d tmp < test.xsl just like you > > (the -c is superfluous in this case) and my output is: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I am running Expat built from current CVS on VS C++ 6.0. > > I can't recall a recent bug regarding character references. > > > > Maybe you should try the pre-built distribution, and if that > > one works for you, have a look at your Expat build. > > > > Karl > > > > ----- Original Message ----- > > From: "Lee Brown" > > To: > > Sent: Sunday, November 21, 2004 8:32 PM > > Subject: Re: [Expat-discuss] numeric entities > > > > > > > Okay, I used xmlwf from 1.95.8 this way: > > > > > > xmlwf -c -m -d tmp < test.xsl > > > > > > test.xsl looks like this: > > > > > > > > > > > > BEFORE@&AFTER > > > > > > > > > The output file looks like this: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Notice the strings "BEFORE" and "AFTER" in the input file, which are > > > separated by a numeric entity (the value of the at-sign) and a standard > > > entity. The standard entity is repeated as a character value in the > xmlwf > > > output, but the numeric entity is discarded. > > > > > > But, if I do not use the -m option, I do see an exact copy of my input > file. > > > > > > This is the behavior I might expect for external entities, but it is my > > > understanding that numeric entities should work like the "standard" > > > pre-defined entities. > > > > > > It is important to repeat that this appears to be a change in the > behavior > > > from an earlier release. Is this a bug that everyone sees, or is it a > bug > > > in my port (in which case are there any suggestions about where to > look), or > > > is my XML file incorrect (in which case, what would be correct)? > > > > > > P.S., the xmlwf man page asks why anyone would want to use the -c, -m, > > > and -d options. I found them quite useful to see if expat would indeed > make > > > an exact copy of the input. > > > > > > Thanks, > > > Lee > > > > > > > > > ----- Original Message ----- > > > From: "Karl Waclawek" > > > To: > > > Sent: Sunday, November 21, 2004 6:04 PM > > > Subject: Re: [Expat-discuss] numeric entities > > > > > > > > >> I suggest you test this with Expat directly. > > >> > > >> Karl > > >> > > >> ----- Original Message ----- > > >> From: "Lee Brown" > > >> To: > > >> Sent: Sunday, November 21, 2004 5:27 PM > > >> Subject: [Expat-discuss] numeric entities > > >> > > >> > > >> The handling of numeric entities changed between releases 1.95.5 and > > > 1.95.8, such that in 1.95.8 > > >> numeric entities seem to be ignored during output. > > >> > > >> Example XSL file: > > >> > > >> > > >> > > version="1.0"> > > >> > > >> > > >> > > >> > > >> @ > > >> & > > >> > > >> > > >> > > >> > > >> Example XML input file: > > >> > > >> > > >> > > >> line one > > >> line two > > >> line three > > >> > > >> > > >> I'm using Sablotron's sabcmd. When linked with expat 1.95.5 each > output > > > line is followed by an > > >> at-sign (#64) and an ampersand. When linked with expat 1.95.8 each > line > > > is followed only by an > > >> ampersand. > > >> > > >> Is this intentional? Or am I the only one experiencing this (I have my > > > own port of expat built from > > >> source)? Anyone know how to write out the value of a numeric entity? > > >> > > >> Thanks, > > >> Lee > > >> _______________________________________________ > > >> Expat-discuss mailing list > > >> Expat-discuss@libexpat.org > > >> http://mail.libexpat.org/mailman/listinfo/expat-discuss > > >> > > >> _______________________________________________ > > >> Expat-discuss mailing list > > >> Expat-discuss@libexpat.org > > >> http://mail.libexpat.org/mailman/listinfo/expat-discuss > > >> > > > > > > _______________________________________________ > > > Expat-discuss mailing list > > > Expat-discuss@libexpat.org > > > http://mail.libexpat.org/mailman/listinfo/expat-discuss > > > > > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > From savvas.socratous at student.manchester.ac.uk Mon Nov 22 18:58:36 2004 From: savvas.socratous at student.manchester.ac.uk (Savvas Socratous) Date: Mon Nov 22 19:50:57 2004 Subject: [Expat-discuss] Run-time error during file parsing References: <20041122053018.8B1561E400B@bag.python.org> Message-ID: <000d01c4d0bc$e3ea7900$17e05882@E26B> Hello,I have small xml file that I want to parse into my application : 0LVRM 0COR1 0DNRM For each element I want to do different things so my start element handler is of the form if(strcmp(el,"layout")==0) { ..... } if(strcmp(el,"floor")==0 { .... } Now I get a number of strange parsing errors....I did a number of tests and I've discovered the following:the and start tags seem to be recognised ok. However,my character handler is called EVERY time-even though and don't contain any characters.Shouldn't the character handler only be called when a element tag is being parsed? Also,I've discovered that the string that gets copied by the character handler actually contains not only the character data,but the end tag as well-so instead of having 0LVRM being parsed I get 0LVRM. I guess that the run time error is the result of both of these anomalies but I can't see why they take place.. If anyone can offer their suggestion as to why expat behaves like that I would be very grateful Thanks, Savvas Socratous ----- Original Message ----- From: To: Sent: Monday, November 22, 2004 5:30 AM Subject: Expat-discuss Digest, Vol 56, Issue 8 > Send Expat-discuss mailing list submissions to > expat-discuss@libexpat.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.libexpat.org/mailman/listinfo/expat-discuss > or, via email, send a message with subject or body 'help' to > expat-discuss-request@libexpat.org > > You can reach the person managing the list at > expat-discuss-owner@libexpat.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Expat-discuss digest..." > > > Today's Topics: > > 1. numeric entities (Lee Brown) > 2. Re: numeric entities (Karl Waclawek) > 3. Re: numeric entities (Lee Brown) > 4. Re: numeric entities (Karl Waclawek) > 5. Re: numeric entities (rolf@pointsman.de) > 6. Re: numeric entities (Lee Brown) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 21 Nov 2004 17:27:16 -0500 > From: "Lee Brown" > Subject: [Expat-discuss] numeric entities > To: > Message-ID: <000c01c4d019$418b3b20$0200a8c0@GLOUCESTER> > Content-Type: text/plain; charset="iso-8859-1" > > The handling of numeric entities changed between releases 1.95.5 and 1.95.8, such that in 1.95.8 numeric entities seem to be ignored during output. > > Example XSL file: > > > > > > > > @ > & > > > > > Example XML input file: > > > > line one > line two > line three > > > I'm using Sablotron's sabcmd. When linked with expat 1.95.5 each output line is followed by an at-sign (#64) and an ampersand. When linked with expat 1.95.8 each line is followed only by an ampersand. > > Is this intentional? Or am I the only one experiencing this (I have my own port of expat built from source)? Anyone know how to write out the value of a numeric entity? > > Thanks, > Lee > > > ------------------------------ > > Message: 2 > Date: Sun, 21 Nov 2004 18:04:42 -0500 > From: "Karl Waclawek" > Subject: Re: [Expat-discuss] numeric entities > To: > Message-ID: <001501c4d01e$7c94a850$0200a8c0@karlglen188> > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > I suggest you test this with Expat directly. > > Karl > > ----- Original Message ----- > From: "Lee Brown" > To: > Sent: Sunday, November 21, 2004 5:27 PM > Subject: [Expat-discuss] numeric entities > > > The handling of numeric entities changed between releases 1.95.5 and 1.95.8, such that in 1.95.8 > numeric entities seem to be ignored during output. > > Example XSL file: > > > > > > > > @ > & > > > > > Example XML input file: > > > > line one > line two > line three > > > I'm using Sablotron's sabcmd. When linked with expat 1.95.5 each output line is followed by an > at-sign (#64) and an ampersand. When linked with expat 1.95.8 each line is followed only by an > ampersand. > > Is this intentional? Or am I the only one experiencing this (I have my own port of expat built from > source)? Anyone know how to write out the value of a numeric entity? > > Thanks, > Lee > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > > > > ------------------------------ > > Message: 3 > Date: Sun, 21 Nov 2004 20:32:28 -0500 > From: "Lee Brown" > Subject: Re: [Expat-discuss] numeric entities > To: > Message-ID: <000801c4d033$2119b960$0200a8c0@GLOUCESTER> > Content-Type: text/plain; charset="iso-8859-1" > > Okay, I used xmlwf from 1.95.8 this way: > > xmlwf -c -m -d tmp < test.xsl > > test.xsl looks like this: > > > > BEFORE@&AFTER > > > The output file looks like this: > > > > > > > > > > > > > > > Notice the strings "BEFORE" and "AFTER" in the input file, which are > separated by a numeric entity (the value of the at-sign) and a standard > entity. The standard entity is repeated as a character value in the xmlwf > output, but the numeric entity is discarded. > > But, if I do not use the -m option, I do see an exact copy of my input file. > > This is the behavior I might expect for external entities, but it is my > understanding that numeric entities should work like the "standard" > pre-defined entities. > > It is important to repeat that this appears to be a change in the behavior > from an earlier release. Is this a bug that everyone sees, or is it a bug > in my port (in which case are there any suggestions about where to look), or > is my XML file incorrect (in which case, what would be correct)? > > P.S., the xmlwf man page asks why anyone would want to use the -c, -m, > and -d options. I found them quite useful to see if expat would indeed make > an exact copy of the input. > > Thanks, > Lee > > > ----- Original Message ----- > From: "Karl Waclawek" > To: > Sent: Sunday, November 21, 2004 6:04 PM > Subject: Re: [Expat-discuss] numeric entities > > > > I suggest you test this with Expat directly. > > > > Karl > > > > ----- Original Message ----- > > From: "Lee Brown" > > To: > > Sent: Sunday, November 21, 2004 5:27 PM > > Subject: [Expat-discuss] numeric entities > > > > > > The handling of numeric entities changed between releases 1.95.5 and > 1.95.8, such that in 1.95.8 > > numeric entities seem to be ignored during output. > > > > Example XSL file: > > > > > > version="1.0"> > > > > > > > > > > @ > > & > > > > > > > > > > Example XML input file: > > > > > > > > line one > > line two > > line three > > > > > > I'm using Sablotron's sabcmd. When linked with expat 1.95.5 each output > line is followed by an > > at-sign (#64) and an ampersand. When linked with expat 1.95.8 each line > is followed only by an > > ampersand. > > > > Is this intentional? Or am I the only one experiencing this (I have my > own port of expat built from > > source)? Anyone know how to write out the value of a numeric entity? > > > > Thanks, > > Lee > > _______________________________________________ > > Expat-discuss mailing list > > Expat-discuss@libexpat.org > > http://mail.libexpat.org/mailman/listinfo/expat-discuss > > > > _______________________________________________ > > Expat-discuss mailing list > > Expat-discuss@libexpat.org > > http://mail.libexpat.org/mailman/listinfo/expat-discuss > > > > > > ------------------------------ > > Message: 4 > Date: Sun, 21 Nov 2004 22:09:06 -0500 > From: "Karl Waclawek" > Subject: Re: [Expat-discuss] numeric entities > To: "Lee Brown" , > Message-ID: <000c01c4d040$a0d1e0d0$0200a8c0@karlglen188> > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > I ran xmlwf -m -d tmp < test.xsl just like you > (the -c is superfluous in this case) and my output is: > > > > > > > > > > > > > > > I am running Expat built from current CVS on VS C++ 6.0. > I can't recall a recent bug regarding character references. > > Maybe you should try the pre-built distribution, and if that > one works for you, have a look at your Expat build. > > Karl > > ----- Original Message ----- > From: "Lee Brown" > To: > Sent: Sunday, November 21, 2004 8:32 PM > Subject: Re: [Expat-discuss] numeric entities > > > > Okay, I used xmlwf from 1.95.8 this way: > > > > xmlwf -c -m -d tmp < test.xsl > > > > test.xsl looks like this: > > > > > > > > BEFORE@&AFTER > > > > > > The output file looks like this: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Notice the strings "BEFORE" and "AFTER" in the input file, which are > > separated by a numeric entity (the value of the at-sign) and a standard > > entity. The standard entity is repeated as a character value in the xmlwf > > output, but the numeric entity is discarded. > > > > But, if I do not use the -m option, I do see an exact copy of my input file. > > > > This is the behavior I might expect for external entities, but it is my > > understanding that numeric entities should work like the "standard" > > pre-defined entities. > > > > It is important to repeat that this appears to be a change in the behavior > > from an earlier release. Is this a bug that everyone sees, or is it a bug > > in my port (in which case are there any suggestions about where to look), or > > is my XML file incorrect (in which case, what would be correct)? > > > > P.S., the xmlwf man page asks why anyone would want to use the -c, -m, > > and -d options. I found them quite useful to see if expat would indeed make > > an exact copy of the input. > > > > Thanks, > > Lee > > > > > > ----- Original Message ----- > > From: "Karl Waclawek" > > To: > > Sent: Sunday, November 21, 2004 6:04 PM > > Subject: Re: [Expat-discuss] numeric entities > > > > > >> I suggest you test this with Expat directly. > >> > >> Karl > >> > >> ----- Original Message ----- > >> From: "Lee Brown" > >> To: > >> Sent: Sunday, November 21, 2004 5:27 PM > >> Subject: [Expat-discuss] numeric entities > >> > >> > >> The handling of numeric entities changed between releases 1.95.5 and > > 1.95.8, such that in 1.95.8 > >> numeric entities seem to be ignored during output. > >> > >> Example XSL file: > >> > >> > >> > version="1.0"> > >> > >> > >> > >> > >> @ > >> & > >> > >> > >> > >> > >> Example XML input file: > >> > >> > >> > >> line one > >> line two > >> line three > >> > >> > >> I'm using Sablotron's sabcmd. When linked with expat 1.95.5 each output > > line is followed by an > >> at-sign (#64) and an ampersand. When linked with expat 1.95.8 each line > > is followed only by an > >> ampersand. > >> > >> Is this intentional? Or am I the only one experiencing this (I have my > > own port of expat built from > >> source)? Anyone know how to write out the value of a numeric entity? > >> > >> Thanks, > >> Lee > >> _______________________________________________ > >> Expat-discuss mailing list > >> Expat-discuss@libexpat.org > >> http://mail.libexpat.org/mailman/listinfo/expat-discuss > >> > >> _______________________________________________ > >> Expat-discuss mailing list > >> Expat-discuss@libexpat.org > >> http://mail.libexpat.org/mailman/listinfo/expat-discuss > >> > > > > _______________________________________________ > > Expat-discuss mailing list > > Expat-discuss@libexpat.org > > http://mail.libexpat.org/mailman/listinfo/expat-discuss > > > > > ------------------------------ > > Message: 5 > Date: Mon, 22 Nov 2004 04:35:11 +0100 (CET) > From: rolf@pointsman.de > Subject: Re: [Expat-discuss] numeric entities > To: expat-discuss@libexpat.org > Message-ID: <20041122033514.9BFBA7F5AB@pointsman.pointsman.de> > Content-Type: TEXT/plain; charset=us-ascii > > On 21 Nov, Lee Brown wrote: > > It is important to repeat that this appears to be a change in the behavior > > from an earlier release. Is this a bug that everyone sees, or is it a bug > > in my port (in which case are there any suggestions about where to look), or > > is my XML file incorrect (in which case, what would be correct)? > > I checked your xsl example data mailed in your previous post with my > expat 1.95.8 using code and didn't saw your problem - I got the '@', > no problem with numeric character entities. Your xml looks OK. > > hth > rolf > > > > > ------------------------------ > > Message: 6 > Date: Mon, 22 Nov 2004 00:30:19 -0500 > From: "Lee Brown" > Subject: Re: [Expat-discuss] numeric entities > To: > Message-ID: <002301c4d054$5ad2c810$0200a8c0@GLOUCESTER> > Content-Type: text/plain; charset="iso-8859-1" > > So my problem appears to be a problem with my port to Unixware 2.1.3. The > parameters passed into XmlUtf8Encode were corrupted on entry to the > function. I changed internal.h to define the FASTCALL macro and the other > macros of that group as empty strings and then I got the behavior I wanted. > > Thanks Karl and Rolf, > Lee > > ----- Original Message ----- > From: "Karl Waclawek" > To: "Lee Brown" ; > Sent: Sunday, November 21, 2004 10:09 PM > Subject: Re: [Expat-discuss] numeric entities > > > > I ran xmlwf -m -d tmp < test.xsl just like you > > (the -c is superfluous in this case) and my output is: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I am running Expat built from current CVS on VS C++ 6.0. > > I can't recall a recent bug regarding character references. > > > > Maybe you should try the pre-built distribution, and if that > > one works for you, have a look at your Expat build. > > > > Karl > > > > ----- Original Message ----- > > From: "Lee Brown" > > To: > > Sent: Sunday, November 21, 2004 8:32 PM > > Subject: Re: [Expat-discuss] numeric entities > > > > > > > Okay, I used xmlwf from 1.95.8 this way: > > > > > > xmlwf -c -m -d tmp < test.xsl > > > > > > test.xsl looks like this: > > > > > > > > > > > > BEFORE@&AFTER > > > > > > > > > The output file looks like this: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Notice the strings "BEFORE" and "AFTER" in the input file, which are > > > separated by a numeric entity (the value of the at-sign) and a standard > > > entity. The standard entity is repeated as a character value in the > xmlwf > > > output, but the numeric entity is discarded. > > > > > > But, if I do not use the -m option, I do see an exact copy of my input > file. > > > > > > This is the behavior I might expect for external entities, but it is my > > > understanding that numeric entities should work like the "standard" > > > pre-defined entities. > > > > > > It is important to repeat that this appears to be a change in the > behavior > > > from an earlier release. Is this a bug that everyone sees, or is it a > bug > > > in my port (in which case are there any suggestions about where to > look), or > > > is my XML file incorrect (in which case, what would be correct)? > > > > > > P.S., the xmlwf man page asks why anyone would want to use the -c, -m, > > > and -d options. I found them quite useful to see if expat would indeed > make > > > an exact copy of the input. > > > > > > Thanks, > > > Lee > > > > > > > > > ----- Original Message ----- > > > From: "Karl Waclawek" > > > To: > > > Sent: Sunday, November 21, 2004 6:04 PM > > > Subject: Re: [Expat-discuss] numeric entities > > > > > > > > >> I suggest you test this with Expat directly. > > >> > > >> Karl > > >> > > >> ----- Original Message ----- > > >> From: "Lee Brown" > > >> To: > > >> Sent: Sunday, November 21, 2004 5:27 PM > > >> Subject: [Expat-discuss] numeric entities > > >> > > >> > > >> The handling of numeric entities changed between releases 1.95.5 and > > > 1.95.8, such that in 1.95.8 > > >> numeric entities seem to be ignored during output. > > >> > > >> Example XSL file: > > >> > > >> > > >> > > version="1.0"> > > >> > > >> > > >> > > >> > > >> @ > > >> & > > >> > > >> > > >> > > >> > > >> Example XML input file: > > >> > > >> > > >> > > >> line one > > >> line two > > >> line three > > >> > > >> > > >> I'm using Sablotron's sabcmd. When linked with expat 1.95.5 each > output > > > line is followed by an > > >> at-sign (#64) and an ampersand. When linked with expat 1.95.8 each > line > > > is followed only by an > > >> ampersand. > > >> > > >> Is this intentional? Or am I the only one experiencing this (I have my > > > own port of expat built from > > >> source)? Anyone know how to write out the value of a numeric entity? > > >> > > >> Thanks, > > >> Lee > > >> _______________________________________________ > > >> Expat-discuss mailing list > > >> Expat-discuss@libexpat.org > > >> http://mail.libexpat.org/mailman/listinfo/expat-discuss > > >> > > >> _______________________________________________ > > >> Expat-discuss mailing list > > >> Expat-discuss@libexpat.org > > >> http://mail.libexpat.org/mailman/listinfo/expat-discuss > > >> > > > > > > _______________________________________________ > > > Expat-discuss mailing list > > > Expat-discuss@libexpat.org > > > http://mail.libexpat.org/mailman/listinfo/expat-discuss > > > > > > > ------------------------------ > > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > > > End of Expat-discuss Digest, Vol 56, Issue 8 > ******************************************** > From karl at waclawek.net Mon Nov 22 19:59:10 2004 From: karl at waclawek.net (Karl Waclawek) Date: Mon Nov 22 19:59:24 2004 Subject: [Expat-discuss] Run-time error during file parsing References: <20041122053018.8B1561E400B@bag.python.org> <000d01c4d0bc$e3ea7900$17e05882@E26B> Message-ID: <001401c4d0c5$5ba98eb0$9e539696@torstar.net> > Hello,I have small xml file that I want to parse into my application : > > > > 0LVRM > 0COR1 > 0DNRM > > > > For each element I want to do different things so my start element handler > is of the form > > if(strcmp(el,"layout")==0) > { > ..... > } > > if(strcmp(el,"floor")==0 > { > .... > } > > Now I get a number of strange parsing errors....I did a number of tests and > I've discovered the following:the and start tags seem to be > recognised ok. However,my character handler is called EVERY time-even though > and don't contain any characters.Shouldn't the character > handler only be called when a element tag is being parsed? You have line breaks, which are character data! So the handler must be called. > Also,I've discovered that the string that gets copied by the character > handler actually contains not only the character data,but the end tag as > well-so instead of having 0LVRM being parsed I get 0LVRM. I guess > that the run time error is the result of both of these anomalies but I can't > see why they take place.. Are you sure you are copying only the number of characters indicated by the "len" argument passed to the handler? Karl From jeffl at hypershell.com Tue Nov 23 14:46:27 2004 From: jeffl at hypershell.com (Jeff Lambert) Date: Tue Nov 23 14:45:06 2004 Subject: [Expat-discuss] Expat 1.95.8 fails on XML with newline Message-ID: <41A33F33.9040103@hypershell.com> I saw something similar on the sourceforge bugs list but it was from 2001 so I assume it's fixed by now. O/S: WinXP SP2 and WinCE. Expat lib linked in VC++ 6 SP6. I have the following XML (simplified for discussion purposes) The XML starts and ends with the braces. { } NOTICE the newline(0A) at the beginning of the file. Now I use the following C++ code to read from the XML file: do { size_t len = fread(buf, 1, sizeof(buf), xmlfile); done = len < sizeof(buf); if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) { return ReturnLua(State, 1, "Error while parsing."); } } while (!done); This works mint on all other XML files, but not with that one. This is how the XML file is returned to me by a SOAP server. What happens is that on first pass through the while loop, XML_Parse doesn't even go into the functions previously set, it instantly returns XML_STATUS_ERROR, and the rest is history. I would like to know if the error is in my file reading code or an Expat bug. If it is the latter, is there a patch or quick fix? And if it is my code, then what could I do to strip the initial newline(s)? Thanks in advance! Jeff Lambert From karl at waclawek.net Tue Nov 23 14:50:08 2004 From: karl at waclawek.net (Karl Waclawek) Date: Tue Nov 23 14:50:25 2004 Subject: [Expat-discuss] Expat 1.95.8 fails on XML with newline References: <41A33F33.9040103@hypershell.com> Message-ID: <001b01c4d163$583c70a0$9e539696@torstar.net> AFAIK, starting an XML document with whitespace is an error, i.e. your document is not well-formed. Karl ----- Original Message ----- From: "Jeff Lambert" To: Sent: Tuesday, November 23, 2004 8:46 AM Subject: [Expat-discuss] Expat 1.95.8 fails on XML with newline > I saw something similar on the sourceforge bugs list but it was from > 2001 so I assume it's fixed by now. > > O/S: WinXP SP2 and WinCE. Expat lib linked in VC++ 6 SP6. > > I have the following XML (simplified for discussion purposes) The XML > starts and ends with the braces. > > { > > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > } > > NOTICE the newline(0A) at the beginning of the file. Now I use the > following C++ code to read from the XML file: > > do > { > size_t len = fread(buf, 1, sizeof(buf), xmlfile); > done = len < sizeof(buf); > if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) > { > return ReturnLua(State, 1, "Error while parsing."); > } > } while (!done); > > This works mint on all other XML files, but not with that one. This is > how the XML file is returned to me by a SOAP server. What happens is > that on first pass through the while loop, XML_Parse doesn't even go > into the functions previously set, it instantly returns > XML_STATUS_ERROR, and the rest is history. > > I would like to know if the error is in my file reading code or an Expat > bug. If it is the latter, is there a patch or quick fix? And if it is my > code, then what could I do to strip the initial newline(s)? > > Thanks in advance! > > Jeff Lambert > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > From ramakumard at yahoo.co.in Wed Nov 24 10:43:29 2004 From: ramakumard at yahoo.co.in (rama kumar) Date: Wed Nov 24 10:43:33 2004 Subject: [Expat-discuss] Problem when doing "male install" on linux ? Message-ID: <20041124094329.22538.qmail@web8402.mail.in.yahoo.com> Hi, I am facing problem i am doing "make install" on Linux. I used standard directories for installation (/usr/local/..). The error i am getting is : --------------------------------------------- [ramakumar@getz expat]$ make install /bin/sh ./conftools/mkinstalldirs /usr/local/lib /usr/local/include /bin/sh ./libtool --mode=install /usr/bin/install -c libexpat.la /usr/local/lib/libexpat.la /usr/bin/install -c .libs/libexpat.so.0.5.0 /usr/local/lib/libexpat.so.0.5.0 /usr/bin/install: cannot create regular file `/usr/local/lib/libexpat.so.0.5.0': Permission denied make: *** [installlib] Error 1 --------------------------------------------- Please give whats the wrong i am doing? plz give reply with solution. Thanks & Regards, Rams Yahoo! India Matrimony: Find your life partneronline. From ramakumard at yahoo.co.in Wed Nov 24 14:08:51 2004 From: ramakumard at yahoo.co.in (rama kumar) Date: Wed Nov 24 14:08:55 2004 Subject: [Expat-discuss] Shall i use expat for Linux machines ?How ! Message-ID: <20041124130851.90554.qmail@web8405.mail.in.yahoo.com> Hi, I downloeded the expat-1.95.8.tar.gz and installed in the Linux machine. But i found all directories are having .dsp or .dsw files mostly. So that i got confused really. Shall i use this on Linux machines? if yes, how can i use to parse the xml file.Plz give guidence to me. Thanks & Regards, Ram Yahoo! India Matrimony: Find your life partneronline. From karl at waclawek.net Wed Nov 24 14:45:49 2004 From: karl at waclawek.net (Karl Waclawek) Date: Wed Nov 24 14:45:59 2004 Subject: [Expat-discuss] Shall i use expat for Linux machines ?How ! References: <20041124130851.90554.qmail@web8405.mail.in.yahoo.com> Message-ID: <001701c4d22b$e877d290$9e539696@torstar.net> > I downloeded the expat-1.95.8.tar.gz and installed in the Linux machine. But i found all directories are having .dsp or .dsw files mostly. Expat works on Windows, Linux and other OSes. > So that i got confused really. Shall i use this on Linux machines? if yes, how can i use to parse the xml file.Plz give guidence to me. There is documentation included. Also check out http://www.xml.com/pub/a/1999/09/expat/index.html. Karl From karl at waclawek.net Wed Nov 24 14:46:30 2004 From: karl at waclawek.net (Karl Waclawek) Date: Wed Nov 24 14:46:53 2004 Subject: [Expat-discuss] Problem when doing "male install" on linux ? References: <20041124094329.22538.qmail@web8402.mail.in.yahoo.com> Message-ID: <001d01c4d22c$050e1720$9e539696@torstar.net> > Hi, > I am facing problem i am doing "make install" on Linux. I used standard directories for installation (/usr/local/..). > > The error i am getting is : > --------------------------------------------- > [ramakumar@getz expat]$ make install > /bin/sh ./conftools/mkinstalldirs /usr/local/lib /usr/local/include > /bin/sh ./libtool --mode=install /usr/bin/install -c libexpat.la /usr/local/lib/libexpat.la > /usr/bin/install -c .libs/libexpat.so.0.5.0 /usr/local/lib/libexpat.so.0.5.0 > /usr/bin/install: cannot create regular file `/usr/local/lib/libexpat.so.0.5.0': Permission denied > make: *** [installlib] Error 1 > --------------------------------------------- > Please give whats the wrong i am doing? plz give reply with solution. Are you logged in as root? Karl