From uche.ogbuji@fourthought.com Tue Oct 1 01:44:31 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: 30 Sep 2002 18:44:31 -0600 Subject: [XML-SIG] 4Suite 0.12.0a3 released Message-ID: <1033433074.2120.1980.camel@malatesta> 0.12.0a3 ia available now from Sourceforge and ftp.4suite.org 4Suite is a comprehensive platform for XML and RDF processing and serving. It is implemented in Python, but provides APIs in XSLT, Web interface and the command line, as well as Python. For general information, see: http://4suite.org For the files, see: ftp://ftp.4suite.org/pub/4Suite/ Sources: ftp://ftp.4suite.org/pub/4Suite/4Suite-0.12.0a3.tar.gz Windows installer: ftp://ftp.4suite.org/pub/4Suite/4Suite-0.12.0a3.win32-py2.1.exe ftp://ftp.4suite.org/pub/4Suite/4Suite-0.12.0a3.win32-py2.2.exe Windows zip: ftp://ftp.4suite.org/pub/4Suite/4Suite-0.12.0a3.zip You can also get the files on Sourceforge: https://sourceforge.net/projects/foursuite/ https://sourceforge.net/project/showfiles.php?group_id=39954 IMPORTANT alpha release notes ----------------------------- If you have built a 4Suite repository using an older version of 4SUite, you may have to make adjustments for this new release. If you used 0.12.0a2, then you'll want to export, create a new repository, then re-import. If you have used a recent CVS version, then 4ss_manager recompile should be all you need. In any case, see the following document for more details: http://uche.ogbuji.net/tech/akara/4suite/backup/ There may still be problems for Mac OS X builds. We have tried to address some of the issues, but there are outstanding problem reports we are still following. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Apache 2.0 API - http://www-106.ibm.com/developerworks/linux/library/l-apache/ Python&XML column: Tour of Python/XML - http://www.xml.com/pub/a/2002/09/18/py.html Python/Web Services column: xmlrpclib - http://www-106.ibm.com/developerworks/webservices/library/ws-pyth10.html From uche.ogbuji@fourthought.com Tue Oct 1 04:03:07 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: 30 Sep 2002 21:03:07 -0600 Subject: [XML-SIG] Some docs on the RELAX NG support in 4Suite 0.12.0a3 Message-ID: <1033441390.2122.2404.camel@malatesta> The API has changed a bit since I first announced it a couple of months ago, so I put even more details in the my Akara: http://uche.ogbuji.net/tech/akara/pyxml/relaxng/ Viva la schema revolucion! (y despues, de chocolate caliente) -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Apache 2.0 API - http://www-106.ibm.com/developerworks/linux/library/l-apache/ Python&XML column: Tour of Python/XML - http://www.xml.com/pub/a/2002/09/18/py.html Python/Web Services column: xmlrpclib - http://www-106.ibm.com/developerworks/webservices/library/ws-pyth10.html From ht@cogsci.ed.ac.uk Tue Oct 1 09:50:06 2002 From: ht@cogsci.ed.ac.uk (Henry S. Thompson) Date: 01 Oct 2002 09:50:06 +0100 Subject: [XML-SIG] Re: Issues with Unicode type In-Reply-To: <001601c266fd$9b3bc5e0$fe193044@tbp1> References: <3D921F0A.9050209@lemburg.com> <1033024134.23888.47.camel@ibook> <1033043569.23888.390.camel@ibook> <20020926084840.A28714@redhat.com> <1033045636.23902.438.camel@ibook> <000c01c26626$7902eb20$fe193044@tbp1> <001601c266fd$9b3bc5e0$fe193044@tbp1> Message-ID: Ah, I see your point -- I'll fix this. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh W3C Fellow 1999--2002, part-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam] From vdv@dyomedea.com Tue Oct 1 14:43:08 2002 From: vdv@dyomedea.com (Eric van der Vlist) Date: 01 Oct 2002 15:43:08 +0200 Subject: [XML-SIG] Re: [4suite] Some docs on the RELAX NG support in 4Suite 0.12.0a3 In-Reply-To: <1033441390.2122.2404.camel@malatesta> References: <1033441390.2122.2404.camel@malatesta> Message-ID: <1033479789.3669.850.camel@ibook> On Tue, 2002-10-01 at 05:03, Uche Ogbuji wrote: > The API has changed a bit since I first announced it a couple of months > ago, so I put even more details in the my Akara: > > http://uche.ogbuji.net/tech/akara/pyxml/relaxng/ Just to add that the documentation about the extensions to Relax NG implemented in this version are documented at: http://downloads.xmlschemata.org/python/xvif/xvif.html Also, you can browse the subset of James Clark's Relax NG test case currently supported by xvif at: http://downloads.xmlschemata.org/python/xvif/tests/rng/jjc/ and try it yourself online: http://downloads.xmlschemata.org/python/xvif/tryMe.cgi Finally, you can report bugs at: http://bugzilla.xmlschemata.org/ Browse the CVS at: http://cvs.xmlschemata.org/ and the mailing list archive at: http://lists.xmlschemata.org/xmlschemata/ (subscription via mail with "subscribe" to xmlschemata-request@xmlschemata.org). > Viva la schema revolucion! (y despues, de chocolate caliente) Well said! Eric -- Rendez-vous a Paris (seminaire 01 Informatique). http://www.01net.com/rubrique?rub=2813&cpn=lib_86 ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ From mclay@nist.gov Tue Oct 1 15:41:51 2002 From: mclay@nist.gov (Michael McLay) Date: Tue, 1 Oct 2002 10:41:51 -0400 Subject: [XML-SIG] Ann: xvif 0.2.0 In-Reply-To: <1033127295.27425.171.camel@ibook> References: <1033127295.27425.171.camel@ibook> Message-ID: <200210011041.51904.mclay@nist.gov> On Friday 27 September 2002 07:48 am, Eric van der Vlist wrote: > The definition of xs:integer for instance matches quite well the Python > "long" builtin type: > > class integerType(long, _Numeric): > """ > """ The Python long type has been merged with int and if I recall corrrectly the use of long has been deprecated. The syntax for int literals would also be more compatible with xs:integer than the long literals. From fdrake@acm.org Tue Oct 1 16:06:37 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Tue, 1 Oct 2002 11:06:37 -0400 Subject: [XML-SIG] Ann: xvif 0.2.0 In-Reply-To: <200210011041.51904.mclay@nist.gov> References: <1033127295.27425.171.camel@ibook> <200210011041.51904.mclay@nist.gov> Message-ID: <15769.47613.231854.803362@grendel.zope.com> Michael McLay writes: > The Python long type has been merged with int and if I recall > corrrectly the use of long has been deprecated. The syntax for int > literals would also be more compatible with xs:integer than the > long literals. I'm not sure what you mean by "merged"; they are decidely two distinct types with incompatible internal representations. This is unlikely to change. To the best of my knowledge, the long() constructor has not been deprecated. What has changed is that functions written in C are now much more likely to accept a long if the value is in the range of a C int, and Python will generate a long as needed for literals that exceed the range of an int. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From vdv@dyomedea.com Tue Oct 1 16:14:54 2002 From: vdv@dyomedea.com (Eric van der Vlist) Date: 01 Oct 2002 17:14:54 +0200 Subject: [XML-SIG] Ann: xvif 0.2.0 In-Reply-To: <15769.47613.231854.803362@grendel.zope.com> References: <1033127295.27425.171.camel@ibook> <200210011041.51904.mclay@nist.gov> <15769.47613.231854.803362@grendel.zope.com> Message-ID: <1033485296.5761.70.camel@ibook> Hi Michael and Fred, On Tue, 2002-10-01 at 17:06, Fred L. Drake, Jr. wrote: > > Michael McLay writes: > > The Python long type has been merged with int and if I recall > > corrrectly the use of long has been deprecated. The syntax for int > > literals would also be more compatible with xs:integer than the > > long literals. > > I'm not sure what you mean by "merged"; they are decidely two distinct > types with incompatible internal representations. This is unlikely to > change. To the best of my knowledge, the long() constructor has not > been deprecated. > > What has changed is that functions written in C are now much more > likely to accept a long if the value is in the range of a C int, and > Python will generate a long as needed for literals that exceed the > range of an int. What I can tell is that if I change "long" to "int" as a base class for the integer type, the test cases testing large value do fail. It is the case for instance for this value: 4294967295 which is then considered invalid. I am running python 2.2.1 on Debian sid: Python 2.2.1 (#5, Sep 25 2002, 11:18:57) [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 Eric -- Did you know it? Python has now a Relax NG (partial) implementation. http://advogato.org/proj/xvif/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ From mclay@nist.gov Tue Oct 1 16:40:37 2002 From: mclay@nist.gov (Michael McLay) Date: Tue, 1 Oct 2002 11:40:37 -0400 Subject: [XML-SIG] Ann: xvif 0.2.0 In-Reply-To: <1033485296.5761.70.camel@ibook> References: <1033127295.27425.171.camel@ibook> <15769.47613.231854.803362@grendel.zope.com> <1033485296.5761.70.camel@ibook> Message-ID: <200210011140.37957.mclay@nist.gov> On Tuesday 01 October 2002 11:14 am, Eric van der Vlist wrote: > Hi Michael and Fred, > > On Tue, 2002-10-01 at 17:06, Fred L. Drake, Jr. wrote: > > Michael McLay writes: > > > The Python long type has been merged with int and if I recall > > > corrrectly the use of long has been deprecated. The syntax for int > > > literals would also be more compatible with xs:integer than the > > > long literals. > > > > I'm not sure what you mean by "merged"; they are decidely two distinct > > types with incompatible internal representations. This is unlikely to > > change. To the best of my knowledge, the long() constructor has not > > been deprecated. Sorry, I worded that very poorly. I was refering to the changes you correctly described in the paragraph that follows. > > What has changed is that functions written in C are now much more > > likely to accept a long if the value is in the range of a C int, and > > Python will generate a long as needed for literals that exceed the > > range of an int. I was suprised to find that the automatic conversion of literals to longs doesn't seem to work. Instead the following occur: Python 2.1.1 (#1, Aug 30 2001, 17:36:05) >>> a = 453326663432 OverflowError: integer literal too large The "L" still needs to be there for literals. >>> a = 453326663432L >>> a 453326663432L I thought I read that this "L" was no longer necessary. > What I can tell is that if I change "long" to "int" as a base class for > the integer type, the test cases testing large value do fail. > > It is the case for instance for this value: > > > 4294967295 > which is then considered invalid. > > I am running python 2.2.1 on Debian sid: I should have tested this prior to posting. I thought the conversion to long when an int overflow occured was now automatic. Now that I've tested this I see that it isn't true. I withdraw my suggestion. Python 2.1.1 (#1, Aug 30 2001, 17:36:05) [GCC 2.96 20000731 (Mandrake Linux 8.1 2.96-0.61mdk)] on linux-i386 Type "copyright", "credits" or "license" for more information. >>> int("2073741824") 2073741824 >>> int("4073741824") Traceback (most recent call last): File "", line 1, in ? ValueError: int() literal too large: 4073741824 >>> long("4073741824") 4073741824L >>> From fdrake@acm.org Tue Oct 1 16:50:52 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Tue, 1 Oct 2002 11:50:52 -0400 Subject: [XML-SIG] Ann: xvif 0.2.0 In-Reply-To: <200210011140.37957.mclay@nist.gov> References: <1033127295.27425.171.camel@ibook> <15769.47613.231854.803362@grendel.zope.com> <1033485296.5761.70.camel@ibook> <200210011140.37957.mclay@nist.gov> Message-ID: <15769.50268.21860.235135@grendel.zope.com> Michael McLay writes: > I was suprised to find that the automatic conversion of literals to longs This was added in Python 2.2. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From vdv@dyomedea.com Tue Oct 1 16:51:56 2002 From: vdv@dyomedea.com (Eric van der Vlist) Date: 01 Oct 2002 17:51:56 +0200 Subject: [XML-SIG] Ann: xvif 0.2.0 In-Reply-To: <200210011140.37957.mclay@nist.gov> References: <1033127295.27425.171.camel@ibook> <15769.47613.231854.803362@grendel.zope.com> <1033485296.5761.70.camel@ibook> <200210011140.37957.mclay@nist.gov> Message-ID: <1033487516.5744.132.camel@ibook> On Tue, 2002-10-01 at 17:40, Michael McLay wrote: > I should have tested this prior to posting. I thought the conversion to long > when an int overflow occured was now automatic. Now that I've tested this I > see that it isn't true. I withdraw my suggestion. Thanks anyway for posting your comments, I like the idea of using native Python types as base types for XML type libraries but my Python is too brand new to let me evaluate all the consequences and feedback on this point is very valuable for me! Eric -- See you in Baltimore. http://www.xmlconference.org/xmlusa/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ From scjuonline@web.de Tue Oct 1 17:12:25 2002 From: scjuonline@web.de (=?iso-8859-15?Q?J=FCrgen_Schmidt?=) Date: Tue, 1 Oct 2002 18:12:25 +0200 Subject: [XML-SIG] replace ENTITY_NODE ? References: <200209301151.57412.scjuonline@web.de> Message-ID: <001701c26965$55a5ae50$0a00a8c0@pamela2000> >> The first problem I face is that ENTITY_NODEs wont show up im my >> DOM-Document if I use Reader.fromStream(...). >In general, processing of the DTD is very weak in the DOM; it is >particularly weak in PyXML, and very weak in PyXML < 0.8.1. >What version have you been using? What XML parser? I'm using version 0.8 of PyXML. And the parser is chosen by the Reader class. I tried validating and non-validating, so it should be pyexpat and xmlproc. First I tought, an ENTITY Node could be created through the callback function of the EntityResolver : resolveEntity of SAX. But this function is called only for external entities, right? And the DTDHandler functions aren't called neither for the entities I'm intersted in. Are there other solutions to build a DOM -tree than using SAX API? Or is the native parser interface the solution? >> The second: will I be able to replace this Node once it shows up or >> is it read-only? >In the DOM, the entities attribute of the DocumentType interface is >readonly, see >http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409/core.html#ID-412 266927 >Editing an individual Entity is not supported, either. >Of course, when you come up with patches to PyXML that go beyond those >specified interfaces, in a canonical way, without breaking anything, >we'd happily include those in PyXML 0.8.2. As I stated earlier, I just started using Python and using all its XML extensions. I'm still on the surface ;-) Thanks for your help! Regards, Juergen From fdrake@acm.org Tue Oct 1 17:33:52 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Tue, 1 Oct 2002 12:33:52 -0400 Subject: [XML-SIG] replace ENTITY_NODE ? In-Reply-To: <001701c26965$55a5ae50$0a00a8c0@pamela2000> References: <200209301151.57412.scjuonline@web.de> <001701c26965$55a5ae50$0a00a8c0@pamela2000> Message-ID: <15769.52848.335402.612823@grendel.zope.com> J=FCrgen Schmidt writes: > I'm using version 0.8 of PyXML. > And the parser is chosen by the Reader class. I tried validating and= > non-validating, so it should be pyexpat and xmlproc. Starting with PyXML 0.8, there is a new DOM builder that doesn't go through SAX accessible using minidom's DOM 3 Load support (spec still in draft). You can use it like this: dom =3D xml.dom.minidom.getDOMImplementation() builder =3D dom.createDOMBuilder(dom.MODE_SYNCHRONOUS, None) # use setFeature() & friends as needed doc =3D builder.parseURI(...) Note that the ENTITY nodes are created, but they are not filled in, and entities are not parsed. This will be improved in the future. Now, I'm not at all sure how to deal with ENTITY nodes when namespaces are being processed, since there is no meaningful namespace context in the raw entities at that point. ;-( -Fred --=20 Fred L. Drake, Jr. PythonLabs at Zope Corporation From martin@v.loewis.de Tue Oct 1 18:29:32 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 01 Oct 2002 19:29:32 +0200 Subject: [XML-SIG] replace ENTITY_NODE ? In-Reply-To: <001701c26965$55a5ae50$0a00a8c0@pamela2000> References: <200209301151.57412.scjuonline@web.de> <001701c26965$55a5ae50$0a00a8c0@pamela2000> Message-ID: J=FCrgen Schmidt writes: > I'm using version 0.8 of PyXML. You might want to try 0.8.1, it has slightly improved in this area. > And the parser is chosen by the Reader class. I tried validating and > non-validating, so it should be pyexpat and xmlproc. Correct. > First I tought, an ENTITY Node could be created through the callback > function of the EntityResolver : resolveEntity of SAX. But this > function is called only for external entities, right? I feel a terminology problem here: You have the entity declaration, This declaration might occur either in the internal subset, or in the external subset - in either case, it is an external entity. An internal entity reads and, again, it may either occur in the internal, or the external subset. resolveEntity is called to retrieve external entity definitions, in particular if they occur in the internal subset. What do you expect to be represented with an Entity node? > And the DTDHandler functions aren't called neither for the entities > I'm intersted in. The DTDHandler functions are called only for notation declarations, and unparsed entities; I believe you are talking about parsed general entities, and perhaps parameter entities. > Are there other solutions to build a DOM -tree than using SAX API? Yes, you can use the native parser API. > Or is the native parser interface the solution? Not for this problem. More precisely, it depends on the parser. You should explain what exactly the document is that you want represented, and how exactly you want it to be represented. Some parser may expose the information you are interested in, another may not. > As I stated earlier, I just started using Python and using all its XML > extensions. I'm still on the surface ;-) I found that the entity stuff in XML is very complex itself, and I'm still confused by notations and unparsed entities. You should make sure you understand all aspects of that first, before starting to look into processing them with Python. Regards, Martin From scjuonline@web.de Wed Oct 2 09:40:11 2002 From: scjuonline@web.de (=?iso-8859-15?q?J=FCrgen=20Schmidt?=) Date: Wed, 2 Oct 2002 10:40:11 +0200 Subject: [XML-SIG] replace ENTITY_NODE ? Message-ID: <200210021040.11881.scjuonline@web.de> This is what the file looks like: ]> &foo; &bar; I would like to change one entity declaration pointing to a different fil= e=20 using DOM and write the file back to disc. thx=20 Juergen From scjuonline@web.de Wed Oct 2 09:57:06 2002 From: scjuonline@web.de (=?iso-8859-15?q?J=FCrgen=20Schmidt?=) Date: Wed, 2 Oct 2002 10:57:06 +0200 Subject: [XML-SIG] replace ENTITY_NODE ? Message-ID: <200210021057.06665.scjuonline@web.de> >Starting with PyXML 0.8, there is a new DOM builder that doesn't go >through SAX accessible using minidom's DOM 3 Load support (spec still >in draft). You can use it like this: > > dom =3D xml.dom.minidom.getDOMImplementation() > builder =3D dom.createDOMBuilder(dom.MODE_SYNCHRONOUS, None) > # use setFeature() & friends as needed > doc =3D builder.parseURI(...) > >Note that the ENTITY nodes are created, but they are not filled in, >and entities are not parsed. This will be improved in the future. > >Now, I'm not at all sure how to deal with ENTITY nodes when namespaces >are being processed, since there is no meaningful namespace context in >the raw entities at that point. ;-( This code: def show(node): print node for n in node.childNodes: show(n) dom =3D minidom.getDOMImplementation() builder =3D dom.createDOMBuilder(dom.MODE_SYNCHRONOUS,None) doc =3D builder.parseURI("file:///.../doc.xml") show(doc) on: ##################################### # doc.xml ##################################### ]> &foo; &bar; ##################################### gives: How do I access the ENTITY Nodes?=20 How could I save this DOM document as XML again? thx Juergen From martin@v.loewis.de Wed Oct 2 18:15:12 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 02 Oct 2002 19:15:12 +0200 Subject: [XML-SIG] replace ENTITY_NODE ? In-Reply-To: <200210021057.06665.scjuonline@web.de> References: <200210021057.06665.scjuonline@web.de> Message-ID: J=FCrgen Schmidt writes: > How do I access the ENTITY Nodes?=20 > How could I save this DOM document as XML again? I think we can safely summarize the answers as: You can't, with PyXML as released. Regards, Martin From dpawson@nildram.co.uk Wed Oct 2 20:07:45 2002 From: dpawson@nildram.co.uk (Dave Pawson) Date: Wed, 02 Oct 2002 20:07:45 +0100 Subject: [XML-SIG] xbel Message-ID: <5.1.1.6.2.20021002200620.0283a9e0@pop3.nildram.co.uk> If this is still alive, parsing a local instance, The url reports NSGMLS.EXE:op.html:4:131:E: could not get "/topics/xml/dtds/xbel-1.0. dtd" from "www.python.org" (reason given was "Moved Permanently") This is provided in the DTD. regards DaveP. From dpawson@nildram.co.uk Wed Oct 2 20:14:35 2002 From: dpawson@nildram.co.uk (Dave Pawson) Date: Wed, 02 Oct 2002 20:14:35 +0100 Subject: [XML-SIG] xbel. Message-ID: <5.1.1.6.2.20021002201105.028333e0@pop3.nildram.co.uk> I'm in a m$ environment. After using html tidy, -config file is: write-back:yes indent: auto indent-spaces: 3 wrap: 72 markup: yes clean:yes drop-empty-paras:yes enclose-text: yes output-xml: yes input-xml: no add-xml-pi: yes add-xml-decl:yes show-warnings: yes numeric-entities: yes quote-marks: yes quote-nbsp: yes quote-ampersand: no break-before-br: no uppercase-tags: no uppercase-attributes: no char-encoding: latin1 show-warnings: no err-file: errs an ie bookmark file produces valid xml to xbel with the stylesheet below. I guess you have a stylesheet, xbel to html? <xsl:value-of select="head/title"/> <xsl:value-of select="normalize-space(h3)"/> <xsl:value-of select="normalize-space(.)"/>

/

HTH DaveP From martin@v.loewis.de Wed Oct 2 20:26:08 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 02 Oct 2002 21:26:08 +0200 Subject: [XML-SIG] xbel In-Reply-To: <5.1.1.6.2.20021002200620.0283a9e0@pop3.nildram.co.uk> References: <5.1.1.6.2.20021002200620.0283a9e0@pop3.nildram.co.uk> Message-ID: Dave Pawson writes: > PUBLIC " +//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML" "http://www.python.org/topics/xml/dtds/xbel-1.0.dtd"> > > > The url reports > > NSGMLS.EXE:op.html:4:131:E: could not get "/topics/xml/dtds/xbel-1.0. > dtd" from "www.python.org" (reason given was "Moved Permanently") Did you try to download the document in a Web browser? Yes, it gives a Moved Permanently status, which redirects the browser to http://pyxml.sourceforge.net/topics/dtds/xbel-1.0.dtd This location is still valid. You should use an XML parser which is capable of processing redirects, or change the system identifier to refer to the current locatio of the document. Regards, Martin From martin@v.loewis.de Wed Oct 2 20:28:27 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 02 Oct 2002 21:28:27 +0200 Subject: [XML-SIG] xbel. In-Reply-To: <5.1.1.6.2.20021002201105.028333e0@pop3.nildram.co.uk> References: <5.1.1.6.2.20021002201105.028333e0@pop3.nildram.co.uk> Message-ID: Dave Pawson writes: > I guess you have a stylesheet, xbel to html? Unfortunately, no: XBEL is meant as an exchange language, not to be visually rendered. That said: If you want to contribute such a stylesheet, we would happily include it in the PyXML distribution. Regards, Martin From noreply@sourceforge.net Thu Oct 3 14:29:58 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 03 Oct 2002 06:29:58 -0700 Subject: [XML-SIG] [ pyxml-Bugs-618072 ] entity resolv. not invoked for some ents Message-ID: Bugs item #618072, was opened at 2002-10-03 09:29 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=618072&group_id=6473 Category: pyexpat Group: None Status: Open Resolution: None Priority: 5 Submitted By: Matthew Gruenke (mgruenke) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: entity resolv. not invoked for some ents Initial Comment: In the latest PyXML (0.8.1 - I also tried 0.7.1), the xml.sax.drivers2.drv_pyexpat parser doesn't call the resolveEntity() method of the entity resolver registered with setEntityResolver(), in some cases. Specifically, the resolver is not invoked for any referenced external parameter entities, or at the point of reference of external general entities that are declared either in external parameter entities or in the internal subset, after an external parameter entity has been referenced. Example .py and .xml files soon to follow. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=618072&group_id=6473 From noreply@sourceforge.net Thu Oct 3 18:21:23 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 03 Oct 2002 10:21:23 -0700 Subject: [XML-SIG] [ pyxml-Patches-618156 ] Optimized patch for 615114 Message-ID: Patches item #618156, was opened at 2002-10-03 19:21 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=306473&aid=618156&group_id=6473 Category: SAX Group: None Status: Open Resolution: None Priority: 5 Submitted By: Walter Dörwald (doerwalter) Assigned to: Nobody/Anonymous (nobody) Summary: Optimized patch for 615114 Initial Comment: Unfortunately SF doesn't let me upload a second file for patch "[ 615114 ] saxutils.py: CharRef escaping", so here is the file in a new patch. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=306473&aid=618156&group_id=6473 From noreply@sourceforge.net Fri Oct 4 06:45:53 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 03 Oct 2002 22:45:53 -0700 Subject: [XML-SIG] [ pyxml-Patches-618394 ] Patch for segfaults in expat 1.95.5 Message-ID: Patches item #618394, was opened at 2002-10-03 23:45 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=306473&aid=618394&group_id=6473 Category: expat Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jeremy Kloth (jkloth) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: Patch for segfaults in expat 1.95.5 Initial Comment: This patch fixes segfaults that occur on several machines using the pyexpat from PyXML 0.8.1. This patch updates xmlparse.c to reflect the changes made in expat CVS to fix the errors. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=306473&aid=618394&group_id=6473 From noreply@sourceforge.net Sun Oct 6 05:58:07 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Sat, 05 Oct 2002 21:58:07 -0700 Subject: [XML-SIG] [ pyxml-Bugs-619155 ] AttributeError: Context.Context Message-ID: Bugs item #619155, was opened at 2002-10-05 21:58 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=619155&group_id=6473 Category: DOM Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: AttributeError: Context.Context Initial Comment: Environment: Python 2.2.1 (#1, Jun 25 2002, 10:55:46) [GCC 2.95.3-5 (cygwin special)] on cygwin PyXML 0.8.1 (used Windows Installer) Windows XP >From inside the python interpreter shell I run the following: import sys from xml.dom.ext.reader import Sax2 # create Reader object reader = Sax2.Reader() # parse the document doc = reader.fromStream(sys.stdin) I then type in: Then I run: from xml import xpath and get the following traceback: >>> from xml import xpath Traceback (most recent call last): File "", line 1, in ? File "C:\Python22\Lib\site- packages\_xmlplus\xpath\__init__.py", line 106, in ? import Context File "/cygdrive/c/python22/lib/site- packages/_xmlplus/xpath/Context.py", line 16, in ? import CoreFunctions File "/cygdrive/c/python22/lib/site- packages/_xmlplus/xpath/CoreFunctions.py", line 21, in ? from xml.xpath import Util, Conversions File "/cygdrive/c/python22/lib/site- packages/_xmlplus/xpath/Conversions.py", l ine 23, in ? from xml.utils import boolean ImportError: cannot import name boolean I run the same line (from xml import xpath) again with no such errors. I then run: nodes = xpath.Evaluate('quotation/note', doc.documentElement) and get: >>> nodes = xpath.Evaluate('quotation/note', doc.documentElement) Traceback (most recent call last): File "", line 1, in ? File "C:\Python22\Lib\site- packages\_xmlplus\xpath\__init__.py", line 68, in E valuate con = Context.Context(contextNode, 0, 0) AttributeError: 'module' object has no attribute 'Context' >>> nodes = xpath.Evaluate('quotation/note', doc.documentElement) Traceback (most recent call last): File "", line 1, in ? File "C:\Python22\Lib\site- packages\_xmlplus\xpath\__init__.py", line 68, in E valuate con = Context.Context(contextNode, 0, 0) AttributeError: 'module' object has no attribute 'Context' ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=619155&group_id=6473 From uche.ogbuji@fourthought.com Tue Oct 8 05:34:55 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Mon, 07 Oct 2002 22:34:55 -0600 Subject: [XML-SIG] Minor patch to xml.pickle.generic? Message-ID: In this message: http://groups.google.com/groups?selm=mailman.1031185928.10194.python-list%40pyt hon.org Most of the patch just looks like the guy is not using the APIs rightly, but this part looks valid: --- xml_pickle.py.orig Tue Sep 3 18:38:48 2002 +++ xml_pickle.py Wed Sep 4 20:18:34 2002 @@ -206,7 +206,7 @@ '\n', '\n' % (_klass(self.py_obj),id_)] - for name in dir(self.py_obj): + for name in self.py_obj.__dict__.keys(): xml_lines.append(_attr_tag(name, getattr(self, name))) xml_lines.append('\n') return string.join(xml_lines,'') @@ -452,7 +452,7 @@ visited[id(thing)] = 1 start_tag = start_tag + 'type="PyObject" class="%s" id="%s">\n' \ % (_klass(thing), id(thing)) - for name in dir(thing): + for name in thing.__dict__.keys(): tag_body.append(_attr_tag(name, getattr(thing, name), level+1)) elif '%s' % type(thing) == "": # SRE_Pattern objects are extension objects, so not -- Should I check that in? I know that dir() result can differ from __dict__.keys() result, but not in ways that I think would affect this. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Apache 2.0 API - http://www-106.ibm.com/developerworks/linux/library/l-apache/ Python&XML column: Tour of Python/XML - http://www.xml.com/pub/a/2002/09/18/py. html Python/Web Services column: xmlrpclib - http://www-106.ibm.com/developerworks/w ebservices/library/ws-pyth10.html From martin@v.loewis.de Tue Oct 8 08:50:48 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 08 Oct 2002 09:50:48 +0200 Subject: [XML-SIG] Minor patch to xml.pickle.generic? In-Reply-To: References: Message-ID: Uche Ogbuji writes: > Should I check that in? Where do you want to check this into? What is xml_pickle? Regards, Martin From mcclain@cc.gatech.edu Tue Oct 8 19:21:45 2002 From: mcclain@cc.gatech.edu (Matthew Forrester McClain) Date: Tue, 8 Oct 2002 14:21:45 -0400 (EDT) Subject: [XML-SIG] Windows Install Message-ID: I was wondering if anyone knew the install options on the command line. I am installing this on windows and I do nto want the GUI to show up, I just want things to run in the back ground. Thanks Matt McClain Matt McClain "To hell with georgia" mcclain@cc.gatech.edu From uche.ogbuji@fourthought.com Tue Oct 8 19:55:29 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Tue, 08 Oct 2002 12:55:29 -0600 Subject: [XML-SIG] Minor patch to xml.pickle.generic? In-Reply-To: Message from martin@v.loewis.de (Martin v. Loewis) of "08 Oct 2002 09:50:48 +0200." Message-ID: > Uche Ogbuji writes: > > > Should I check that in? > > Where do you want to check this into? What is xml_pickle? Never mind. I was looking at ancient code, somehow. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Apache 2.0 API - http://www-106.ibm.com/developerworks/linux/library/l-apache/ Python&XML column: Tour of Python/XML - http://www.xml.com/pub/a/2002/09/18/py. html Python/Web Services column: xmlrpclib - http://www-106.ibm.com/developerworks/w ebservices/library/ws-pyth10.html From martin@v.loewis.de Tue Oct 8 21:12:30 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 08 Oct 2002 22:12:30 +0200 Subject: [XML-SIG] Windows Install In-Reply-To: References: Message-ID: Matthew Forrester McClain writes: > I was wondering if anyone knew the install options on the command > line. I am installing this on windows and I do nto want the GUI to > show up, I just want things to run in the back ground. I don't think this is supported in the Windows installer. If you need to install from the command line, I recommend to use distutils directly: "python setup.py install". You can pre-built the extension modules so you don't need to invoke the C compiler. Regards, Martin From ht@cogsci.ed.ac.uk Wed Oct 9 11:10:57 2002 From: ht@cogsci.ed.ac.uk (Henry S. Thompson) Date: 09 Oct 2002 11:10:57 +0100 Subject: [XML-SIG] Name pattern bug or not (was Re: [XML-SIG] Re: Issues with Unicode type) In-Reply-To: <001601c266fd$9b3bc5e0$fe193044@tbp1> References: <3D921F0A.9050209@lemburg.com> <1033024134.23888.47.camel@ibook> <1033043569.23888.390.camel@ibook> <20020926084840.A28714@redhat.com> <1033045636.23902.438.camel@ibook> <000c01c26626$7902eb20$fe193044@tbp1> <001601c266fd$9b3bc5e0$fe193044@tbp1> Message-ID: "Thomas B. Passin" writes: > [Henry S. Thompson] > > > > The XML Namespaces Rec says that an NCName is > > > > > > NCName ::= (Letter | '_') (NCNameChar)* > > > > > > but you have it equivalent to > > > > > > NCName ::= (NCNameChar) (NCNameChar)* > > > > I _think_ I have that right -- Name is defined as > > > > > > > > References: <90400-22002103921320356@M2W039.mail2web.com> Message-ID: "misc@tinorb.com" writes: > When i execute the PyXML, it launches, but doesn't find a python > installation to use. How do i get the installer to find my Python? Is > there an Env. variable? I think it looks in the registry at the standard keys. I'm not exactly sure, because it is distutils which provides the installer binary, and I have no source code for that. Regards, Martin From tpassin@comcast.net Thu Oct 10 02:05:53 2002 From: tpassin@comcast.net (Thomas B. Passin) Date: Wed, 09 Oct 2002 21:05:53 -0400 Subject: [XML-SIG] PyXML-0.8.1.win32-py2.1.exe install prob on Windows 2000 References: <90400-22002103921320356@M2W039.mail2web.com> Message-ID: <001201c26ff9$2e34b060$fe193044@tbp1> [ ] [[ I downloaded PyXML-0.8.1.win32-py2.1.exe and am hoping to run it for my Zope installation on Windows 2000. My python is "Zope 2.5.1 (binary release, python 2.1, win32-x86)". When i execute the PyXML, it launches, but doesn't find a python installation to use. How do i get the installer to find my Python? Is there an Env. variable? ]] Here's what to do. Install the same version of Python, 2.1.3, as Zope uses - just do a regular installation. It will not conflict with Zope. Next install PyXml. The installer will find your new Python installation. Now you have two possibilities and you can try them both out if you like. 1) Copy the PyXml installation to the corresponding place in the Zope tree (the Zope Python tree is laid out a little differently from an ordinary Python installation but it should be clear where to put it. 2) Set the Python path for Zope to point to the PyXml installation (instead of copying it to the Zope tree). If you do 1), make sure to delete all *.pyc and *.pyo files, because sometimes they contain absolute path information that would be wrong in the new location. To test the final setup, whichever you choose, learn how to do some simple task with PyXml that returns a string (whether an XML string or not). Make sure it works. In Zope, create an External Method that invokes your test code and returns the resulting string to Zope. Make sure that Zope renders the result. Remember, with an External Method, you have to either re-save the method in the Zope Management Interface, or you have to stop and start the Zope server in order for the changes to take effect. Even re-saving the method may not work for some changes to the code that lives outside the external method, so get in the habit of starting Zope and restarting it. Sounds awful but I got used to it. You will be left with an extra Python installation. That is not harmful, but you can delete it if you like (if you used option 1). Cheers, Tom P From fredrik@pythonware.com Thu Oct 10 12:18:26 2002 From: fredrik@pythonware.com (Fredrik Lundh) Date: Thu, 10 Oct 2002 13:18:26 +0200 Subject: [XML-SIG] PyXML-0.8.1.win32-py2.1.exe install prob on Windows 2000 References: <90400-22002103921320356@M2W039.mail2web.com> Message-ID: <00cc01c2704e$c24161e0$0900a8c0@spiff> martin wrote: > "misc@tinorb.com" writes: >=20 > > When i execute the PyXML, it launches, but doesn't find a python > > installation to use. How do i get the installer to find my Python? = Is > > there an Env. variable? >=20 > I think it looks in the registry at the standard keys. I'm not exactly > sure, because it is distutils which provides the installer binary, and > I have no source code for that. this note might help: http://www.pythonware.com/products/works/articles/regpy20.htm (don't forget to update version numbers and paths to match the actual installation, of course) From uche.ogbuji@fourthought.com Fri Oct 11 04:37:51 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Thu, 10 Oct 2002 21:37:51 -0600 Subject: [XML-SIG] PyXML 0.8.1 pyexpat segfault Message-ID: Enough people are reproducing this PyXML 0.8.1 bug, and having to revert to 0.8.0, that I think it warrants a PyXML 0.8.2 release. Jeremy has been closely tracking the problems both in expat itself and in pyexpat, as noted in patch #618394. It looks like the situation is quickly converging on stability. As it is, I'm adding wording to the 4Suite docs telling people to avoid PyXML 0.8.1. --Uche --- Patches item #618394, was opened at 2002-10-03 23:45 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=306473&aid=618394&group_id=64 73 Category: expat Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jeremy Kloth (jkloth) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: Patch for segfaults in expat 1.95.5 Initial Comment: This patch fixes segfaults that occur on several machines using the pyexpat from PyXML 0.8.1. This patch updates xmlparse.c to reflect the changes made in expat CVS to fix the errors. - ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=306473&aid=618394&group_id=64 73 _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig ------- End of Forwarded Message From martin@v.loewis.de Fri Oct 11 07:01:28 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 11 Oct 2002 08:01:28 +0200 Subject: [XML-SIG] PyXML 0.8.1 pyexpat segfault In-Reply-To: References: Message-ID: Uche Ogbuji writes: > Enough people are reproducing this PyXML 0.8.1 bug, and having to > revert to 0.8.0, that I think it warrants a PyXML 0.8.2 release. > Jeremy has been closely tracking the problems both in expat itself > and in pyexpat, as noted in patch #618394. It looks like the > situation is quickly converging on stability. Sounds good. We will then release 0.8.2 shortly. Regards, Martin From fdrake@acm.org Fri Oct 11 14:11:17 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 11 Oct 2002 09:11:17 -0400 Subject: [XML-SIG] PyXML 0.8.1 pyexpat segfault In-Reply-To: References: Message-ID: <15782.52725.921127.749177@grendel.zope.com> Martin v. Loewis writes: > Sounds good. We will then release 0.8.2 shortly. How shortly? Some of the problems have been chased down and determined to be Expat bugs, and I don't think all these have been fixed yet. Several Expat bugs have been fixed; I need to spend some time on the regression tests for Expat before there can be another release of that. I won't have any time for it until next week. Uche, how many of the bugs you're concerned about are actual Expat bugs? -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From jeremy.kloth@fourthought.com Fri Oct 11 19:40:15 2002 From: jeremy.kloth@fourthought.com (Jeremy Kloth) Date: Fri, 11 Oct 2002 12:40:15 -0600 Subject: [XML-SIG] PyXML 0.8.1 pyexpat segfault In-Reply-To: <15782.52725.921127.749177@grendel.zope.com> References: <15782.52725.921127.749177@grendel.zope.com> Message-ID: <200210111240.15720.jeremy.kloth@fourthought.com> On Friday 11 October 2002 07:11 am, Fred L. Drake, Jr. wrote: > Martin v. Loewis writes: > > Sounds good. We will then release 0.8.2 shortly. > > How shortly? Some of the problems have been chased down and > determined to be Expat bugs, and I don't think all these have been > fixed yet. > > Several Expat bugs have been fixed; I need to spend some time on the > regression tests for Expat before there can be another release of > that. I won't have any time for it until next week. > > Uche, how many of the bugs you're concerned about are actual Expat > bugs? > There are two Expat bugs which are very reproduceable, I should know, I=20 reported them. The xmlns in external subset (fixed in xmlparse.c, v1.91)= and=20 the storeRawNames fix (fixed in v1.93). Both of these end up corrupting=20 malloc's memory structures which end up causing segfaults in strange plac= es=20 (totally unrelated areas of code). With the fixes, I can successfully=20 complete 4Suite's regression tests. Jeremy Kloth From fdrake@acm.org Fri Oct 11 19:49:22 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 11 Oct 2002 14:49:22 -0400 Subject: [XML-SIG] PyXML 0.8.1 pyexpat segfault In-Reply-To: <200210111240.15720.jeremy.kloth@fourthought.com> References: <15782.52725.921127.749177@grendel.zope.com> <200210111240.15720.jeremy.kloth@fourthought.com> Message-ID: <15783.7474.42424.111012@grendel.zope.com> Jeremy Kloth writes: > There are two Expat bugs which are very reproduceable, I should know, I > reported them. The xmlns in external subset (fixed in xmlparse.c, v1.91) and > the storeRawNames fix (fixed in v1.93). Both of these end up corrupting > malloc's memory structures which end up causing segfaults in strange places > (totally unrelated areas of code). With the fixes, I can successfully > complete 4Suite's regression tests. Ok, so it seems what I need to do next week is get another Expat released. I'll see what I can do. I'll be away from computers for most of the weekend, so I know I won't get to much until Monday. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From martin@v.loewis.de Fri Oct 11 20:13:48 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 11 Oct 2002 21:13:48 +0200 Subject: [XML-SIG] PyXML 0.8.1 pyexpat segfault In-Reply-To: <15783.7474.42424.111012@grendel.zope.com> References: <15782.52725.921127.749177@grendel.zope.com> <200210111240.15720.jeremy.kloth@fourthought.com> <15783.7474.42424.111012@grendel.zope.com> Message-ID: "Fred L. Drake, Jr." writes: > Ok, so it seems what I need to do next week is get another Expat > released. I'll see what I can do. Not necessarily. If Jeremy volunteers to backport those changes to PyXML CVS, we can release 0.8.2 without a new Expat release. Regards, Martin From fdrake@acm.org Fri Oct 11 20:38:23 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 11 Oct 2002 15:38:23 -0400 Subject: [XML-SIG] PyXML 0.8.1 pyexpat segfault In-Reply-To: References: <15782.52725.921127.749177@grendel.zope.com> <200210111240.15720.jeremy.kloth@fourthought.com> <15783.7474.42424.111012@grendel.zope.com> Message-ID: <15783.10415.781664.955935@grendel.zope.com> Martin v. Loewis writes: > Not necessarily. If Jeremy volunteers to backport those changes to > PyXML CVS, we can release 0.8.2 without a new Expat release. Ok, if everyone is happy with just yanking an arbitrary snapshot from the Expat CVS, I won't complain. Please tell me when you're ready and I'll tag the Expat tree so we can more easily determine just what version went into PyXML 0.8.2. (I would rather the library be taken as a whole rather than just selecting a couple of patches.) -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From jeremy.kloth@fourthought.com Fri Oct 11 20:46:17 2002 From: jeremy.kloth@fourthought.com (Jeremy Kloth) Date: Fri, 11 Oct 2002 13:46:17 -0600 Subject: [XML-SIG] PyXML 0.8.1 pyexpat segfault In-Reply-To: References: <15783.7474.42424.111012@grendel.zope.com> Message-ID: <200210111346.17515.jeremy.kloth@fourthought.com> On Friday 11 October 2002 01:13 pm, Martin v. Loewis wrote: > "Fred L. Drake, Jr." writes: > > Ok, so it seems what I need to do next week is get another Expat > > released. I'll see what I can do. > > Not necessarily. If Jeremy volunteers to backport those changes to > PyXML CVS, we can release 0.8.2 without a new Expat release. > The most recent change, which I posted as a patch, is pretty straight for= ward. =20 However, the change for DTDs was a pretty substantial change to Expat, an= d I=20 would feel better if Fred could get it tested throughly within Expat itse= lf. =20 That said, if Fred believes that the changes are stable enough, I have no= =20 problem getting them into the PyXML tree. This is because with the chang= es I=20 can no longer reproduce the errors, though my test cases might not be=20 thorough enough. Jeremy From noreply@sourceforge.net Sat Oct 12 12:07:21 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Sat, 12 Oct 2002 04:07:21 -0700 Subject: [XML-SIG] [ pyxml-Bugs-622286 ] marshal.wddx: 'recordset' element typo Message-ID: Bugs item #622286, was opened at 2002-10-12 04:07 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=622286&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: marshal.wddx: 'recordset' element typo Initial Comment: wddx.py: lines 143, 152, 206 Element 'recordSet' should be 'recordset' (lowercase 's'). For the one other person who is unmarshalling WDDX packets ;) A ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=622286&group_id=6473 From uche.ogbuji@fourthought.com Sun Oct 13 01:44:56 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: 12 Oct 2002 18:44:56 -0600 Subject: [XML-SIG] Article on using Python generators for XML and DOM processing Message-ID: <1034469897.12954.4289.camel@malatesta> Tip: Using generators for XML processing http://www-106.ibm.com/developerworks/xml/library/x-tipgenr.html Generators are a very powerful new language feature of Python 2.2. In this tip, Uche Ogbuji presents a set of techniques for using generators for fast and lucid XML processing patterns in Python. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Apache 2.0 API - http://www-106.ibm.com/developerworks/linux/library/l-apache/ Python&XML column: Tour of Python/XML - http://www.xml.com/pub/a/2002/09/18/py.html Python/Web Services column: xmlrpclib - http://www-106.ibm.com/developerworks/webservices/library/ws-pyth10.html From erotik@firemail.de Mon Oct 14 19:39:11 2002 From: erotik@firemail.de (Magicsearch) Date: Mon, 14 Oct 2002 20:39:11 +0200 Subject: [XML-SIG] agicsearch die Suchmaschine - 14-10-2002 Message-ID: Sie bekommen diese Email da sie in unserem Verteiler eingetragen sind. Weiter unten können sie diesen Newsletter abbestellen, falls sie unfreiwillig eingetragen wurden. Sollten sie diese Email 2 mal bekommen bitten wir um Entschuldigung es gab Probleme mit unserem Email Server. Magicsearch die ultimative Suchmaschine ist nun am Start tragen sie noch heute ihre Internetpräsenz bei uns kostenlos ein oder benutzen sie uns für ihre Suchanfragen. http://www.magicsearch.info Um den Newsletter abzubestellen klicken Sie unten: http://www.coolio.d-ip.de/nlserver/scribe.cgi?&user_username=Magicsearch&mail=XML-SIG@python.org From shrestha@ipsi.fraunhofer.de Tue Oct 15 11:30:36 2002 From: shrestha@ipsi.fraunhofer.de (Nitesh Shrestha) Date: Tue, 15 Oct 2002 12:30:36 +0200 Subject: [XML-SIG] help on installing PyXML Message-ID: <000001c27435$e6a29aa0$95240c8d@pcpersimmon> This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C27446.AA2B6AA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi there, I am trying to install PyXML but I am stuck. When the wizard starts to install, I get the setup screen. There is nothing in first screen, information about PyXML, then I clicked on next. Here it ask for = =93Select python installation to use:=94 but there is nothing and I can not give = the path also. In down, there is space for Installation Directory, and cursor, but I can not even write there anything.. and Next button is fade, so I can not proceed. I don=B4t understand this problem. I have installed Python successfully in C:\python22 directory and it=B4s in = path and working properly. I am using Windows 2000 OS. What could be the problem.. Regards, Nitesh. ------=_NextPart_000_0001_01C27446.AA2B6AA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi there,

=A0=A0 I am = trying to install PyXML but I am stuck. When the wizard starts to install, I get = the setup screen. There is nothing in first screen, information about PyXML, then I clicked on next. Here it ask for “Select python installation to use:” but there is = nothing and I can not give the path also. In down, there is space for Installation = Directory, and cursor, but I can not even write there anything.. and Next button is fade, so I can not proceed. I = don=B4t understand this problem. I have installed Python successfully in = C:\python22 directory and it=B4s in path and working properly. I am using Windows = 2000 OS. What could be the problem..

Regards,

Nitesh.=

------=_NextPart_000_0001_01C27446.AA2B6AA0-- From fredrik@pythonware.com Tue Oct 15 11:56:29 2002 From: fredrik@pythonware.com (Fredrik Lundh) Date: Tue, 15 Oct 2002 12:56:29 +0200 Subject: [XML-SIG] help on installing PyXML References: <000001c27435$e6a29aa0$95240c8d@pcpersimmon> Message-ID: <009c01c27439$8578ce80$0900a8c0@spiff> Nitesh Shrestha wrote: > I am trying to install PyXML but I am stuck. When the wizard starts > to install, I get the setup screen. There is nothing in first screen, > information about PyXML, then I clicked on next. Here it ask for = "Select > python installation to use:" but there is nothing and I can not give = the > path also. the installer looks for certain keys in the windows registry, and fails to find the python interpreter if they are not there. this note might help: http://www.pythonware.com/products/works/articles/regpy20.htm (don't forget to update version numbers and paths to match the actual installation, of course) From shrestha@ipsi.fraunhofer.de Tue Oct 15 12:35:49 2002 From: shrestha@ipsi.fraunhofer.de (Nitesh Shrestha) Date: Tue, 15 Oct 2002 13:35:49 +0200 Subject: [XML-SIG] help on installing PyXML In-Reply-To: <009c01c27439$8578ce80$0900a8c0@spiff> Message-ID: <000501c2743f$04494eb0$95240c8d@pcpersimmon> This does not help. I run the regpy20.py script with minor change of version (2.2.2 instead of 2.0) and python path, which run okay and says registered. But again same problem. Yeah, I have installed extension of python for windows, win32all , which is installed successfully. But what=B4s wrong with this PyXML. I think I am missing something.. Regards, Nitesh. -----Original Message----- From: Fredrik Lundh [mailto:fredrik@pythonware.com]=20 Sent: Dienstag, 15. Oktober 2002 12:56 To: Nitesh Shrestha; xml-sig@python.org Subject: Re: [XML-SIG] help on installing PyXML Nitesh Shrestha wrote: > I am trying to install PyXML but I am stuck. When the wizard starts > to install, I get the setup screen. There is nothing in first screen, > information about PyXML, then I clicked on next. Here it ask for "Select > python installation to use:" but there is nothing and I can not give the > path also. the installer looks for certain keys in the windows registry, and fails to find the python interpreter if they are not there. this note might help: http://www.pythonware.com/products/works/articles/regpy20.htm (don't forget to update version numbers and paths to match the actual installation, of course) From martin@v.loewis.de Tue Oct 15 17:29:29 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 15 Oct 2002 18:29:29 +0200 Subject: [XML-SIG] help on installing PyXML In-Reply-To: <000501c2743f$04494eb0$95240c8d@pcpersimmon> References: <000501c2743f$04494eb0$95240c8d@pcpersimmon> Message-ID: "Nitesh Shrestha" writes: > This does not help. I run the regpy20.py script with minor change of > version (2.2.2 instead of 2.0) and python path, which run okay and says > registered. But again same problem. Yeah, I have installed extension of > python for windows, win32all , which is installed successfully. But > what's wrong with this PyXML. I think I am missing something.. Since you did not say exactly what you did, we cannot say what you did wrong. Please report *precisely* what you did, in what order. In particular, give exact URLs of files which you've downloaded, both for Python and PyXML. Regards, Martin From walter@livinglogic.de Wed Oct 16 18:39:14 2002 From: walter@livinglogic.de (=?ISO-8859-15?Q?Walter_D=F6rwald?=) Date: Wed, 16 Oct 2002 19:39:14 +0200 Subject: [XML-SIG] ANN: XIST 2.0 Message-ID: <3DADA442.2050409@livinglogic.de> XIST 2.0 has been released! What is it? =========== XIST is an XML-based extensible HTML generator written in Python. XIST is also a DOM parser (built on top of SAX2) with a very simple and Pythonesque tree API. Every XML element type corresponds to a Python class, and these Python classes provide a conversion method to transform the XML tree (e.g., into HTML). XIST can be considered "object oriented XSL". What's new in version 2.0? ========================== * XIST now requires at least Python 2.2.1. * Attribute handling has been largely rewritten. Instead of a class attribute attrHandlers, the attributes are now defined by deriving from the builtin attribute classes. The benefits: docstrings, default values, sets of allowed attribute values and whether a attribute is required can now be specified. * XIST now has namespace support for parsing and publishing. Namespace support is even available for entities and processing instruction. * Global attributes are supported now. Namespace modules for the xml and xlink namespaces have been added. * A new namespace module for SVG 1.0 has been added. * The HTML specific parts of ll.xist.ns.specials have been split off into a separate module ll.xist.ns.htmlspecials. * Comparison of attributes with strings has been removed. * The HTMLParser now removes unknown attributes instead of complaining. * There is a new parser class BadEntityParser, which recognizes the character entities defined in HTML and tries to pass on unknown or malformed entities to the handler literally. * Many other small bug fixes and enhancements. For changes in older versions see: http://www.livinglogic.de/Python/xist/History.html Where can I get it? =================== XIST can be downloaded from ftp://ftp.livinglogic.de/pub/livinglogic/xist/ Web pages are at http://www.livinglogic.de/Python/xist/ ViewCVS access is available at http://www.livinglogic.de/viewcvs/ Bye, Walter Dörwald From veillard@redhat.com Wed Oct 16 19:42:50 2002 From: veillard@redhat.com (Daniel Veillard) Date: Wed, 16 Oct 2002 14:42:50 -0400 Subject: [XML-SIG] ANN: XIST 2.0 In-Reply-To: <3DADA442.2050409@livinglogic.de>; from walter@livinglogic.de on Wed, Oct 16, 2002 at 07:39:14PM +0200 References: <3DADA442.2050409@livinglogic.de> Message-ID: <20021016144250.Z27304@redhat.com> On Wed, Oct 16, 2002 at 07:39:14PM +0200, Walter D=F6rwald wrote: > * XIST now has namespace support for parsing and publishing. > Namespace support is even available for entities and > processing instruction. Are you trying to reinvent XML ? Namespace support for PI ??? What's that ? Daniel --=20 Daniel Veillard | Red Hat Network https://rhn.redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From uche.ogbuji@fourthought.com Wed Oct 16 20:46:56 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: 16 Oct 2002 13:46:56 -0600 Subject: [XML-SIG] Tutorial: Python/XML development using 4Suite Part 4: Composition and updates Message-ID: <1034797623.30951.441.camel@malatesta> This tutorial actually spends more time on just explaining XInclude/XPointer and XUpdate themselves than how to use them in 4Suite. https://www6.software.ibm.com/reg/devworks/dw-x4suite4-i/?loc=dwmain Free registration required. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Python&XML column: 2. Introducing PyXML - http://www.xml.com/pub/a/2002/09/25/py.html The Past, Present and Future of Web Services 1 - http://www.webservices.org/index.php/article/articleview/663/1/24/ The Past, Present and Future of Web Services 2 - 'http://www.webservices.org/index.php/article/articleview/679/1/24/ Serenity through markup - http://adtmag.com/article.asp?id=6807 Tip: Using generators for XML processing - http://www-106.ibm.com/developerworks/xml/library/x-tipgenr.html From Janet Valbuena" This is a multi-part message in MIME format. ------=_NextPart_000_0060_01C275D8.707E3420 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I'm trying to create some XML using the PyXML package. The way I'm doing it is by assigning to a variable some XML and then I = enter content to some of the tags. The result is OK, but it only shows when I use PrettyPrint of Print. I need to send an HTTP request with this XML. How can I get the result = in a variable? Thanks JANET ------=_NextPart_000_0060_01C275D8.707E3420 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I'm trying to create some XML using the = PyXML=20 package.
The way I'm doing it is by assigning to = a variable=20 some XML and then I enter content to some of the tags.
The result is OK, but it only shows = when I use=20 PrettyPrint of Print.
 
I need to send an HTTP request with = this XML. How=20 can I get the result in a variable?
 
Thanks
 
JANET
------=_NextPart_000_0060_01C275D8.707E3420-- From martin@v.loewis.de Thu Oct 17 03:36:37 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 17 Oct 2002 04:36:37 +0200 Subject: [XML-SIG] help! In-Reply-To: <006301c27584$9f1547a0$361ea8c0@twoplums.com.au> References: <006301c27584$9f1547a0$361ea8c0@twoplums.com.au> Message-ID: "Janet Valbuena" writes: > I need to send an HTTP request with this XML. How can I get the > result in a variable? I recommend that you use a cStringIO.StringIO object as the second argument to Print. Regards, Martin From noreply@sourceforge.net Thu Oct 17 03:37:02 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 16 Oct 2002 19:37:02 -0700 Subject: [XML-SIG] [ pyxml-Bugs-624420 ] Can't create 2nd Sax2.Reader Message-ID: Bugs item #624420, was opened at 2002-10-16 19:37 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=624420&group_id=6473 Category: SAX Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Can't create 2nd Sax2.Reader Initial Comment: Environment: Windows XP Python 2.2.1 (#1, Jun 25 2002, 10:55:46) [GCC 2.95.3-5 (cygwin special)] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> from xml.dom.ext.reader import Sax2 >>> reader1 = Sax2.Reader() >>> reader2 = Sax2.Reader() Traceback (most recent call last): File "", line 1, in ? File "C:\Python22\Lib\site- packages\_xmlplus\dom\ext\reader\Sax2.py", line 347, in __init__ self.parser = parser or (validate and sax2exts.XMLValParserFactory.make_parser()) or sax2exts.XMLParserFactory.make_parser() File "/cygdrive/c/python22/lib/site- packages/_xmlplus/sax/saxexts.py", line 64, in make_parser return self._create_parser(parser_name) File "/cygdrive/c/python22/lib/site- packages/_xmlplus/sax/saxexts.py", line 43, in _create_parser return drv_module.create_parser() File "/cygdrive/c/python22/lib/site- packages/_xmlplus/sax/saxexts.py", line 74, in _create_parser raise _exceptions.SAXReaderNotAvailable TypeError: __init__() takes at least 2 arguments (1 given) >>> The first creation succeeds. The second fails. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=624420&group_id=6473 From uche.ogbuji@fourthought.com Thu Oct 17 06:44:25 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: 16 Oct 2002 23:44:25 -0600 Subject: [XML-SIG] Article: A Tour of 4Suite Message-ID: <1034833466.30873.2335.camel@malatesta> http://www.xml.com/pub/a/2002/10/16/py-xml.html In this article, I provide a tour of the 4Suite package, with liberal code examples. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Python&XML column: 2. Introducing PyXML - http://www.xml.com/pub/a/2002/09/25/py.html The Past, Present and Future of Web Services 1 - http://www.webservices.org/index.php/article/articleview/663/1/24/ The Past, Present and Future of Web Services 2 - 'http://www.webservices.org/index.php/article/articleview/679/1/24/ Serenity through markup - http://adtmag.com/article.asp?id=6807 Tip: Using generators for XML processing - http://www-106.ibm.com/developerworks/xml/library/x-tipgenr.html From walter@livinglogic.de Thu Oct 17 09:37:25 2002 From: walter@livinglogic.de (=?ISO-8859-1?Q?Walter_D=F6rwald?=) Date: Thu, 17 Oct 2002 10:37:25 +0200 Subject: [XML-SIG] ANN: XIST 2.0 References: <3DADA442.2050409@livinglogic.de> <20021016144250.Z27304@redhat.com> Message-ID: <3DAE76C5.7080803@livinglogic.de> Daniel Veillard wrote: > On Wed, Oct 16, 2002 at 07:39:14PM +0200, Walter Dörwald wrote: > >> * XIST now has namespace support for parsing and publishing. >> Namespace support is even available for entities and >> processing instruction. > > > Are you trying to reinvent XML ? Namespace support for PI ??? > What's that ? The character : is valid inside processing instruction targets, so why shouldn't the application use this to interpret targets containing : as prefix/localname pairs? is perfectly valid XML and so is Bye, Walter Dörwald From veillard@redhat.com Thu Oct 17 12:31:30 2002 From: veillard@redhat.com (Daniel Veillard) Date: Thu, 17 Oct 2002 07:31:30 -0400 Subject: [XML-SIG] ANN: XIST 2.0 In-Reply-To: <3DAE76C5.7080803@livinglogic.de>; from walter@livinglogic.de on Thu, Oct 17, 2002 at 10:37:25AM +0200 References: <3DADA442.2050409@livinglogic.de> <20021016144250.Z27304@redhat.com> <3DAE76C5.7080803@livinglogic.de> Message-ID: <20021017073130.A20393@redhat.com> On Thu, Oct 17, 2002 at 10:37:25AM +0200, Walter D=F6rwald wrote: > Daniel Veillard wrote: >=20 > > On Wed, Oct 16, 2002 at 07:39:14PM +0200, Walter D=F6rwald wrote: > >=20 > >> * XIST now has namespace support for parsing and publishing. > >> Namespace support is even available for entities and > >> processing instruction. > >=20 > >=20 > > Are you trying to reinvent XML ? Namespace support for PI ??? > > What's that ? >=20 > The character : is valid inside processing instruction targets, so > why shouldn't the application use this to interpret targets > containing : as prefix/localname pairs? >=20 > >=20 > is perfectly valid XML and so is >=20 > Yep but it has absolutely no relationship to namespaces. Please read http://www.w3.org/TR/REC-xml-names/ before inventing stuff and tell me the semantic of the namespace in your mapping for the following examples: ---- ---- ---- first case there cannot be any namespace in scope. second case is perfectly legal w.r.t. XML + Namespace and still your mapping has no semantic. Sorry your mapping is broken, it doesn't reflect the specs and is broken in a number of obvious ways. Daniel --=20 Daniel Veillard | Red Hat Network https://rhn.redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From alessandro.bottoni@infinito.it Thu Oct 17 13:53:44 2002 From: alessandro.bottoni@infinito.it (Alex @ Infinito) Date: Thu, 17 Oct 2002 14:53:44 +0200 Subject: [XML-SIG] SimpleXMLRPCServer-related questions Message-ID: <200210171245.g9HCjll26567@mail2.infinito.it> I'm playing with the SimpleXMLRPCServer and I have a few doubts: + How do I start the SimpleXMLRPCServer(derived) object? - Should I start it with inetd? - In this case, is there any sample inetd script available? - Or should I start it by myself, forking and chdir/umask the child process? + How do I stop the service(daemon)? - By "KILLing" it? - In this case, the SimpleXMLRPCServer class (or its ancestors) provides any facility to get and record the PID for later use? - Or should I stop it by sending it a service shutdown request (and handling it inside my code)? - How do I handle the service shutdown request in the SimpleXMLRPCServer case? - Does it have any specific needs? + In a real-world application, should I use threads with SimpleXMLRPCServer? - Should I use something else (the ESO platform, for example)? As an alternative: + Is there any tutorial/article on this topic? (I have read already the recipe called "A simple XML-RPC Server", by Brian Quinlan, available at the ASPN - activestate web site. That's very good but not enough for my needs). + Is there any complete (but simple) XML-RPC server that I can dissect and study? Many thanks in advance ---------------------- Alessandro Bottoni From martin@v.loewis.de Thu Oct 17 14:22:59 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 17 Oct 2002 15:22:59 +0200 Subject: [XML-SIG] SimpleXMLRPCServer-related questions In-Reply-To: <200210171245.g9HCjll26567@mail2.infinito.it> References: <200210171245.g9HCjll26567@mail2.infinito.it> Message-ID: "Alex @ Infinito" writes: > I'm playing with the SimpleXMLRPCServer and I have a few doubts: Alex, I think few people have been confronted with these issues so far. If it works for you, it is good. > + How do I start the SimpleXMLRPCServer(derived) object? > - Should I start it with inetd? That is not supported, I believe. inetd will give the connection as stdin/stdout, whereas SimpleXMLRPCServer will accept its own connections. You probably *could* make this work by inheriting from SimpleXMLRPCRequestHandler. However, this assumes that there is a single socket; I don't know whether passing in sys.stdin there might work as well. > - Or should I start it by myself, forking and chdir/umask the child process? If you start it through /etc/rc?.d, I recommend you just create a background process. You can then do all chdir/umask in the shell script. > + How do I stop the service(daemon)? The server should probably respond to SIGINT. You can save the PID of the process in /var/run/yourserver.pid, which you get from starting the server in the /etc/init.d script. > - By "KILLing" it? > - In this case, the SimpleXMLRPCServer class (or its ancestors) provides any > facility to get and record the PID for later use? If the shell forks it, it will know the PID. Alternatively, you can use standard Python API (os.getpid), and write the .pid file yourself. > - Or should I stop it by sending it a service shutdown request (and > handling it inside my code)? You would need to authenticate this request, to avoid that somebody can kill your server remotely. > - How do I handle the service shutdown request in the > SimpleXMLRPCServer case? raise SystemExit. > - Does it have any specific needs? It depends on your service. You may want to provide "graceful" shutdown, ie. do not outright stop the process, but wait for the current request to complete. Whether this is needed depends on your application. > + In a real-world application, should I use threads with > SimpleXMLRPCServer? It depends on what load you expect, and whether you expect to service requests more quickly when using threads. Unless your service implementation has blocking calls, threads are not needed. > - Should I use something else (the ESO platform, for example)? What is ESO? I always recommend to use CORBA, instead of XML-RPC. Regards, Martin From walter@livinglogic.de Thu Oct 17 17:43:08 2002 From: walter@livinglogic.de (=?ISO-8859-1?Q?Walter_D=F6rwald?=) Date: Thu, 17 Oct 2002 18:43:08 +0200 Subject: [XML-SIG] ANN: XIST 2.0 References: <3DADA442.2050409@livinglogic.de> <20021016144250.Z27304@redhat.com> <3DAE76C5.7080803@livinglogic.de> <20021017073130.A20393@redhat.com> Message-ID: <3DAEE89C.7000305@livinglogic.de> Daniel Veillard wrote: > On Thu, Oct 17, 2002 at 10:37:25AM +0200, Walter Dörwald wrote: > >>Daniel Veillard wrote: >> >> >>>On Wed, Oct 16, 2002 at 07:39:14PM +0200, Walter Dörwald wrote: >>> >>> >>>> * XIST now has namespace support for parsing and publishing. >>>> Namespace support is even available for entities and >>>> processing instruction. >>> >>> >>> Are you trying to reinvent XML ? Namespace support for PI ??? >>>What's that ? >> >>The character : is valid inside processing instruction targets, so >>why shouldn't the application use this to interpret targets >>containing : as prefix/localname pairs? >> >> >> >>is perfectly valid XML and so is >> >> > > > Yep but it has absolutely no relationship to namespaces. Exactly, that why I should be able to use it for that. > Please > read http://www.w3.org/TR/REC-xml-names/ Ouch, seems I missed the "No entity names, PI targets, or notation names contain any colons." part on the first reading. Fortunately XIST can be configured to only recognize unprefixed processing instruction targets, so this shouldn't be a problem. > before inventing stuff and > tell me the semantic of the namespace in your mapping for the following > examples: > > ---- > > > ---- > > > > ---- > > first case there cannot be any namespace in scope. > second case is perfectly legal w.r.t. XML + Namespace and still your > mapping has no semantic. Yes, but doesn't either. however does. > Sorry your mapping is broken, it doesn't reflect the specs and is broken > in a number of obvious ways. So is there any better way to fix this problem? The point of XIST is that element types are mapped to Python classes, for namespaces namespace names are mapped to Python modules. So how can I duplicate this mapping for processing instructions? To me it seems there is no easy way for partitioning namespace targets into several namespaces. Bye, Walter Dörwald From veillard@redhat.com Thu Oct 17 18:02:38 2002 From: veillard@redhat.com (Daniel Veillard) Date: Thu, 17 Oct 2002 13:02:38 -0400 Subject: [XML-SIG] ANN: XIST 2.0 In-Reply-To: <3DAEE89C.7000305@livinglogic.de>; from walter@livinglogic.de on Thu, Oct 17, 2002 at 06:43:08PM +0200 References: <3DADA442.2050409@livinglogic.de> <20021016144250.Z27304@redhat.com> <3DAE76C5.7080803@livinglogic.de> <20021017073130.A20393@redhat.com> <3DAEE89C.7000305@livinglogic.de> Message-ID: <20021017130238.B3429@redhat.com> On Thu, Oct 17, 2002 at 06:43:08PM +0200, Walter D=F6rwald wrote: > > Please > > read http://www.w3.org/TR/REC-xml-names/=20 >=20 > Ouch, seems I missed the "No entity names, PI targets, or notation > names contain any colons." part on the first reading. Sorry about that. If you actually go back far far in history you would see that initially namespaces were declared with PIs but this has been dropped. > > ---- > > > > > > ---- > > > > > > > > ---- > >=20 > > first case there cannot be any namespace in scope. > > second case is perfectly legal w.r.t. XML + Namespace and still you= r > > mapping has no semantic. >=20 > Yes, but >=20 > > > >=20 > doesn't either. Right, > > > >=20 > however does. No neither, The semantic of the namespace applies only to elements and attributes, and again is not correct w.r.t. XML Namespace. > So is there any better way to fix this problem? The point of XIST Namespace are not intended to cover PIs. Don't try to force the spec in a behaviour or semantic it clearly wasn't intended for. Make your framework implement XML to provide higher level abstraction but don't try to tweak the underlying specification to adapt to those abstractions. Namespace applies only to element and attributes, and possibly not=20 all of them, you're operating on a subset of the nodes present in your tree, make your abstraction follow this limitation. Daniel --=20 Daniel Veillard | Red Hat Network https://rhn.redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From uche.ogbuji@fourthought.com Thu Oct 17 18:32:20 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Thu, 17 Oct 2002 11:32:20 -0600 Subject: [XML-SIG] ANN: XIST 2.0 In-Reply-To: Message from Daniel Veillard of "Wed, 16 Oct 2002 14:42:50 EDT." <20021016144250.Z27304@redhat.com> Message-ID: > On Wed, Oct 16, 2002 at 07:39:14PM +0200, Walter D=F6rwald wrote: > > * XIST now has namespace support for parsing and publishing. > > Namespace support is even available for entities and > > processing instruction. > = > Are you trying to reinvent XML ? Namespace support for PI ??? > What's that ? I have a similar question. I did mention XIST in http://www.xml.com/pub/a/2002/09/18/py.html But now I wonder whather I missed something fundamental about it. What do the comments on namespaces in the announcement mean? What is the= basic relationship between XIST and XML/XML NS? -- = Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Python&XML column: 2. Introducing PyXML - http://www.xml.com/pub/a/2002/0= 9/25/py.html The Past, Present and Future of Web Services 1 - http://www.webservices.o= rg/index.php/article/articleview/663/1/24/ The Past, Present and Future of Web Services 2 - 'http://www.webservices.= org/index.php/article/articleview/679/1/24/ Serenity through markup - http://adtmag.com/article.asp?id=3D6807 Tip: Using generators for XML processing - http://www-106.ibm.com/develop= erworks/xml/library/x-tipgenr.html From noreply@sourceforge.net Thu Oct 17 18:54:32 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 17 Oct 2002 10:54:32 -0700 Subject: [XML-SIG] [ pyxml-Patches-624797 ] sgmlop and procinst again Message-ID: Patches item #624797, was opened at 2002-10-17 19:54 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=306473&aid=624797&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Walter Dörwald (doerwalter) Assigned to: Nobody/Anonymous (nobody) Summary: sgmlop and procinst again Initial Comment: According to http://www.w3.org/TR/REC-xml#sec-pi rule [16]: PI ::= '' Char*)))? '?>' the space character after the PITarget is optional. So the search in sgmlop for the character that terminates the target is broken. This patch fixes this problem. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=306473&aid=624797&group_id=6473 From martin@v.loewis.de Thu Oct 17 19:16:30 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 17 Oct 2002 20:16:30 +0200 Subject: [XML-SIG] ANN: XIST 2.0 In-Reply-To: <20021017130238.B3429@redhat.com> References: <3DADA442.2050409@livinglogic.de> <20021016144250.Z27304@redhat.com> <3DAE76C5.7080803@livinglogic.de> <20021017073130.A20393@redhat.com> <3DAEE89C.7000305@livinglogic.de> <20021017130238.B3429@redhat.com> Message-ID: Daniel Veillard writes: > No neither, The semantic of the namespace applies only to elements and > attributes, and again is not correct w.r.t. XML Namespace. No, but is that relevant? Walter is defining PIs, and can't use whatever architecture he likes for that? > > > So is there any better way to fix this problem? The point of XIST > > Namespace are not intended to cover PIs. Don't try to force the > spec in a behaviour or semantic it clearly wasn't intended for. He isn't. He is not attempting to interpret the spec. He is giving a semantics to his own processing chain. Applications should be allowed to use whatever PIs they feel reasonable. Regards, Martin From brian@sweetapp.com Thu Oct 17 19:37:25 2002 From: brian@sweetapp.com (Brian Quinlan) Date: Thu, 17 Oct 2002 11:37:25 -0700 Subject: [XML-SIG] RE: SimpleXMLRPCServer-related questions In-Reply-To: <200210171245.g9HCjll26567@mail2.infinito.it> Message-ID: <00a901c2760c$3d6e5040$df7e4e18@dell1700> > How do I start the SimpleXMLRPCServer(derived) object? By calling either serve_forever(), or handle_request() > Should I start it with inetd? I don't know. Doesn't inetd use stdin and stdout instead of socket IO? If so, it might be similar to using CGI, and you find examples of that at: http://www.sweetapp.com/xmlrpc/ > In this case, the SimpleXMLRPCServer class (or its ancestors) provides any > facility to get and record the PID for later use? No > How do I handle the service shutdown request in the SimpleXMLRPCServer > case? Maybe this will help: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/114579 > In a real-world application, should I use threads with SimpleXMLRPCServer? It depends on the quality of service that you intend to offer clients, the maximum time it takes to complete a request, and the maximum load. > Is there any tutorial/article on this topic? (I have read already the > recipe called "A simple XML-RPC Server", by Brian Quinlan, available > at the ASPN - activestate web site. That's very good but not enough > for my needs). Not that I know of. SimpleXMLRPCServer subclasses BaseHTTPServer, so you might want to read the documentation for that. Then, if that still isn't enough, you could read the SimpleXMLRPCServer source, which is quite simple. > Is there any complete (but simple) XML-RPC server that I can dissect and > study? I could send you one, but it won't really show you anything that the cookbook didn't. Cheers, Brian From veillard@redhat.com Thu Oct 17 19:40:00 2002 From: veillard@redhat.com (Daniel Veillard) Date: Thu, 17 Oct 2002 14:40:00 -0400 Subject: [XML-SIG] ANN: XIST 2.0 In-Reply-To: ; from martin@v.loewis.de on Thu, Oct 17, 2002 at 08:16:30PM +0200 References: <3DADA442.2050409@livinglogic.de> <20021016144250.Z27304@redhat.com> <3DAE76C5.7080803@livinglogic.de> <20021017073130.A20393@redhat.com> <3DAEE89C.7000305@livinglogic.de> <20021017130238.B3429@redhat.com> Message-ID: <20021017144000.E3429@redhat.com> On Thu, Oct 17, 2002 at 08:16:30PM +0200, Martin v. Loewis wrote: > He isn't. He is not attempting to interpret the spec. He is giving a > semantics to his own processing chain. Applications should be allowed > to use whatever PIs they feel reasonable. yes, within the limits defined for their syntax, and : is not allowed for PI names for a namespace aware application. Hence defining namespace for PIs 1/ makes no sense w.r.t. the spec 2/ induce people in error thinking they should prefix their PI names. Daniel -- Daniel Veillard | Red Hat Network https://rhn.redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From goltermann@attbi.com Thu Oct 17 19:46:34 2002 From: goltermann@attbi.com (Wilbur Goltermann) Date: Thu, 17 Oct 2002 12:46:34 -0600 Subject: [XML-SIG] converting xbel to html pages compatible with Mozilla Message-ID: <200210171246.34834.goltermann@attbi.com> People, I have a number of xbel bookmark files left over from a time when I used=20 Galeon, and now find it necessary to move back to Mozilla. How can I convert these xbel files to html which can be used by Mozilla? Sincerely, Wilbur Goltermann From Juergen Hermann" Message-ID: On Thu, 17 Oct 2002 13:02:38 -0400, Daniel Veillard wrote: >On Thu, Oct 17, 2002 at 06:43:08PM +0200, Walter D=F6rwald wrote: >> So is there any better way to fix this problem? The point of XIST > > Namespace are not intended to cover PIs. One way to cover this for PIs I could imagine would be and call handler_module.some_pi('moreargs...'). A bit more verbose, but = within the standard. Ciao, J=FCrgen From walter@livinglogic.de Thu Oct 17 20:47:25 2002 From: walter@livinglogic.de (=?ISO-8859-1?Q?Walter_D=F6rwald?=) Date: Thu, 17 Oct 2002 21:47:25 +0200 Subject: [XML-SIG] ANN: XIST 2.0 References: Message-ID: <3DAF13CD.4030403@livinglogic.de> Uche Ogbuji wrote: >>On Wed, Oct 16, 2002 at 07:39:14PM +0200, Walter Dörwald wrote: >> >>> * XIST now has namespace support for parsing and publishing. >>> Namespace support is even available for entities and >>> processing instruction. >> >> Are you trying to reinvent XML ? Namespace support for PI ??? >>What's that ? > > > I have a similar question. I did mention XIST in > > http://www.xml.com/pub/a/2002/09/18/py.html I noticed that! ;) > But now I wonder whather I missed something fundamental about it. > > What do the comments on namespaces in the announcement mean? > What is the basic relationship between XIST and XML/XML NS? For standard DOMs you have one element class. The element type is available as an additional attribute on the element class instance. In XIST every element type maps to a separate element class, and every element that is of this element type is an instance of the appropriate class (which is derived from the element base class). When you do a "from ll.xist.ns import html" you're defining 93 element classes for all the element types defined in XHTML 1.0 and you're telling XIST that these classes all belong to the namespace with the name "http://www.w3.org/1999/xhtml". When you're importing ll.xist.ns.ihtml you're defining the version of HTML used for DoCoMo's i-mode (with the namespace name "http://www.nttdocomo.co.jp/imode" (which is made up, because AFAICT there is no official namespace name.)) Both namespaces contain an element type "a" (but with different attributes), so both modules define a class "a". Now when XIST parses an XML file, it must know which class to instantiate. In versions prior to 2.0 this was more or less non-deterministic (it happened to be the element class that was defined last), but in XIST 2.0 namespaces are used for that, i.e. """ """ will instantiate ll.xist.ns.html.a and """ """ will instantiate ll.xist.ns.ihtml.a. Mapping element types to classes seems to be totally useless, until you start to define your own new element classes: Tree transformation logic that is written with template elements in XSLT is written with methods in XIST. For example the XSLT rule can be written in XIST as: from ll.xist.ns import html class bold(xsc.Element): empty = False def convert(self, converter): return html.b(self.content.convert(converter)) So you can program you XML transformations in Python and use all the benefits we know and love. ;) We use this for making the syntax for JSP files XML-compatible: JSP defines several syntaxes for embedding executable Java code in HTML templates. <% scriptlet %> works like , i.e. it embeds the scriptlet literally in the generated servlet. <%= expression %> generates Java code that output the expression. Unfortunately this syntax is not XML compatible. (There's a XML compatible variant, but the last time we looked this wasn't supported by all application servers.) With XIST this problem can be solved rather easily. Define scriptlet and expression as processing instructions and overwrite the publish method, which is responsible for emitting the resulting "XML" string: class scriptlet(xsc.ProcInst): def publish(self, publisher): publisher.publish(u"<% ") publisher.publish(self.content) publisher.publish(u" %>") class expression(xsc.ProcInst): def publish(self, publisher): publisher.publish(u"<%= ") publisher.publish(self.content) publisher.publish(u" %>") So you can write your JSP expressions as: After conversion by XIST this will be output as: <%= 17+23+42 %> Granted, this isn't XML any more, but it's nonetheless very useful. Apart from that, XIST is just a tool for generating extended XML trees that come with their own transformation methods. Sorry for the long rant, I hope this explains what can be done with XIST. For more information you might want to read the HOWTO at: http://www.livinglogic.de/Python/xist/Howto.html Bye, Walter Dörwald From walter@livinglogic.de Thu Oct 17 21:06:41 2002 From: walter@livinglogic.de (=?ISO-8859-1?Q?Walter_D=F6rwald?=) Date: Thu, 17 Oct 2002 22:06:41 +0200 Subject: [XML-SIG] ANN: XIST 2.0 References: Message-ID: <3DAF1851.9090809@livinglogic.de> Juergen Hermann wrote: > On Thu, 17 Oct 2002 13:02:38 -0400, Daniel Veillard wrote: > >>On Thu, Oct 17, 2002 at 06:43:08PM +0200, Walter Dörwald wrote: >> >>>So is there any better way to fix this problem? The point of XIST >> >> Namespace are not intended to cover PIs. > > One way to cover this for PIs I could imagine would be > > > > and call handler_module.some_pi('moreargs...'). A bit more verbose, but > within the standard. I guess would be an option to. Unfortunately the same doesn't hold for elements. It would be cool to be able to write and have it automatically instantiate the class ll.xist.ns.html.a but that's not real HTML. But this is giving me some ideas to try out. Bye, Walter Dörwald From martin@v.loewis.de Fri Oct 18 07:45:40 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 18 Oct 2002 08:45:40 +0200 Subject: [XML-SIG] converting xbel to html pages compatible with Mozilla In-Reply-To: <200210171246.34834.goltermann@attbi.com> References: <200210171246.34834.goltermann@attbi.com> Message-ID: Wilbur Goltermann writes: > I have a number of xbel bookmark files left over from a time when I used > Galeon, and now find it necessary to move back to Mozilla. > > How can I convert these xbel files to html which can be used by Mozilla? You take xbel_parse.py from demo/xbel, and invoke xbel_parse.py --netscape mybookmarks.xml Regards, Martin From felciano@yahoo.com Sat Oct 19 04:34:31 2002 From: felciano@yahoo.com (Ramon Felciano) Date: Fri, 18 Oct 2002 20:34:31 -0700 (PDT) Subject: [XML-SIG] Newbie: how do I install PyXML to a local directory? Message-ID: <20021019033431.51645.qmail@web20005.mail.yahoo.com> Hi -- I'm trying to install PyXML on an ISP-hosted site where I don't have su privileges. Can someone point me to documentation for how to install python packages to a local user directory, and instruct python to search there for packages as well? I looked at the command options for setup.py but it wasn't clear which to use, nor how to subsequentely configure Python's path searching to find the newly installed package. Part of the problem is that I'm relative newbie to Python (but love it!) and am not clear what the Python 'idiom' is for local installs of packages. I'd like to set up my directory structure in 'python way' but can't figure out what that is! Thanks in advance for your time. Ramon __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ From martin@v.loewis.de Sat Oct 19 04:41:36 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 19 Oct 2002 05:41:36 +0200 Subject: [XML-SIG] Newbie: how do I install PyXML to a local directory? In-Reply-To: <20021019033431.51645.qmail@web20005.mail.yahoo.com> References: <20021019033431.51645.qmail@web20005.mail.yahoo.com> Message-ID: Ramon Felciano writes: > I'm trying to install PyXML on an ISP-hosted site > where I don't have su privileges. Can someone point me > to documentation for how to install python packages to > a local user directory, and instruct python to search > there for packages as well? See http://www.python.org/doc/current/inst/alt-install-windows.html The "home scheme" ought to work. > Part of the problem is that I'm relative newbie to > Python (but love it!) and am not clear what the Python > 'idiom' is for local installs of packages. I'd like to > set up my directory structure in 'python way' but > can't figure out what that is! Essentially, you can install things anywhere, and then set PYTHONPATH to make Python aware of it. Regards, Martin From stephane@sources.org Sat Oct 19 13:18:37 2002 From: stephane@sources.org (Stephane Bortzmeyer) Date: Sat, 19 Oct 2002 14:18:37 +0200 Subject: [XML-SIG] Re: SimpleXMLRPCServer-related questions In-Reply-To: (martin@v.loewis.de (Martin v. Loewis)'s message of 17 Oct 2002 15:22:59 +0200) Message-ID: <200210191218.g9JCIbgj012987@ludwigV.sources.org> On Thursday 17 October 2002, at 15 h 22, the keyboard of martin@v.loewis.de (Martin v. Loewis) wrote: > I always recommend to use CORBA, instead of XML-RPC. Could you explain why because I recommend exactly the opposite (it is far simpler to write a XML-RPC client or server than a Corba one). From haering_python@gmx.de Sun Oct 20 19:42:16 2002 From: haering_python@gmx.de (Gerhard =?iso-8859-1?Q?H=E4ring?=) Date: Sun, 20 Oct 2002 20:42:16 +0200 Subject: [XML-SIG] Re: XML Library from "XML Processing with Python" In-Reply-To: References: <3D85DE91.8010102@gmx.net> Message-ID: <20021020184216.GA11978@lilith.ghaering.test> * Will Ganz [2004-10-03 20:38 -0500]: > The book "XML Processing with Python" comes with a companion CD that has > several programs on it for Python 1.5.2. I have ActivePython 2.2.1 > installed on a W2K machine. Is installing "xmln.exe", "xmlv.exe", "Mark > Hammond's Win32 extensions", and "Python XML library from XML-SIG" a GOOD > THING? Or will I thoroughly hose my Python 2.2.1 install? Python 1.5.2 stuff won't work with Python 2.2.x. But I beleive the author still maintains his utilities, so you might browse his homepage for updated versions, that might work with Python 2.2.x. Alternatively, just install 1.5.2. But 1.5.2 didn't even have Unicode strings, so I don't know how useful it might be in the XML context. > I am just converting over from that other "P" scripting language and > am having to do a crash course on how to handle XML. Is this book > still a good reference or is it too dated already? (I got it at the > $4.99each discount store so I didn't lose that much if it is already > an antique). I bought it very cheaply too and didn't like it at all. I've mostly only done DOM, and DOM is the same, no matter which language you use, so I mostly browsed the web for Java examples, if I couldn't find one for Python. Worked ok so far, YMMV. Btw. there's another Python/XML book, which is much newer: http://www.oreilly.com/catalog/pythonxml/ -- Gerhard From noreply@sourceforge.net Mon Oct 21 20:11:35 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 21 Oct 2002 12:11:35 -0700 Subject: [XML-SIG] [ pyxml-Bugs-626489 ] Attribute content not properly escaped. Message-ID: Bugs item #626489, was opened at 2002-10-21 12:11 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=626489&group_id=6473 Category: DOM Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Attribute content not properly escaped. Initial Comment: Hi, I found bug a whereby ">" is not properly escaped in written attribute values. It should be written as ">". Here is some sample code >>>from xml.dom.ext import PrettyPrint, Print >>>from xml.dom.ext.reader import PyExpat >>>tree = PyExpat.Reader().fromString("") >>>PrettyPrint(tree) The output is which is not well-formed. I traced it down to the _xmlplus.dom.ext.Printer.py module, but didn't have the time to work through the code and develop a patch. Sorry. I figure it would be much easier for someone more familiar with the code. Regards, Alan. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=626489&group_id=6473 From bortzmeyer@nic.fr Mon Oct 21 21:25:45 2002 From: bortzmeyer@nic.fr (Stephane Bortzmeyer) Date: Mon, 21 Oct 2002 22:25:45 +0200 Subject: [XML-SIG] Trying to validate a document which is not in a file Message-ID: <200210212025.g9LKPjtJ010813@ludwigV.sources.org> I'm trying to validate a XML document. It is not in a file (it was received from the network) and I do not want to write it on disk just to validate it. So, I cannot use parse_resource() and I tried: import xml.parsers.xmlproc.xmlapp from xml.parsers.xmlproc import xmlval class MessageValidator (xml.parsers.xmlproc.xmlapp.ErrorHandler): ... def validate (text): val = xmlval.XMLValidator() val.feed(text) And it always fail: Traceback (most recent call last): File "validator.py", line 36, in ? validate(content) File "validator.py", line 26, in validate val.feed(text) File "/usr/lib/python2.1/site-packages/_xmlplus/parsers/xmlproc/xmlval.py", line 45, in feed self.parser.feed(data) File "/usr/lib/python2.1/site-packages/_xmlplus/parsers/xmlproc/xmlutils.py", line 330, in feed self.do_parse() File "/usr/lib/python2.1/site-packages/_xmlplus/parsers/xmlproc/xmlproc.py", line 101, in do_parse self.parse_doctype() File "/usr/lib/python2.1/site-packages/_xmlplus/parsers/xmlproc/xmlproc.py", line 510, in parse_doctype p.deref() UnboundLocalError: local variable 'p' referenced before assignment Reading the source, I tried to add various assignments such as val.current_sysID = "Nothing" but I still get the same mistake. From martin@v.loewis.de Mon Oct 21 22:52:03 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 21 Oct 2002 23:52:03 +0200 Subject: [XML-SIG] Trying to validate a document which is not in a file In-Reply-To: <200210212025.g9LKPjtJ010813@ludwigV.sources.org> References: <200210212025.g9LKPjtJ010813@ludwigV.sources.org> Message-ID: Stephane Bortzmeyer writes: > UnboundLocalError: local variable 'p' referenced before assignment What version of PyXML are you using? This was fixed in xmlproc.py 1.23, released as PyXML 0.7.1. Regards, Martin From bortzmeyer@nic.fr Tue Oct 22 21:00:21 2002 From: bortzmeyer@nic.fr (Stephane Bortzmeyer) Date: Tue, 22 Oct 2002 22:00:21 +0200 Subject: [XML-SIG] Trying to validate a document which is not in a file In-Reply-To: (martin@v.loewis.de (Martin v. Loewis)'s message of 21 Oct 2002 23:52:03 +0200) Message-ID: <200210222000.g9MK0LgA009179@ludwigV.sources.org> On Monday 21 October 2002, at 23 h 52, martin@v.loewis.de (Martin v. Loewis) wrote: > What version of PyXML are you using? This was fixed in xmlproc.py > 1.23, released as PyXML 0.7.1. xmlproc 1.21, PyXML 0.7. This is the default version in Debian 3.0 ("woody"), the current stable one. From martin@v.loewis.de Tue Oct 22 22:26:08 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 22 Oct 2002 23:26:08 +0200 Subject: [XML-SIG] Trying to validate a document which is not in a file In-Reply-To: <200210222000.g9MK0LgA009179@ludwigV.sources.org> References: <200210222000.g9MK0LgA009179@ludwigV.sources.org> Message-ID: Stephane Bortzmeyer writes: > xmlproc 1.21, PyXML 0.7. This is the default version in Debian 3.0 > ("woody"), the current stable one. I see. I recommend to update, then. Regards, Martin From fdrake@acm.org Mon Oct 28 21:17:14 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Mon, 28 Oct 2002 16:17:14 -0500 Subject: [XML-SIG] getDOMImplementation() extension Message-ID: <15805.43354.386664.895647@grendel.zope.com> I've just checked in an extension to the getDOMImplementation() function provided by the xml.dom package. The extension is that the "features" argument can now accept a string that lists the features that are being requested as well as a sequence of pairs; the syntax of the string is brain-dead simple (modulo a lack of precision in the DOM Level 3 drafts, which I'll address to the DOM comments if I haven't already). Background: Martin added the xml.dom.domreg module and the getDOMImplementation() function in Feb 2001, before the DOM working group came up with the "DOMImplementationSource" interface and its only method, getDOMImplementation(). The functionality, however, is essentially identical, though there were minor differences in the signature. The changes I checked in allows the arguments to match either the original Python definition for the function or the W3C definition. Issue: There is an issue with this addition, however, though I don't think it's a major one. The draft Level 3 specification states that the getDOMImplementation() function should return null (None in Python) if there is no suitable implementation, whereas the getDOMImplementation() function we already had raises ImportError (weird, but that's how it is). Now, part of this comes from my desire not to have two functions/ methods with slightly different behaviors but identical functionality; we *could* say that the xml.dom package is not an implementation of the DOMImplementationSource interface, and provide a separate object that does that, if we think we need one. That feels pretty distasteful to me, since the interface we have is reasonable. Proposal: Though it's possible to use the type of the value of the "features" argument to determine whether to return None or raise an exception, that seems both fragile and rediculous. I'm going to propose that we simply declare (via documentation) that the Python binding for getDOMImplementation() raises ImportError instead of returning None. I wanted to bring the issue up here before doing that since that doesn't fall into the same pattern as the rest of the binding and does diverge from the W3C specification (however draft it may be). Comments? -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From BudP.Bruegger Tue Oct 29 09:17:20 2002 From: BudP.Bruegger (BudP.Bruegger) Date: Tue, 29 Oct 2002 10:17:20 +0100 Subject: ANN: ezex 0.1--an xml shorthand in python; was: [XML-SIG] ANN: SLiP and SLIDE - a quick XML shorthand syntax and tool for editing In-Reply-To: References: <20020819192819.630dce5b.bud@sistema.it> Message-ID: <20021029101720.351562ff.bud@sistema.it> Hi Uche: did you ever have a chance to look at the examples/code? I realize that when I released it you were over your head in discussion of other topics on the xml SIG list... best cheers --bud [*** Fasttrack ***: look at the example at the end of the message] On Thu, 05 Sep 2002 09:29:06 -0600 Uche Ogbuji wrote: [SNIP] > Your post sounds interesting, and apparently a lot of work has gone into your > ideas. Some brief examples would be helpful as I'm trying to get a sense of > your ideas quickly. Uche and all: I have since implemented a prototype of my xml shorthand ideas and created some illustrative examples. You can find it all at http://www.sistema.it/ezex/ The name "ezex" tries to convey that it is an easy (ez) syntax for xml (ex). Suggestions for better names are very welcome. As I mentioned before, the approach has some similarities with SOX (particularly in data mode) and with PYX (particularly in document mode). On the server: ezex.0.1.alpha.py is the code. In the examples e1 through e4, the file without extension (e1) is the ezex source and the one with the .xml extension is the output produced with the prototype. The examples illustrate the following: * e1 gives an example for using ezex in "data mode" where leading and trailing whitespace does not matter and whitespace is extensively used for a layout that optimizes readability. (Data mode is selected by setting useIndent to 1). The similarities to SOX are obvious, even if the syntax is slightly different and SOX allows more "shortcuts" * e2 gives an example for using ezex in "document mode" where whitespace matters and mixed content is common. While a little more cumbersome to write than data mode, note that the author has complete control over whitespace. This is very similar to PYX. [Note: a subset of ezex that avoids the use of multi-line {text, comments}, as well as elements with text content on the same line, can be as easily analyzed with grep as can PYX. It would be easy to implement this option in an xml to ezex converter.] * e3 is a very minimal example for the extensibility of ezex. Here, a simplistic custom parser for lists was implemented. More complex examples could include: - tables - nested lists - structured text (reStructuredText, structuredTextNG, some wiki stuff) - raw (for example for including xml syntax) - include (to add and parse the content of an external file) - csv (to parse a csv table into an xml table) - e-mail (that parses e-mail format into xml) - sh (that includes the result of some sh command such as ls) As the example suggests, it is quite straight forward to write simple custom parsers or to incorporate existing parsers (structured text). Since it is basically a call to a python function, it is also easy to define "pipelines" of processing. For example, it should be easy to import a csv file and then parse it to create an xml table representation. * e4 illustrates the syntax used in more detail giving examples for all options. * e5 illustrates the use of namespaces. While ezex is not actually aware of ns, it makes it quite straight forward to declare them and to use prefixed in element and attribute names. I'm looking forward to your comments and suggestions! kind regards --bud -------------------- simple example, ezex input ------------------------------- ?xml version="1.0" encoding="UTF-8" !mydoctype "some elaborate stuff here"
123 Sesame Street Wonderland CA 90012 Please leave packages with Grouch in garbage can next door.
From scjuonline@web.de Tue Oct 29 15:00:30 2002 From: scjuonline@web.de (JS) Date: Tue, 29 Oct 2002 16:00:30 +0100 Subject: [XML-SIG] unknown url type in urllib2 Message-ID: <200210291600.30044.scjuonline@web.de> Hello, I have the following xml: =2E.. ]> &content; but since I updated to PyXML to 0.8.1,=20 I get the following error: ############################################################# ValueError: unknown url type: /xmldb/second.__LCMS__CONTENT /usr/local/lib/python2.2/urllib2.py in get_type(self=3D) 221 if self.type is None: 222 self.type, self.__r_type =3D splittype(self.__original) 223 if self.type is None: 224 raise ValueError, "unknown url type: %s" %=20 self.__original 225 return self.type 226 227 def get_host(self): ValueError undefined, self =3D ,=20 self.__original undefined /usr/local/lib/python2.2/urllib2.py in open(self=3D, fullurl=3Du'/xmldb/second.__LCMS__CONTENT', data=3D= None) 317 if result: 318 return result 319 320 type_ =3D req.get_type() 321 result =3D self._call_chain(self.handle_open, type_, type_ = + \ 322 '_open', req) 323 if result: type_ undefined, req =3D , req.get= _type =3D=20 = > =2E..(need more?) ############################################################## I read, that urllib2 is used instead of urllib. Is there anybody, who could help or experienced a similar error? Regards, JS From Juergen Hermann" Message-ID: On Tue, 29 Oct 2002 16:00:30 +0100, JS wrote: > References: <15805.43354.386664.895647@grendel.zope.com> Message-ID: "Fred L. Drake, Jr." writes: > I've just checked in an extension to the getDOMImplementation() > function provided by the xml.dom package. The extension is that the > "features" argument can now accept a string that lists the features > that are being requested as well as a sequence of pairs; the syntax of > the string is brain-dead simple (modulo a lack of precision in the DOM > Level 3 drafts, which I'll address to the DOM comments if I haven't > already). This all sounds good, except that I intended usage to be slightly different: I think it should be xml.dom.getDOMImplementation, not xml.dom.domreg.getDOMImplementation. The domreg module serves mainly to simplifiy code sharing between PyXML and Python, even though the __init__ files are entirely different. > Though it's possible to use the type of the value of the "features" > argument to determine whether to return None or raise an exception, > that seems both fragile and rediculous. I'm going to propose that we > simply declare (via documentation) that the Python binding for > getDOMImplementation() raises ImportError instead of returning None. > I wanted to bring the issue up here before doing that since that > doesn't fall into the same pattern as the rest of the binding and does > diverge from the W3C specification (however draft it may be). The function would deviate from the other DOM functions in another respect: It requires a keyword argument if you only want to pass features. So I would leave this as-is (raise ImportError), until a) somebody complains, AND b) the W3C draft becomes a recommendation. When that happens, we can again reconsider. Regards, Martin From fdrake@acm.org Wed Oct 30 15:26:44 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Wed, 30 Oct 2002 10:26:44 -0500 Subject: [XML-SIG] getDOMImplementation() extension In-Reply-To: References: <15805.43354.386664.895647@grendel.zope.com> Message-ID: <15807.64052.889220.365334@grendel.zope.com> Martin v. Loewis writes: > This all sounds good, except that I intended usage to be slightly > different: I think it should be xml.dom.getDOMImplementation, not > xml.dom.domreg.getDOMImplementation. The domreg module serves mainly > to simplifiy code sharing between PyXML and Python, even though the > __init__ files are entirely different. Yes, I understood that; I did not intend to imply that the domreg module was part of the public API, but on re-reading my message realize that I did. Sorry. > The function would deviate from the other DOM functions in another > respect: It requires a keyword argument if you only want to pass > features. Yes. > So I would leave this as-is (raise ImportError), until > a) somebody complains, AND > b) the W3C draft becomes a recommendation. > > When that happens, we can again reconsider. Ok, it sounds to me like we're in agreement. I sent this email to the www-dom list: http://lists.w3.org/Archives/Public/www-dom/2002OctDec/0089.html but there's been no response (expected ). -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation