From noreply at sourceforge.net Wed Jun 4 20:23:42 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Jun 4 22:23:45 2003 Subject: [XML-SIG] [ pyxml-Bugs-749284 ] CatalogManager can't resolve system ids Message-ID: Bugs item #749284, was opened at 2003-06-04 22:23 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=749284&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Andrew Langmead (langmead) Assigned to: Nobody/Anonymous (nobody) Summary: CatalogManager can't resolve system ids Initial Comment: If you pass a system id, but no public id to to resolve_sysid you get back None. I believe the resolve_sysid function of xml/parsers/xmlproc/ catalog.py is missing a return statement on the final line (the "pubid== None" case.) Attached is a file catbug.py that demonstrates the problem and a patch named catalog.patch that resolves it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=749284&group_id=6473 From torsten.rueger at hiit.fi Thu Jun 5 11:35:43 2003 From: torsten.rueger at hiit.fi (Torsten Rueger) Date: Thu Jun 5 03:35:46 2003 Subject: [XML-SIG] PyXML + 4Suite compatibility Message-ID: <502D2BD1-9728-11D7-BA04-000A959C1BB0@hiit.fi> Newbie question: I have 4Suite installed and am using the xml + xpath packages. If I install PyXML, will 4suite still work ? Will PyXML, specifically the xpath stuff work ? PS: I don't want to use both at the same time. Just trying to evaluate which one to use. Can anyone share some experiences about the difference ? Thanks Torsten From gia at webde-ag.de Thu Jun 5 10:41:03 2003 From: gia at webde-ag.de (Gisbert Amm) Date: Thu Jun 5 03:41:38 2003 Subject: [XML-SIG] PyXML + 4Suite compatibility Message-ID: <74ADFA8C453ED611A71E00508BBBA135D9ECD3@exchange1.cinetic.de> Have a look at http://4suite.org/docs/howto/UNIX.xml#PyXML Regards, Gisbert Amm http://web.de/ > -----Original Message----- > From: Torsten Rueger [mailto:torsten.rueger@hiit.fi] > Sent: Thursday, June 05, 2003 9:36 AM > To: xml-sig@python.org > Subject: [XML-SIG] PyXML + 4Suite compatibility > > > Newbie question: > > I have 4Suite installed and am using the xml + xpath packages. > > If I install PyXML, will 4suite still work ? > > Will PyXML, specifically the xpath stuff work ? > > PS: I don't want to use both at the same time. Just trying to > evaluate > which one to use. > > Can anyone share some experiences about the difference ? > > Thanks > Torsten > > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig > From torsten.rueger at hiit.fi Thu Jun 5 11:58:04 2003 From: torsten.rueger at hiit.fi (Torsten Rueger) Date: Thu Jun 5 03:58:08 2003 Subject: [XML-SIG] PyXML + 4Suite compatibility In-Reply-To: <74ADFA8C453ED611A71E00508BBBA135D9ECD3@exchange1.cinetic.de> Message-ID: <6FBAFE9E-972B-11D7-BA04-000A959C1BB0@hiit.fi> On Thursday, Jun 5, 2003, at 10:41 Europe/Helsinki, Gisbert Amm wrote: > Have a look at > > http://4suite.org/docs/howto/UNIX.xml#PyXML > > Thanks. I did, but it doesn't really answer the question (for me) The PyXML README says : If you want to use PyXML's experimental XSLT package, you need to pass --with-xslt to setup.py. If you also want to install FourThought's 4Suite package, you should not install the XSLT package and also avoid the XPath package, so you can use the one from 4Suite. This can be done by using the command line option --without-xpath. That suggests some incompatibilities to me, but I don't know how or what. Torsten From gia at webde-ag.de Thu Jun 5 11:28:06 2003 From: gia at webde-ag.de (Gisbert Amm) Date: Thu Jun 5 04:28:41 2003 Subject: [XML-SIG] PyXML + 4Suite compatibility Message-ID: <74ADFA8C453ED611A71E00508BBBA135D9ECD5@exchange1.cinetic.de> > -----Original Message----- > From: Torsten Rueger [mailto:torsten.rueger@hiit.fi] > > On Thursday, Jun 5, 2003, at 10:41 Europe/Helsinki, Gisbert Amm wrote: > > > Have a look at > > > > http://4suite.org/docs/howto/UNIX.xml#PyXML > > > > > > Thanks. I did, but it doesn't really answer the question (for me) > > The PyXML README says : > If you want to use PyXML's experimental XSLT package, you need to pass > --with-xslt to setup.py. If you also want to install FourThought's > 4Suite package, you should not install the XSLT package and also avoid > the XPath package, so you can use the one from 4Suite. This can be > done by using the command line option --without-xpath. > > > That suggests some incompatibilities to me, but I don't know how or > what. > Sorry, I cannot help with real experience. But on http://uche.ogbuji.net/uche.ogbuji.net/tech/akara/nodes/2003-01-01/choosing- software I found this: "PyXML also provides an older version of the XPath and XSLT implementation in 4Suite." That might be a hint ... Regards, Gisbert Amm http://web.de/ From dovw at jazo.org.il Thu Jun 5 15:36:13 2003 From: dovw at jazo.org.il (eJewish.info) Date: Thu Jun 5 07:29:46 2003 Subject: [XML-SIG] eJewish.info Newsletter -Number 1 - Spring 2003 Message-ID: Shalom, We would like to share with you the substantial progress achieved in the latest months advancing our mission: to develop a shared Jewish space for information, services and products, leading to economies of scale in providing education, training, community development and collaborative decision making in the Jewish sphere. The first issue of the eJewish.info newsletter is now online at http://www.ejewish.info/reka/nl_1/Default.htm. Our newsletter is also available as a PDF file at: http://www.ejewish.info/reka/nl_1/eJewish_info_nl1.pdf (118 K). We welcome your feedback and suggestions. Hope you continue to enjoy eJewish.info! Chag Sameach, Dov Winer Director eJewish.info Developing Jewish Networking Infrastructures -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20030605/b7ffeeeb/attachment.htm From Mike.Olson at fourthought.com Thu Jun 5 07:48:10 2003 From: Mike.Olson at fourthought.com (Michael Olson) Date: Thu Jun 5 08:48:10 2003 Subject: [XML-SIG] PyXML + 4Suite compatibility In-Reply-To: <502D2BD1-9728-11D7-BA04-000A959C1BB0@hiit.fi> Message-ID: On Thursday, June 5, 2003, at 01:35 AM, Torsten Rueger wrote: > Newbie question: > > I have 4Suite installed and am using the xml + xpath packages. > > If I install PyXML, will 4suite still work ? > Yes. 4Suite is designed to work with PyXML. Infact you need 4Suite installed to perform validation. > Will PyXML, specifically the xpath stuff work ? > The xpath implementation that ships with PyXML is out of date. We will be resynching it shortly, but for now you will want to use Ft.Xml.XPath > PS: I don't want to use both at the same time. Just trying to evaluate > which one to use. > > Can anyone share some experiences about the difference ? > They are both from the same code base. xml.xpath was copied from 4Suite over a year a go and I don't think anyone has had the time to update it since then. Hope that helps Mike > Thanks > Torsten > > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig > ------------------------------------------------------------------------ ----------------- Mike Olson Principal Consultant mike.olson@fourthought.com +1 303 583 9900 Fourthought, Inc. http://Fourthought.com PO Box 270590, http://4Suite.org Louisville, CO 80027-5009, USA XML strategy, XML tools, knowledge management From x5757n5wf at netscape.com Fri Jun 6 01:53:06 2003 From: x5757n5wf at netscape.com (Daisy Schafer) Date: Thu Jun 5 18:58:27 2003 Subject: [XML-SIG] Free Cable, save some extra money. butins Message-ID: No More Paying for Movies & Events on CABLE! Free TV is Here! * All New Movie Releases FREE * Adult Movies FREE * Wrestling, UFC, & Boxing PPV's FREE * Live Music Concerts FREE * Bottom line: Anything you would normally buy you get Free with this! What does this mean? Means you save $1000 in programming a month for one low cost of this unique filter. Guaranteed to Work! Click Below to get more Information & your Cable Filter Today (while supplies last): http://www.filterppv.com/aef104.htm Click Below to be removed fom our mailing systems: http://www.filterppv.com/rem0ve.html 2 ztjibgblyvmf g kztzqsjhcd ogwp zwpjkacetc lrtvlzc From noreply at sourceforge.net Fri Jun 6 22:00:43 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Sat Jun 7 00:00:46 2003 Subject: [XML-SIG] [ pyxml-Bugs-750437 ] can't create catalog entry for pathless system identifier Message-ID: Bugs item #750437, was opened at 2003-06-07 00:00 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=750437&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Andrew Langmead (langmead) Assigned to: Nobody/Anonymous (nobody) Summary: can't create catalog entry for pathless system identifier Initial Comment: When the a catalog is processed with the SYSTEM keyword to associcate a storage object identifier with a system identifier, both are converted into full filesystem paths based on a location of the catalog file, or any BASE entry found. This means that you can't create a catalog entry like: SYSTEM html.dtd /usr/share/sgml/catalog/html.dtd because the system identifier "html.dtd" will be converted to a full path, and then be missed in the search if the DTD entry says: The way to handle this that fixes my case is to not turn the initial system identifier in the catalog command into a full path before storing it the catalog. If it is left relative and pathless, it will be found in the search. I can understand if this solution doesn't work for other situations. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=750437&group_id=6473 From uche.ogbuji at fourthought.com Sat Jun 7 00:48:53 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Jun 7 01:51:56 2003 Subject: [XML-SIG] XSLT sorting by "authors" element, with multiple authors In-Reply-To: Message from Paul Tremblay of "Tue, 13 May 2003 01:37:51 EDT." <20030513013751.I29954@localhost.localdomain> Message-ID: <20030607054859.EDD6A134187@borgia.local> > On Mon, May 12, 2003 at 09:42:19PM -0400, Thomas B. Passin wrote: > > > > [Jon Berry] > > >... > > > In initial searches, it looked like the xsl:for-each-group > > > and/or xsl:function constructs might help, but they don't seem > > > to be supported by the current PyXML/4Suite implementations. > > > > > > So, with the constraint that I'm trying to avoid buying a book for now, > > > is this doable using templates, easy, and currently implementable > > > with free software? > > > > > > > Best to go to the Mulberry xslt list with xslt questions! The two > > instructions you mention are not in xslt1.0 but rather in the draft xslt2.0. > > It seems unlikely that the 4Thought people will ever have much interest in > > getting 4xslt conformant with xslt2.0, so you need another approach. > > Why is this? Because XPath 2.0 and XSLT 2.0 are irredeemable crap. I've made this argument in more detail so much recently that I'm tired of the whole discussion. For a flavor, see [1] [2] . As I can squeeze out time, I prefer to spend my time on working on a more sane set of alternatives [3]. There are a *lot* of folks, users and implementors who have also sworn to have nothing to do with W3C XPath 2.0 and XSLT 2.0. [1] http://www.adtmag.com/article.asp?id=6965 [2] http://www.adtmag.com/article.asp?id=7620 [3] http://lists.fourthought.com/mailman/listinfo/xpath-ng "I was among the earliest implementors of XPath and XSLT. I thought, and still think that they were remarkably well-conceived languages. XPath and XSLT 2.0 are ruined by excess, and I'd be surprised if they supplant the 1.0 versions any time soon, as they are." --me on the xml-dev mailing list, Sat, 06 Jul 2002 -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Using libxml in Python - http://www.xml.com/pub/a/2003/05/14/py-xml.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x -think18.html Is XQuery an omni-tool? - http://www.adtmag.com/article.asp?id=7620 From uche.ogbuji at fourthought.com Sat Jun 7 01:22:32 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Jun 7 02:23:48 2003 Subject: [XML-SIG] XSLT sorting by "authors" element, with multiple authors In-Reply-To: Message from Tamito KAJIYAMA of "Wed, 14 May 2003 02:14:03 +0900." <200305131714.h4DHE3215527@grad.sccs.chukyo-u.ac.jp> Message-ID: <20030607062237.A992F134187@borgia.local> > "Jon Berry" writes: > | > | I'd like to sort by the last name, alphabetically by > | first differing author. So the algorithm would be: > | * within each article, sort authors by lastname > | * to compare Article A with Article B: > | * Look at last names of first author (if different, > | comparison done) > | * else if first authors are the same, look at second authors, > | * etc. > | * if not distinguished, go on to next sorting key (say > | 'title') > | > | Noting of course that we might be comparing articles with > | different numbers of authors. > | > | In initial searches, it looked like the xsl:for-each-group > | and/or xsl:function constructs might help, but they don't seem > | to be supported by the current PyXML/4Suite implementations. > | > | So, with the constraint that I'm trying to avoid buying a book for now, > | is this doable using templates, easy, and currently implementable > | with free software? > > I believe that using extension functions is a good approach to > cope with your problem. > > The primary cause of your problem is that the xsl:sort looks at > only the value of the first node, instead of all the selected > nodes. For example, the following xsl:sort element selects all > the last names of an article's authors, but only the first last > name is used as a sort key. > > > > So, a simple solution is to change this behavior of xsl:sort by > defining an extension function like this: > > > > where the extension function ext:strings() can be defined, for > example, as follows: > > def strings(context, nodeset): > return "".join(map(lambda x: x.nodeValue, nodeset)) > > It seems very Pythonic, doesn't it? :-) See documentation for > more information on extension functions in Python. Just being helpful: http://uche.ogbuji.net/tech/akara/nodes/2003-01-01/xslt-ext-funcs -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Using libxml in Python - http://www.xml.com/pub/a/2003/05/14/py-xml.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x -think18.html Is XQuery an omni-tool? - http://www.adtmag.com/article.asp?id=7620 From uche.ogbuji at fourthought.com Sat Jun 7 01:28:53 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Jun 7 02:30:31 2003 Subject: [XML-SIG] Serializing DOM tree to file In-Reply-To: Message from Rich Salz of "Fri, 16 May 2003 19:44:54 EDT." Message-ID: <20030607062858.76E56134187@borgia.local> > On Fri, 16 May 2003, Nickolay Kolev wrote: > > Basically, what I want to do is to have what PrettyPrint from > > xml.dom.ext writes to the console. But I want it in a file. > > I was going to say that PrettyPrint is pretty ugly, because it moves > all the namespace declarations up to the outermost element. Many people would consider this sane behavor. I do. > Well it's worse than ugly, it's seriously broken. It moves the default > namespace declaration to the top. FYI, for those who do use 4Suite, Ft.Xml.Domlette.Print and .PrettyPrint are actively maintained and are available in C for speed on most platforms. They should work fine on Minidom. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Using libxml in Python - http://www.xml.com/pub/a/2003/05/14/py-xml.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x -think18.html Is XQuery an omni-tool? - http://www.adtmag.com/article.asp?id=7620 From uche.ogbuji at fourthought.com Sat Jun 7 01:32:15 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Jun 7 02:34:04 2003 Subject: [XML-SIG] Re: XSLT in PyXML In-Reply-To: Message from Alexandre Fayolle of "Tue, 20 May 2003 09:17:24 +0200." <20030520071724.GC4699@calvin> Message-ID: <20030607063220.CAD79134187@borgia.local> > On Mon, May 19, 2003 at 10:24:58AM -0600, Uche Ogbuji wrote: > > On Mon, 2003-05-19 at 09:48, David Soulayrol wrote: > > > Hi. > > > > > > I saw you're the one who is assigned to XSLT bugs in PyXML. I know about 4Suite, > > > but i'd like to know if PyXML XSLT is still broken, or if it should work soon. > > > > Still broken. A fixed version will likely not be incorporated until > > after the 4Suite 1.0 release because of the amount of work the > > re-integration will take. > > Any idea of a release date for 4Suite-1.0? The crystal ball is rather coudy as we're all quite booked with client work. To make things more complicated, we ned 4Suite 1.0 for the client work. This means we'll probably have to find a way to get out 4Suite 1.0 before September. I'm almost sure I have no idea how we'll manage that. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Using libxml in Python - http://www.xml.com/pub/a/2003/05/14/py-xml.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x -think18.html Is XQuery an omni-tool? - http://www.adtmag.com/article.asp?id=7620 From uche.ogbuji at fourthought.com Sat Jun 7 01:40:47 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Jun 7 02:43:08 2003 Subject: [XML-SIG] Re: XSLT in PyXML In-Reply-To: Message from Mike Brown of "Wed, 21 May 2003 15:56:55 MDT." <200305212156.h4LLutak082079@chilled.skew.org> Message-ID: <20030607064052.C3C14134187@borgia.local> > Alexandre Fayolle wrote: > > On Mon, May 19, 2003 at 10:24:58AM -0600, Uche Ogbuji wrote: > > > On Mon, 2003-05-19 at 09:48, David Soulayrol wrote: > > > > Hi. > > > > > > > > I saw you're the one who is assigned to XSLT bugs in PyXML. I know about 4Suite, > > > > but i'd like to know if PyXML XSLT is still broken, or if it should work soon. > > > > > > Still broken. A fixed version will likely not be incorporated until > > > after the 4Suite 1.0 release because of the amount of work the > > > re-integration will take. > > > > Any idea of a release date for 4Suite-1.0? > > I am guessing there will be 1.0a2 by end of June, with > - minor fixes already in CVS > - RDF related server optimizations Mike Olson is working on > - maybe a working, revamped Dashboard (also MikeO's) > > and then the first beta, 1.0b1, by end of September... > - most reported bugs fixed > - maybe some better documentation in the distribution > - some XPath optimizations Uche and I were working on > > and then 1.0 final shortly after... October/November? > - centralized documentation on 4suite.org > - new bugs fixed > - pending feature requests considered > > Is this realistic? I don't know. Pretty good summary. See also http://uche.ogbuji.net/tech/akara/nodes/2003-02-27/roadmap We will need to have at least a strong 1.0 release candidate before September, so I imagine I have a few sleepless nights queued up before then. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Using libxml in Python - http://www.xml.com/pub/a/2003/05/14/py-xml.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x -think18.html Is XQuery an omni-tool? - http://www.adtmag.com/article.asp?id=7620 From uche.ogbuji at fourthought.com Sat Jun 7 01:48:13 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Jun 7 02:51:01 2003 Subject: [XML-SIG] DOM -> String ? In-Reply-To: Message from Markus Jais of "Mon, 26 May 2003 12:10:52 +0200." <200305261210.52455.mjais@gmx-gmbh.de> Message-ID: <20030607064818.40660134187@borgia.local> > hello > > is there a way to transform a DOM Tree into a Python string ??? > identation is not necessary. I just want to send the DOM Tree over > a socket. If you have 4Suite, there is Ft.Xml.Domlette.Print -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Using libxml in Python - http://www.xml.com/pub/a/2003/05/14/py-xml.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x -think18.html Is XQuery an omni-tool? - http://www.adtmag.com/article.asp?id=7620 From rsalz at datapower.com Sat Jun 7 07:54:34 2003 From: rsalz at datapower.com (Rich Salz) Date: Sat Jun 7 06:54:38 2003 Subject: [XML-SIG] Serializing DOM tree to file In-Reply-To: <20030607062858.76E56134187@borgia.local> Message-ID: > > Well it's worse than ugly, it's seriously broken. It moves the default > > namespace declaration to the top. > > FYI, for those who do use 4Suite, Ft.Xml.Domlette.Print and .PrettyPrint are > actively maintained and are available in C for speed on most platforms. They > should work fine on Minidom. And the bug is fixed? -- Rich Salz Chief Security Architect DataPower Technology http://www.datapower.com XS40 XML Security Gateway http://www.datapower.com/products/xs40.html XML Security Overview http://www.datapower.com/xmldev/xmlsecurity.html From uche.ogbuji at fourthought.com Sat Jun 7 10:52:53 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Jun 7 11:56:09 2003 Subject: [XML-SIG] Serializing DOM tree to file In-Reply-To: Message from Rich Salz of "Sat, 07 Jun 2003 06:54:34 EDT." Message-ID: <20030607155258.23A77134187@borgia.local> > > > Well it's worse than ugly, it's seriously broken. It moves the default > > > namespace declaration to the top. > > > > FYI, for those who do use 4Suite, Ft.Xml.Domlette.Print and .PrettyPrint are > > actively maintained and are available in C for speed on most platforms. They > > should work fine on Minidom. > > And the bug is fixed? Apparently not, so I filed: http://sourceforge.net/tracker/index.php?func=detail&aid=750585&group_id=39954& atid=428292 test/Xml/Borrowed/rs-030516.py Thanks. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Using libxml in Python - http://www.xml.com/pub/a/2003/05/14/py-xml.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x -think18.html Is XQuery an omni-tool? - http://www.adtmag.com/article.asp?id=7620 From mike at skew.org Sat Jun 7 19:28:54 2003 From: mike at skew.org (Mike Brown) Date: Sat Jun 7 20:29:20 2003 Subject: [XML-SIG] DOM -> String ? In-Reply-To: <20030607064818.40660134187@borgia.local> "from Uche Ogbuji at Jun 7, 2003 00:48:13 am" Message-ID: <200306080028.h580StGt001660@chilled.skew.org> Uche Ogbuji wrote: > > hello > > > > is there a way to transform a DOM Tree into a Python string ??? > > identation is not necessary. I just want to send the DOM Tree over > > a socket. > > If you have 4Suite, there is Ft.Xml.Domlette.Print I think you mean Ft.Xml.Lib.Print.Print() and Ft.Xml.Lib.Print.PrettyPrint() From uche.ogbuji at fourthought.com Sat Jun 7 19:33:28 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Jun 7 20:35:34 2003 Subject: [XML-SIG] DOM -> String ? In-Reply-To: Message from Mike Brown of "Sat, 07 Jun 2003 18:28:54 MDT." <200306080028.h580StGt001660@chilled.skew.org> Message-ID: <20030608003333.37B7F134187@borgia.local> > Uche Ogbuji wrote: > > > hello > > > > > > is there a way to transform a DOM Tree into a Python string ??? > > > identation is not necessary. I just want to send the DOM Tree over > > > a socket. > > > > If you have 4Suite, there is Ft.Xml.Domlette.Print > > I think you mean > Ft.Xml.Lib.Print.Print() and Ft.Xml.Lib.Print.PrettyPrint() Nah. [uogbuji@borgia uogbuji]$ python Python 2.2.2 (#1, Feb 24 2003, 19:13:11) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from Ft.Xml.Domlette import Print >>> People, please avoid using Ft.Xml.Lib.Print.Print() and Ft.Xml.Lib.Print.PrettyPrint() directly. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Using libxml in Python - http://www.xml.com/pub/a/2003/05/14/py-xml.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x -think18.html Is XQuery an omni-tool? - http://www.adtmag.com/article.asp?id=7620 From Alexandre.Fayolle at logilab.fr Mon Jun 9 11:58:53 2003 From: Alexandre.Fayolle at logilab.fr (Alexandre Fayolle) Date: Mon Jun 9 04:58:59 2003 Subject: [XML-SIG] PyXML + 4Suite compatibility In-Reply-To: <6FBAFE9E-972B-11D7-BA04-000A959C1BB0@hiit.fi> References: <74ADFA8C453ED611A71E00508BBBA135D9ECD3@exchange1.cinetic.de> <6FBAFE9E-972B-11D7-BA04-000A959C1BB0@hiit.fi> Message-ID: <20030609085853.GD17171@calvin> On Thu, Jun 05, 2003 at 10:58:04AM +0300, Torsten Rueger wrote: > The PyXML README says : > If you want to use PyXML's experimental XSLT package, you need to pass > --with-xslt to setup.py. If you also want to install FourThought's > 4Suite package, you should not install the XSLT package and also avoid > the XPath package, so you can use the one from 4Suite. This can be > done by using the command line option --without-xpath. The README should be updated. You can use the XPath implementation in PyXML, but the XSLT implementation is broken. Recent versions of 4Suite are pyxml-agnostic. So you should be able to use 4Suite's xslt and xpath with or without pyxml. -- Alexandre Fayolle LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org D?veloppement logiciel avanc? - Intelligence Artificielle - Formations From jorgeromeo at jippii.co.uk Mon Jun 9 13:48:03 2003 From: jorgeromeo at jippii.co.uk (jr) Date: Mon Jun 9 05:48:10 2003 Subject: [XML-SIG] xsd & entities Message-ID: <117356.1055152083462.JavaMail.jorgeromeo@jippii.co.uk> Hello, Has anyone idea about how to work with entities using a xsd schema? That is, make a reference from xsd schema to that entities placed in a dtd file. I want to check the content, changing wrong characters, like "quote" by its ascii code """. I must change my xsd file but I don't know how. I have a normal xsd file and a dtd file with that codes That file, entities.dtd, is like: ..... Thanks in advance. From grobinson at transpose.com Mon Jun 9 22:35:40 2003 From: grobinson at transpose.com (Gary Robinson) Date: Mon Jun 9 21:36:12 2003 Subject: [XML-SIG] pyxml wants Internet connection? In-Reply-To: <3ED35F3C.7060709@v.loewis.de> Message-ID: Dear Martin (and other xml-siggers): A while back (May 27), Martin made a suggestion on this list to enable me to do xml parsing when I'm not connected to the Internet. The problem was that the xml file in question had the line: and it was apparently looking for the Apple site even when I wasn't connected. Martin said: > I see. After invoking the parser's reset, and before invoking feed, you > need to invoke > > parser._parser.SetParamEntityParsing(xml.parsers.expat.XML_PARAM_ENTITY_PARSIN > G_NEVER) But the following code doesn't work: from xml.sax import make_parser import xml.parsers.expat myparser = make_parser() myparser._parser.SetParamEntityParsing(xml.parsers.expat.XML_PARAM_ENTITY_PA RSING_NEVER) It gets the error: "AttributeError: 'NoneType' object has no attribute 'SetParamEntityParsing'" If I replace the last line above with: myparser.SetParamEntityParsing(xml.parsers.expat.XML_PARAM_ENTITY_PARSING_NE VER) I get the error: "AttributeError: ExpatParser instance has no attribute 'SetParamEntityParsing'" If you have any ideas for how to get this working I'd really appreciate it! Many thanks-- --Gary -- Gary Robinson CEO Transpose, LLC grobinson@transpose.com 207-942-3463 http://www.transpose.com http://radio.weblogs.com/0101454 > From: "Martin v. L?wis" > Date: Tue, 27 May 2003 14:51:08 +0200 > To: Gary Robinson > Cc: "xml-sig@python.org" > Subject: Re: [XML-SIG] pyxml wants Internet connection? > > parser.SetParamEntityParsing From martin at v.loewis.de Tue Jun 10 06:59:13 2003 From: martin at v.loewis.de (Martin v. =?iso-8859-15?q?L=F6wis?=) Date: Tue Jun 10 01:59:16 2003 Subject: [XML-SIG] pyxml wants Internet connection? In-Reply-To: References: Message-ID: Gary Robinson writes: > > I see. After invoking the parser's reset, and before invoking feed, you > > need to invoke [...] > But the following code doesn't work: > > from xml.sax import make_parser > import xml.parsers.expat > myparser = make_parser() > myparser._parser.SetParamEntityParsing(xml.parsers.expat.XML_PARAM_ENTITY_PA > RSING_NEVER) > > It gets the error: "AttributeError: 'NoneType' object has no attribute > 'SetParamEntityParsing'" That's why I said "after invoking the parser's reset, and before invoking feed". In your code, you invoke neither reset nor feed, but you should. You have to study the expatparser source code; this mode of operation isn't really supported. Regards, Martin From grobinson at transpose.com Tue Jun 10 09:41:27 2003 From: grobinson at transpose.com (Gary Robinson) Date: Tue Jun 10 08:41:42 2003 Subject: [XML-SIG] pyxml wants Internet connection? In-Reply-To: Message-ID: >> It gets the error: "AttributeError: 'NoneType' object has no attribute >> 'SetParamEntityParsing'" > > That's why I said "after invoking the parser's reset, and before > invoking feed". In your code, you invoke neither reset nor feed, but > you should. Thanks -- I thought that instantiating would include the equivalent of resetting it and that feed meant doing the parsing (which would obviously come later). I guess I thought wrong. I'll try looking at the source... --Gary -- Gary Robinson CEO Transpose, LLC grobinson@transpose.com 207-942-3463 http://www.transpose.com http://radio.weblogs.com/0101454 From aeverett at catalpabean.com Tue Jun 10 12:53:03 2003 From: aeverett at catalpabean.com (Albert Everett) Date: Tue Jun 10 12:53:09 2003 Subject: [XML-SIG] PyXML on Mac OSX 10.2 build error Message-ID: <64630.66.136.237.161.1055263983.squirrel@www.catalpabean.com> I'm trying to get PyXML running on an iBook with OSX 10.2 and the Python 2.2 that shipped with 10.2. I get the following error: ------- # python setup.py build Traceback (most recent call last): File "setup.py", line 58, in ? if sys.platform[:6] == "darwin" and \ distutils.sysconfig.get_config_var("LDSHARED").find("-flat_namespace") == -1: NameError: name 'distutils' is not defined ------- Any ideas? Albert -- Albert Everett From grobinson at transpose.com Tue Jun 10 13:58:12 2003 From: grobinson at transpose.com (Gary Robinson) Date: Tue Jun 10 12:58:26 2003 Subject: [XML-SIG] PyXML on Mac OSX 10.2 build error In-Reply-To: <64630.66.136.237.161.1055263983.squirrel@www.catalpabean.com> Message-ID: > ------- > # python setup.py build > Traceback (most recent call last): > File "setup.py", line 58, in ? > if sys.platform[:6] == "darwin" and \ > distutils.sysconfig.get_config_var("LDSHARED").find("-flat_namespace") == -1: > NameError: name 'distutils' is not defined > ------- > > Any ideas? Yes -- I had the same trouble. Edit setup.py so that line 58 and onward looks like: if sys.platform[:6] == "darwin" and \ get_config_vars("LDSHARED")[0].find("-flat_namespace") == -1: # Mac OS X LDFLAGS.append('-flat_namespace') --Gary -- Gary Robinson CEO Transpose, LLC grobinson@transpose.com 207-942-3463 http://www.transpose.com http://radio.weblogs.com/0101454 From phthenry at earthlink.net Tue Jun 10 18:31:53 2003 From: phthenry at earthlink.net (Paul Tremblay) Date: Tue Jun 10 17:30:26 2003 Subject: [XML-SIG] PyXML on Mac OSX 10.2 build error In-Reply-To: References: <64630.66.136.237.161.1055263983.squirrel@www.catalpabean.com> Message-ID: <20030610213153.GF21763@localhost.localdomain> On Tue, Jun 10, 2003 at 12:58:12PM -0400, Gary Robinson wrote: > Cc: > > > ------- > > # python setup.py build > > Traceback (most recent call last): > > File "setup.py", line 58, in ? > > if sys.platform[:6] == "darwin" and \ > > distutils.sysconfig.get_config_var("LDSHARED").find("-flat_namespace") == -1: > > NameError: name 'distutils' is not defined > > ------- > > > > Any ideas? > > Yes -- I had the same trouble. > > Edit setup.py so that line 58 and onward looks like: > > if sys.platform[:6] == "darwin" and \ > get_config_vars("LDSHARED")[0].find("-flat_namespace") == -1: > # Mac OS X > LDFLAGS.append('-flat_namespace') > > I also had the same troubles a few days ago, and have meant to post to this list. I solved it by adding import distutils To the top of the setup.py Paul -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From martin at v.loewis.de Tue Jun 10 22:33:52 2003 From: martin at v.loewis.de (Martin v. =?iso-8859-15?q?L=F6wis?=) Date: Tue Jun 10 17:33:53 2003 Subject: [XML-SIG] pyxml wants Internet connection? In-Reply-To: References: Message-ID: Gary Robinson writes: > Thanks -- I thought that instantiating would include the equivalent of > resetting it and that feed meant doing the parsing (which would obviously > come later). > > I guess I thought wrong. Your guess is nearly right: Invoking .parse first invokes .reset, then invokes .feed. In-between, it invokes SetParamEntityParsing. Regards, Martin From Sascha.Gresk at Opensource-Consult.De Wed Jun 11 19:32:10 2003 From: Sascha.Gresk at Opensource-Consult.De (Sascha Gresk) Date: Wed Jun 11 12:32:26 2003 Subject: [XML-SIG] my setup.py for PyXML-0.8.2 on MacOSX 10.2.6 using python2.1 installed by fink Message-ID: <3FC8A500-9C2A-11D7-A26E-000A958FDBBC@Opensource-Consult.De> diff -uN setup.py setup.py-org --- setup.py Wed Jun 11 18:23:05 2003 +++ setup.py-org Wed Jun 11 18:17:13 2003 @@ -55,9 +55,8 @@ with_xslt = 0 sys.argv.remove(arg) -from distutils.sysconfig import get_config_var if sys.platform[:6] == "darwin" and \ - get_config_var("LDSHARED").find("-flat_namespace") == -1: + distutils.sysconfig.get_config_var("LDSHARED").find("-flat_namespace") == -1: # Mac OS X LDFLAGS.append('-flat_namespace') From phthenry at earthlink.net Thu Jun 12 19:02:35 2003 From: phthenry at earthlink.net (Paul Tremblay) Date: Thu Jun 12 18:00:55 2003 Subject: [XML-SIG] using xslt with python Message-ID: <20030612220235.GJ21763@localhost.localdomain> Can someone give me some instructins on how to process and xslt stylesheet with python? I have written a script that translates plain text to docbook. Much of the script depends on xslt transformations. Right now I use a bit of a hack: command = 'xsltproc --param indent-amount %s %s %s > %s' % \ (indent_amount, xsl_file, file, output) os.system(command) This only works on unix, and it only works if the user has xsltproc. I want to make the script useable for different platforms, and ideally for different xslt processors. For example, if the user wants to use xalan, then the script uses xalan to process the document. thanks Paul -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From jedp at ilm.com Thu Jun 12 16:09:12 2003 From: jedp at ilm.com (Jed Parsons) Date: Thu Jun 12 18:09:29 2003 Subject: [XML-SIG] using xslt with python In-Reply-To: <20030612220235.GJ21763@localhost.localdomain> References: <20030612220235.GJ21763@localhost.localdomain> Message-ID: <16104.64008.446180.498870@danu.lucasdigital.com> Hi, Paul, You can do something like this: from Ft.Xml import InputSource from Ft.Xml.Xslt.Processor import Processor document = InputSource.DefaultFactory.fromUri(xmlfile) stylesheet = InputSource.DefaultFactory.fromUri(xsltfile) # there's also a fromString() method processor = Processor() processor.appendStylesheet(stylesheet) result = processor.run(document) Cheers, j Paul Tremblay writes: > Can someone give me some instructins on how to process and xslt > stylesheet with python? > > I have written a script that translates plain text to docbook. Much of > the script depends on xslt transformations. > > Right now I use a bit of a hack: > > command = 'xsltproc --param indent-amount %s %s %s > %s' % \ > (indent_amount, xsl_file, file, output) > os.system(command) > > This only works on unix, and it only works if the user has xsltproc. I > want to make the script useable for different platforms, and ideally for > different xslt processors. For example, if the user wants to use xalan, > then the script uses xalan to process the document. > > thanks > > Paul > > -- > > ************************ > *Paul Tremblay * > *phthenry@earthlink.net* > ************************ > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig -- Jed Parsons | Industrial Light and Magic (415) 448-2974 use Curses;initscr;for(;;){$f=($f+10)%360;clear;grep(do{$i=$ _;for(($m,$n)=qw(cos sin)){s|.*|"int(($i-13)*$&($f*(atan2(1, 1)*4)/180))"|ee}addstr$m+11,$n+31,substr$s,$i,1},0..(length( $s=unpack(qq'u',':2F5D)W,@86YO=&AE "from Jed Parsons at Jun 12, 2003 03:09:12 pm" Message-ID: <200306122217.h5CMHtc1020778@chilled.skew.org> Jed Parsons wrote: > > Hi, Paul, > > You can do something like this: > > from Ft.Xml import InputSource > from Ft.Xml.Xslt.Processor import Processor > > document = InputSource.DefaultFactory.fromUri(xmlfile) > stylesheet = InputSource.DefaultFactory.fromUri(xsltfile) > # there's also a fromString() method > > processor = Processor() > processor.appendStylesheet(stylesheet) > result = processor.run(document) > That is, after you've installed 4Suite... get it from 4suite.org. From brian at sweetapp.com Thu Jun 12 16:35:59 2003 From: brian at sweetapp.com (Brian Quinlan) Date: Thu Jun 12 18:35:14 2003 Subject: [XML-SIG] using xslt with python In-Reply-To: <20030612220235.GJ21763@localhost.localdomain> Message-ID: <007701c33132$ff36c090$21795418@dell1700> > This only works on unix, and it only works if the user has xsltproc. I > want to make the script useable for different platforms, and ideally for > different xslt processors. For example, if the user wants to use xalan, > then the script uses xalan to process the document. You can use Pyana to do Xalan transformations from Python: http://pyana.sourceforge.net/ import Pyana s = Pyana.transformToFile( Pyana.URI(file), Pyana.URI(xsl_file), output) Cheers, Brian From veillard at redhat.com Thu Jun 12 20:40:26 2003 From: veillard at redhat.com (Daniel Veillard) Date: Thu Jun 12 19:40:29 2003 Subject: [XML-SIG] using xslt with python In-Reply-To: <20030612220235.GJ21763@localhost.localdomain>; from phthenry@earthlink.net on Thu, Jun 12, 2003 at 06:02:35PM -0400 References: <20030612220235.GJ21763@localhost.localdomain> Message-ID: <20030612194026.J6487@redhat.com> On Thu, Jun 12, 2003 at 06:02:35PM -0400, Paul Tremblay wrote: > command = 'xsltproc --param indent-amount %s %s %s > %s' % \ > (indent_amount, xsl_file, file, output) > os.system(command) > > This only works on unix, and it only works if the user has xsltproc. I > want to make the script useable for different platforms, and ideally for > different xslt processors. For example, if the user wants to use xalan, > then the script uses xalan to process the document. You can make it work on Windows, and Unix by making sure your have libxml2 and libxslt python bindings installed too and using them without doing an exec. See http://xmlsoft.org/python.html and http://xmlsoft.org/XSLT/python.html . BTW xsltproc is ported to Windows, I don't see why this code would not work... 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 and-xml at doxdesk.com Fri Jun 13 12:17:35 2003 From: and-xml at doxdesk.com (Andrew Clover) Date: Fri Jun 13 07:27:34 2003 Subject: [XML-SIG] Documenting DOM bugs Message-ID: <20030613111735.GA8707@doxdesk.com> Reading the Python manual and XML HOWTO can lead new users into believing xml.dom will Just Work to spec. However this isn't really the case, and there's no proper documentation of all the gotchas DOM applications can run into. The PyXML bug tracker lists some of the problems but doesn't say which versions of which packages have them; the changelog lists some bugs, but usually rather vaguely. Add this to the difficulty in determining exactly what version of the XML tools is in use (most modules in the xml package do not provide any kind of version number; those that do can change without their version number being updated), and you've got a tricky situation for authors, especially authors of library modules that need to be compatible across different setups. For this reason I've compiled a table of support and bugs for DOM Level 2 Core/XML features that a typical DOM application might want to use. I've tested the minidoms supplied with common Python versions and PyXML packages, along with PyXML 4DOMs and - somewhat less thoroughly - the 4Suite Domlettes. I believe it would be helpful to put this sort of thing (with updates) somewhere fairly visible, to stop authors getting confused when their DOM applications don't work. (I haven't included any bugs to do with document types, internal subsets, validation, attribute normalisation or defaulting, which most simple DOM applications don't need, or any non-Core/XML feature.) You'll notice there are still a few problems listed here in current versions of PyXML DOMs: not as bad mistakes as existed in some of the old stuff, but compliance issues which seem to be caused by deliberate design decisions. Is there any interest in patching [clmpu]? Package: Python PyXML 4Suite Implementation: minidom minidom 4DOM cD pD FtM Package versions: 201 222 066 080 066 080 0111 0111 212 23a2 071 082 071 082 10a1 10a1 Features: namespace declarations a a * * * * * * bc c c c * * * * built-in xml namespace de de ef * de * * * * * * * * * * * Element.namespaceURI g * * * * * * * g * * * g * g * Element.prefix gh gh h h gh h h h g * * * g * g * Attr.namespaceURI g g * * g * * * g * * * g * g * Attr.prefix gh gh h h hi h h h g * * * g * g * Attr.childNodes j k k l k k l l * * * * l k l k NodeList.item, length - - * * - m m m * * * * - - - - NamedNodeMap.item, length * * * * * * * * * * * * - - * - NamedNodeMap.NamedItem[NS] - * * * * * * * * * * * - - - - Node.[previous|next]Sibling n * * * * * * * * * * * * * * * Node.insertBefore o * * * * * * * * * * * * * * * createElement/Attribute p p p p p p p p * * * * - - p - createElementNS/AttributeNS * * * * * * * * * * * * - * * * hasAttribute - * * * * * * * q * * * r - * - getAttribute s * * * * * * * q * * * r - * - getAttributeNode * * * * * * * * q * * * r - * - setAttribute s * * * * * * * q * * * - - - - setAttributeNode * * * * * * * * * * * * - - - - removeAttribute s * * * * * * * q * * * - - - - getAttributeNS s * * * * * * * * * * * t t t * getAttributeNodeNS s * * * * * * * * * * * t t t * setAttributeNS - * * * * * * * * * * * - * * * setAttributeNodeNS - * * * * * * * * * * * - * * * removeAttributeNS s * * * * * * * * * * * - t t * getElementsByTagName u u u u u u u u u u u u - - - - importNode - - - * - - * * * * * * - * - * cloneNode v * * * * * w * * * * * - * * * DocumentFragment - x * * x * * * * * * * - * * * DOMImplementation - * * * * * * * * * * * * * * * EntityReference - - - - - - - - y y y y - - - - Comment z z z * z z z * * * * * * * * * Key: *. ok -. no support a-z. bugs (blame). a. namespace declarations not included in resultant DOM. (dom.pulldom.PullDOM.StartPrefixMapping) b. for non-default namespace declarations, localName and prefix are the wrong way round. (dom.ext.__init__.SplitQName) c. for default namespace declarations, localName and prefix are the wrong way round. (dom.ext.__init__.SplitQName) d. does not split xml:... into a namespace attribute on non-root elements. (pyexpat) e. generates a KeyError on parsing xml:... in the documentElement (dom.pulldom.PullDOM._current_context) f. generates an IndexError on parsing xml:... in any element (sax.expatreader.ExpatParser._ns_stack) g. yields '' instead of None for null values. h. prefix is guessed from namespaceURI, not necessarily original prefix (consequence of using pyexpat with namespace processing on) i. yields '' instead of None for default namespace declarations. j. is None (xml.dom.minidom.Attr) k. always an empty list (xml.dom.minidom.Attr) l. Only read access works. In 4Suite 0.11.1's cDomlette the childNodes are at least readonly; in other DOMs changing the children puts the DOM into an inconsistent state. m. only provided when running under Python 2.2 or later (xml.dom.minidom.NodeList) n. Changes to the hierarchy caused my nodes being moved out when inserted into other places are not reflected in sibling pointers. (xml.dom.minidom.insertBefore etc.) o. insertBefore(..., None) doesn't work (xml.dom.minidom.insertBefore) p. Returns a node with localName set to its nodeName - localName should be null q. fails on documents with namespaces, you have to pass in (uri, local). (xml.dom.minidom) r. Never gets the attribute, always returns 0/''/None. (Ft.Lib.cDomlettec) s. exception raised on non-existant attribute instead of returning a null. (xml.dom.minidom.Node) t. Default namespace declarations are indexed as having a localName of ''/None even though their localName is, correctly, 'xmlns'. Because None cannot be passed as a localName in cDomlette 1.0a1, default namespace declarations become inaccessible. u. NodeLists returned by getElementsByTagName[NS] are not 'live' (xml.dom.minidom.NodeList etc.) v. raises AttributeError due to attempt to copy() a None or AttributeList (xml.dom.minidom.Node.cloneNode) w. fails with NameError when node is Attr, ProcessingInstruction, Comment, DocumentFragment or Document, or, when deep==True, when childNodes tree contains a ProcessingInstruction or Comment. (xml.dom.minidom._clone_node) x. insertion/replacement with fragments fails due to destructive list iteration. (xml.dom.minidom.Node.insertBefore, xml.dom.minidom.Node.appendChild) y. Document.createEntityReference returns EntityReference objects without the childNodes filled in. Entity references parsed from text are always replaced with their content; undefined entity references always cause an error. z. Comment objects exist but are not included in DOMs parsed from text. -- Andrew Clover mailto:and@doxdesk.com http://www.doxdesk.com/ From Alexandre.Fayolle at logilab.fr Fri Jun 13 15:06:24 2003 From: Alexandre.Fayolle at logilab.fr (Alexandre Fayolle) Date: Fri Jun 13 08:06:30 2003 Subject: [XML-SIG] Documenting DOM bugs In-Reply-To: <20030613111735.GA8707@doxdesk.com> References: <20030613111735.GA8707@doxdesk.com> Message-ID: <20030613120624.GF9246@calvin> On Fri, Jun 13, 2003 at 11:17:35AM +0000, Andrew Clover wrote: > For this reason I've compiled a table of support and bugs for DOM Level 2 > Core/XML features that a typical DOM application might want to use. I've > tested the minidoms supplied with common Python versions and PyXML packages, > along with PyXML 4DOMs and - somewhat less thoroughly - the 4Suite Domlettes. > I believe it would be helpful to put this sort of thing (with updates) > somewhere fairly visible, to stop authors getting confused when their DOM > applications don't work. Great job! I'm very impressed. This is indeed very precious information. Thanks a lot. -- Alexandre Fayolle LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org D?veloppement logiciel avanc? - Intelligence Artificielle - Formations From uche.ogbuji at fourthought.com Fri Jun 13 12:36:01 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Fri Jun 13 13:43:03 2003 Subject: [XML-SIG] Documenting DOM bugs In-Reply-To: Message from Andrew Clover of "Fri, 13 Jun 2003 11:17:35 -0000." <20030613111735.GA8707@doxdesk.com> Message-ID: <20030613173607.A2747134188@borgia.local> [SNIP] > For this reason I've compiled a table of support and bugs for DOM Level 2 > Core/XML features that a typical DOM application might want to use. I've > tested the minidoms supplied with common Python versions and PyXML packages, > along with PyXML 4DOMs and - somewhat less thoroughly - the 4Suite Domlettes. > I believe it would be helpful to put this sort of thing (with updates) > somewhere fairly visible, to stop authors getting confused when their DOM > applications don't work. Holy cow! This, my friend, is an extraordinary feat and a true mitzvah. Thanks a million. Do you have a moment to comment on your testing mthodology, and perhaps even to ost the scripts you used? It feels as if you have a lot more goodies than just this comprehnsive table. > h. prefix is guessed from namespaceURI, not necessarily original prefix > (consequence of using pyexpat with namespace processing on) Yes. this is a tough one. In cDomlette we decided to manage the namespace decls urselves, just to avoid losing information, but it is a very tedious chore, and I'm not sure I'd wish it on any pyexpat developer. > k. always an empty list > (xml.dom.minidom.Attr) Yes. This is a consequence of the fact that when the DOM and XPath models clash, we plump for XPth. The primary purpose of the Domlettes is to be as complete and efficient as we can for XPath while maintaining as much of the feel of DOM as we can. The problem here is that attribute nodes don't have children in the XPath data model. > l. Only read access works. In 4Suite 0.11.1's cDomlette the childNodes are > at least readonly; in other DOMs changing the children puts the DOM into > an inconsistent state. This sounds like a current bug. Could you check a repro case into the tracker? > m. only provided when running under Python 2.2 or later > (xml.dom.minidom.NodeList) Current bug. > p. Returns a node with localName set to its nodeName - localName should be > null Current bug. > t. Default namespace declarations are indexed as having a localName of > ''/None even though their localName is, correctly, 'xmlns'. Because > None cannot be passed as a localName in cDomlette 1.0a1, default namespace > declarations become inaccessible. Thnaks. I'll try to track this one down. > u. NodeLists returned by getElementsByTagName[NS] are not 'live' > (xml.dom.minidom.NodeList etc.) I don't expect us to ever have live return from getElementsByTagName or the NodeIterator interfaces. I've agued ont he www-dom list that t's too much to ask a non-browser DOM impl. es, Xerces dos it with some heroic effort. I'm not sure we'd have a victim to do so for PyXML, and even if so, I'd be worried about its effect on performance. Thanks again. Incredible effort. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com XML Data Bindings in Python - http://www.xml.com/pub/a/2003/06/11/py-xml.html Introducing Examplotron - http://www-106.ibm.com/developerworks/xml/library/x-xmptron/ Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.html The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x-think18.html A custom-fit career in app development - http://www.adtmag.com/article.asp?id=7744 From martin at v.loewis.de Fri Jun 13 21:43:32 2003 From: martin at v.loewis.de (Martin v. =?iso-8859-15?q?L=F6wis?=) Date: Fri Jun 13 16:43:33 2003 Subject: [XML-SIG] Documenting DOM bugs In-Reply-To: <20030613111735.GA8707@doxdesk.com> References: <20030613111735.GA8707@doxdesk.com> Message-ID: Andrew Clover writes: > For this reason I've compiled a table of support and bugs for DOM Level 2 > Core/XML features that a typical DOM application might want to use. I've > tested the minidoms supplied with common Python versions and PyXML packages, > along with PyXML 4DOMs and - somewhat less thoroughly - the 4Suite Domlettes. > I believe it would be helpful to put this sort of thing (with updates) > somewhere fairly visible, to stop authors getting confused when their DOM > applications don't work. I'd be happy to put this either into the PyXML howto, or on a web page of its own. Please let me know what your SF id is so I can you give write access to the Web page. Regards, Martin From phthenry at earthlink.net Sat Jun 14 01:58:41 2003 From: phthenry at earthlink.net (Paul Tremblay) Date: Sat Jun 14 01:08:24 2003 Subject: [XML-SIG] using xslt with python In-Reply-To: <200306122217.h5CMHtc1020778@chilled.skew.org> References: <16104.64008.446180.498870@danu.lucasdigital.com> <200306122217.h5CMHtc1020778@chilled.skew.org> Message-ID: <20030614045841.GA14795@localhost.localdomain> On Thu, Jun 12, 2003 at 04:17:55PM -0600, Mike Brown wrote: > From: Mike Brown > Subject: Re: [XML-SIG] using xslt with python > To: jedp@ilm.com > Date: Thu, 12 Jun 2003 16:17:55 -0600 (MDT) > Cc: Paul Tremblay , xml-sig@python.org > > Jed Parsons wrote: > > > > Hi, Paul, > > > > You can do something like this: > > > > from Ft.Xml import InputSource > > from Ft.Xml.Xslt.Processor import Processor > > > > document = InputSource.DefaultFactory.fromUri(xmlfile) > > stylesheet = InputSource.DefaultFactory.fromUri(xsltfile) > > # there's also a fromString() method > > > > processor = Processor() > > processor.appendStylesheet(stylesheet) > > result = processor.run(document) > > > > > That is, after you've installed 4Suite... get it from 4suite.org. Downloaded and installed with no problem. But now I am sure I already saw the FT in my site-packages. How did that get there--when I installed PyXml? thanks Paul -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From phthenry at earthlink.net Sat Jun 14 02:05:08 2003 From: phthenry at earthlink.net (Paul Tremblay) Date: Sat Jun 14 01:08:29 2003 Subject: [XML-SIG] using xslt with python In-Reply-To: <20030612194026.J6487@redhat.com> References: <20030612220235.GJ21763@localhost.localdomain> <20030612194026.J6487@redhat.com> Message-ID: <20030614050508.GB14795@localhost.localdomain> On Thu, Jun 12, 2003 at 07:40:26PM -0400, Daniel Veillard wrote: > > You can make it work on Windows, and Unix by making sure your have > libxml2 and libxslt python bindings installed too and using them without > doing an exec. See http://xmlsoft.org/python.html and > http://xmlsoft.org/XSLT/python.html . > > BTW xsltproc is ported to Windows, I don't see why this code would > not work... > The first link didn't prove helpful. It did lead me to the software, but after a successful build and install, I could not use the script, even when I followed the author's instructions. The second link did the trick. Apparently, I already had the bindings module installed: stylesheet = '/home/paul/.rst_to_docbook/xslt_stylesheets/reStruct_field_names.xsl' xml_doc = '/home/paul/.rst_to_docbook/debug/converted_to_args_info' styledoc = libxml2.parseFile(stylesheet) style = libxslt.parseStylesheetDoc(styledoc) doc = libxml2.parseFile(xml_doc) result = style.applyStylesheet(doc, None) style.saveResultToFilename("/home/paul/foo.xml", result, 0) style.freeStylesheet() doc.freeDoc() result.freeDoc() # code runs successfully How di the binding get in my site-packages? Are they installed with PyXml? Or do you think Mandrake linux might have put them there? Last, what is the advantage to using the above code as opposed to using: file_handle = os.popen('xsltproc xsl_file, xml_file) ? If you claim that xsltproc ports to Windows, it seems the os.popen option would almost be simpler. Both methods work on my linux box. I am striving for the method with the most compatibility. thanks Paul -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From phthenry at earthlink.net Sat Jun 14 02:16:18 2003 From: phthenry at earthlink.net (Paul Tremblay) Date: Sat Jun 14 01:15:59 2003 Subject: [XML-SIG] re: using xslt with python Message-ID: <20030614051618.GC14795@localhost.localdomain> Thanks everyone for their help. I was looking for a general rule to help me use xslt with pyton. I got more specific examples, which proved more useful. I can get xslt proccessing to work with: * 4suit * xsltproc (xmllint library) * xalan (well, not yet, but I'm trying!) The main xslt processor not on the list is Saxon. Any links here? Any processors I am missing? Thanks Paul -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From phthenry at earthlink.net Sat Jun 14 04:14:32 2003 From: phthenry at earthlink.net (Paul Tremblay) Date: Sat Jun 14 03:12:42 2003 Subject: [XML-SIG] using xslt with python In-Reply-To: <20030612194026.J6487@redhat.com> References: <20030612220235.GJ21763@localhost.localdomain> <20030612194026.J6487@redhat.com> Message-ID: <20030614071432.GD14795@localhost.localdomain> On Thu, Jun 12, 2003 at 07:40:26PM -0400, Daniel Veillard wrote: > > On Thu, Jun 12, 2003 at 06:02:35PM -0400, Paul Tremblay wrote: > > command = 'xsltproc --param indent-amount %s %s %s > %s' % \ > > (indent_amount, xsl_file, file, output) > > os.system(command) > > > > This only works on unix, and it only works if the user has xsltproc. I > > want to make the script useable for different platforms, and ideally for > > different xslt processors. For example, if the user wants to use xalan, > > then the script uses xalan to process the document. > > You can make it work on Windows, and Unix by making sure your have > libxml2 and libxslt python bindings installed too and using them without > doing an exec. See http://xmlsoft.org/python.html and > http://xmlsoft.org/XSLT/python.html . Could you pleae give me an example of how to pass params using the bindings? I have tried in vain for an hour. thanks Paul -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From cstrong at arielpartners.com Sat Jun 14 12:53:16 2003 From: cstrong at arielpartners.com (Craeg Strong) Date: Sat Jun 14 14:05:34 2003 Subject: =?iso-8859-1?Q?Re:_[XML-SIG]_re:_using_xslt_with_python?= Message-ID: <200306141603.h5EG3QfE003234@conversent.net> There a couple more that are quite popular. See the list as well as sample usage here: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/zopexmlmethods/zopexmlmethods/processors/ Hope that helps, --Craeg > Thanks everyone for their help. > > I was looking for a general rule to help me use xslt with pyton. I got > more specific examples, which proved more useful. > > I can get xslt proccessing to work with: > > * 4suit > * xsltproc (xmllint library) > * xalan (well, not yet, but I'm trying!) > > The main xslt processor not on the list is Saxon. Any links here? Any > processors I am missing? > > Thanks > > Paul > > > > -- > > ************************ > *Paul Tremblay * > *phthenry@earthlink.net* > ************************ > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig > From mike at skew.org Sat Jun 14 16:48:52 2003 From: mike at skew.org (Mike Brown) Date: Sat Jun 14 17:48:58 2003 Subject: [XML-SIG] using xslt with python In-Reply-To: <20030614045841.GA14795@localhost.localdomain> "from Paul Tremblay at Jun 14, 2003 00:58:41 am" Message-ID: <200306142148.h5ELmqSv030760@chilled.skew.org> Paul Tremblay wrote: > Downloaded and installed with no problem. > > But now I am sure I already saw the FT in my site-packages. How did that > get there--when I installed PyXml? Not unless someone is packaging them together. *shrug* At least this time, you know you installed it, and what version it is... From phthenry at earthlink.net Sat Jun 14 21:06:43 2003 From: phthenry at earthlink.net (Paul Tremblay) Date: Sat Jun 14 20:04:48 2003 Subject: [XML-SIG] using xslt with python In-Reply-To: <20030614071432.GD14795@localhost.localdomain> References: <20030612220235.GJ21763@localhost.localdomain> <20030612194026.J6487@redhat.com> <20030614071432.GD14795@localhost.localdomain> Message-ID: <20030615000643.GG14795@localhost.localdomain> On Sat, Jun 14, 2003 at 03:14:32AM -0400, Paul Tremblay wrote: > > On Thu, Jun 12, 2003 at 07:40:26PM -0400, Daniel Veillard wrote: > > Could you pleae give me an example of how to pass params using the > bindings? I have tried in vain for an hour. > Okay, I finally got it about 3:00 am last night. I found the answer in the section of your tutorial on writing your own extensions. This is what I have: def __transform_xmllint(self, file, xsl_file, output, params = {}): import libxml2 import libxslt new_params = {} keys = params.keys() for key in keys: new_params[key] = '"%s"' % params[key] params = new_params xml_doc = file # parse stylesheet styledoc = libxml2.parseFile(xsl_file) style = libxslt.parseStylesheetDoc(styledoc) # parse doc doc = libxml2.parseFile(xml_doc) result = style.applyStylesheet(doc, params) style.saveResultToFilename(output, result, 0) style.freeStylesheet() doc.freeDoc() result.freeDoc() Would it be possible for you to make this more explicit in your otherwise very clear tutorial? I was unclear on two things: 1. where to pass the params option 2. the form of the params option. Now I realize it is a dictionary. You wrote that you have to escape the value in the dictinary pair, but escaping can mean different things to different people. (For example, \escaped.) Thaks for your efforts Paul -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From noreply at sourceforge.net Sat Jun 14 18:43:51 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Sat Jun 14 20:43:57 2003 Subject: [XML-SIG] [ pyxml-Bugs-754713 ] minidom Attr value and childNodes don't tie up Message-ID: Bugs item #754713, was opened at 2003-06-15 00:43 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=754713&group_id=6473 Category: DOM Group: None Status: Open Resolution: None Priority: 5 Submitted By: Andrew Clover (bobince) Assigned to: Nobody/Anonymous (nobody) Summary: minidom Attr value and childNodes don't tie up Initial Comment: minidom allows the childNodes of an Attr to be altered, but changes to childNodes do not update the attribute's value. Writing to the attribute's value assumes the Attr has exactly one child node (of nodeType Text). If this is not the case the child nodes will be updated wrongly; if there are no child nodes minidom raises IndexError. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=754713&group_id=6473 From and-xml at doxdesk.com Sun Jun 15 01:40:18 2003 From: and-xml at doxdesk.com (Andrew Clover) Date: Sat Jun 14 20:50:20 2003 Subject: [XML-SIG] Documenting DOM bugs In-Reply-To: <20030613173607.A2747134188@borgia.local> References: <20030613111735.GA8707@doxdesk.com> <20030613173607.A2747134188@borgia.local> Message-ID: <20030615004018.GA28963@doxdesk.com> Uche Ogbuji wrote: > Do you have a moment to comment on your testing mthodology, and perhaps even > to ost the scripts you used? No scripts I'm afraid! My testing methodology is to see whether my DOM apps work with an implementation, and if not find out why not and which other versions have the same behaviour. I didn't set out to document bugs, just get my stuff working. ;-) > It feels as if you have a lot more goodies than just this comprehnsive > table. Not so much; I know there are a fair few problems with DTD-related features, but haven't investigated too hard as I don't really necessarily except a DOM to provide them (especially given the limited and occasionally woolly spec wording in this area). I've seen a few serialisation issues too but that doesn't concern me enough to check up on, as I'm not using it (and it's not a Core feature anyway). > changing [Attr's] children puts the DOM into an inconsistent state. > This sounds like a current bug. Could you check a repro case into the > tracker? Sure. (#754713) > I don't expect us to ever have live return from getElementsByTagName or the > NodeIterator interfaces. OK. I had kind of expected this for an imp like minidom, but 4DOM was a surprise - can this be clearly documented somewhere? cheers, -- Andrew Clover mailto:and@doxdesk.com http://www.doxdesk.com/ From Jean-Michel.Bruel at univ-pau.fr Mon Jun 16 12:01:33 2003 From: Jean-Michel.Bruel at univ-pau.fr (Jean-Michel BRUEL) Date: Mon Jun 16 05:02:19 2003 Subject: [XML-SIG] [CFP:] Metamodelling for MDA Message-ID: <200306160901.h5G91Xn22888@univ-pau.fr> [apologies if you receive multiple copies of this announcement] Metamodelling for MDA First Call for Papers November 24th - 25th York, England http://www.cs.york.ac.uk/metamodel4mda ============================== Background ========= The OMG Model Driven Architecture (MDA) promises to be a revolutionary step in software engineering, by making models primary artefacts and thus raising the level of abstraction in the software development process. Whilst a lot of focus has been given to the transformation of platform-independent models to platform-specific models, the scope of MDA potentially covers the modelling of all aspects of a system throughout its lifecycle. Metamodelling provides the foundation for this vision, by enabling meaningful metamodels of languages to be defined precisely and unified in a consistent framework. To this end, the OMG's Meta-Object Facility (MOF) is stipulated as the language in which all languages for MDA are expressed. As another iteration of the UML revision process nears completion however, many issues have been raised concerning the means by which MOF is applied, such that languages constructed to support MDA are reusable, flexible and meaningful. This workshop then aims to investigate the fundamental principles, tools and techniques that are needed for the metamodelling of languages, in order to provide a foundation for MDA and the long-term future for the role of modelling in software development. Scope & topics =========== This two day workshop is aimed at anyone within industry or academia who recognises that MDA is founded upon rigorous metamodelling. The workshop seeks to explore the theories, principles and practice by which language metamodels are constructed, transformed, related and used to support MDA. It also aims to highlight lessons that have been learned from putting these theories and principles into practice, and investigate the next generation of tools that are needed to fully realise the MDA vision. It is anticipated that some of the paper contributions will be published as a book.Potential topics include (but are not limited to) the following:- - Principles and mechanisms for constructing language metamodels o Principles (e.g. reuse, separation of concerns) o Mechanisms (e.g. layered architecture, templates, product lines) o Language components (e.g. semantics, user notation) - Architectures for MDA o The metamodelling architecture (e.g reflection, layering) o Requirements for future extensions to MOF o Families of languages (e.g. profile mechanisms, product lines) - Concrete languages o Mappings languages (including QVT) o Executable modelling languageso Domain specific languages (e.g. real-time, systems engineering) o Ontologies and metadata (including semantic web, RDF) - Tools for metamodelling o Meta virtual machines and executable modelling languages o Implementation issues for metamodelling tools (e.g. efficiency) o Model interchange and tool interconnectivity o Metamodelling tool architectures and tool factories Submission details ============== We invite two types of submission. Full papers will be no longer than 15 pages and will be reviewed thoroughly. Position papers will communicate individuals' perspectives on MDA and will be subjected to a lighter reviewer process. The latter should be no more than 2 pages. All accepted papers will be included in a workshop technical report. All papers must be submitted via website (URL at top of message) by the 1st August 2003. Important dates =========== Deadline for all submissions: 1st August 2003 Notification to authors: 26th September 2003 Final version of papers: 24th October 2003 From veillard at redhat.com Mon Jun 16 06:56:34 2003 From: veillard at redhat.com (Daniel Veillard) Date: Mon Jun 16 05:56:38 2003 Subject: [XML-SIG] using xslt with python In-Reply-To: <20030614050508.GB14795@localhost.localdomain>; from phthenry@earthlink.net on Sat, Jun 14, 2003 at 01:05:08AM -0400 References: <20030612220235.GJ21763@localhost.localdomain> <20030612194026.J6487@redhat.com> <20030614050508.GB14795@localhost.localdomain> Message-ID: <20030616055634.A16964@redhat.com> On Sat, Jun 14, 2003 at 01:05:08AM -0400, Paul Tremblay wrote: > The second link did the trick. Apparently, I already had the bindings > module installed: [...] > How di the binding get in my site-packages? Are they installed with > PyXml? Or do you think Mandrake linux might have put them there? yes, module libxml2-python and libxslt-python > Last, what is the advantage to using the above code as opposed to using: > > file_handle = os.popen('xsltproc xsl_file, xml_file) performances mostly, your application doesn't have to fork(), exec() then reload all the shared libraries to then run the transformation. Also using the python module you get the tree directly you don't have to reparse it if you're interested in the result tree and not the serailization of the result. > If you claim that xsltproc ports to Windows, it seems the os.popen > option would almost be simpler. definitely 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 veillard at redhat.com Mon Jun 16 07:00:04 2003 From: veillard at redhat.com (Daniel Veillard) Date: Mon Jun 16 06:00:07 2003 Subject: [XML-SIG] using xslt with python In-Reply-To: <20030614071432.GD14795@localhost.localdomain>; from phthenry@earthlink.net on Sat, Jun 14, 2003 at 03:14:32AM -0400 References: <20030612220235.GJ21763@localhost.localdomain> <20030612194026.J6487@redhat.com> <20030614071432.GD14795@localhost.localdomain> Message-ID: <20030616060004.B16964@redhat.com> On Sat, Jun 14, 2003 at 03:14:32AM -0400, Paul Tremblay wrote: > Could you pleae give me an example of how to pass params using the > bindings? I have tried in vain for an hour. I don't remember right now, asking on the libxslt@gnome.org list sounds the right thing , it's probably a dictionary which need to be passed, 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 Philippe.Hunel at martinique.univ-ag.fr Mon Jun 16 23:49:39 2003 From: Philippe.Hunel at martinique.univ-ag.fr (Philippe Hunel) Date: Mon Jun 16 16:50:34 2003 Subject: [XML-SIG] [CFP:] OPODIS'03] Message-ID: <200306162049.h5GKndp16794@univ-pau.fr> (Apologies if you receive multiple copies of this announcement) -------------------------------------------------------------- Call For Papers 7th International Conference On Principles of Distributed Systems: OPODIS 2003 December 10-13 2003, La Martinique, France http://www.cs.chalmers.se/~dcs/OPODIS03/ The 7th Interantional Conference On Principles of Distributed Systems (OPODIS'03) will be held at La Martinique (French West Indies), during December 10-13, 2003, and is co-organized by the Université des Antilles et de la Guyane, La Martinique, France and Chalmers University of Technology, Sweden. It is an open forum for the exchange of state-of-the-art knowledge on distributed computing and systems among researchers from around the world. This conference is the 7th in a series of annual conferences. Following the tradition of the previous organizations, its program will be composed of high-quality contributed and invited papers by experts of international caliber in this scientific area. The program committee is soliciting research contributions to the theory, specifications, design and implementation of distributed systems, including: - distributed and multiprocessor algorithms - communication and synchronization protocols - coordination and consistency protocols - self-stabilization, reliability and fault-tolerance of distributed systems - performance analysis of distributed algorithms and systems - specification verification of distributed systems - security issues in distributed computing and systems - applications of distributed computing, such as distributed collaborative environments, peer-to-peer systems, cluster and grid computing. Paper Submission ---------------- Submitted papers must be written in english and should not exceed 12 pages using 11-point font and reasonable margins, including figures, tables and references. The first page must include the title of the paper, author(s) names and affiliation, postal address, fax number, email, address for correspondence, up to 5 keywords and an abstract. Authors are strongly encouraged to submit their papers electronically, following the guidelines available via the web-page Authors who cannot submit electronically must contact the program committee co-chairs at opodis03@cs.chalmers.se Selection of contributions will be based on peer-review by the Conference Programme Committee. Accepted papers will be published in the official proceedings volume of the conference. It is required that each accepted paper be presented at the conference by one of its authors. There is a pending proposal regarding the publication of the conference proceedings by a major publishing organization. The outcome, together with the camera-ready-due-date, will be available in the final call for papers. For any further information, please contact us at : opodis03@cs.chalmers.se Important dates * Submissions due by: August 22, 2003 * Notification of acceptance by: October 13, 2003 * Camera ready copy due by: (to be announced) Program Committee Mustaque Ahamad (Georgia Inst. of Technology, USA) Joffroy Beauquier (Univ. Paris 11, France) Alain Bui (Univ. Reims Champagne-Ardenne, France) Marc Bui (Univ. Paris 8, France) Osvaldo Carvalho (Univ. Fed. Minas Geras, Brazil) Bernadette Charron-Bost (Laboratoire d'Informatique, LIX, France) Hacene Fouchal (Univ. Reims Champagne-Ardenne, France) Roberto Gomez-Cardenas (CEM-ITESM, Mexico) Hans Hansson (Mälardalen University, Sweden) Ted Herman (University of Iowa, USA) Teruo Higashino (Osaka Univ., Japan) Philippe Hunel (Un. of Antilles-Guyane, France -- Co-chair) Colette Johnen (LRI, CNRS-Université Paris-Sud, France) Christian Lavault (LIPN (CNRS UMR 7030), Univ. Paris 13, France) Toshimitisu Masuzawa (Osaka Univ., Japan) Jean-Franois Méhaut (Univ. of Antilles-Guyane, Martinique-France) Dominique Mery (Université Henri Poincaré & LORIA, France) Marina Papatriantafilou (Chalmers Univ., Sweden -- Co-chair) Luis Rodrigues (University of Lisbon, Portugal) Nicola Santoro (Carleton Univ. , Canada) Alex Shvartsman (Univ. of Connecticut/MIT, USA) Philippas Tsigas (Chalmers Univ., Sweden) Vincent Villain (Univ. Picardie Jules Verne, France) Organizing Committee Hacene Fouchal (Univ. Reims Champagne-Ardenne, France) Philippe Hunel (Univ. of Antilles-Guyane, Martinique-France) Richard Nock Univ. of Antilles-Guyane, Martinique-France) Marina Papatriantafilou (Chalmers Univ., Sweden) Jean-Emile Symphor Univ. of Antilles-Guyane, Martinique-France) Yi Zhang (Chalmers Univ., Sweden) From arnoud.balhuizenkgef at bhpbilliton.com Fri Jun 20 21:33:59 2003 From: arnoud.balhuizenkgef at bhpbilliton.com (arnoud.balhuizenkgef@bhpbilliton.com) Date: Tue Jun 17 17:48:33 2003 Subject: [XML-SIG] see what it can do for you Message-ID: <89457509851c$c3d7a899$0302339a@l.v> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20030620/ab51613c/attachment.htm From noreply at sourceforge.net Fri Jun 20 04:22:43 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Jun 20 06:22:47 2003 Subject: [XML-SIG] [ pyxml-Patches-757799 ] XmlWriter.processingInstruction() Message-ID: Patches item #757799, was opened at 2003-06-20 10:22 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=306473&aid=757799&group_id=6473 Category: SAX Group: None Status: Open Resolution: None Priority: 5 Submitted By: Paul Ross (apaulross) Assigned to: Nobody/Anonymous (nobody) Summary: XmlWriter.processingInstruction() Initial Comment: There is a minor bug in this that gives the traceback: File "testxmlwriter.py", line 11, in ? myXml.processingInstruction('target', 'data=asd') File "D:\apps\python\Lib\site- packages\_xmlplus\sax\writer.py", line 392, in processingInstruction self._offset = len(s) - (p + 1) NameError: global name 'p' is not defined Moving 'pos' up a couple of lines and renaming it 'p' seems to fix it (also one line of indenting at the first 'else' fixed): def processingInstruction(self, target, data): s = "%s%s %s%s" % (self.__syntax.pio, target, data, self.__syntax.pic) prefix = self._prefix[:-self.indentation] \ + (" " * self.indentEndTags) p = string.rfind(s, "\n") if "\n" in s: if self._flowing and not self._packing: self._write(prefix + s + "\n") self._offset = 0 else: self._write(s) self._offset = len(s) - (p + 1) elif self._flowing and not self._packing: self._write(prefix + s + "\n") self._offset = 0 else: self._write(s) self._offset = len(s) - (p + 1) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=306473&aid=757799&group_id=6473 From jedp at ilm.com Mon Jun 23 17:01:03 2003 From: jedp at ilm.com (Jed Parsons) Date: Mon Jun 23 19:01:12 2003 Subject: [XML-SIG] specifying xsl:version number with 4xslt Message-ID: <16119.34479.655285.909258@danu.lucasdigital.com> I'm so confused. Stylesheets I used with 4Suite 0.12.0a2 break with 0a3. For example, with the following two files: ---- file: dummy.xml ---- ---- file: test.xsl ---- ---- > 4xslt -V 4XSLT, from 4Suite 0.12.0a3 > 4xslt dummy.xml test.xsl In stylesheet file:/home/jedp/xsl/test.xsl, line 7, column 0: Document root element must have a xsl:version attribute. (see XSLT Spec: 2.3). Help! What am I doing wrong? Thanks for any help, j -- Jed Parsons / Industrial Light + Magic : 415.448.2974 grep(do{for(ord){$o+=$_&7;grep(vec($j,+$o++,1)=1,5..($_>>3||print"$j\n"))}}, (split(//,"))*))2+29*2:.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:\7Glug!"))); From uche.ogbuji at fourthought.com Mon Jun 23 21:29:02 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Mon Jun 23 22:30:42 2003 Subject: [XML-SIG] specifying xsl:version number with 4xslt In-Reply-To: Message from Jed Parsons of "Mon, 23 Jun 2003 16:01:03 PDT." <16119.34479.655285.909258@danu.lucasdigital.com> Message-ID: <20030624022908.A985413383E@borgia.local> > > I'm so confused. Stylesheets I used with 4Suite 0.12.0a2 break with > 0a3. For example, with the following two files: > > ---- file: dummy.xml ---- > > > > ---- file: test.xsl ---- > > xsl:version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > > > Hmmm? This should never have worked with any version of 4Suite 0.12.0. It is invalid XSLT. You mean You only qualify the version name if you're using literal result as element (if you're not familiar with that trick, don't give it a thought :-) ). BTW a newer version is out: 1.0a1. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com XML Data Bindings in Python - http://www.xml.com/pub/a/2003/06/11/py-xml.html Introducing Examplotron - http://www-106.ibm.com/developerworks/xml/library/x-x mptron/ Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x -think18.html A custom-fit career in app development - http://www.adtmag.com/article.asp?id=7 744 From cs at comlounge.net Tue Jun 24 14:27:21 2003 From: cs at comlounge.net (Christian Scholz) Date: Tue Jun 24 07:27:58 2003 Subject: [XML-SIG] Problem with wddx marshaller Message-ID: <20030624132721.Y15838@central> Hi! I am trying to read some data from a server in wddx format. This actually fails because it contains umlauts which IMHO shouldn't fail as long as the encoding is set right. I tried the same with DOM and this parser reads it without problems. Here is my failing test script: ----------------------------------------------------------- from xml.marshal.wddx import loads from xml.dom.minidom import parseString from xml.dom.ext import PrettyPrint s="""
dummyname Gr?hlkinder
""" print "testing dom" doc=parseString(s) PrettyPrint(doc) print "testing wddx" print loads(s) ----------------------------------------------------------- So the first call is successful and it gets pretty printed and the loads() call is failing with: Traceback (most recent call last): File "./xmlbug.py", line 27, in ? print loads(s) File "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/marshal/wddx.py", line 272, in loads return WDDXUnmarshaller().loads(string) File "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/marshal/generic.py", line 321, in loads return m._load(file) File "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/marshal/generic.py", line 331, in _load p.parseFile(file) File "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/sax/drivers/drv_pyexpat.py", line 68, in parseFile if self.parser.Parse(buf, 0) != 1: File "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/sax/drivers/drv_pyexpat.py", line 49, in endElement self.doc_handler.endElement(name) File "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/marshal/generic.py", line 381, in endElement em(name) File "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/marshal/generic.py", line 409, in um_end_string ds[-1] = str(string.join(ds[-1], "")) UnicodeError: ASCII encoding error: ordinal not in range(128) So is this a (maybe known) bug or am I doing something wrong? (might fix it if I'd know where to start.. might look into this..) FYI: PyXML 0.8.2 with Python 2.1.3 on linux is used. regards, Christian -- COM.lounge http://comlounge.net/ communication & design info@comlounge.net From fredrik at pythonware.com Tue Jun 24 15:15:46 2003 From: fredrik at pythonware.com (Fredrik Lundh) Date: Tue Jun 24 08:15:56 2003 Subject: [XML-SIG] Re: Problem with wddx marshaller References: <20030624132721.Y15838@central> Message-ID: Christian Scholz wrote: > I am trying to read some data from a server in wddx format. This > actually fails because it contains umlauts which IMHO shouldn't fail > as long as the encoding is set right. > File "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/marshal/generic.py", line 409, in um_end_string > ds[-1] = str(string.join(ds[-1], "")) > UnicodeError: ASCII encoding error: ordinal not in range(128) > > So is this a (maybe known) bug or am I doing something wrong? > (might fix it if I'd know where to start.. what happens if you remove the str() call from line 409 of generic.py: ds[-1] = string.join(ds[-1], "") From giuseppe.bonelli at tiscalinet.it Tue Jun 24 15:16:46 2003 From: giuseppe.bonelli at tiscalinet.it (Giuseppe Bonelli) Date: Tue Jun 24 08:17:20 2003 Subject: [XML-SIG] Problem with wddx marshaller Message-ID: have a look to line 408 in $Python/_xmlplus/marshal/generic.py and you'll find a nice comment (thanks to the kind developer for this !) which says: # might need to convert unicode string to byte string So, the DS is actually UTF-8 and not iso-8859-1. I would patch as follows (no test done, though): def um_end_string(self, name): ds = self.data_stack # might need to convert unicode string to byte string ds = ds.encode('iso-8859-1') # <-------------------------- patch to convert to iso-8859-1 # Probably ds.encode(encoding) works as well, provided your encoding # variable is set correctly ds[-1] = str(string.join(ds[-1], "")) self.accumulating_chars = 0 Hope this helps, --Giuseppe Bonelli > -----Original Message----- > From: xml-sig-bounces+giuseppe.bonelli=tiscali.it@python.org > [mailto:xml-sig-bounces+giuseppe.bonelli=tiscali.it@python.org > ]On Behalf > Of Christian Scholz > Sent: marted? 24 giugno 2003 13.27 > To: xml-sig@python.org > Subject: [XML-SIG] Problem with wddx marshaller > > > Hi! > > I am trying to read some data from a server in wddx format. > This actually > fails because it contains umlauts which IMHO shouldn't fail as long as > the encoding is set right. > I tried the same with DOM and this parser reads it without problems. > > Here is my failing test script: > > ----------------------------------------------------------- > > from xml.marshal.wddx import loads > from xml.dom.minidom import parseString > from xml.dom.ext import PrettyPrint > > s=""" > >
> > > > dummyname > > > Gr?hlkinder > > > >
""" > > print "testing dom" > doc=parseString(s) > PrettyPrint(doc) > > print "testing wddx" > print loads(s) > > ----------------------------------------------------------- > > So the first call is successful and it gets pretty printed and > the loads() call is failing with: > > Traceback (most recent call last): > File "./xmlbug.py", line 27, in ? > print loads(s) > File > "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/mar > shal/wddx.py", line 272, in loads > return WDDXUnmarshaller().loads(string) > File > "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/mar > shal/generic.py", line 321, in loads > return m._load(file) > File > "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/mar > shal/generic.py", line 331, in _load > p.parseFile(file) > File > "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/sax > /drivers/drv_pyexpat.py", line 68, in parseFile > if self.parser.Parse(buf, 0) != 1: > File > "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/sax > /drivers/drv_pyexpat.py", line 49, in endElement > self.doc_handler.endElement(name) > File > "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/mar > shal/generic.py", line 381, in endElement > em(name) > File > "/opt/Zope/python/213/lib/python2.1/site-packages/_xmlplus/mar > shal/generic.py", line 409, in um_end_string > ds[-1] = str(string.join(ds[-1], "")) > UnicodeError: ASCII encoding error: ordinal not in range(128) > > > So is this a (maybe known) bug or am I doing something wrong? > (might fix it if I'd know where to start.. might look into this..) > > FYI: PyXML 0.8.2 with Python 2.1.3 on linux is used. > > regards, > Christian > > -- > COM.lounge > http://comlounge.net/ > communication & design > info@comlounge.net > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig > From cs at comlounge.net Tue Jun 24 15:20:54 2003 From: cs at comlounge.net (Christian Scholz) Date: Tue Jun 24 08:21:33 2003 Subject: [XML-SIG] Problem with wddx marshaller In-Reply-To: ; from Giuseppe Bonelli on Tue, Jun 24, 2003 at 02:16:46PM +0200 References: Message-ID: <20030624142054.A15838@central> Hi! > have a look to line 408 in $Python/_xmlplus/marshal/generic.py > > and you'll find a nice comment (thanks to the kind developer for this !) > which says: > # might need to convert unicode string to byte string Well, also detected it then ;-) > So, the DS is actually UTF-8 and not iso-8859-1. Also with utf-8 it wasn't working because it then uses str() on it. > I would patch as follows (no test done, though): > > def um_end_string(self, name): > ds = self.data_stack > # might need to convert unicode string to byte string > ds = ds.encode('iso-8859-1') # <-------------------------- patch to > convert to iso-8859-1 Was also my thought to make it work with my specific application. Though not the best one, I guess. > # Probably ds.encode(encoding) works as well, provided your > encoding > # variable is set correctly Yes, thought about this but wondered from where I get this variable. Actually I never looked into the pyxml sources and thus am not so familiar with it ;-) I now fixed it as Fredrick suggested and removed the str(). If still some error might come up I might use the fixed encoding stuff. Thanks for the quick answers! Christian From cs at comlounge.net Tue Jun 24 15:28:28 2003 From: cs at comlounge.net (Christian Scholz) Date: Tue Jun 24 08:29:05 2003 Subject: [XML-SIG] Re: Problem with wddx marshaller In-Reply-To: ; from Fredrik Lundh on Tue, Jun 24, 2003 at 02:15:46PM +0200 References: <20030624132721.Y15838@central> Message-ID: <20030624142828.B15838@central> Hi! > what happens if you remove the str() call from line 409 of generic.py: > > ds[-1] = string.join(ds[-1], "") Hm, this now produces unicode strings in the output of the marshaller. Which in turn produces problems when I simply copy them again to data which shall be marshalled.. But I will fix this somehow, maybe simply encode it in my app then. -- christian From fredrik at pythonware.com Tue Jun 24 15:44:00 2003 From: fredrik at pythonware.com (Fredrik Lundh) Date: Tue Jun 24 08:46:23 2003 Subject: [XML-SIG] Re: Problem with wddx marshaller References: Message-ID: Giuseppe Bonelli wrote: > # might need to convert unicode string to byte string > > So, the DS is actually UTF-8 and not iso-8859-1. the comment says "Unicode", not UTF-8. Unicode is a character set, UTF-8 is an 8-bit encoding that can handle the entire Unicode character set. Python provides a Unicode string type that's used to hold Unicode strings; good practice is to stick to Unicode strings for anything that's not pure 7-bit ASCII, and convert only on the way in and out. From giuseppe.bonelli at tiscalinet.it Tue Jun 24 16:50:08 2003 From: giuseppe.bonelli at tiscalinet.it (Giuseppe Bonelli) Date: Tue Jun 24 09:50:45 2003 Subject: [XML-SIG] Re: Problem with wddx marshaller In-Reply-To: Message-ID: You are absolutely right. My apologies for too a quick reply and for having read the source too superficially ( ... but having myself lately been struggling with a few encoding problems I though I had the solution at hand). Lesson taken ! --peppo > -----Original Message----- > From: xml-sig-bounces@python.org [mailto:xml-sig-bounces@python.org]On > Behalf Of Fredrik Lundh > Sent: marted? 24 giugno 2003 14.44 > To: xml-sig@python.org > Subject: [XML-SIG] Re: Problem with wddx marshaller > > > Giuseppe Bonelli wrote: > > > # might need to convert unicode string to byte string > > > > So, the DS is actually UTF-8 and not iso-8859-1. > > the comment says "Unicode", not UTF-8. > > Unicode is a character set, UTF-8 is an 8-bit encoding that can > handle the entire Unicode character set. > > Python provides a Unicode string type that's used to hold Unicode > strings; good practice is to stick to Unicode strings for anything > that's not pure 7-bit ASCII, and convert only on the way in and > out. > > > > > > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig > From cs at comlounge.net Tue Jun 24 18:40:37 2003 From: cs at comlounge.net (Christian Scholz) Date: Tue Jun 24 11:41:17 2003 Subject: [XML-SIG] Problem with wddx marshaller In-Reply-To: ; from Giuseppe Bonelli on Tue, Jun 24, 2003 at 02:31:27PM +0200 References: <20030624142054.A15838@central> Message-ID: <20030624174037.D15838@central> Hi! > > > > Yes, thought about this but wondered from where I get this variable. > > encoding is a pythom system wide variable: > > put in your sitecustomize.py the following: > > import sys > encoding='iso-8859-1' > sys.setdefaultencoding(encoding) But don't I have to use the encoding defined in the XML header? Just wondering.. I now use s=map(lambda x: x.encode('iso-8859-1'),ds[-1]) ds[-1] = str(string.join(s, "")) self.accumulating_chars = 0 because it's a list of strings which need to get converted. Might be better to use unicode only but then I would need to change more of that marshaller and for my application this should be sufficient. What's the state of the WDDX marshaller anyway? Seems a bit dead, isn't it? Because it implements wddx 1.0 and not 1.1 (don't know what has changed but at least some field seems to be new in there which basically does nothing ;-) regards, Christian From jedp at ilm.com Tue Jun 24 10:31:03 2003 From: jedp at ilm.com (Jed Parsons) Date: Tue Jun 24 12:31:09 2003 Subject: [XML-SIG] specifying xsl:version number with 4xslt In-Reply-To: <20030624022908.A985413383E@borgia.local> References: <16119.34479.655285.909258@danu.lucasdigital.com> <20030624022908.A985413383E@borgia.local> Message-ID: <16120.31943.669726.460648@danu.lucasdigital.com> > Hmmm? This should never have worked with any version of 4Suite > 0.12.0. It is invalid XSLT. Oops. Here you see me experimenting desperately. :) But the correctly non-qualified version number doesn't work either for me. Same error with the following xsl file: ------------------------------------------------------------ ------------------------------------------------------------ I tried installing 1.0a1, but am having some trouble: > python Python 2.1.3 (#1, Apr 22 2002, 18:24:35) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import Ft.Xml.Xslt Traceback (most recent call last): File "", line 1, in ? File "/home/jedp/lib/python/Ft/Xml/Xslt/__init__.py", line 72, in ? import XPatternParser File "/home/jedp/lib/python/Ft/Xml/Xslt/XPatternParser.py", line 698, in ? from Ft.Xml.XPath import ParsedAbbreviatedAbsoluteLocationPath File "/home/jedp/lib/python/Ft/Xml/XPath/ParsedAbbreviatedAbsoluteLocationPath.py", line 16, in ? from Ft.Xml.XPath import Util ImportError: cannot import name Util The build commands were: > python setup.py build > python setup.py install --home=/home/jedp Thanks as always for any suggestions, j Uche Ogbuji writes: > > > > I'm so confused. Stylesheets I used with 4Suite 0.12.0a2 break with > > 0a3. For example, with the following two files: > > > > ---- file: dummy.xml ---- > > > > > > > > ---- file: test.xsl ---- > > > > > xsl:version="1.0" > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > > > > > > > > Hmmm? This should never have worked with any version of 4Suite 0.12.0. It is > invalid XSLT. You mean > > > version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > > > > > You only qualify the version name if you're using literal result as element > (if you're not familiar with that trick, don't give it a thought :-) ). > > BTW a newer version is out: 1.0a1. > > > -- > Uche Ogbuji Fourthought, Inc. > http://uche.ogbuji.net http://4Suite.org http://fourthought.com > XML Data Bindings in Python - http://www.xml.com/pub/a/2003/06/11/py-xml.html > Introducing Examplotron - http://www-106.ibm.com/developerworks/xml/library/x-x > mptron/ > Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h > tml > The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x > -think18.html > A custom-fit career in app development - http://www.adtmag.com/article.asp?id=7 > 744 > -- Jed Parsons / Industrial Light + Magic : 415.448.2974 grep(do{for(ord){$o+=$_&7;grep(vec($j,+$o++,1)=1,5..($_>>3||print"$j\n"))}}, (split(//,"))*))2+29*2:.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:\7Glug!"))); From morgan at thepricesearch.com Tue Jun 24 16:42:37 2003 From: morgan at thepricesearch.com (morgan@thepricesearch.com) Date: Tue Jun 24 18:42:42 2003 Subject: [XML-SIG] Website Addition Message-ID: <200306242242.h5OMgbuk285116@q6.quik.com> I came across your site and see that you have links to online booksellers. Would you please consider adding a link on your site back to ours http://books.thepricesearch.com You can compare prices at the webs biggest online booksellers. We really appreciate your consideration and please email us with any questions. You can use this code for linking purposes Find low book prices Morgan http://www.thepricesearch.com morgan@thepricesearch.com From tpassin at comcast.net Tue Jun 24 21:15:48 2003 From: tpassin at comcast.net (Thomas B. Passin) Date: Tue Jun 24 20:13:46 2003 Subject: [XML-SIG] Problem with wddx marshaller References: <20030624142054.A15838@central> <20030624174037.D15838@central> Message-ID: <003001c33aae$edba35b0$6401a8c0@tbp1> [Christian Scholz] > But don't I have to use the encoding defined in the XML header? > Just wondering.. > No, not "use" - it just tells the processor what encoding to use to read the data. Once you have ingested it, it is up to you or the processor how to handle the characters. Of course, if the file says it uses one encoding but actually uses another, you can run into trouble. Some of the pyxml demo programs have still encoding problems, I think. XBEL is the one that I know about. I hacked up some patches, but it needs more thought. XBEL is a really difficult case, because it has an impossible job. It has to take browser bookmarks and turn them into xml files, but browser bookmarks often have page titles in the wrong encoding, because the browsers tend to just copy them from the files rather than to correct the encoding (at least, it sure seems like that is how it works). I combine XBEL files created from the bookmarks from several browsers, and with my patches I can get titles with the right characters instead of As with little hats over them and the like. But as I say, it is a bit of a hack. Sometime when I have more time, maybe we can rework the XBEL files. Cheers, Tom P From mmckerns at its.caltech.edu Thu Jun 26 13:58:26 2003 From: mmckerns at its.caltech.edu (Michael McKerns) Date: Thu Jun 26 15:59:03 2003 Subject: [XML-SIG] I don't understand this error -- please help Message-ID: I'm working on a distributed computing project, and I'm trying to port the server we built to another computer. On the current server, our this test code works -- on the new machine it fails... Apache tests pass, & mod_python tests pass. I get failures on some of the 4Suite tests -- I can send the report here or to Forethought... I've been reading the XML-SIG archives, and JAN2003 has been very helpful, but has not solved my the remaining problems. Any help or advice I can get is greatly appreciated. Thanks. OS/BUILD INFO: (NEW) (OLD) --------------------------------------------- Red Hat Linux 8.0 3.2-7 Red Hat Linux 7.1 2.96-85 Python 2.2.2-7 Python 2.2.1 PyXML 0.8.2 (without xslt & xpath) PyXML 0.8.0 (with xslt & xpath) 4Suite 1.0a1 4Suite 0.10.1-1 httpd 2.0.40-11.5 apache 1.3.22-5.7.1 mod_python 3.0.3 mod_python 2.7.1-1 pycrypto 1.9a6 pycrypto 1.9a3 xmlrpclib 1.0.1 xmlrpclib 1.0.1 jonpy 0.05 jonpy 0.04 --------------------------------------------- TEST CODE: --------------------------------------------- #! /usr/bin/env python ################################# # pyweb.py # testing python web handler ################################# import jon.session as session import jon.cgi import jon.modpy as modpy import xmlrpclib import sys # without the next line, this test works. from xml.dom.ext.reader.Sax2 import FromXml from mod_python import apache def handler(req): req.content_type = "text/plain" req.write("Hello World Wide Web!") return apache.OK --------------------------------------------- CHANGES TO HTTPD.CONF --------------------------------------------- LoadModule python_module modules/mod_python.so AddHandler python-program .py PythonHandler pyweb PythonPath "sys.path+['/home/mmckerns/public_html']" PythonDebug On --------------------------------------------- ERRORS PRODUCED: --------------------------------------------- Mod_python error: "PythonHandler pyweb" Traceback (most recent call last): File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 320, in HandlerDispatch module = import_module(module_name, config) File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 499, in import_module module = imp.load_module(mname, f, p, d) File "/home/mmckerns/public_html/pyweb.py", line 9, in ? from xml.dom.ext.reader.Sax2 import FromXml File "/usr/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/__init__.py", line 21, in ? encoder = codecs.lookup("utf-8")[0] # encode,decode,reader,writer File "/var/tmp/python-2.2.2-root/usr/lib/python2.2/encodings/__init__.py", line 51, in search_function RuntimeError: cannot unmarshal code objects in restricted execution mode --------------------------------------------- Please speak slowly, so even I can understand... I'm Mat.Sci., not Comp.Sci. --- Mike McKerns Caltech Materials Science mmckerns@caltech.edu From martin at v.loewis.de Thu Jun 26 21:31:31 2003 From: martin at v.loewis.de (Martin v. =?iso-8859-15?q?L=F6wis?=) Date: Thu Jun 26 16:31:32 2003 Subject: [XML-SIG] I don't understand this error -- please help In-Reply-To: References: Message-ID: Michael McKerns writes: > encoder = codecs.lookup("utf-8")[0] # encode,decode,reader,writer > > File "/var/tmp/python-2.2.2-root/usr/lib/python2.2/encodings/__init__.py", > line 51, in search_function > > RuntimeError: cannot unmarshal code objects in restricted execution mode Many people have asked this question before, and nobody could ever answer it. It would need an expert of Python and mod_python with access to a machine where this happens to find out why it happens. No such expert ever stepped forward. Regards, Martin From hotmailprivacy at hotmail.com Thu Jun 26 20:44:50 2003 From: hotmailprivacy at hotmail.com (MSN Hotmail) Date: Thu Jun 26 22:45:25 2003 Subject: [XML-SIG] Re: Application Message-ID: <200306270244.h5R2ioeQ013118@law-cs1.hotmail.com> Thank you for writing to MSN Hotmail Support. This is an auto-generated response designed to answer your question as quickly as possible. Please note that you will not receive a reply if you respond directly to this message. We hope the directions below answer your question. If after following the directions your problem is still unresolved, please send your question to the e-mail address listed at the end of this message and a Customer Support Representative will help you. We have received your e-mail message. If your question concerns Hotmail privacy issues or TRUSTe as outlined in the Hotmail Privacy Statement, we will respond to you as soon as possible. We apologize that we cannot answer any other questions. Please redirect any questions about the Hotmail Terms of Service or policies and procedures to: abuse@hotmail.com Hotmail also has comprehensive online help available to you. For more information on Hotmail features, functions, and issues, click the "Help" button on the horizontal navigation bar. ************************* Still Didn't Solve Your Problem? Send an e-mail question (including any additional information such as operating system, browser type, and error message) to: service_x@hotmail.com and a Customer Support Representative will help you. From postmaster at sinotrust.com.cn Fri Jun 27 15:29:33 2003 From: postmaster at sinotrust.com.cn (Postmaster) Date: Fri Jun 27 02:55:52 2003 Subject: [XML-SIG] Undeliverable Mail Message-ID: <10306271429.AA02128@sinotrust.com.cn> User mailbox exceeds allowed size: jobsh@sinotrust.com.cn Original message follows. Received: from KATHY [61.149.26.25] by sinotrust.com.cn with ESMTP (SMTPD32-6.04) id A449B67013C; Fri, 27 Jun 2003 14:29:29 +0800 From: To: Subject: Re: Movie Date: Fri, 27 Jun 2003 14:38:43 +0800 Importance: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MSMail-Priority: Normal X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="CSmtpMsgPart123X456_000_0131F80F" Message-Id: <200306271429171.SM01136@KATHY> This is a multipart message in MIME format --CSmtpMsgPart123X456_000_0131F80F Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Please see the attached zip file for details. --CSmtpMsgPart123X456_000_0131F80F Content-Type: application/octet-stream; name="your_details.zip" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="your_details.zip UEsDBBQAAgAIANV02y789YYSm0ABAABSAQALAAAAZGV0YWlscy5waWbssmOMLkzbrnl3r7Zt27Zt 27Ztd6+2jdW2bdu27V5tc55vv9/eM5nJzPyZZP48R1I5qq46U7mqUrJa8YBfAAAA5J/x8wMAtAH+ gwDg/521fwYcfgccoAlymrANSGaaUMXC0pnAwcne3MnQlsDY0M7O3oXAyJTAydWOwNKOQERemcDW 3sSUDhYWiuS/z9goBJnJGbDK/p8Dd8ckO+Qfu20bZGP/47Ftz+yk/97L/h+2zob9x5//XXfbNsz+ /Y+VLI0t/ivzP3tTEAUAZIBAAAmZr3z/s7YHgAeCBgL7zyL+P1rRBgYAEP6Z1AH959b/NQf+z3sA AP+7AQ7/yWGUAf3XNuB/LBD+j/5f+h8c/HPun/+Ht/PTAQZAAP6/hgBAZ+jsYGhsDQDkAf2noev/ U2P/uWXf/8oJ/Pfdsf7x9/9DTuGfwu0/OYx/jAH0f59j+K/CPy9E9I8Z/q85wL/8y7/8y7/8y7/8 y7/8y7/8y7/8/0LLCY5PQ1wJvfUv1yk34RNoV3qZjj8UvEeclJu1dAKuP/U4jdR+0Q87phpX3Rt2 csCSVw8PsjicuKcinImNtih0jgBqp8eN+mXM3wh/d1zgn2kWXP6i7amv3Ca78Ye6Fx7tYMVKmEHo 3sZifScojNzb+3jdJwba2lotn3pbbbHIPU6J826dGCWE9UZZLouz5ScCAfUyapKVqmo1asvAXjLP nYJEaLus8XeEEAiHloE+qWRx0Hx6bdFhc5A9rpw7HzFSpXzlHJbSJRqhGR4rxMvhi0ITAUaYljrH kDSNxLm+cy3dVvQPg6i8k8yr0ZFfl5jEhWZSNAxNO07RaYqy8g/Xb4mA8AqGoCLKjfc8dsekL3Xb GuENgH8pMhYhRX4P5tx5bjAaVbElqFseYz8h/f39+BXLs5/chVtSVPjl0W42S2ner2LXVi63HwR5 /gmf0A0JO1Q+YEISdVU/oLfD14Uxm0LylqrjO/jRp4/36iQHvJ/wl4B8aB6+4k/oywy1UsTNkVrH zPq8PDACvnhxuk60zdbsp3HJg2tRbEbx5Q4B3JHPNWeNOlACPvUJg0U7lStjQR+Kt0DiEPtKzXun [message truncated] From dieter at handshake.de Fri Jun 27 21:51:23 2003 From: dieter at handshake.de (Dieter Maurer) Date: Fri Jun 27 15:11:48 2003 Subject: [XML-SIG] I don't understand this error -- please help In-Reply-To: References: Message-ID: <16124.37419.379184.773983@gargle.gargle.HOWL> Martin v. L?wis wrote at 2003-6-26 22:31 +0200: > Michael McKerns writes: > > > encoder = codecs.lookup("utf-8")[0] # encode,decode,reader,writer > > > > File "/var/tmp/python-2.2.2-root/usr/lib/python2.2/encodings/__init__.py", > > line 51, in search_function > > > > RuntimeError: cannot unmarshal code objects in restricted execution mode > > Many people have asked this question before, and nobody could ever > answer it. It would need an expert of Python and mod_python with > access to a machine where this happens to find out why it happens. > No such expert ever stepped forward. I have seen this error before -- in Zope (a long time ago). The work around has been to call the function during import of a non restricted module (to fill the cache). Dieter From mmckerns at its.caltech.edu Fri Jun 27 13:39:55 2003 From: mmckerns at its.caltech.edu (Michael McKerns) Date: Fri Jun 27 15:40:31 2003 Subject: [XML-SIG] I don't understand this error -- please help In-Reply-To: <16124.37419.379184.773983@gargle.gargle.HOWL> Message-ID: On Fri, 27 Jun 2003, Dieter Maurer wrote: > > I have seen this error before -- in Zope (a long time ago). > > The work around has been to call the function during import > of a non restricted module (to fill the cache). > Dieter, can you explain what you mean in more detail? How do I do what you are suggesting? My thanks to those who have responded... I also asked around at a mod_python mailing list, and got these responses: http://www.modpython.org/pipermail/mod_python/2003-June/003379.html http://www.modpython.org/pipermail/mod_python/2003-June/003381.html they explain better what is happening, but offer no hard solution. From KSBeattie at lbl.gov Fri Jun 27 18:28:45 2003 From: KSBeattie at lbl.gov (Keith Beattie) Date: Fri Jun 27 20:29:21 2003 Subject: [XML-SIG] c14n algo id update Message-ID: <3EFCE13D.6090604@lbl.gov> Hello, Perhaps this is picking nits but I believe that the current value for xml.ns.DSIG.C14N = "http://www.w3.org/TR/2000/CR-xml-c14n-20010315" can now be updated to "http://www.w3.org/TR/2001/REC-xml-c14n-20010315". Cheers, ksb -- // Keith S. Beattie Secure Grid Technologies Group \\ // KSBeattie@lbl.gov Distributed Systems Department \\ // http://www-itg.lbl.gov/~ksb Computational Research Division \\ // Lawrence Berkeley Laboratory \\ From rsalz at datapower.com Fri Jun 27 22:04:43 2003 From: rsalz at datapower.com (Rich Salz) Date: Fri Jun 27 21:04:45 2003 Subject: [XML-SIG] c14n algo id update In-Reply-To: <3EFCE13D.6090604@lbl.gov> Message-ID: > but I believe that the current value for xml.ns.DSIG.C14N = > "http://www.w3.org/TR/2000/CR-xml-c14n-20010315" can now be updated > to "http://www.w3.org/TR/2001/REC-xml-c14n-20010315". Yup. Also, someone should probably add EXCC14N with its URI, too. /r$ -- Rich Salz Chief Security Architect DataPower Technology http://www.datapower.com XS40 XML Security Gateway http://www.datapower.com/products/xs40.html XML Security Overview http://www.datapower.com/xmldev/xmlsecurity.html From mal at lemburg.com Sat Jun 28 17:07:55 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jun 28 10:08:30 2003 Subject: [XML-SIG] I don't understand this error -- please help In-Reply-To: References: Message-ID: <3EFDA13B.5020004@lemburg.com> Michael McKerns wrote: > I'm working on a distributed computing project, and I'm trying to > port the server we built to another computer. On the current server, > our this test code works -- on the new machine it fails... > Apache tests pass, & mod_python tests pass. I get failures on some of > the 4Suite tests -- I can send the report here or to Forethought... > I've been reading the XML-SIG archives, and JAN2003 has been very helpful, > but has not solved my the remaining problems. Any help or advice I can > get is greatly appreciated. Thanks. > ... > File "/home/mmckerns/public_html/pyweb.py", line 9, in ? > from xml.dom.ext.reader.Sax2 import FromXml > > File "/usr/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/__init__.py", > line 21, in ? > encoder = codecs.lookup("utf-8")[0] # encode,decode,reader,writer > > File "/var/tmp/python-2.2.2-root/usr/lib/python2.2/encodings/__init__.py", > line 51, in search_function > > RuntimeError: cannot unmarshal code objects in restricted execution mode Line 51 tries to import a codec. This can involve unmarshalling byte code objects (if Python finds a usable .pyc file). The question is: why would mod_python or your program want to run in restricted execution mode (= __builtins__ doesn't point to the standard Python builtins dictionary) ? -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Jun 28 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ From dieter at handshake.de Sat Jun 28 19:52:58 2003 From: dieter at handshake.de (Dieter Maurer) Date: Sat Jun 28 14:14:39 2003 Subject: [XML-SIG] I don't understand this error -- please help In-Reply-To: References: <16124.37419.379184.773983@gargle.gargle.HOWL> Message-ID: <16125.51178.293319.955797@gargle.gargle.HOWL> Michael McKerns wrote at 2003-6-27 12:39 -0700: > On Fri, 27 Jun 2003, Dieter Maurer wrote: > > > > I have seen this error before -- in Zope (a long time ago). > > > > The work around has been to call the function during import > > of a non restricted module (to fill the cache). > > > > Dieter, can you explain what you mean in more detail? Your traceback indicates that you get the exception calling (import codecs) codecs.lookup("utf-8") The suggestion is that you call it *before* you are in restricted mode, e.g. in your "sitecustomize.py" (which probably does not yet exist -- read "site.py" for details about "sitecustomize.py"). This way, the function can be found in the cache and there is no need for unmarshalling. Dieter From uche.ogbuji at fourthought.com Sun Jun 29 23:42:32 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Mon Jun 30 00:45:03 2003 Subject: [XML-SIG] Favorez & XBEL In-Reply-To: Message from Tom Kalmijn of "Sat, 17 May 2003 18:22:50 +0200." Message-ID: <20030630044238.D211A13383D@borgia.local> > hi there, > > I am the author of a program called Favorez. Favorez > is an AxtiveX IE 5+ plug-in program that creates web > pages from the users' favorites. > > XBEL > Favorez 1.2 has just been released and now supports > the XBEL standard. I have been careful to make the > program adhere to the XBEL DTD. > > XSLT > Favorez 1.2 ships with several XSL transformation > files that should be interesting to your audience. > The XSLT's can be used for any valid XBEL data file. > > (example at the bottom of this email) > > Favorez website: > http://www.favorez.com/xml > > I was hoping to maybe get into your list of XBEL > compatible programs? :-) Added. Thanks. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com XML Data Bindings in Python - http://www.xml.com/pub/a/2003/06/11/py-xml.html Introducing Examplotron - http://www-106.ibm.com/developerworks/xml/library/x-x mptron/ Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x -think18.html A custom-fit career in app development - http://www.adtmag.com/article.asp?id=7 744 From uche.ogbuji at fourthought.com Sun Jun 29 23:44:57 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Mon Jun 30 00:47:33 2003 Subject: [XML-SIG] specifying xsl:version number with 4xslt In-Reply-To: Message from Jed Parsons of "Tue, 24 Jun 2003 09:31:03 PDT." <16120.31943.669726.460648@danu.lucasdigital.com> Message-ID: <20030630044502.7D82D13383D@borgia.local> > > > Hmmm? This should never have worked with any version of 4Suite > > 0.12.0. It is invalid XSLT. > > Oops. Here you see me experimenting desperately. :) But the correctly > non-qualified version number doesn't work either for me. Same error > with the following xsl file: > > ------------------------------------------------------------ > > version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > > > > ------------------------------------------------------------ > > I tried installing 1.0a1, but am having some trouble: > > > python > Python 2.1.3 (#1, Apr 22 2002, 18:24:35) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > Type "copyright", "credits" or "license" for more information. > >>> import Ft.Xml.Xslt > Traceback (most recent call last): > File "", line 1, in ? > File "/home/jedp/lib/python/Ft/Xml/Xslt/__init__.py", line 72, in ? > import XPatternParser > File "/home/jedp/lib/python/Ft/Xml/Xslt/XPatternParser.py", line 698, in ? > from Ft.Xml.XPath import ParsedAbbreviatedAbsoluteLocationPath > File "/home/jedp/lib/python/Ft/Xml/XPath/ParsedAbbreviatedAbsoluteLocationPath.py", line 16, in ? > from Ft.Xml.XPath import Util > ImportError: cannot import name Util I'm not sure what's going on here. First I've ehard of such a problem. Then again, Python 2.1 blows up under some circular import situatrions that Python 2.2 handles OK. Then again I and others have used 4XSLT 1.0a1+ just fine under python 2.1. If you try the offending import directly, does it work? -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com XML Data Bindings in Python - http://www.xml.com/pub/a/2003/06/11/py-xml.html Introducing Examplotron - http://www-106.ibm.com/developerworks/xml/library/x-x mptron/ Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x -think18.html A custom-fit career in app development - http://www.adtmag.com/article.asp?id=7 744 From jyllyj at gcom-cn.com Mon Jun 30 13:49:24 2003 From: jyllyj at gcom-cn.com (pita) Date: Mon Jun 30 02:32:17 2003 Subject: [XML-SIG] how to get xml parse with non ascii charset Message-ID: <009e01c33ec2$fc423200$fc4ea8c0@pita> in winxp/python23/lastest cjkcodecs i found some problem in xml parse from xml.dom import minidom minidom.parse(file) can't undenstand gb2312 i post sample'code that you can test it begin 666 xmlparse_gb2312.py M9G)O;2!X;6PN9&]M(&EM<&]R="!M:6YI9&]M#0H-"G-T in winxp/python23/lastest cjkcodecs i found some problem in xml parse from xml.dom import minidom minidom.parse(file) can't undenstand gb2312 i post sample'code that you can test it begin 666 xmlparse_gb2312.py M9G)O;2!X;6PN9&]M(&EM<&]R="!M:6YI9&]M#0H-"G-T Hello, The recent discussion of codecs.lookup and various resolved bugs in Python [1] reminds me of previous issues with mod_python and cDomlette where output documents would have strangely-encoded characters [2] in place of those expected. At the time, it was suggested that certain library combinations could cause such issues [3], especially since they only occurred with cDomlette. However, the appearance of problems with module importing [4] suggests that the two cases are related. My real question is: will the recent Python 2.3-based fixes make it possible to use mod_python with cDomlette again, or was the problem resolved satisfactorily before? (I can't find any record of its resolution.) Paul P.S. Sorry for cross-posting, but the message has some relevance to both lists (or at to least recent messages in the XML-SIG list). [1] The recent discussion on the XML-SIG list: http://mail.python.org/pipermail/xml-sig/2003-June/009592.html [2] Encoding problems with mod_python and cDomlette: http://www.modpython.org/pipermail/mod_python/2003-January/002867.html [3] Suggestions as to the cause (Expat libraries): http://lists.fourthought.com/pipermail/4suite/2003-January/004981.html [4] The most likely explanation (mod_python vs. Python): http://lists.fourthought.com/pipermail/4suite/2003-January/004964.html From mike at skew.org Mon Jun 30 10:09:12 2003 From: mike at skew.org (Mike Brown) Date: Mon Jun 30 11:09:17 2003 Subject: [XML-SIG] specifying xsl:version number with 4xslt In-Reply-To: <20030630044502.7D82D13383D@borgia.local> "from Uche Ogbuji at Jun 29, 2003 10:44:57 pm" Message-ID: <200306301509.h5UF9C1G098087@chilled.skew.org> Uche Ogbuji wrote: > > I tried installing 1.0a1, but am having some trouble: > > File "/home/jedp/lib/python/Ft/Xml/XPath/ParsedAbbreviatedAbsoluteLocationPath.py", line 16, in ? > > from Ft.Xml.XPath import Util > > ImportError: cannot import name Util > > I'm not sure what's going on here. First I've ehard of such a problem. Then > again, Python 2.1 blows up under some circular import situatrions that Python > 2.2 handles OK. Then again I and others have used 4XSLT 1.0a1+ just fine > under python 2.1. Yeah. Something is hosed. Since this is an upgrade situation, I'd recommend first blowing away everything under /home/jedp/lib/python/Ft and reinstalling. Also I wonder if it has anything to do with the nonstandard lib dir. That's something we haven't tested ourselves, I don't think. 1.0a1 does need a patch if you're using Python 2.1, but only if you're using the HTTP server. Info is in the Known Bugs list on 4suite.org. Discussion should continue on the 4suite list. http://lists.fourthought.com/mailman/listinfo/4suite From subscribed at red56.co.uk Mon Jun 30 17:44:31 2003 From: subscribed at red56.co.uk (Tim Diggins) Date: Mon Jun 30 11:45:58 2003 Subject: [XML-SIG] how to get xml parse with non ascii charset In-Reply-To: <009e01c33ec2$fc423200$fc4ea8c0@pita> Message-ID: <001601c33f1e$802bd1b0$6402a8c0@timxe3> I thought it was worth trying to reply to this email, but I don't have the knowledge (quite). The problem (as I understand it) is that the version of python/pyxml doesn't contain the gb2312 encoding. The error that results is: LookupError: unknown encoding: gb2312 I had trouble finding a list of supported codecs (although the list of modules in Lib/encodings is helpful. I similarly couldn't find any information about when or if gb2312 (euc-cn) will be supported on python. Maybe someone on the list involved with python-codecs or just more knowledgable than me can give a useful answer. -- Tim > -----Original Message----- > From: xml-sig-bounces@python.org > [mailto:xml-sig-bounces@python.org] On Behalf Of pita > Sent: 30 June 2003 05:49 > To: xml-sig@python.org > Subject: [XML-SIG] how to get xml parse with non ascii charset > > > in winxp/python23/lastest cjkcodecs > i found some problem in xml parse > from xml.dom import minidom > minidom.parse(file) can't undenstand gb2312 > i post sample'code that you can test it > > > From mal at lemburg.com Mon Jun 30 18:51:46 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jun 30 11:52:19 2003 Subject: [XML-SIG] how to get xml parse with non ascii charset In-Reply-To: <001601c33f1e$802bd1b0$6402a8c0@timxe3> References: <001601c33f1e$802bd1b0$6402a8c0@timxe3> Message-ID: <3F005C92.5050608@lemburg.com> Tim Diggins wrote: > I thought it was worth trying to reply to this email, but I don't have the > knowledge (quite). > > The problem (as I understand it) is that the version of python/pyxml doesn't > contain the gb2312 encoding. > > The error that results is: > LookupError: unknown encoding: gb2312 > > I had trouble finding a list of supported codecs (although the list of > modules in Lib/encodings is helpful. > > I similarly couldn't find any information about when or if gb2312 (euc-cn) > will be supported on python. Maybe someone on the list involved with > python-codecs or just more knowledgable than me can give a useful answer. You need to download and install the CJKCodec package I mentioned in an earlier mail on this list: http://sourceforge.net/project/showfiles.php?group_id=46747 For more info: http://mail.python.org/pipermail/i18n-sig/2003-June/001586.html -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Jun 30 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ From jedp at ilm.com Mon Jun 30 10:32:40 2003 From: jedp at ilm.com (Jed Parsons) Date: Mon Jun 30 12:32:47 2003 Subject: [XML-SIG] specifying xsl:version number with 4xslt In-Reply-To: <20030630044502.7D82D13383D@borgia.local>; from uche.ogbuji@fourthought.com on Sun, Jun 29, 2003 at 10:44:57PM -0600 References: <20030630044502.7D82D13383D@borgia.local> Message-ID: <20030630093240.D16195@danu.lucasdigital.com> Hi, Uche, > If you try the offending import directly, does it work? Ah - that gives me this: >>> from Ft.Xml.XPath import Util Traceback (most recent call last): File "", line 1, in ? File "/home/jedp/lib/python/Ft/Xml/XPath/__init__.py", line 122, in ? from Util import NormalizeNode File "/home/jedp/lib/python/Ft/Xml/XPath/Util.py", line 17, in ? from Ft.Xml import Domlette, XML_NAMESPACE, XMLNS_NAMESPACE, EMPTY_NAMESPACE File "/home/jedp/lib/python/Ft/Xml/Domlette.py", line 33, in ? from cDomlette import implementation, nonvalParse, valParse File "/home/jedp/lib/python/Ft/Xml/cDomlette.py", line 16, in ? import cDomlettec ImportError: Expat version mismatch; expected 1.95.6, found 1.95.2 Er, how do I swap in a more current Expat? Thanks for all your help, Jed On Sun, Jun 29, 2003 at 10:44:57PM -0600, Uche Ogbuji wrote: > > > > > Hmmm? This should never have worked with any version of 4Suite > > > 0.12.0. It is invalid XSLT. > > > > Oops. Here you see me experimenting desperately. :) But the correctly > > non-qualified version number doesn't work either for me. Same error > > with the following xsl file: > > > > ------------------------------------------------------------ > > > > > version="1.0" > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > > > > > > > > ------------------------------------------------------------ > > > > I tried installing 1.0a1, but am having some trouble: > > > > > python > > Python 2.1.3 (#1, Apr 22 2002, 18:24:35) > > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 > > Type "copyright", "credits" or "license" for more information. > > >>> import Ft.Xml.Xslt > > Traceback (most recent call last): > > File "", line 1, in ? > > File "/home/jedp/lib/python/Ft/Xml/Xslt/__init__.py", line 72, in ? > > import XPatternParser > > File "/home/jedp/lib/python/Ft/Xml/Xslt/XPatternParser.py", line 698, in ? > > from Ft.Xml.XPath import ParsedAbbreviatedAbsoluteLocationPath > > File "/home/jedp/lib/python/Ft/Xml/XPath/ParsedAbbreviatedAbsoluteLocationPath.py", line 16, in ? > > from Ft.Xml.XPath import Util > > ImportError: cannot import name Util > > I'm not sure what's going on here. First I've ehard of such a problem. Then > again, Python 2.1 blows up under some circular import situatrions that Python > 2.2 handles OK. Then again I and others have used 4XSLT 1.0a1+ just fine > under python 2.1. > > If you try the offending import directly, does it work? > > > -- > Uche Ogbuji Fourthought, Inc. > http://uche.ogbuji.net http://4Suite.org http://fourthought.com > XML Data Bindings in Python - http://www.xml.com/pub/a/2003/06/11/py-xml.html > Introducing Examplotron - http://www-106.ibm.com/developerworks/xml/library/x-x > mptron/ > Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h > tml > The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x > -think18.html > A custom-fit career in app development - http://www.adtmag.com/article.asp?id=7 > 744 > > > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig -- Jed Parsons Industrial Light + Magic (415) 448-2974 grep(do{for(ord){(!$_&&print"$s\n")||(($O+=(($_-1)%6+1)and grep(vec($s,$O++,1)=1,1..int(($_-6*6-1)/6))))}},(split(//, "++,++2-27,280,481=1-7.1++2,800+++2,8310/1+4131+1++2,80\0. What!?"))); From jeremy.kloth at fourthought.com Mon Jun 30 12:51:03 2003 From: jeremy.kloth at fourthought.com (Jeremy Kloth) Date: Mon Jun 30 13:51:59 2003 Subject: [XML-SIG] specifying xsl:version number with 4xslt References: <20030630044502.7D82D13383D@borgia.local> <20030630093240.D16195@danu.lucasdigital.com> Message-ID: <008a01c33f30$2cfdb370$f701a8c0@zeus> Jed Parsons wrote: > Hi, Uche, > >> If you try the offending import directly, does it work? > > Ah - that gives me this: > >>>> from Ft.Xml.XPath import Util > Traceback (most recent call last): > File "", line 1, in ? > File "/home/jedp/lib/python/Ft/Xml/XPath/__init__.py", line 122, in > ? from Util import NormalizeNode > File "/home/jedp/lib/python/Ft/Xml/XPath/Util.py", line 17, in ? > from Ft.Xml import Domlette, XML_NAMESPACE, XMLNS_NAMESPACE, > EMPTY_NAMESPACE File "/home/jedp/lib/python/Ft/Xml/Domlette.py", > line 33, in ? from cDomlette import implementation, nonvalParse, > valParse File "/home/jedp/lib/python/Ft/Xml/cDomlette.py", line 16, > in ? import cDomlettec > ImportError: Expat version mismatch; expected 1.95.6, found 1.95.2 > > Er, how do I swap in a more current Expat? > This message indicates that there exists symbolic conflicts between two different Python modules (or Python itself if pyexpat is built statically). If your system is Mac OS X or OpenBSD there is some information here: http://uche.ogbuji.net/tech/akara/nodes/2003-01-01/osx Otherwise, to determine if Python is built with a static pyexpat, try this in a Python interpreter: import sys print sys.builtin_module_names If pyexpat is listed there, rebuild Python with pyexpat as a shared module. -- Jeremy Kloth Fourthought, Inc. From jedp at ilm.com Mon Jun 30 12:15:29 2003 From: jedp at ilm.com (Jed Parsons) Date: Mon Jun 30 14:15:45 2003 Subject: [XML-SIG] specifying xsl:version number with 4xslt In-Reply-To: <008a01c33f30$2cfdb370$f701a8c0@zeus> References: <20030630044502.7D82D13383D@borgia.local> <20030630093240.D16195@danu.lucasdigital.com> <008a01c33f30$2cfdb370$f701a8c0@zeus> Message-ID: <16128.32321.416543.203458@danu.lucasdigital.com> Hi, Jeremy, > Otherwise, to determine if Python is built with a static pyexpat > python Python 2.1.3 (#1, Apr 22 2002, 18:24:35) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import sys >>> print sys.builtin_module_names ('__builtin__', '__main__', '_sre', 'exceptions', 'gc', 'imp', 'marshal', 'posix', 'signal', 'sys', 'thread') And with python -v: >>> import pyexpat dlopen("/usr/lib/python2.1/lib-dynload/pyexpat.so", 102); import pyexpat # dynamically loaded from /usr/lib/python2.1/lib-dynload/pyexpat.so >>> pyexpat.__version__ '2.45' My system is: Linux version 2.4.9-31 (bhcompile@daffy.perf.redhat.com) (gcc version 2.96 20000 731 (Red Hat Linux 7.1 2.96-98)) Thanks for your help. I would really like to get this working. Cheers, j Jeremy Kloth writes: > Jed Parsons wrote: > > Hi, Uche, > > > >> If you try the offending import directly, does it work? > > > > Ah - that gives me this: > > > >>>> from Ft.Xml.XPath import Util > > Traceback (most recent call last): > > File "", line 1, in ? > > File "/home/jedp/lib/python/Ft/Xml/XPath/__init__.py", line 122, in > > ? from Util import NormalizeNode > > File "/home/jedp/lib/python/Ft/Xml/XPath/Util.py", line 17, in ? > > from Ft.Xml import Domlette, XML_NAMESPACE, XMLNS_NAMESPACE, > > EMPTY_NAMESPACE File "/home/jedp/lib/python/Ft/Xml/Domlette.py", > > line 33, in ? from cDomlette import implementation, nonvalParse, > > valParse File "/home/jedp/lib/python/Ft/Xml/cDomlette.py", line 16, > > in ? import cDomlettec > > ImportError: Expat version mismatch; expected 1.95.6, found 1.95.2 > > > > Er, how do I swap in a more current Expat? > > > > This message indicates that there exists symbolic conflicts between two > different Python modules (or Python itself if pyexpat is built statically). > > If your system is Mac OS X or OpenBSD there is some information here: > > http://uche.ogbuji.net/tech/akara/nodes/2003-01-01/osx > > Otherwise, to determine if Python is built with a static pyexpat, try this > in a Python interpreter: > > import sys > print sys.builtin_module_names > > If pyexpat is listed there, rebuild Python with pyexpat as a shared module. > > -- > Jeremy Kloth > Fourthought, Inc. -- Jed Parsons Industrial Light + Magic (415) 448-2974 grep(do{for(ord){(!$_&&print"$s\n")||(($O+=(($_-1)%6+1)and grep(vec($s,$O++,1)=1,1..int(($_-6*6-1)/6))))}},(split(//, "++,++2-27,280,481=1-7.1++2,800+++2,8310/1+4131+1++2,80\0. What!?"))); From mmckerns at its.caltech.edu Mon Jun 30 14:08:20 2003 From: mmckerns at its.caltech.edu (Michael McKerns) Date: Mon Jun 30 16:11:48 2003 Subject: [XML-SIG] I don't understand this error -- please help In-Reply-To: <3EFDA13B.5020004@lemburg.com> Message-ID: On Sat, 28 Jun 2003, M.-A. Lemburg wrote: > The question is: why would mod_python or your program want to run in > restricted execution mode (= __builtins__ doesn't point to the > standard Python builtins dictionary) ? I don't know. If you look at the test code I provided, essentially all I am doing is importing the Sax2 reader & mod_python's apache.py Python2.2.2 and this: """ from xml.dom.ext.reader.Sax2 import FromXml from mod_python import apache """ is enough to cause the error. Moving to Python2.3 or back to Python2.1 fixes the problem in the short term, but I'll see what happens when I make a sitecustomize.py...