From james.perrin@ntlworld.com Sat Dec 1 05:24:05 2001 From: james.perrin@ntlworld.com (James S. Perrin) Date: Sat Dec 1 05:24:05 2001 Subject: [Expat-discuss] what is xmlwf? Message-ID: Hi, OK this might the most stupid question asked on this list but what does xmlwf do, as I can't find any mention let alone docs/man page for it? Regards James -- James S. Perrin Cruising at a speed of 50Mips (A1200T 060/66 Voodoo3) Why go at faster, you just miss the scenery? Nah! Screw the scenery I wanna go faster! From fdrake@acm.org Sat Dec 1 06:56:12 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Sat Dec 1 06:56:12 2001 Subject: [Expat-discuss] what is xmlwf? In-Reply-To: References: Message-ID: <15368.64374.978299.900046@grendel.zope.com> James S. Perrin writes: > OK this might the most stupid question asked on this list but what does > xmlwf do, as I can't find any mention let alone docs/man page for it? James, xmlwf is a well-formedness checker. I've filed a feature request for documentation for xmlwf: http://sourceforge.net/tracker/index.php?func=detail&aid=487840&group_id=10127&atid=110127 I don't know when I'll get to it; I've been more swamped lately than I'd expected. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From james.perrin@ntlworld.com Sat Dec 1 10:27:02 2001 From: james.perrin@ntlworld.com (James S. Perrin) Date: Sat Dec 1 10:27:02 2001 Subject: [Expat-discuss] Expat ported to AmigaOS Message-ID: Hi, I've finished my port of expat to the AmigaOS as a shared library, unlike a static compile, which is very straight forward, creating an Amiga shared libraries requires a number of additional files and all the API functions defintions modifying which means that there is no nice way (dozens of #ifdef AMIGA etc) of merging the changes with the current sources. Does anyone think its worth putting it in the CVS tree ( I know ZERO about CVS) or would be willing to do it? I've uploaded the binaries and modified sources to the Amiga's primary resource the Aminet http://us.aminet.net Regards James -- James S. Perrin Cruising at a speed of 50Mips (A1200T 060/66 Voodoo3) Why go at faster, you just miss the scenery? Nah! Screw the scenery I wanna go faster! From fdrake@acm.org Sat Dec 1 13:40:09 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Sat Dec 1 13:40:09 2001 Subject: [Expat-discuss] Expat ported to AmigaOS In-Reply-To: References: Message-ID: <15369.23073.440419.403265@grendel.zope.com> James S. Perrin writes: > I've finished my port of expat to the AmigaOS as a shared library, > unlike a static compile, which is very straight forward, creating an Amiga > shared libraries requires a number of additional files and all the API > functions defintions modifying which means that there is no nice way > (dozens of #ifdef AMIGA etc) of merging the changes with the current > sources. I'd be interested in seeing the kings of changes you needed to make. > I've uploaded the binaries and modified sources to the Amiga's primary > resource the Aminet http://us.aminet.net I just looked around there, and wasn't able to find it. Where should I be looking? I'd like to take a look at the sources to see what it would take to merge the changes, and what kind of changes were needed. If there's a way to merge changes in, that would be best, and would make it easier to maintain the Amiga version. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From james.perrin@ntlworld.com Sat Dec 1 15:21:14 2001 From: james.perrin@ntlworld.com (James S. Perrin) Date: Sat Dec 1 15:21:14 2001 Subject: [Expat-discuss] Re: Expat ported to AmigaOS In-Reply-To: <15369.23073.440419.403265@grendel.zope.com> Message-ID: Hello Jr. On 01-Dec-01, you wrote: >> I've uploaded the binaries and modified sources to the Amiga's primary >> resource the Aminet http://us.aminet.net > I just looked around there, and wasn't able to find it. Where > should I be looking? I'd like to take a look at the sources to see > what it would take to merge the changes, and what kind of changes were > needed. If there's a way to merge changes in, that would be best, and > would make it easier to maintain the Amiga version. It takes a couple of days for submissions to appear but then sources should be found under the tree in dev/src. Or else I can send them to you directly. Regards -- James S. Perrin Cruising at a speed of 50Mips (A1200T 060/66 Voodoo3) Why go at faster, you just miss the scenery? Nah! Screw the scenery I wanna go faster! From bronson@rinspin.com Sun Dec 2 14:00:05 2001 From: bronson@rinspin.com (Scott Bronson) Date: Sun Dec 2 14:00:05 2001 Subject: [Expat-discuss] what is xmlwf? In-Reply-To: <15368.64374.978299.900046@grendel.zope.com> References: <15368.64374.978299.900046@grendel.zope.com> Message-ID: <41688.65.5.145.141.1007330373.squirrel@www.rinspin.com> ---------------------- multipart/mixed attachment Ask and ye shall recieve. Here's a first pass. It's a bit raw, but it should be adequate to close the following bug reports: http://sourceforge.net/tracker/index.php?func=detail&aid=487840&group_id=10127&atid=110127 http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&data=expat&archive=no I'll happily integrate any suggestions any of you can come up with. - Scott I guess procrastinating from homework can actually be beneficial. :) > > James S. Perrin writes: > > OK this might the most stupid question asked on this list but > > what does > > xmlwf do, as I can't find any mention let alone docs/man page for > > it? > > James, > xmlwf is a well-formedness checker. I've filed a feature request > for documentation for xmlwf: > > http://sourceforge.net/tracker/index.php?func=detail&aid=487840&group_id=10127&atid=110127 > > I don't know when I'll get to it; I've been more swamped lately than > I'd expected. > > > -Fred > > -- > Fred L. Drake, Jr. > PythonLabs at Zope Corporation > > > _______________________________________________ > Expat-discuss mailing list > Expat-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/expat-discuss ---------------------- multipart/mixed attachment A non-text attachment was scrubbed... Name: xmlwf.1 Type: application/x-troff Size: 11420 bytes Desc: not available Url : http://mail.libexpat.org/pipermail-21/expat-discuss/attachments/20011202/dc8ecd54/xmlwf.roff ---------------------- multipart/mixed attachment A non-text attachment was scrubbed... Name: xmlwf.sgml Type: text/sgml Size: 16385 bytes Desc: not available Url : http://mail.libexpat.org/pipermail-21/expat-discuss/attachments/20011202/dc8ecd54/xmlwf.bin ---------------------- multipart/mixed attachment-- From bronson@rinspin.com Sun Dec 2 15:36:03 2001 From: bronson@rinspin.com (Scott Bronson) Date: Sun Dec 2 15:36:03 2001 Subject: [Expat-discuss] xmlwf test harness Message-ID: <41931.65.5.145.141.1007336122.squirrel@www.rinspin.com> In writing the xmlwf man page, I found it useful to set up a small functional test harness to check a few things. I've made it available at: http://www.trestle.com/linux/test-xmlwf.tar.gz What is a functional test? Well, unit tests typically ensure the different parts of a system all work as expected. Functional tests ignore the parts and make sure the system as a whole works properly. Large projects often make extensive use of both. This harness could be expanded without too much trouble to provide a comprehensive test suite for xmlwf and Expat. All it needs is a bunch of test files. It should compliment very nicely Fred's unit tests. If anyone has .xml files that demonstrate either buggy expat behavior, or complex but correct behavior, I'd be happy to integrate them. - Scott From fdrake@acm.org Mon Dec 3 13:24:02 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Mon Dec 3 13:24:02 2001 Subject: [Expat-discuss] what is xmlwf? In-Reply-To: <41688.65.5.145.141.1007330373.squirrel@www.rinspin.com> References: <15368.64374.978299.900046@grendel.zope.com> <41688.65.5.145.141.1007330373.squirrel@www.rinspin.com> Message-ID: <15371.63816.364481.966076@grendel.zope.com> Scott Bronson writes: > Ask and ye shall recieve. And without actually asking, no less! ;-) > Here's a first pass. It's a bit raw, but it should be adequate to > close the following bug reports: > http://sourceforge.net/tracker/index.php?func=detail&aid=487840&group_id=10127&atid=110127 > http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&data=expat&archive=no Thanks! I should be able to take a look at these this week. > I guess procrastinating from homework can actually be beneficial. :) In limited doses, I hope! -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From jchick@dsl.net Wed Dec 5 08:21:05 2001 From: jchick@dsl.net (jchick@dsl.net) Date: Wed Dec 5 08:21:05 2001 Subject: [Expat-discuss] Question Concerning Python stubs Message-ID: <20011205070026.P359-100000@ottercreek.dsl.net> To Expat-List: I have a question about the python which "just doesn't make sense" or Choo-baca. Here is my problem illistrated below: file: Python2.0/xml/parser/expat.py contains: """Interface to the Expat non-validating XML parser.""" __version__ = '$Revision: 1.1 $' from pyexpat import * <---- I understand the Import of pyexpat.py ------------------------------------------------------------------------------------- file: Python2.0/pyexpat.py contains: # XXX TypeErrors on calling handlers, or on bad return values from a# handler, are obscure and unhelpful. from xml.parsers import expat <---- I don't understand why?? class Outputter: def StartElementHandler(self, name, attrs): print 'Start element:\n\t', repr(name), attrs ... ... ... out = Outputter() ##################################################### Where Does This Method Exsist --> parser = expat.ParserCreate(namespace_separator='!') ##################################################### # Test getting/setting returns_unicode parser.returns_unicode = 0; confirm(parser.returns_unicode == 0) --------------------------------------------------------------------------------------------- If you don't understand my picture above, this is the break down of it. I have two python file, one file is located in Python2.0/xml/parser/expat.py, which looks to import the other file located Python2.0/pyexpat.py. The first file imports everything from pyexpat, which makes senses, but in the second file pyexpat.py, the imports are pulling everything from expat.py, which is nothing....... The first choo-baca thing and the second choo-baca thing is located in pyexpat.py after the class were the function call of ParserCreate from expat. Reminder that expat has nothing in it, so how does this function exsists or do I have a bad copy of expat.py. PS - Choo-baca is a reference from SouthPark, if you don't watch SouthPark then I am sorry....... Josh Chick jchick@dsl.net From fdrake@acm.org Wed Dec 5 08:45:06 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Wed Dec 5 08:45:06 2001 Subject: [Expat-discuss] what is xmlwf? In-Reply-To: <41688.65.5.145.141.1007330373.squirrel@www.rinspin.com> References: <15368.64374.978299.900046@grendel.zope.com> <41688.65.5.145.141.1007330373.squirrel@www.rinspin.com> Message-ID: <15374.23278.493618.567281@grendel.zope.com> Scott Bronson writes: > Ask and ye shall recieve. > > Here's a first pass. It's a bit raw, but it should be adequate to > close the following bug reports: > http://sourceforge.net/tracker/index.php?func=detail&aid=487840&group_id=10127&atid=110127 > http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&data=expat&archive=no > > I'll happily integrate any suggestions any of you can come up with. Don't bother adding docs for the -v option I just added to xmlwf; I've already modified a copy of xmlwf.sgml to include that. The docbook-to-man tools don't seem to work on my Mandrake box (I'm using version 2.0.0 sources + Debian patch, modified to point to components in my installation), but I suspect I simply don't have everything I need installed &/or configured yet. I'd like to get that working before checking it in. (I'd also like to convert it to XML, since this is documentation for an XML tool.) Thanks for working on this! -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From jchick@dsl.net Wed Dec 5 11:18:15 2001 From: jchick@dsl.net (jchick@dsl.net) Date: Wed Dec 5 11:18:15 2001 Subject: [Expat-discuss] Question Concerning Python Stubs Message-ID: <20011205101959.V359-100000@ottercreek.dsl.net> To Expat-List: I have a question about the python which "just doesn't make sense" or Choo-baca. Here is my problem illistrated below: file: Python2.0/xml/parser/expat.py contains: """Interface to the Expat non-validating XML parser.""" __version__ = '$Revision: 1.1 $' from pyexpat import * <---- I understand the Import of pyexpat.py ------------------------------------------------------------------------------------- file: Python2.0/pyexpat.py contains: # XXX TypeErrors on calling handlers, or on bad return values from a# handler, are obscure and unhelpful. from xml.parsers import expat <---- I don't understand why?? class Outputter: def StartElementHandler(self, name, attrs): print 'Start element:\n\t', repr(name), attrs ... ... ... out = Outputter() ##################################################### Where Does This Method Exsist --> parser = expat.ParserCreate(namespace_separator='!') ##################################################### # Test getting/setting returns_unicode parser.returns_unicode = 0; confirm(parser.returns_unicode == 0) --------------------------------------------------------------------------------------------- If you don't understand my picture above, this is the break down of it. I have two python file, one file is located in Python2.0/xml/parser/expat.py, which looks to import the other file located Python2.0/pyexpat.py. The first file imports everything from pyexpat, which makes senses, but in the second file pyexpat.py, the imports are pulling everything from expat.py, which is nothing....... The first choo-baca thing and the second choo-baca thing is located in pyexpat.py after the class were the function call of ParserCreate from expat. Reminder that expat has nothing in it, so how does this function exsists or do I have a bad copy of expat.py. PS - Choo-baca is a reference from SouthPark, if you don't watch SouthPark then I am sorry....... Josh Chick jchick@dsl.net From Andrew.Nesbit@CSIRO.AU Wed Dec 5 23:44:03 2001 From: Andrew.Nesbit@CSIRO.AU (Andrew.Nesbit@CSIRO.AU) Date: Wed Dec 5 23:44:03 2001 Subject: [Expat-discuss] Handling arbitrary bytes in CDATA marked sections... Message-ID: <3C0F1F93.4040208@csiro.au> Hi ho, if somebody could help me with this problem, I'd really be appreciative :-) Basically, what I wan't to do is parse a document which includes CDATA marked sections. The thing is that I want the CDATA marked sections to be able to contain arbitrary 8-bit bytes (i.e. binary data). I do realise that this makes the document a non-XML document, but I do not want to have to use any encoding system on it. I need to read these bytes raw, (i.e. not cook them into UTF-8 or anything), so they can be stored in an array of unsigned chars or shorts or something. Can somebody please give me some hints on how I can do this? I am prepared to do some hacking on the source to get this effect. Thankyou! -Andrew Nesbit From dcrowley@scitegic.com Thu Dec 6 09:46:10 2001 From: dcrowley@scitegic.com (David Crowley) Date: Thu Dec 6 09:46:10 2001 Subject: [Expat-discuss] Handling arbitrary bytes in CDATA marked sections... In-Reply-To: <3C0F1F93.4040208@csiro.au> Message-ID: <5.1.0.14.0.20011206094135.02e69938@mail.internal.scitegic.com> At 11:34 PM 12/5/2001, Andrew.Nesbit@CSIRO.AU wrote: >Hi ho, if somebody could help me with this problem, I'd really be >appreciative :-) > >Basically, what I wan't to do is parse a document which includes CDATA >marked sections. The thing is that I want the CDATA marked sections to be >able to contain arbitrary 8-bit bytes (i.e. binary data). I do realise >that this makes the document a non-XML document, but I do not want to have >to use any encoding system on it. I need to read these bytes raw, (i.e. >not cook them into UTF-8 or anything), so they can be stored in an array >of unsigned chars or shorts or something. > >Can somebody please give me some hints on how I can do this? This should be a FAQ. Do yourself a favor and base64 encode it. It's really not hard, it's not slow, it preserves the XML, it makes the representation only 30% larger, and you don't have to go making ugly hacks in the code that nobody else is interested in. If your using XML then USE XML. Don't bastardize it. >I am prepared to do some hacking on the source to get this effect. Please please please don't do that. >Thankyou! >-Andrew Nesbit From larry@shafferinteractive.com Sat Dec 8 19:36:03 2001 From: larry@shafferinteractive.com (Larry Shaffer) Date: Sat Dec 8 19:36:03 2001 Subject: [Expat-discuss] expat for Mac OS X 10.1? Message-ID: Is there a way to compile expat on Mac OS X 10.1? I have tried expat v. 1.95.0, .1, and .2 with plenty of errors in the ./configure stage. I read on this list that someone had success with using 'autoconf' before ./configure with the OS X Beta, but this has not worked for me on 10.1. Any suggestions would be greatly appreciated. Larry From nnfei@hotmail.com Wed Dec 19 10:54:03 2001 From: nnfei@hotmail.com (nnfei) Date: Wed Dec 19 10:54:03 2001 Subject: [Expat-discuss] Re-entry XMLParser Message-ID: This is a multi-part message in MIME format. ---------------------- multipart/alternative attachment Hi all, I'm a new user of expat XML parser, when I'm trying to parse the same XML file twice, there's an error reported like "Line1, junk after document element" What does that mean? I don't want to create & free the XML parser for every incoming packet. Thanks, Please refer to the following source code: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D // = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D // test............ // = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D test =3D fopen( "test.xml", "r" ); if( test =3D=3D NULL ) { TRACEOUT( "Couldn't open test XML file\n" ); goto EXIT_PARSE; } len =3D fread( pBuff, 1, iBuffSize, test ); if( ferror( test ) ) { TRACEOUT( "Read error\n" ); goto EXIT_PARSE; } done =3D feof( test ); if( !XML_Parse( pXML, pBuff, len, done ) ) { sprt.Format( "Parse error at line %d:\n%s\n", XML_GetCurrentLineNumber( pXML ), XML_ErrorString( XML_GetErrorCode( pXML ) ) ); TRACEOUT( sprt.GetBuffer(0) ); goto EXIT_PARSE; } if( !XML_Parse( pXML, pBuff, len, done ) ) { sprt.Format( "Parse error at line %d:\n%s\n", = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D> error here! "junk after document = element" XML_GetCurrentLineNumber( pXML ), XML_ErrorString( XML_GetErrorCode( pXML ) ) ); TRACEOUT( sprt.GetBuffer(0) ); goto EXIT_PARSE; } ---------------------- multipart/alternative attachment An HTML attachment was scrubbed... URL: http://mail.libexpat.org/pipermail-21/expat-discuss/attachments/20011219/0d1f0d73/attachment.html ---------------------- multipart/alternative attachment-- From fdrake@acm.org Wed Dec 19 11:29:01 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Wed Dec 19 11:29:01 2001 Subject: [Expat-discuss] Re-entry XMLParser In-Reply-To: References: Message-ID: <15392.59665.27333.967562@cj42289-a.reston1.va.home.com> nnfei writes: > I'm a new user of expat XML parser, when I'm > trying to parse the same XML file twice, there's > an error reported like "Line1, junk after document element" > What does that mean? I don't want to create & free the XML > parser for every incoming packet. That's what you need to do. I'm hoping to add a "reset" function for the parser object in the next release (which I had hoped to get done by now, but haven't), but for earlier versions, you'll need to replace the parser object for subsequent documents. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From jchick@dsl.net Mon Dec 31 09:45:03 2001 From: jchick@dsl.net (jchick@dsl.net) Date: Mon Dec 31 09:45:03 2001 Subject: [Expat-discuss] Sample Code For Python Message-ID: <20011231084636.H38270-100000@ottercreek.dsl.net> Can Someone please send me some sample code of expat, parsing an XML file in the Python Language. Thank You Josh Chick jchick@dsl.net