From noreply@sourceforge.net Sat Jun 1 22:56:28 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Sat, 01 Jun 2002 14:56:28 -0700 Subject: [XML-SIG] [ pyxml-Bugs-563399 ] expatreader breaks AttributeNSImpl Message-ID: Bugs item #563399, was opened at 2002-06-01 21:56 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=563399&group_id=6473 Category: SAX Group: None Status: Open Resolution: None Priority: 5 Submitted By: Uche Ogbuji (uche) Assigned to: Nobody/Anonymous (nobody) Summary: expatreader breaks AttributeNSImpl Initial Comment: With make_parser(), expatreader is what I get on Python 2.2/PyXML latest PyXML CVS. It seems that after coercing it to namespace mode, it sets up AttributeNSImpl: from xml.sax import * #from Ft.Xml import InputSource import StringIO XML = "" class TestHandler(ContentHandler): def startElementNS(self, name, qname, attrs): print name print qname print attrs.__dict__ ##parser = make_parser() ##parser._namespaces = 1 ##parser.setContentHandler(TestHandler()) ##factory = InputSource.DefaultFactory ##isrc = factory.fromString(XML, "dummy") ##parser.parse(isrc.stream) parser = make_parser() parser._namespaces = 1 parser.setContentHandler(TestHandler()) stream = StringIO.StringIO(XML) parser.parse(stream) $ python broken-attrs.py (u'http://relaxng.org/ns/structure/1.0', u'grammar') None {'_qnames': {}, '_attrs': {(None, u'foo'): u'bar'}} That should be {'_qnames': {u'foo'}, '_attrs': {(None, u'foo'): u'bar'}} This breaks getQNames() and other things. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=563399&group_id=6473 From uche.ogbuji@fourthought.com Sun Jun 2 01:15:31 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sat, 01 Jun 2002 18:15:31 -0600 Subject: [XML-SIG] Restrictions on documentation of AttributesImpl objects? Message-ID: <200206020015.g520FVA05994@localhost.localdomain> In http://python.org/doc/current/lib/attributes-impl-objects.html http://python.org/doc/current/lib/attributes-ns-impl-objects.html The APIs given for these objects are only the broad, non-Pythonic ones. I think this leads people into an ugly, style for accessing these objects which doesn't take advantage of Python. It also, incodentally, leads people to a nasty bug in expatreader with namespace_feature on: https://sourceforge.net/tracker/index.php?func=detail&aid=563399&group_id=6473& atid=106473 Anyway, is there any reason the Pythonic APIS (__getitem__, keys, get, items, etc.) are not documented? -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From phthenry@earthlink.net Sun Jun 2 06:40:00 2002 From: phthenry@earthlink.net (Paul Tremblay) Date: Sun, 2 Jun 2002 01:40:00 -0400 Subject: [XML-SIG] new install does not work Message-ID: <20020602014000.B5232@localhost.localdomain> I've just installed the 4xslt suite. I went to the doc file and ran: $ python test.py I listed the complete error message below. This message seems to be directly related to the problem I am having with the CDATA tag. I am also not able to use 4xslt. I tried running the script provided with the download, and I got error messages. I have also included these below. Any help would be greatly appreciated. Paul ****************************************************** ERROR MESSAGES WHEN RUNNING python test.py Traceback (most recent call last): File "test.py", line 30, in ? t.run() File "/usr/local/lib/python2.2/site-packages/Ft/Lib/TestSuite/TestWalker.py", line 323, in run self._buildCommandTree(tester) File "/usr/local/lib/python2.2/site-packages/Ft/Lib/TestSuite/TestWalker.py", line 192, in _buildCommandTree newDir = TestDirectory(f,self) File "/usr/local/lib/python2.2/site-packages/Ft/Lib/TestSuite/TestWalker.py", line 156, in __init__ TestNode.__init__(self,file,parent) File "/usr/local/lib/python2.2/site-packages/Ft/Lib/TestSuite/TestWalker.py", line 54, in __init__ self.module = __import__(self.pyFile, {}, {}, '*') File "XPath/__init__.py", line 79, in ? _DomMapping = { File "/usr/local/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/Sax2.py", line 394, in FromXml saxHandlerClass, parser) File "/usr/local/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/Sax2.py", line 387, in FromXmlStream return reader.fromStream(stream, ownerDocument) File "/usr/local/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/Sax2.py", line 373, in fromStream self.parser.parse(s) File "/usr/local/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py", line 107, in parse self.reset() File "/usr/local/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py", line 243, in reset self._reset_lex_handler_prop() File "/usr/local/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py", line 229, in _reset_lex_handler_prop self._parser.CommentHandler = self._lex_handler_prop.comment AttributeError: 'NoneType' object has no attribute 'CommentHandler' *************************************************************** ******************************************************** ERROR MESSAGES WHEN RUNNING 4XSLT Traceback (most recent call last): File "/home/paul/paultemp/python.temp2.py", line 2, in ? from xml.xslt import _4xslt File "/usr/local/lib/python2.2/site-packages/_xmlplus/xslt/_4xslt.py", line 20, in ? from xml.xslt import Processor File "/usr/local/lib/python2.2/site-packages/_xmlplus/xslt/Processor.py", line 24, in ? from xml.xslt import StylesheetReader, ReleaseNode File "/usr/local/lib/python2.2/site-packages/_xmlplus/xslt/StylesheetReader.py", line 53, in ? from xml.xslt.Stylesheet import StylesheetElement File "/usr/local/lib/python2.2/site-packages/_xmlplus/xslt/Stylesheet.py", line 22, in ? from xml.xslt import XsltElement, XsltException, InternalException, Error ImportError: cannot import name InternalException -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From martin@v.loewis.de Sun Jun 2 09:12:23 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 02 Jun 2002 10:12:23 +0200 Subject: [XML-SIG] Restrictions on documentation of AttributesImpl objects? In-Reply-To: <200206020015.g520FVA05994@localhost.localdomain> References: <200206020015.g520FVA05994@localhost.localdomain> Message-ID: Uche Ogbuji writes: > Anyway, is there any reason the Pythonic APIS (__getitem__, keys, > get, items, etc.) are not documented? "AttributesImpl objects implement a portion of the mapping protocol, and the methods copy(), get(), has_key(), items(), keys(), and values()" seems pretty clear to me... Regards, Martin From uche.ogbuji@fourthought.com Sun Jun 2 16:46:14 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sun, 02 Jun 2002 09:46:14 -0600 Subject: [XML-SIG] new install does not work In-Reply-To: Message from Paul Tremblay of "Sun, 02 Jun 2002 01:40:00 EDT." <20020602014000.B5232@localhost.localdomain> Message-ID: <200206021546.g52FkEn16112@localhost.localdomain> > I've just installed the 4xslt suite. I went to the doc file and > ran: > > $ python test.py > > I listed the complete error message below. This message seems to > be directly related to the problem I am having with the CDATA > tag. > > I am also not able to use 4xslt. I tried running the script > provided with the download, and I got error messages. I have also > included these below. > > Any help would be greatly appreciated. This probably means you got 4Suite 0.11.1. The problems you report are ones that appear to affect people using Python 2.2 with 4Suite 0.11.1. For Python 2.2, we've been recommending 4Suite 0.12.0: still in alpha, but already with many important advances over the old version. http://lists.fourthought.com/pipermail/4suite/2002-May/003771.html -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From uche.ogbuji@fourthought.com Sun Jun 2 16:48:36 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sun, 02 Jun 2002 09:48:36 -0600 Subject: [XML-SIG] Restrictions on documentation of AttributesImpl objects? In-Reply-To: Message from martin@v.loewis.de (Martin v. Loewis) of "02 Jun 2002 10:12:23 +0200." Message-ID: <200206021548.g52Fmat16121@localhost.localdomain> > Uche Ogbuji writes: > > > Anyway, is there any reason the Pythonic APIS (__getitem__, keys, > > get, items, etc.) are not documented? > > "AttributesImpl objects implement a portion of the mapping protocol, > and the methods copy(), get(), has_key(), items(), keys(), and > values()" > > seems pretty clear to me... *sigh*. Perils of posting while tired. Though I posted both links, I really only paid attention to http://python.org/doc/current/lib/attributes-ns-impl-objects.html Which does not have the nice sentence you quote. It also doesn't mention that AttributesNSImpl is derived from AttributesImpl, so people won't know it inherits these functions. So I still think it's a doc problem, but I didn't state my case very well :-) -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From uche.ogbuji@fourthought.com Mon Jun 3 02:15:50 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sun, 02 Jun 2002 19:15:50 -0600 Subject: [XML-SIG] Uche Ogbuji's integrated guide to XML processing in Python Message-ID: <200206030115.g531Fou18571@localhost.localdomain> Negatively inspired by Eric van der Vlists's frustrations in trying to work with Python/XML, PyXML and 4Suite, I started this project: http://uche.ogbuji.net:8080/uche.ogbuji.net/tech/python/pyxml/?xslt=pyxml-guide .xslt I quite firmly intend to keep it up, so I would appreciate pointers, suggestions and tips. I hope it will be a good resource for making people more productive in Python/XML and thus making it a more attractive choice than the many other options. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From fdrake@acm.org Mon Jun 3 14:23:55 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Mon, 3 Jun 2002 09:23:55 -0400 Subject: [XML-SIG] Restrictions on documentation of AttributesImpl objects? In-Reply-To: <200206020015.g520FVA05994@localhost.localdomain> References: <200206020015.g520FVA05994@localhost.localdomain> Message-ID: <15611.28139.971567.375190@grendel.zope.com> Uche Ogbuji writes: > Anyway, is there any reason the Pythonic APIS (__getitem__, keys, > get, items, etc.) are not documented? Only that I've not had the time to add that yet. There is an open bug in the Python issue tracker for this, assigned to me. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From phthenry@earthlink.net Mon Jun 3 16:59:16 2002 From: phthenry@earthlink.net (Paul Tremblay) Date: Mon, 3 Jun 2002 11:59:16 -0400 Subject: [XML-SIG] new install does not work In-Reply-To: <200206021546.g52FkEn16112@localhost.localdomain> References: <20020602014000.B5232@localhost.localdomain> <200206021546.g52FkEn16112@localhost.localdomain> Message-ID: <20020603115916.E5232@localhost.localdomain> I posted this message on Sunday morning, and it hasn't appared as of Monday, 11:57 est. I am guessing that the original email with the full output of the error message was too large for this mailing list, so I have resent it with most of the error message cut out. I apologize if this is a duplicate message. On Sun, Jun 02, 2002 at 09:46:14AM -0600, Uche Ogbuji wrote: > > This probably means you got 4Suite 0.11.1. The problems you report are ones > that appear to affect people using Python 2.2 with 4Suite 0.11.1. For Python > 2.2, we've been recommending 4Suite 0.12.0: still in alpha, but already with > many important advances over the old version. > I downloaded 4Suite 0.12.2a2 and moved it to my /usr/local/src folder. I untarred it. I ran # python setup.py build I included the error messages below. I am a newbie to python, so I can't really see any reason to try to make an alpa version of software work. I think I'll uninstall pythone 2.1, and then install 2.1. Then I'll install 4Suite 0.11. Any reason why I shouldn't do this? **************************************** ERROR MESSAGE FROM ./python.py build Traceback (most recent call last): File "build/lib.linux-i586-2.2/Ft/Lib/Time.py", line 5, in ? from Ft import STRING_TYPES ImportError: cannot import name STRING_TYPES warning: build_docs: not documenting Ft.Lib.Time (could not import) Traceback (most recent call last): File "/usr/local/lib/python2.2/site-packages/Ft/Ods/StorageManager/Adapters/Dbm/__init__.py", line 15, in ? import DAdapter File "build/lib.linux-i586-2.2/Ft/Lib/DistExt/BuildDocs.py", line 172, in _safe_import return apply(self._builtin_import, args) File "/usr/local/lib/python2.2/site-packages/Ft/Ods/StorageManager/Adapters/Dbm/DAdapter.py", line 20, in ? from Ft.Lib import DbmDatabase ImportError: cannot import name DbmDatabase warning: build_docs: not documenting Ft.Ods.StorageManager.Adapters.Dbm (could not import) -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From phoengeist38259@arcor.de" Entschuldigen Sie bitte die Störung! Mir ist etwas zu Ohren gekommen. Eine relativ aussergewöhnliche Gerüchteküche, aus der man mir ein schwerverdauliches Süppchen vorgesetzt hat, ist der Grund meiner Mail. Unappetitlich ist gar kein Ausdruck! Ist es möglich auf funktechnischem Wege(in welchen Frequenzbereichen?) jemanden zu beeinflussen oder zu manipulieren? Oder sogar zu schikanieren und terrorisieren? Unter dem Motto:"Einen am Sender?Nich ganz alleine? Kleine Mannim Ohr?Falsche Wellenlänge?Bohnen in den Ohren? Auf den Zahn gefühlt(Amalgam)?Mal unverbindlich reinhören? Der Pullacher Wanzentanz? Ist das Spinnerei?Das geht doch gar nicht,oder? Und wenn wie sieht das ethisch moralisch aus? Zur technischen Seite der Sache gibt es zwar Berichte und Webseiten: Totalitaer,de - Die Waffe gegen die Kritik http://www.raum-und-zeit.com/Aktuell/Brummton.htm http://www.fosar-bludorf.com/Tempelhof/ http://jya.com/haarp.htm http://www.zeitenschrift.at/magazin/zs_24_15/1_mikrowaffen.htm http://www.bse-plus.de/d/doc/lbrief/lbmincontr.htm http://home.nexgo.de/kraven/bigb/big3.html http://w3.nrl.navy.mil/projects/haarp/index.html http://cryptome.org/ http://www.raven1.net/ravindex.htm http://www.calweb.com/~welsh/ http://www.cahe.org/ http://www.parascope.com/ds/mkultra0.htm http://www.trufax.org/menu/mind.html http://www.trufax.org/menu/elect.html http://mindcontrolforum.com/ http://www.trufax.org/menu/elect.html usw. usw. usw. ,aber,das kann doch nicht sein,das soetwas gemacht wird,oder? Eine Menschenrechtsverletzung sonder gleichen!?! Ist es möglich,durch Präparation,der Ohren und im Zusammenspiel mit eventuell vorhandenem Zahnersatz? Mit relativ einfacher Funktechnik?? In diesem Land?Hier und heute??? Unter welchen Motiven? Wo ist eigentlich die Abteilung 5 des BND und des Verfassungsschutzes? Kann es sein,daß es Leute gibt,die dem BND/Verfassungsschutz,auf funktechnischem Wege permanent einen Situationsbericht abliefern,ohne es selbst zu merken,im Kindesalter machbar gemacht?? Werden durch solche inoffiziellen Mitarbeiter,beim BND und Verfassungsschutz,nach Stasimanier, Informationen von und über,rein theoretisch, jeden Bundesbürger,gesammelt? Gibt es dann noch ein Recht auf Privatsphere? Wer kontrolliert eigentlich den BND,MAD und Verfassungsschutz auf Unterwanderung??? In der Mail geht es mir eigentlich um die Frage,ob es kriminellen Elementen, aus dem Motiv der Bereicherung,oder Gruppierungen aus ideologischen Motiven, möglich ist ,sich Wissen und Technik anzueignen,die zu anderen Zeiten, aus anderen Motiven(Westfernsehen?),entwickelt wurde. Und stellt der technische Wissensstand, der der Allgemeinheit bekannt ist wirklich das Ende der Fahnenstange dar? Ist es denn nicht kriminellen Elementen genauso möglich, ich sage das jetzt mal verharmlost und verniedlichend, einzelne Personen oder Gruppen mit relativ einfachen Mitteln, aus welchen Motiven auch immer, auszuspionieren? Und stellt diese "Ausspioniererei" nicht einen erheblichen Eingriff in die Privatsphäre dar? Ist es möglich einzelne Personen oder Gruppen, eine Akzeptans einer gewissen Öffentlichkeit(suggeriert?), die z.B. mit Hilfe von Internetseiten,wie zum Beispiel dem "Pranger"geschaffen werden könnte, mal vorausgestzt,zu terroriesieren und oder zu schikanieren, und das in aller (suggerierten)Öffentlichkeit?Haben die Leute die da am Pranger, oder auf irgendeiner anderen Seite verunglimpft,oder gar Verleumdet werden, eigentlich eine Chance zur Gegenöffentlichkeit?Ist das nicht Rufmord? Vor einigen Jahren bin ich per Zufall auf die Seite "Der Pranger" gestoßen, damals lief das noch nicht unter dem Deckmantel der Partnervermittlung. Können sich einzelne Personen,oder Interessengemeinschaften, aus reinem Selbstzweck,solcher Seiten bedienen, um unter dem Deckmantel einer fragwürdigen Zivilkourage, durch anzetteln irgendwelcher Hetzkampagnen,eigene, ganz persöhnliche Interessen durchsetzen? Können solche Seiten zur Koordination von kriminellen machenschaften dienen? Die Frage,ist es Möglichkeit oder Unmöglichkeit,technisch und gesellschaftlich, einzelne Personen,oder auch Gruppierungen,aus einer kriminellen/ideologischen Energei heraus,zu manipulieren oder zu beeinflussen,terrorisieren oder zu schickanieren,und zwar gezielt. Zielgruppenmanipulation durch Massenmedien sind alltägliche Manipulation, der mansich,mehr oder weniger,entziehen kann. Wird das Recht auf Privatsphäre,schleichend,tiefenpsychologisch, durch Sendungen,wie,zum Beispiel "Big brother",untergraben? Sollte bei einem der Angemailten ein gewisser Wissensstand zum Thema vorhanden sein, wäre ich über Hinweise zum Thema froh. Auf der Suche nach Antworten auf meine Fragen maile ich verschiedene Adressen aus dem Internet an, und hoffe aufkonstruktive Antworten und Kritiken. Über einen Besuch auf der Seite würde ich mich freuen. Sollten Sie von mir mehrfach angeschrieben worden sein,so bitte ich Sie,mir dies zu entschuldigen, das war nicht beabsichtigt. Der Grund für meine Anonymität ist die Tatsache, daß bei derlei Fragenstellerei, verständlicherweise,schnell der Ruf nach der Psychatrie laut wird. Was auch Methode hat(ist). Sollten Sie die Mail als Belästigung empfinden, möchte ich mich hiermit dafür entschuldigen! Big brother is watching you? Excuse please the disturbance! Me something came to ears. A relatively unusual rumor kitchen, from which one put forward to me a heavydigestible soup, is the reason of my Mail. Unappetizing is no printout! Is it possible on radio Wege(in for which frequency ranges?) to influence or manipulate someone? Terrorize or to even chicane and? Under the Motto:"Einen at the Sender?Nich quite alone? Small Mannim Ohr?Fal Wellenlaenge?Bohnen in the ears? On the tooth clean-hear gefuehlt(Amalgam)?Mal witthout obligation? The Pullacher bug wanzentanz? Isn't the Spinnerei?Das goes nevertheless at all, or? And if as looks ethicalally morally? For the technical page of the thing there is to report and web page: Totalitaer,de - Die Waffe gegen die Kritik http://www.raum-und-zeit.com/Aktuell/Brummton.htm http://www.fosar-bludorf.com/Tempelhof/ http://jya.com/haarp.htm http://www.zeitenschrift.at/magazin/zs_24_15/1_mikrowaffen.htm http://www.bse-plus.de/d/doc/lbrief/lbmincontr.htm http://home.nexgo.de/kraven/bigb/big3.html http://w3.nrl.navy.mil/projects/haarp/index.html http://cryptome.org/ http://www.raven1.net/ravindex.htm http://www.calweb.com/~welsh/ http://www.cahe.org/ http://www.parascope.com/ds/mkultra0.htm http://www.trufax.org/menu/mind.html http://www.trufax.org/menu/elect.html http://mindcontrolforum.com/ http://www.trufax.org/menu/elect.html usw. usw. usw. but, that cannot be nevertheless, which is made soetwas, or? A violation of human rights resemble special!?! Is it possible, by preparation, the ears and in interaction with possibly available artificial dentures? With relatively simple radio engineering?? In this Land?Hier and today??? Under which motives? Where is the department actually 5 of the BND and the protection of the constitution? Can it be that there are people, which deliver the Federal Intelligence Service/protection of the constitution, on radio way permanently a situation report, without noticing it, in the infancy feasiblly made? By such unofficial coworkers, with the BND and protection of the constitution, after Stasimanier, is information collected of and over,purely theoretically, each Federal citizen? Is there then still another right to Privatsphere? Who actually checks the BND, WAD and protection of the constitution for infiltration??? Into the Mail actually concerns it to me the question whether it criminal items, from which motive of enriching, or groupings from ideological motives is possible, to acquire itself knowledge and technique which were developed at other times, from other Motiven(Westfernsehen?).And does the technical knowledge status place, to that the public admits is really the end of the flag bar? Is it not to criminal items just as possible, I legend that now times played down and does nice-end, individual persons or groups with relatively simple means, to spy from whatever motives always? And doesn't this " Ausspioniererei " represent a substantial intervention into the privatsphaere? It is possible individual persons or groups, one acceptance to of a certain Oeffentlichkeit(suggeriert?), e.g. by Internet pages, how for example the " Pranger"geschaffen could become, times vorausgestzt, to terroriesieren and or chicane, and in everything (the people suggerierten)Oeffentlichkeit?Haben there at the Pranger, or on any other page to be reviled, or slandered, actually a chance to the Gegenoeffentlichkeit?Ist that not character assassination? Some years ago I am by coincidence the page " the Pranger " encountered, at that time ran not yet under the cover of the partner switching.Itself can individual persons, or communities of interests, from pure self purpose, such pages to serve, over under the cover of a doubtful Zivilkourage, through plot any rushing campaigns, own, quite persoehnliche interests to intersperse? Can such pages serve for the co-ordination of criminal machinations? The question, is it possibility or impossibility, technically and socially, individual persons, or also groupings of manipulating or of influencing from an criminal/ideological Energei, terrorizes or to schickanieren, directed.Target group manipulation by mass media are everyday manipulation, from which, more or less, can extract itself. Does the right to privatsphaere, creeping, by transmissions become deep psychological, how, for example " Big undermine brother"? If the Angemailten should be available a certain knowledge status to the topic with one, I would be glad over notes to the topic On the search for responses to my questions maile I different addresses from the Internet on, and hope up-constructional responses and criticisms.Over an attendance on the page wuerde I are pleased.If you should have been written down by me several times, then please I you to excuse me this that was not intended. The reason for my anonymity is the fact that with such Fragenstellerei, understandably, fast after the call the Psychatrie loud becomes. Which also method hat(ist). If you should feel the Mail as annoyance, I would like to apologize hereby for it! Big is watching you? Veuillez excuser le dérangement! Moi quelque chose concernant des oreilles est venu. Une cuisine de bruit relativement inhabituelle, dont on m'a placé un Sueppchen schwerverdauliches devant, est la raison de mes Mail.Aucune expression n'est peu appétissante! Il est possible sur un Wege(in funktechnischem pour quelles réponses fréquentielles?) quelqu'un influencer ou manipuler? Ou même schikanieren et terroriser? Sous le Motto:"Einen au Sender?Nich tout à fait seulement? Petits Mannim Ohr?Falsche Wellenlaenge?Bohnen dans les oreilles? Sur la dent gefuehlt(Amalgam)?Mal non contraignant reinhoeren? Le Pullacher Wanzentanz? Le Spinnerei?Das n'est-il quand même pas du tout va, ou? Et si comme cela paraît éthiquement moralement? Au côté technique de la chose, il y a certes des rapports et des Webseiten: Totalitaer,de - Die Waffe gegen die Kritik http://www.raum-und-zeit.com/Aktuell/Brummton.htm http://www.fosar-bludorf.com/Tempelhof/ http://jya.com/haarp.htm http://www.zeitenschrift.at/magazin/zs_24_15/1_mikrowaffen.htm http://www.bse-plus.de/d/doc/lbrief/lbmincontr.htm http://home.nexgo.de/kraven/bigb/big3.html http://w3.nrl.navy.mil/projects/haarp/index.html http://cryptome.org/ http://www.raven1.net/ravindex.htm http://www.calweb.com/~welsh/ http://www.cahe.org/ http://www.parascope.com/ds/mkultra0.htm http://www.trufax.org/menu/mind.html http://www.trufax.org/menu/elect.html http://mindcontrolforum.com/ http://www.trufax.org/menu/elect.html usw. usw. usw. toutefois qui ne peut quand même pas être qui on fait soetwas, ou? Une violation des droits de l'homme séparer ressembler!?! Il est possible, par la préparation, des oreilles et dans l'effet avec la prothèse dentaire éventuellement existante? Avec la technique de radio relativement simple?? Dans ce Land?Hier et aujourd'hui Sous quels motifs? Où le département est-il en réalité 5 du BND et de la protection d'constitution? peut il être qu'il y a les personnes qui livrent en permanence le BND/Verfassungsschutz, de manière funktechnischem un rapport de situation, sans le remarquer le -même , dans l'enfance rendu possible?? Par de tels collaborateurs officieux, avec le BND et la protection d'constitution, après manière, des informations sont-elles rassemblées et plus de, purement théoriquement, chaque citoyen allemand? Il y a alors encore un droit à des Privatsphere? Qui contrôle en réalité le BND, mad et protection d'constitution sur une infiltration??? Il s'agit en réalité dans le Mail me la question de savoir si lui éléments criminels, dont le motif de l'enrichissement, ou de groupements des motifs idéologiques, possible de s'acquérir le savoir et la technique qui à d'autres temps, est autre MotivenEt place-t-il le savoir technique dont le public vraiment la fin la barre de drapeau a connaissance ? Il n'est pas donc exactement la même chose possible pour des éléments criminels, moi cela maintenant fois verharmlost et minimisant une légende, personnes ou groupes particuliers avec des moyens relativement simples, de quels motifs aussi toujours, auszuspionieren?(Westfernsehen?), a été développé. Et ce "Ausspioniererei" ne représente-t-il pas une intervention considérable dans la vie privée? Il est possible personnes ou groupes particuliers, pour certain Oeffentlichkeit(suggeriert?), celui p. ex. à l'aide des côtés Internet, comme par exemple "le Pranger"geschaffen pourrait, fois vorausgestzt schikanieren terroriesieren et ou , et qui toute (suggerierten)Oeffentlichkeit?Haben les personnes ceux là, ou d'un autre côté verunglimpft, ou on ne pas calomnie, en réalité une chance au Gegenoeffentlichkeit?Ist qui meurtre d'appel? Il y a quelques années, je ne suis pas encore par hasard sur le côté "celui" poussé, fonctionnais alors cela sous la couche de pont de l'entremise partenaire. Des personnes particulières, ou des communautés d'intérêts le peuventelles, d'un autobut pur, de tels côtés servent, sous la couche de pont d'un Zivilkourage douteux, tracent plus de des campagnes de précipitation, propres intérêts tout à fait persoehnliche entremêlent? De tels côtés peuvent-ils servir à la coordination des manoeuvres criminelles? Question, est lui possibilité ou impossibilité de manipuler ou d'influencer techniquement et socialement, particulière personnes, ou aussi groupements, criminelle/ponctuel idéologique Energei dehors, , terroriser ou schickanieren, et ce.Une manipulation de groupe cible par des masse-médias être la manipulation quotidienne qui peut extraire mansich, plus ou moins. Le droit à la vie privée est-il miné, ramment, tiefenpsychologisch, par des envois, comme, par exemple "des Big brother"? Avec un les Angemailten si un certain savoir devait exister sur le thème, je serais heureux sur des indications sur le thème.Sur la recherche des réponses à mes questions je différentes adresses maile d'Internet dessus, et espère réponses et critiques aufkonstruktive. Sur une visite du côté http://hometown.aol.de/reinerhohn38259/homepage/index.html> je me réjouirais. Si vous deviez avoir été écrit à différentes reprises par moi, je vous demande de m'excuser cela qui n'était pas envisagé. La raison de mon anonymat est le fait qu'avec telle des Fragenstellerei, l'appel devient ce qui est bien compréhensible, rapidement bruyant après le Psychatrie. Ce que la méthode a également (ist). Si vous deviez ressentir les Mail comme un ennui, je voudrais m'excuser par ceci pour cela! Big brother is watching you? From olivier.grisel@ensta.fr Mon Jun 3 23:55:52 2002 From: olivier.grisel@ensta.fr (Olivier Grisel) Date: Tue, 4 Jun 2002 00:55:52 +0200 (CEST) Subject: [XML-SIG] [XML-checkins]SAX or DOM Message-ID: Hi, I'm new to XML processing, and I want to write a python app that : 1- parse a xml config file, 2- set it's data as default's data in several wxPython forms and, 3- could be able to write a pretty xml file with the data set corrected by the user with the form. For 1 & 2, the SAX API is very adapted but how to simply print a new well formed xml file with this data ? For this point (3), DOM seems to be a smarter choice, but not for the first points (my parsed config file may contain a lot of data that I don't need ...) So what should I do ? Unfortunately, pullDOM and SAX2DOM docs aren't complete :( Thanks in advance, Olivier _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ Pyxml-checkins mailing list Pyxml-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyxml-checkins From m_mariappanX@trillium.com Tue Jun 4 09:40:17 2002 From: m_mariappanX@trillium.com (Mariappan, MaharajanX) Date: Tue, 4 Jun 2002 01:40:17 -0700 Subject: [XML-SIG] Cloning and comparing the DOM Document object? Message-ID: <53A7943A5BD8D411B6930002A5073155022D75E3@bgsmsx90.iind.intel.com> Hi All, I'm using xml.dom.minidom for parsing the xml file. Can i clone the Doument object and compare one Doument object with other Document object? Workaround for this is write the current Document object to a temp xml file and write the docuent object after change into another xml file and do file comparition using any other python file comparing module. But I would like know can do this operation in python object level itself, which will avoid the file operation and will be more efficient. TIA, Maharajan From mike@skew.org Tue Jun 4 09:37:43 2002 From: mike@skew.org (Mike Brown) Date: Tue, 4 Jun 2002 02:37:43 -0600 (MDT) Subject: [XML-SIG] merging xml sources (again) In-Reply-To: <200205301922.MAA37116@ocean.lucasdigital.com> "from Jed Parsons at May 30, 2002 12:22:54 pm" Message-ID: <200206040837.g548bhtb064169@chilled.skew.org> Jed Parsons wrote: > I would like to be able to merge bits of xml into a document > while it's being parsed. Merging is triggered by an element > I'm calling 'include-xml' that indicates the location of an > external xml document. How is this different from XInclude? There was a good thread on XInclude on xml-dev at the end of April, but the list archives apparently stop on April 26 and don't start again till May 1 :/ Maybe Uche has it. It also came up on xsl-list in the last few days. FWIW, 4Suite's XML readers expand XIncludes by default, if I'm not mistaken. Seems like it wouldn't be too hard to do with a SAX document handler. Just customize startElement()... - Mike ____________________________________________________________________________ mike j. brown | xml/xslt: http://skew.org/xml/ denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/ From akuchlin@mems-exchange.org Tue Jun 4 15:45:44 2002 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Tue, 4 Jun 2002 10:45:44 -0400 Subject: [XML-SIG] Uche Ogbuji's integrated guide to XML processing in Python In-Reply-To: <200206030115.g531Fou18571@localhost.localdomain> References: <200206030115.g531Fou18571@localhost.localdomain> Message-ID: <20020604144544.GD1039@ute.mems-exchange.org> On Sun, Jun 02, 2002 at 07:15:50PM -0600, Uche Ogbuji wrote: >I quite firmly intend to keep it up, so I would appreciate pointers, >suggestions and tips. I hope it will be a good resource for making people The online Python cookbook has 13 XML-related items. http://aspn.activestate.com/ASPN/Cookbook/Python?kwd=XML --amk From martin@v.loewis.de Tue Jun 4 17:45:58 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 04 Jun 2002 18:45:58 +0200 Subject: [XML-SIG] Cloning and comparing the DOM Document object? In-Reply-To: <53A7943A5BD8D411B6930002A5073155022D75E3@bgsmsx90.iind.intel.com> References: <53A7943A5BD8D411B6930002A5073155022D75E3@bgsmsx90.iind.intel.com> Message-ID: "Mariappan, MaharajanX" writes: > Can i clone the Doument object and compare one Doument object with other > Document object? You could try copy.deepcopy, but you are somewhat at the mercy of the DOM implementation - this likely won't work. > Workaround for this is write the current Document object to a temp xml file > and write the docuent object after change into another xml file > and do file comparition using any other python file comparing module. But I > would like know can do this operation in python object level itself, > which will avoid the file operation and will be more efficient. You can easily avoid the file operation by writing to and reading from a string object. Regards, Martin From mzipay@ag.com Tue Jun 4 19:55:23 2002 From: mzipay@ag.com (Matt Zipay) Date: Tue, 04 Jun 2002 14:55:23 -0400 Subject: [XML-SIG] utf8 conversion issue Message-ID: <3CFD0D1B.4080409@ag.com> I recently discovered in PyXML 0.5.2 (more than a bit behind, I know) that xml.unicode.utf8_iso.code_to_utf9() is returning incorrect values. For example, the name "tørvåld" does not convert properly; it *should* be "torvald" - the 'o' with a stroke, the 'a' with a ring above. However, it gets mangled into "t\xc3\xb8rv\xc3\xa5ld". I took a look at code_to_utf8() and noticed that it in turn calls utf8chr(), which does a comparison to see if the ordinal passed in is <128. Shouldn't it be <256??? Has anyone else wondered about or experienced this? Also, I noticed that the line doing the actual conversion reads "return chr(0xc0 | (c>>6)) + chr(0x80 | (c & 0x3f))" where c is the ordinal. I almost hesitate to ask, but why is it even necessary to bit-or and -shift? Especially when this seems to yield incorrect results? Am i just missing something? Any input is greatly appreciated. From martin@v.loewis.de Tue Jun 4 20:59:17 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 04 Jun 2002 21:59:17 +0200 Subject: [XML-SIG] utf8 conversion issue In-Reply-To: <3CFD0D1B.4080409@ag.com> References: <3CFD0D1B.4080409@ag.com> Message-ID: Matt Zipay writes: > I recently discovered in PyXML 0.5.2 (more than a bit behind, I know) > that xml.unicode.utf8_iso.code_to_utf9() is returning incorrect > values. Do you mean _to_utf8 here? If not, what exactly is utf9? > For example, the name "tørvåld" does not convert properly; > it *should* be "torvald" - the 'o' with a stroke, the 'a' with a > ring above. This is certainly different from "torvald". > However, it gets mangled into "t\xc3\xb8rv\xc3\xa5ld". That is correct. In UTF-8, LATIN SMALL LETTER O WITH STROKE is /xc3/xb8, LATIN SMALL LETTER A WITH RING ABOVE is /xc3/xa5. > I took a look at code_to_utf8() and noticed that it in turn calls > utf8chr(), which does a comparison to see if the ordinal passed in > is <128. Shouldn't it be <256??? No. If all characters below 256 would stand for themselves (as single bytes), how precisely would you encode characters above 256? In UTF-8, characters between 128 and 2048 are encoded as two bytes. > Has anyone else wondered about or experienced this? Not with this specific implementation of UTF-8, but certainly with other implementations of UTF-8. > Also, I noticed that the line doing the actual conversion reads > "return chr(0xc0 | (c>>6)) + chr(0x80 | (c & 0x3f))" where c is the > ordinal. I almost hesitate to ask, but why is it even necessary to > bit-or and -shift? Because that's how UTF-8 is defined. > Especially when this seems to yield incorrect results? Am i just > missing something? Most definitely. Regards, Martin From mike@skew.org Tue Jun 4 21:03:03 2002 From: mike@skew.org (Mike Brown) Date: Tue, 4 Jun 2002 14:03:03 -0600 (MDT) Subject: [XML-SIG] utf8 conversion issue In-Reply-To: <3CFD0D1B.4080409@ag.com> "from Matt Zipay at Jun 4, 2002 02:55:23 pm" Message-ID: <200206042003.g54K33Yj067032@chilled.skew.org> Matt Zipay wrote: > I recently discovered in PyXML 0.5.2 (more than a bit behind, I know) > that xml.unicode.utf8_iso.code_to_utf9() is returning incorrect values. > For example, the name "tørvåld" does not convert properly; it > *should* be "torvald" - the 'o' with a stroke, the 'a' with a ring > above. However, it gets mangled into "t\xc3\xb8rv\xc3\xa5ld". I took a > look at code_to_utf8() and noticed that it in turn calls utf8chr(), > which does a comparison to see if the ordinal passed in is <128. > Shouldn't it be <256??? Has anyone else wondered about or experienced this? > Also, I noticed that the line doing the actual conversion reads "return > chr(0xc0 | (c>>6)) + chr(0x80 | (c & 0x3f))" where c is the ordinal. I > almost hesitate to ask, but why is it even necessary to bit-or and > -shift? Especially when this seems to yield incorrect results? Am i just > missing something? > Any input is greatly appreciated. Either I'm missing what the problem is, or you're missing the fact that the results are correct. :) Read up on UTF-8. It uses 1 byte for the ASCII range (U+0000 through U+007F) only, and it's a direct mapping (U+0020 --> byte x20). It uses 2 bytes for U+0080 through U+0FFF. Bytes C3 B8 are exactly what you want. That is, ø means Unicode character number F8 (in hex): LATIN SMALL LETTER O WITH STROKE. In UTF-8 this character is represented as 2 bytes: C3 B8. http://www.eki.ee/letter/chardata.cgi?ucode=00f8 "\xc3\xb8" is Python's unambiguous way of representing an object of type string that consists of bytes C3 B8. Python's non-Unicode string objects are just byte buffers, and you don't know what encoding they actually use (i.e., you don't know how those bytes map to Unicode characters). The string actually has the right bytes in it. When you print the string, you're serializing those bytes to an output device. Depending on how you do it, you'll either write the raw bytes to the device, or Python will do some escaping for you, if it thinks you might need to keep the output bytes all in the ASCII range. - Mike ____________________________________________________________________________ mike j. brown | xml/xslt: http://skew.org/xml/ denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/ From noreply@sourceforge.net Wed Jun 5 17:48:44 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 05 Jun 2002 09:48:44 -0700 Subject: [XML-SIG] [ pyxml-Bugs-564922 ] conflict with LDAPUserFolder 1.x Message-ID: Bugs item #564922, was opened at 2002-06-05 09:48 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=564922&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: conflict with LDAPUserFolder 1.x Initial Comment: Each time I (have compiled and) have installed the PyXML 7.1 in the python 2.1 directory (built-in with Zope 2.5.1) the product LDAPUserFolder 1.x stopped to work. When I want to access my LDAPUserFolder objects with the ZMI, Zope asked me to reauthentified then refused me access to the folder where these objects are placed. I use a Zope 2.5.1 (python 2.1.3) My Zope site contains only one custom product : LDAPUserFolder 1.5 ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=564922&group_id=6473 From noreply@sourceforge.net Wed Jun 5 20:33:00 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 05 Jun 2002 12:33:00 -0700 Subject: [XML-SIG] [ pyxml-Bugs-564996 ] Message-ID: Bugs item #564996, was opened at 2002-06-05 12:33 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=564996&group_id=6473 Category: DOM Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Initial Comment: ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=564996&group_id=6473 From vdv@dyomedea.com Wed Jun 5 22:50:33 2002 From: vdv@dyomedea.com (Eric van der Vlist) Date: Wed, 05 Jun 2002 23:50:33 +0200 Subject: [XML-SIG] Switching back and forward between SAX and DOM Message-ID: <3CFE87A9.7020407@dyomedea.com> Just a Python newbie question to try to find my way into XML processing with Python :-) In Java, I like to use both SAX and DOM (I prefer using SAX to bind documents to and from predefined data models and DOM when manipulating documents) and I need|want to do the same with Python (I am currently using Python 2.2 with 4suite 0.12 latest CVS). How can you get a DOM tree out of SAX events (if for instance you've developed a ContentHandler, can you retrieve a part of the document as a DOM tree by forwarding the events to a DOM parser?) and vice versa, how can I serialize a DOM tree as SAX events which can be processed by a ContentHandler? Thanks Eric -- See you in San Diego. http://conferences.oreillynet.com/os2002/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com http://xsltunit.org http://4xt.org http://examplotron.org ------------------------------------------------------------------------ From noreply@sourceforge.net Wed Jun 5 23:16:27 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 05 Jun 2002 15:16:27 -0700 Subject: [XML-SIG] [ pyxml-Bugs-565056 ] SOAP.py detects error in PyXML-0.7.1 Message-ID: Bugs item #565056, was opened at 2002-06-05 14:16 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=565056&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Dave Kuhlman (dkuhlman2) Assigned to: Nobody/Anonymous (nobody) Summary: SOAP.py detects error in PyXML-0.7.1 Initial Comment: When I use SOAP.py (e.g. from SOAPpy097) with PyXML-0.7.1, I get an error. The trace-back is below. If I rename the _xmlplus directory under /usr/local/lib/python2.2/site-packages, then the error goes away. I guess a default implementation of pyexpat in Python 2.2.1 is being used. If I re-install PyXML-7.0, there is no error. Note that if I attempt to fix the offending call by changing line 233 in expatreader.py from: self._parser = expat.ParserCreate(None, " ", intern = self._interning) to: self._parser = expat.ParserCreate(None) then I get another error, a bit farther down the line, which indicates that PyXML-0.7.1 is handling namespaces in a way that SOAP.py does not expect. I am using Python 2.2.1. Are there any notes on how to upgrade client code in order to adapt to PyXML-0.7.1? - Dave Kuhlman ========================================= python weatherTest.py Traceback (most recent call last): File "daveweatherTest.py", line 37, in ? main() File "daveweatherTest.py", line 33, in main getWeather(args[0]) File "daveweatherTest.py", line 21, in getWeather print "inline", server._ns('ns1', MethodNamespaceURI).getTemp(zipcode=zip) File "../SOAP.py", line 3640, in __call__ return self.__r_call(*args, **kw) File "../SOAP.py", line 3660, in __r_call self.__hd, self.__ma) File "../SOAP.py", line 3571, in __call p, attrs = parseSOAPRPC(r, attrs = 1) File "../SOAP.py", line 2825, in parseSOAPRPC t = _parseSOAP(xml_str, rules = rules) File "../SOAP.py", line 2809, in _parseSOAP parser.parse(inpsrc) File "/usr/local/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py", line 107, in parse self.reset() File "/usr/local/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py", line 233, in reset self._parser = expat.ParserCreate(None, " ", intern = self._interning) ========================================= ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=565056&group_id=6473 From martin@v.loewis.de Thu Jun 6 08:03:24 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 06 Jun 2002 09:03:24 +0200 Subject: [XML-SIG] Switching back and forward between SAX and DOM In-Reply-To: <3CFE87A9.7020407@dyomedea.com> References: <3CFE87A9.7020407@dyomedea.com> Message-ID: Eric van der Vlist writes: > How can you get a DOM tree out of SAX events (if for instance you've > developed a ContentHandler, can you retrieve a part of the document as > a DOM tree by forwarding the events to a DOM parser?) Depends on whether you have PyXML, or only Python proper. With minidom, there is xml.dom.ext.reader.Sax2, which takes a SAX parser; for PyXML, xml.dom.minidom.parse does the same thing. Notice that, in both cases, you need to pass an XMLReader. For minidom, the content handler that will build the DOM tree is xml.dom.pulldom.SAX2DOM (unless you need the pulldom functionality itself); for 4DOM, it is xml.dom.ext.reader.Sax2.XmlDomGenerator. > how can I serialize a DOM tree as SAX events which can be processed > by a ContentHandler? For PyXML, xml.dom.ext.Dom2Sax does that. In standard Python, that functionality is not available. Notice that you will have to experiment, and might find bugs, since that functionality is rarely used. Regards, Martin From uche.ogbuji@fourthought.com Thu Jun 6 15:01:50 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Thu, 06 Jun 2002 08:01:50 -0600 Subject: [XML-SIG] Switching back and forward between SAX and DOM In-Reply-To: Message from Eric van der Vlist of "Wed, 05 Jun 2002 23:50:33 +0200." <3CFE87A9.7020407@dyomedea.com> Message-ID: <200206061401.g56E1oW04495@localhost.localdomain> > Just a Python newbie question to try to find my way into XML processing > with Python :-) > > In Java, I like to use both SAX and DOM (I prefer using SAX to bind > documents to and from predefined data models and DOM when manipulating > documents) and I need|want to do the same with Python (I am currently > using Python 2.2 with 4suite 0.12 latest CVS). > > How can you get a DOM tree out of SAX events (if for instance you've > developed a ContentHandler, can you retrieve a part of the document as a > DOM tree by forwarding the events to a DOM parser?) and vice versa, how > can I serialize a DOM tree as SAX events which can be processed by a > ContentHandler? The basic infrastructure for both tasks is available, but largely not ported to the Domlettes, which I know you're using. They use the older interfaces that you struggled with at first. I'll do a bit of checking today to see how much porting would be required to get what you need. These would actually be very good general-purpose additions to Ft.Xml.Util, and updates to xml.dom. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From uche.ogbuji@fourthought.com Thu Jun 6 15:35:57 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Thu, 06 Jun 2002 08:35:57 -0600 Subject: [XML-SIG] Switching back and forward between SAX and DOM In-Reply-To: Message from martin@v.loewis.de (Martin v. Loewis) of "06 Jun 2002 09:03:24 +0200." Message-ID: <200206061435.g56EZvJ04712@localhost.localdomain> > Eric van der Vlist writes: > > > How can you get a DOM tree out of SAX events (if for instance you've > > developed a ContentHandler, can you retrieve a part of the document as > > a DOM tree by forwarding the events to a DOM parser?) > > Depends on whether you have PyXML, or only Python proper. With > minidom, there is xml.dom.ext.reader.Sax2, which takes a SAX parser; > for PyXML, xml.dom.minidom.parse does the same thing. Notice that, in > both cases, you need to pass an XMLReader. For minidom, the content > handler that will build the DOM tree is xml.dom.pulldom.SAX2DOM > (unless you need the pulldom functionality itself); for 4DOM, it > is xml.dom.ext.reader.Sax2.XmlDomGenerator. > > > how can I serialize a DOM tree as SAX events which can be processed > > by a ContentHandler? > > For PyXML, xml.dom.ext.Dom2Sax does that. In standard Python, that > functionality is not available. > > Notice that you will have to experiment, and might find bugs, since > that functionality is rarely used. Well, I should have known Martin would have it all offhead :-). It is pretty much as I'd thought. I don't recommend that Eric switch to 4DOM. Not only has he already survived one traumatic switch, but it is a great step backward, not least because 4DOM is excruciatingly slow. I'll look to updating xml.dom.ext.reader.Sax2.XmlDomGenerator and xml.dom.ext.Dom2Sax to general-purpose utilities for both PyXML and 4Suite domlettes. Should go pretty quickly if I end up in enough boring sessions here at XML One :-) -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From phthenry@earthlink.net Thu Jun 6 17:37:45 2002 From: phthenry@earthlink.net (Paul Tremblay) Date: Thu, 6 Jun 2002 12:37:45 -0400 Subject: [XML-SIG] converting rtf to xml Message-ID: <20020606123745.A4356@localhost.localdomain> I am struggling to get a java utility called majix to work. This utility is supposed to convert rtf files to xml. I was wondering if there is any similar python utility? I have just discovered (last night!) that rtf files are relatively structured. I'm sure I could write a crude script to convert them myself, but I don't want to re-invent the wheel. Thanks Paul -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From haering_python@gmx.de Thu Jun 6 17:47:23 2002 From: haering_python@gmx.de (Gerhard =?iso-8859-15?Q?H=E4ring?=) Date: Thu, 6 Jun 2002 18:47:23 +0200 Subject: [XML-SIG] converting rtf to xml In-Reply-To: <20020606123745.A4356@localhost.localdomain> References: <20020606123745.A4356@localhost.localdomain> Message-ID: <20020606164723.GB3232@lilith.my-fqdn.de> * Paul Tremblay [2002-06-06 12:37 -0400]: > I am struggling to get a java utility called majix to work. This > utility is supposed to convert rtf files to xml. > > I was wondering if there is any similar python utility? > > I have just discovered (last night!) that rtf files are > relatively structured. Heh, I've once written a parser in C++. I can tell you that are some very obscure corners wrt. to stylesheets and graphics. The first thing I'd do is fire up Google: Searched the web for rtf2xml. Results 1 - 10 of about 3,340. Search took 0.10 seconds. Maybe this helps. Gerhard -- This sig powered by Python! Außentemperatur in München: 20.4 °C Wind: 3.9 m/s From mal@lemburg.com Thu Jun 6 19:00:46 2002 From: mal@lemburg.com (M.-A. Lemburg) Date: Thu, 06 Jun 2002 20:00:46 +0200 Subject: [XML-SIG] converting rtf to xml References: <20020606123745.A4356@localhost.localdomain> <20020606164723.GB3232@lilith.my-fqdn.de> Message-ID: <3CFFA34E.1020502@lemburg.com> Gerhard H=E4ring wrote: > * Paul Tremblay [2002-06-06 12:37 -0400]: >=20 >>I am struggling to get a java utility called majix to work. This >>utility is supposed to convert rtf files to xml. >> >>I was wondering if there is any similar python utility?=20 >> >>I have just discovered (last night!) that rtf files are >>relatively structured. >=20 >=20 > Heh, I've once written a parser in C++. I can tell you that are som= e > very obscure corners wrt. to stylesheets and graphics. >=20 > The first thing I'd do is fire up Google: >=20 > Searched the web for rtf2xml. Results 1 - 10 of about 3,340. > Search took 0.10 seconds. >=20 > Maybe this helps. Another approach: use the RTF parser in mxTextTools or simply use COM to have Word generate HTML which you then pass through mxTidy to generate XHTML. --=20 Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ Meet us at EuroPython 2002: http://www.europython.org/ From phthenry@earthlink.net Fri Jun 7 06:44:19 2002 From: phthenry@earthlink.net (Paul Tremblay) Date: Fri, 7 Jun 2002 01:44:19 -0400 Subject: [XML-SIG] 4xslt not installed? Message-ID: <20020607014419.B1888@localhost.localdomain> I just did a new install of python 2.1.3, of PyXML .7, and of 4Suite. I then included this line in my script, in order to test things. import Ft.Xml.Xslt ImportError: No module named Xml.Xslt However, if I use: import xml.xslt then I get no error message, which means that python is using the pyXML xslt rather than the 4Suite version. There is an executable in /usr/local/bin. If I type ./4xslt, then I get the standard message, telling me to enter options, so this executable appears to be working. However, I can't figure out how to use it from the command line! I am used to the xsltproc, where I simply type xsltproc stylesheet.xsl document.xml. Any tips would be appreciated. Paul -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From Matt Gushee Fri Jun 7 06:59:38 2002 From: Matt Gushee (Matt Gushee) Date: Thu, 6 Jun 2002 23:59:38 -0600 Subject: [XML-SIG] 4xslt not installed? In-Reply-To: <20020607014419.B1888@localhost.localdomain> References: <20020607014419.B1888@localhost.localdomain> Message-ID: <20020607055938.GA2474@swordfish.havenrock.com> On Fri, Jun 07, 2002 at 01:44:19AM -0400, Paul Tremblay wrote: > I just did a new install of python 2.1.3, of PyXML .7, and of > 4Suite. What version of 4Suite did you install? Unfortunately, 0.11.x and earlier don't work with PyXML 0.7. That incompatibility could account for your import error. > import Ft.Xml.Xslt Should work for 4Suite 0.12 series. Earlier versions spelled it as xml.xslt. > There is an executable in /usr/local/bin. If I type ./4xslt, then > I get the standard message, telling me to enter options, so this > executable appears to be working. However, I can't figure out how > to use it from the command line! I am used to the xsltproc, where > I simply type > > xsltproc stylesheet.xsl document.xml. Actually, I think xsltproc is backwards. Every other XSLT processor I know of, including 4XSLT, does it: document.xml stylesheet.xsl For 4Suite, if you want to specify an output file, you can use the -o option: 4xslt -o foo.html document.xml stylesheet.xsl or use a shell redirect: 4xslt document.xml stylesheet.xsl >foo.html To pass a parameter, you can use one or more -D statements: 4xslt -Dcolor=red -Dstatus=fubar doc.xml style.xsl Hope that helps a bit. -- Matt Gushee Englewood, Colorado, USA mgushee@havenrock.com http://www.havenrock.com/ From phthenry@earthlink.net Fri Jun 7 17:50:56 2002 From: phthenry@earthlink.net (Paul Tremblay) Date: Fri, 7 Jun 2002 12:50:56 -0400 Subject: [XML-SIG] 4xslt not installed? In-Reply-To: <20020607055938.GA2474@swordfish.havenrock.com> References: <20020607014419.B1888@localhost.localdomain> <20020607055938.GA2474@swordfish.havenrock.com> Message-ID: <20020607125056.A4483@localhost.localdomain> On Thu, Jun 06, 2002 at 11:59:38PM -0600, Matt Gushee wrote: > > What version of 4Suite did you install? Unfortunately, 0.11.x and > earlier don't work with PyXML 0.7. That incompatibility could account > for your import error. > > > import Ft.Xml.Xslt I installed 0.11x because I was told that 0.12 had a bug with python 2.2. So I assumed I had to install python 2.13, then install 4Suite 0.11. I read the README when I installed PyXML, and it said that there could be a conflict with Xpath and Xslt in the PyXML suite, and and Xpath and Xslt in the 4Suite. The solution, it said, was to build like this: python setup.py build --without-xpath --without-xslt python setup.py install --without-xpath --without-xslt This is what I did. > Actually, I think xsltproc is backwards. Every other XSLT processor > I know of, including 4XSLT, does it: > > document.xml stylesheet.xsl I enter $ 4xslt test.xml test.xsl I get an error message, which I included below. Thanks Paul ************************************ Traceback (most recent call last): File "/usr/local/bin/4xslt", line 3, in ? _4xslt.XsltCommandLineApp().run() File "/usr/local/lib/python2.1/site-packages/Ft/Lib/CommandLine/CommandLineApp.py", line 87, in run cmd.run_command(self.authenticationFunction) File "/usr/local/lib/python2.1/site-packages/Ft/Lib/CommandLine/Command.py", line 83, in run_command self.function(self.clOptions, self.clArguments) File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/_4xslt.py", line 106, in Run processor.appendStylesheetUri(sty) File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/Processor.py", line 101, in appendStylesheetUri sty = self._styReader.fromUri(styleSheetUri, baseUri) File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/StylesheetReader.py", line 579, in fromUri ownerDoc, stripElements) File "/usr/local/lib/python2.1/site-packages/Ft/Lib/ReaderBase.py", line 76, in fromUri rt = self.fromStream(stream, newBaseUri, ownerDoc, stripElements) File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/StylesheetReader.py", line 622, in fromStream sheet.setup() File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/Stylesheet.py", line 140, in setup self._setupChildNodes() File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/Stylesheet.py", line 183, in _setupChildNodes curr_node.setup() File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/VariableElement.py", line 30, in setup self._name = Util.ExpandQName(name_attr, namespaces=self._nss) File "/usr/local/lib/python2.1/site-packages/_xmlplus/xpath/Util.py", line 83, in ExpandQName split_name = (nss[prefix], local) KeyError -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From uche.ogbuji@fourthought.com Fri Jun 7 19:43:45 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Fri, 07 Jun 2002 12:43:45 -0600 Subject: [XML-SIG] 4xslt not installed? In-Reply-To: Message from Paul Tremblay of "Fri, 07 Jun 2002 12:50:56 EDT." <20020607125056.A4483@localhost.localdomain> Message-ID: <200206071843.g57Ihkb14697@localhost.localdomain> > On Thu, Jun 06, 2002 at 11:59:38PM -0600, Matt Gushee wrote: > > > > > What version of 4Suite did you install? Unfortunately, 0.11.x and > > earlier don't work with PyXML 0.7. That incompatibility could account > > for your import error. > > > > > import Ft.Xml.Xslt > > I installed 0.11x because I was told that 0.12 had a bug with > python 2.2. Huh? Who said that? I said that 0.11.1 is what has a bug with 2.2. 0.12.0 works just fine. > So I assumed I had to install python 2.13, then > install 4Suite 0.11. Yes. > I read the README when I installed PyXML, and it said that there > could be a conflict with Xpath and Xslt in the PyXML suite, and > and Xpath and Xslt in the 4Suite. The solution, it said, was to > build like this: > > python setup.py build --without-xpath --without-xslt > python setup.py install --without-xpath --without-xslt > > This is what I did. Then I'm not sure why you're having an import problem. I certainly can't reproduce it. Is there any other info you can offer? > > Actually, I think xsltproc is backwards. Every other XSLT processor > > I know of, including 4XSLT, does it: > > > > document.xml stylesheet.xsl > > I enter > > $ 4xslt test.xml test.xsl > > I get an error message, which I included below. > > Thanks > > Paul > > ************************************ > > Traceback (most recent call last): > File "/usr/local/bin/4xslt", line 3, in ? > _4xslt.XsltCommandLineApp().run() > File "/usr/local/lib/python2.1/site-packages/Ft/Lib/CommandLine/CommandLineApp.py", line 87, in run > cmd.run_command(self.authenticationFunction) > File "/usr/local/lib/python2.1/site-packages/Ft/Lib/CommandLine/Command.py", line 83, in run_command > self.function(self.clOptions, self.clArguments) > File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/_4xslt.py", line 106, in Run > processor.appendStylesheetUri(sty) > File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/Processor.py", line 101, in appendStylesheetUri > sty = self._styReader.fromUri(styleSheetUri, baseUri) > File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/StylesheetReader.py", line 579, in fromUri > ownerDoc, stripElements) > File "/usr/local/lib/python2.1/site-packages/Ft/Lib/ReaderBase.py", line 76, in fromUri > rt = self.fromStream(stream, newBaseUri, ownerDoc, stripElements) > File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/StylesheetReader.py", line 622, in fromStream > sheet.setup() > File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/Stylesheet.py", line 140, in setup > self._setupChildNodes() > File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/Stylesheet.py", line 183, in _setupChildNodes > curr_node.setup() > File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/VariableElement.py", line 30, in setup > self._name = Util.ExpandQName(name_attr, namespaces=self._nss) > File "/usr/local/lib/python2.1/site-packages/_xmlplus/xpath/Util.py", line 83, in ExpandQName > split_name = (nss[prefix], local) > KeyError This is the clash between 4Suite 0.11.1 and PyXML 7.1 that was pointed out. OK. This is probably more complex than it should be, but here it is in a nutshell. *either* use Python 2.1 + 4Suite 0.11.1 + PyXML 0.6.6 *or* use Python 2.0, 2.1 or 2.2 + 4Suite 0.12.0 + (optionally PyXML 0.7.1) Clear? -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From Matt Gushee Fri Jun 7 21:23:37 2002 From: Matt Gushee (Matt Gushee) Date: Fri, 7 Jun 2002 14:23:37 -0600 Subject: [XML-SIG] 4xslt not installed? In-Reply-To: <200206071843.g57Ihkb14697@localhost.localdomain> References: <20020607125056.A4483@localhost.localdomain> <200206071843.g57Ihkb14697@localhost.localdomain> Message-ID: <20020607202337.GD448@swordfish.havenrock.com> On Fri, Jun 07, 2002 at 12:43:45PM -0600, Uche Ogbuji wrote: > > I installed 0.11x because I was told that 0.12 had a bug with > > python 2.2. > > Huh? Who said that? I said that 0.11.1 is what has a bug with 2.2. 0.12.0 > works just fine. Aren't there outstanding issues with 2.2 on Windows, with any version of 4Suite? Or did those all get fixed? -- Matt Gushee Englewood, Colorado, USA mgushee@havenrock.com http://www.havenrock.com/ From phthenry@earthlink.net Fri Jun 7 22:23:56 2002 From: phthenry@earthlink.net (Paul Tremblay) Date: Fri, 7 Jun 2002 17:23:56 -0400 Subject: [XML-SIG] 4xslt not installed? In-Reply-To: <200206071843.g57Ihkb14697@localhost.localdomain> References: <20020607125056.A4483@localhost.localdomain> <200206071843.g57Ihkb14697@localhost.localdomain> Message-ID: <20020607172356.C6866@localhost.localdomain> On Fri, Jun 07, 2002 at 12:43:45PM -0600, Uche Ogbuji wrote: > Huh? Who said that? I said that 0.11.1 is what has a bug with 2.2. 0.12.0 > works just fine. Not for me. I had a new install of python 2.2 and of 4Suite .12. I posted on this board really got no solid anwers as to what I should do, so I decided to install the more stable (not alpha) version, .11. > > Then I'm not sure why you're having an import problem. I certainly can't > reproduce it. Is there any other info you can offer? > No. Everyting is brand new in my install. I built python 2.13 two days ago. I downloaded PyXML .7 and built and installed this yesterday, as I did with the 4Suite. This is very frustrating for me. I switched from perl to python because everyone said python was great for parsing xml. Xml.com calls it "charming python," but so far it has proved about as charming as a broken car. I keep downloading the newest versions of the libraries, building them and instaling them and keep getting errors. I haven't gotten Sax or 4xslt to work. Thanks for your patience. Paul -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From Mike.Olson@fourthought.com Fri Jun 7 23:22:52 2002 From: Mike.Olson@fourthought.com (Mike Olson) Date: 07 Jun 2002 16:22:52 -0600 Subject: [XML-SIG] 4xslt not installed? In-Reply-To: <20020607202337.GD448@swordfish.havenrock.com> References: <20020607125056.A4483@localhost.localdomain> <200206071843.g57Ihkb14697@localhost.localdomain> <20020607202337.GD448@swordfish.havenrock.com> Message-ID: <1023488583.6004.32.camel@penny> On Fri, 2002-06-07 at 14:23, Matt Gushee wrote: > On Fri, Jun 07, 2002 at 12:43:45PM -0600, Uche Ogbuji wrote: > > > > I installed 0.11x because I was told that 0.12 had a bug with > > > python 2.2. > > > > Huh? Who said that? I said that 0.11.1 is what has a bug with 2.2. 0.12.0 > > works just fine. > > Aren't there outstanding issues with 2.2 on Windows, with any version of > 4Suite? Or did those all get fixed? All of these are fixed, except for Windows and Python 2.0 Mike > > -- > Matt Gushee > Englewood, Colorado, USA > mgushee@havenrock.com > http://www.havenrock.com/ > > > _______________________________________________ > 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 x 102 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, http://4Suite.org Boulder, CO 80301-2537, USA XML strategy, XML tools, knowledge management From ndw@nwalsh.com Sat Jun 8 14:31:25 2002 From: ndw@nwalsh.com (Norman Walsh) Date: Sat, 08 Jun 2002 09:31:25 -0400 Subject: [XML-SIG] DOM performance? Message-ID: <87bsalucb6.fsf@nwalsh.com> Hello world, I've been meaning to learn Python for ages and I've finally found the project that I'm going to use to do so: a little UI thingy with an XML back end. Ok. so I grabbed PyXML 0.7.1 and installed it on my Linux box where I've got Python 2.1. Running a little test program to build a DOM tree (baby steps, to be sure): import sys from xml.dom.ext.reader import Sax2 # create Reader object reader = Sax2.Reader() print "parse it!" # parse the document doc = reader.fromStream(sys.stdin) print "parsed!" I'm concerned about the performance. For a small XML document it works fine, but for the actual 1.4Mb XML document I need to read for my project, performance is abysmal (after several minutes, I gave up). Am I doing something obviously wrong? Be seeing you, norm -- Norman Walsh | Where it is permissible both to die and http://nwalsh.com/ | not to die, it is an abuse of valour to | die.--Mencius From uche.ogbuji@fourthought.com Sat Jun 8 16:40:35 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sat, 08 Jun 2002 09:40:35 -0600 Subject: [XML-SIG] Nastiness in xml/extensions/pyexpat.c Message-ID: <200206081540.g58Feag19848@localhost.localdomain> The following simple program dumps core currently. from xml.sax import * from xml.sax.handler import feature_namespaces from xml.dom.ext.reader.Sax2 import XmlDomGenerator from Ft.Xml import cDomlette handler = XmlDomGenerator(implementation=cDomlette.implementation) parser = make_parser() parser.setFeature(feature_namespaces, 1) parser.setContentHandler(handler) parser.parse("test.xml") doc = handler.getRootNode() Uncommenting the line "parser.setFeature(feature_namespaces, 1)" stops it doing so. In tracing the through xml/extensions/pyexpat.c (and a tremendous fag that was), I found an instance of sheer nastiness: static void flag_error(xmlparseobject *self) { clear_handlers(self, 0); } This function doesn't really do anything to "flag" an error. It merely clears the handlers. The problem is that in most cases the code just continues on, and then it dumps core the next time it comes to invoking a handler (jump to address 0) since all handler pointers are now NULL. How we handle this in cDomlette is to have a full-blown state machine. We leave handlers untouched on error, but we have them all do nothing on error state. This would probably be overkill for pyexpat.so, but we should at least set an actual flag on the parser instance that can be used to short-cut execution on error, and move the clear_handlers() invokation to a safer spot. It turns out that the direct cause of the bug is that I didn't call initState() on the XmlDomGenerator instance, which eventually caused an AttributeError exception in the startPrefixMapping callback, which caused a null return to the low-level StartNamespaceDeclHandler in pyexpat.c, which invoked a flag_error() which cleared the handlers without stopping the parse, which caused the NULL address violation when the subsequent StartElementHandler was invoked. The following code works as expected: from xml.sax import * from xml.sax.handler import feature_namespaces from xml.dom.ext.reader.Sax2 import XmlDomGenerator from Ft.Xml import cDomlette handler = XmlDomGenerator(implementation=cDomlette.implementation) handler.initState() parser = make_parser() parser.setFeature(feature_namespaces, 1) parser.setContentHandler(handler) parser.parse("test.xml") doc = handler.getRootNode() So the question is, how do we make the handling of the startPrefixMapping exception less confusing and drastic. I have ideas, but I only dimly understood pyexpat.c, and these would invariably be hacks. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s=2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From uche.ogbuji@fourthought.com Sat Jun 8 17:49:19 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sat, 08 Jun 2002 10:49:19 -0600 Subject: [XML-SIG] DOM performance? In-Reply-To: Message from Norman Walsh of "Sat, 08 Jun 2002 09:31:25 EDT." <87bsalucb6.fsf@nwalsh.com> Message-ID: <200206081649.g58GnKN20383@localhost.localdomain> > Hello world, Hey, Norm. Great to have you around here. > I've been meaning to learn Python for ages and I've finally found the > project that I'm going to use to do so: a little UI thingy with an XML > back end. Ok. so I grabbed PyXML 0.7.1 and installed it on my Linux > box where I've got Python 2.1. > > Running a little test program to build a DOM tree (baby steps, to be sure): > > import sys > from xml.dom.ext.reader import Sax2 > > # create Reader object > reader = Sax2.Reader() > > print "parse it!" > > # parse the document > doc = reader.fromStream(sys.stdin) > > print "parsed!" > > I'm concerned about the performance. For a small XML document it works > fine, but for the actual 1.4Mb XML document I need to read for my > project, performance is abysmal (after several minutes, I gave up). > > Am I doing something obviously wrong? Yeah. You're using 4DOM. Very thorough, but very slow. You can get much better perfoamnce by using a different DOM implementation Option one: using the software you've alreasdy installed. Use minidom instead: import sys from xml.dom import minidom doc = minidom.parse(sys.stdin) Option two: Even faster, but requires additional software. Install 4Suite 0.12.0. Preferably a recent CVS snapshot. Then use cDomlette import sys from Ft.Xml.Domlette import NonvalidatingReader doc = NonvalidatingReader.parseStream(sys.stdin) -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s=2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From fredrik@pythonware.com Sat Jun 8 18:43:15 2002 From: fredrik@pythonware.com (Fredrik Lundh) Date: Sat, 8 Jun 2002 19:43:15 +0200 Subject: [XML-SIG] DOM performance? References: <200206081649.g58GnKN20383@localhost.localdomain> Message-ID: <00ac01c20f13$fa1b8ce0$ced241d5@hagrid> Uche wrote: > Yeah. You're using 4DOM. Very thorough, but very slow. You can get much > better perfoamnce by using a different DOM implementation do you happen to have any benchmarks available that compares 4DOM with minidom and cdomlette? just curious-ly yrs /F ::: > Option one: using the software you've alreasdy installed. > > Use minidom instead: > > import sys > from xml.dom import minidom > doc = minidom.parse(sys.stdin) > > > Option two: Even faster, but requires additional software. > > Install 4Suite 0.12.0. Preferably a recent CVS snapshot. Then use cDomlette > > import sys > from Ft.Xml.Domlette import NonvalidatingReader > doc = NonvalidatingReader.parseStream(sys.stdin) From uche.ogbuji@fourthought.com Sat Jun 8 18:22:19 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sat, 08 Jun 2002 11:22:19 -0600 Subject: [XML-SIG] DOM performance? In-Reply-To: Message from "Fredrik Lundh" of "Sat, 08 Jun 2002 19:43:15 +0200." <00ac01c20f13$fa1b8ce0$ced241d5@hagrid> Message-ID: <200206081722.g58HMKp20451@localhost.localdomain> > Uche wrote: > > Yeah. You're using 4DOM. Very thorough, but very slow. You can get much > > better perfoamnce by using a different DOM implementation > > do you happen to have any benchmarks available that > compares 4DOM with minidom and cdomlette? Someone (ALexandre?) posted some startling benchmarks last year. Does this list have a good searchable archive anywhere? Google wasn't helpful in my quick try just now, and I've never been able to get much use out if the ASPN UI. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From uche.ogbuji@fourthought.com Sat Jun 8 19:04:22 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sat, 08 Jun 2002 12:04:22 -0600 Subject: [XML-SIG] 4xslt not installed? In-Reply-To: Message from Paul Tremblay of "Fri, 07 Jun 2002 17:23:56 EDT." <20020607172356.C6866@localhost.localdomain> Message-ID: <200206081804.g58I4M920529@localhost.localdomain> > On Fri, Jun 07, 2002 at 12:43:45PM -0600, Uche Ogbuji wrote: > > > Huh? Who said that? I said that 0.11.1 is what has a bug with 2.2. 0.12.0 > > works just fine. > > Not for me. I had a new install of python 2.2 and of 4Suite .12. I posted on this board really got no solid anwers as to what I should do, so I decided to install the more stable (not alpha) version, .11. Hmm. I looked back and saw a message from you on 6/3 with no responses. I apologize. I was mobilizing for a conference then. I'll go back and see what I can do. > > Then I'm not sure why you're having an import problem. I certainly can't > > reproduce it. Is there any other info you can offer? > > > > No. Everyting is brand new in my install. I built python 2.13 two days ago. I downloaded PyXML .7 and built and installed this yesterday, as I did with the 4Suite. > > This is very frustrating for me. I switched from perl to python because everyone said python was great for parsing xml. Xml.com calls it "charming python," but so far it has proved about as charming as a broken car. I keep downloading the newest versions of the libraries, building them and instaling them and keep getting errors. I haven't gotten Sax or 4xslt to work. Yes. I learned how frustrating the current state of things is for new users from the experience of a recent newcomer from Java/XML. All I can say is that I personally have pledged to put work into makign things better: in terms of documentation and code, as time allows. It is a pretty high priority for me now. If you're a bit patient with PyXML. I think we'll not continue to disappoint you. And you are helping make things better by offering specific complaints. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s=2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From uche.ogbuji@fourthought.com Sat Jun 8 19:18:50 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sat, 08 Jun 2002 12:18:50 -0600 Subject: [XML-SIG] new install does not work In-Reply-To: Message from Paul Tremblay of "Mon, 03 Jun 2002 11:59:16 EDT." <20020603115916.E5232@localhost.localdomain> Message-ID: <200206081818.g58IIoP20557@localhost.localdomain> > I posted this message on Sunday morning, and it hasn't appared as > of Monday, 11:57 est. I am guessing that the original email > with the full output of the error message was too large for this > mailing list, so I have resent it with most of the error message > cut out. > > I apologize if this is a duplicate message. > > On Sun, Jun 02, 2002 at 09:46:14AM -0600, Uche Ogbuji wrote: > > > > > This probably means you got 4Suite 0.11.1. The problems you report are ones > > that appear to affect people using Python 2.2 with 4Suite 0.11.1. For Python > > 2.2, we've been recommending 4Suite 0.12.0: still in alpha, but already with > > many important advances over the old version. > > > > I downloaded 4Suite 0.12.2a2 and moved it to my /usr/local/src > folder. I untarred it. I ran > > # python setup.py build > > I included the error messages below. > > I am a newbie to python, so I can't really see any reason to try > to make an alpa version of software work. I think I'll uninstall > pythone 2.1, and then install 2.1. Then I'll install 4Suite 0.11. > > Any reason why I shouldn't do this? No, this is fine. But you also must then revert back to PyXML 0.6.6. You'll also need to change the way you specify empty namespaces and prefixes once you do move to PyXML 0.7 or 4Suite 0.12.0. > **************************************** > ERROR MESSAGE FROM ./python.py build > > > Traceback (most recent call last): > File "build/lib.linux-i586-2.2/Ft/Lib/Time.py", line 5, in ? > from Ft import STRING_TYPES > ImportError: cannot import name STRING_TYPES > warning: build_docs: not documenting Ft.Lib.Time (could not import) Weird. is STRING_TYPES for some reason not defined in your local copy of Ft/__init__.py? (should be near the top). At any rate, you can skip the long build-docs phase by using ./setup.py --skip-docs install > Traceback (most recent call last): > File "/usr/local/lib/python2.2/site-packages/Ft/Ods/StorageManager/Adapters/Dbm/__init__.py", line 15, in ? > import DAdapter > File "build/lib.linux-i586-2.2/Ft/Lib/DistExt/BuildDocs.py", line 172, in _safe_import > return apply(self._builtin_import, args) > File "/usr/local/lib/python2.2/site-packages/Ft/Ods/StorageManager/Adapters/Dbm/DAdapter.py", line 20, in ? > from Ft.Lib import DbmDatabase > ImportError: cannot import name DbmDatabase > warning: build_docs: not documenting Ft.Ods.StorageManager.Adapters.Dbm (could not import) The combination of these two errors makes me think you somehow got files confused or corrupted. See if ./setup.py --skip-docs install -f (the -f meand force overwrite) helps. You might want to rm -rf Ft and _xmlplus from your site-packages before trtying again. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From phthenry@earthlink.net Sun Jun 9 03:26:39 2002 From: phthenry@earthlink.net (Paul Tremblay) Date: Sat, 8 Jun 2002 22:26:39 -0400 Subject: [XML-SIG] 4xslt not installed? In-Reply-To: <200206081804.g58I4M920529@localhost.localdomain> References: <20020607172356.C6866@localhost.localdomain> <200206081804.g58I4M920529@localhost.localdomain> Message-ID: <20020608222639.C10617@localhost.localdomain> On Sat, Jun 08, 2002 at 12:04:22PM -0600, Uche Ogbuji wrote: > > Yes. I learned how frustrating the current state of things is for new users > from the experience of a recent newcomer from Java/XML. > > All I can say is that I personally have pledged to put work into makign things > better: in terms of documentation and code, as time allows. It is a pretty > high priority for me now. > > If you're a bit patient with PyXML. I think we'll not continue to disappoint you. And you are helping make things better by offering specific complaints. > Thanks for your response. I know that the open-source software counts on dedicated people. I think things might be in a bit of a flux right now for PyXML and 4Suite. (I understand that these two libries would eventually merge?) I'll try installing version .6x of PyXML like you said. I assume that first I should manually remove /usr/local/lib/python2.1/site-packages/_xmlplus? Thanks Paul -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From martin@v.loewis.de Sun Jun 9 08:51:21 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 09 Jun 2002 09:51:21 +0200 Subject: [XML-SIG] Nastiness in xml/extensions/pyexpat.c In-Reply-To: <200206081540.g58Feag19848@localhost.localdomain> References: <200206081540.g58Feag19848@localhost.localdomain> Message-ID: Uche Ogbuji writes: > The following simple program dumps core currently. Can you rephrase this example to only use PyXML (or perhaps even to only use the expatreader)? I cannot reproduce the crash; I don't have test.xml, and I don't have cDomlette.implementation. I modified the code to ignore cDomlette.implementation, and took an arbitrary document, and got a traceback ending in File "/usr/local/lib/python2.3/site-packages/_xmlplus/dom/ext/reader/Sax2.py", line 170, in _completeTextNode if self._currText and len(self._nodeStack) and self._nodeStack[-1].nodeType != Node.DOCUMENT_NODE: AttributeError: XmlDomGenerator instance has no attribute '_currText' which appears to be unrelated to the current problem. > This function doesn't really do anything to "flag" an error. It > merely clears the handlers. The problem is that in most cases the > code just continues on, and then it dumps core the next time it > comes to invoking a handler (jump to address 0) since all handler > pointers are now NULL. It does not have to flag the error. When it is called, a Python exception has been raised, so when it gets out of expat, the Python exception is propagated. Why does it crash? I.e. why does anybody invoke a NULL handler? Expat always checks whether a handler is set before invoking it. > So the question is, how do we make the handling of the > startPrefixMapping exception less confusing and drastic. I have > ideas, but I only dimly understood pyexpat.c, and these would > invariably be hacks. I need to understand the problem first, too. Regards, Martin From john.ogorman@zombie.co.nz Mon Jun 10 01:52:53 2002 From: john.ogorman@zombie.co.nz (John O'Gorman) Date: Mon, 10 Jun 2002 12:52:53 +1200 Subject: [XML-SIG] latest versions of python, pyxml, etc blow away printing References: <20020609160003.29359.15843.Mailman@mail.python.org> Message-ID: <3D03F865.7B53C069@zombie.co.nz> Hi I visited the websites, studied the docs, then set about bringing everything up to date on my Redhat 7.2 Linux box. After getting the new python 2.2.2 installed, I found the print spooler no longer worked - python errors. I installed the python from RPM I really do want to get this stuff (python, pyxml, 4thought) going but I just gotta have printing. Any ideas anyone? John O'Gorman From malcolm@commsecure.com.au Mon Jun 10 02:05:00 2002 From: malcolm@commsecure.com.au (Malcolm Tredinnick) Date: Mon, 10 Jun 2002 11:05:00 +1000 Subject: [XML-SIG] latest versions of python, pyxml, etc blow away printing In-Reply-To: <3D03F865.7B53C069@zombie.co.nz>; from john.ogorman@zombie.co.nz on Mon, Jun 10, 2002 at 12:52:53PM +1200 References: <20020609160003.29359.15843.Mailman@mail.python.org> <3D03F865.7B53C069@zombie.co.nz> Message-ID: <20020610110500.C24844@ws14.commsecure.com.au> On Mon, Jun 10, 2002 at 12:52:53PM +1200, John O'Gorman wrote: [...] > I really do want to get this stuff (python, pyxml, 4thought) going > but I just gotta have printing. Not that this is in any way related to the XML-SIG. Assuming you didn't completely blow away Python 1.5 (the version that came with Red Hat 7.2), just go into /usr/share/printconf/util/prcintconf_backend.py and change the first line from #!/usr/bin/python to #!/usr/bin/python1.5, restart lpd by hand (run /etc/init.d/lpd start) and fix any other small errors that appear (I don't think there are any others). If you didn't keep Python 1.5, download source rpms of all the required packages printing packages from rpmfind.net and start rebuilding against the new python. It will take a few hours, but it's certainly possible (I've done it before). Malcolm -- From uche.ogbuji@fourthought.com Mon Jun 10 07:50:56 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Mon, 10 Jun 2002 00:50:56 -0600 Subject: [XML-SIG] Article: Using pull-based DOMs [in Python] Message-ID: <200206100650.g5A6ou004719@localhost.localdomain> http://www-106.ibm.com/developerworks/xml/library/x-tipulldom.html -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From martin@v.loewis.de Mon Jun 10 07:11:13 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 10 Jun 2002 08:11:13 +0200 Subject: [XML-SIG] latest versions of python, pyxml, etc blow away printing In-Reply-To: <3D03F865.7B53C069@zombie.co.nz> References: <20020609160003.29359.15843.Mailman@mail.python.org> <3D03F865.7B53C069@zombie.co.nz> Message-ID: "John O'Gorman" writes: > Any ideas anyone? I recommend to reinstall the Python 1.5 RPM (with force), then install the Python 2 RPM included in your RedHat release (I believe there is one, although I'm not sure). If you absolutely want to install Python 2.2, you could either install it into a different prefix (say, /usr/local), or install with "make altinstall" (this will create /usr/bin/python2.2, but not /usr/bin/python). Regards, Martin From uche.ogbuji@fourthought.com Mon Jun 10 08:36:15 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Mon, 10 Jun 2002 01:36:15 -0600 Subject: [XML-SIG] Nastiness in xml/extensions/pyexpat.c In-Reply-To: Message from martin@v.loewis.de (Martin v. Loewis) of "09 Jun 2002 09:51:21 +0200." Message-ID: <200206100736.g5A7aFr04943@localhost.localdomain> > Uche Ogbuji writes: > > > The following simple program dumps core currently. > > Can you rephrase this example to only use PyXML (or perhaps even to > only use the expatreader)? I cannot reproduce the crash; I don't have > test.xml, and I don't have cDomlette.implementation. So could it be a clash between cDomlette and PyXML? I find this hard to believe, or perhaps just understand. The crash I see manifests itself long before it gets near any cDomlette code. > I modified the > code to ignore cDomlette.implementation, and took an arbitrary > document, and got a traceback ending in > > File "/usr/local/lib/python2.3/site-packages/_xmlplus/dom/ext/reader/Sax2.py", line 170, in _completeTextNode > if self._currText and len(self._nodeStack) and self._nodeStack[-1].nodeType != Node.DOCUMENT_NODE: > AttributeError: XmlDomGenerator instance has no attribute '_currText' > > which appears to be unrelated to the current problem. This is what is fixed by the initState() call. > > This function doesn't really do anything to "flag" an error. It > > merely clears the handlers. The problem is that in most cases the > > code just continues on, and then it dumps core the next time it > > comes to invoking a handler (jump to address 0) since all handler > > pointers are now NULL. > > It does not have to flag the error. When it is called, a Python > exception has been raised, so when it gets out of expat, the Python > exception is propagated. The "when it gets out of expat" is the key phrase here. From what I see, the entire problem is that it is not getting out of expat quickly enough. I.e. it is going from the NSDecl handler to the StartELement handler without checking in the meantime for the global exception flag for early exit. I suppose I'll have to narrow this down further. Does anyone know how to get DDD to load symbols for an so that has not yet been loaded? This would have helped yesterday as well. > Why does it crash? I.e. why does anybody invoke a NULL handler? Expat > always checks whether a handler is set before invoking it. Not in the code I saw from the core dump stack trace. > > So the question is, how do we make the handling of the > > startPrefixMapping exception less confusing and drastic. I have > > ideas, but I only dimly understood pyexpat.c, and these would > > invariably be hacks. > > I need to understand the problem first, too. I guess I have some more work to do in tracing this... -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From martin@v.loewis.de Mon Jun 10 09:34:23 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 10 Jun 2002 10:34:23 +0200 Subject: [XML-SIG] Nastiness in xml/extensions/pyexpat.c In-Reply-To: <200206100736.g5A7aFr04943@localhost.localdomain> References: <200206100736.g5A7aFr04943@localhost.localdomain> Message-ID: Uche Ogbuji writes: > Does anyone know how to get DDD to load symbols for an so that has not yet > been loaded? This would have helped yesterday as well. I think it is possible to set a breakpoint on "shared library events", but I could not figure out right now how to do that. What helps is calling dlopen, such as (gdb) p dlopen("/usr/lib/libjpeg.so",2) $9 = 135696400 The 2 is RTLD_NOW on Linux. Regards, Martin From jedp@ilm.com Mon Jun 10 18:19:39 2002 From: jedp@ilm.com (Jed Parsons) Date: Mon, 10 Jun 2002 10:19:39 -0700 (PDT) Subject: [XML-SIG] DOM performance? In-Reply-To: <200206081649.g58GnKN20383@localhost.localdomain> References: <87bsalucb6.fsf@nwalsh.com> <200206081649.g58GnKN20383@localhost.localdomain> Message-ID: <200206101719.KAA82480@ocean.lucasdigital.com> Regarding dom implementations: > Option two: Even faster, but requires additional software. > > Install 4Suite 0.12.0. Preferably a recent CVS snapshot. Then use cDomlette > > import sys > from Ft.Xml.Domlette import NonvalidatingReader > doc = NonvalidatingReader.parseStream(sys.stdin) Should that be from Ft.Xml.cDomlette? And is there a way to instruct 4xslt to use the cDomlette parser by default? Thanks! Cheers, Jed -- Jed Parsons : Industrial Light + Magic (415) 448.2974 @@=split(m@\S\n?@,<<';-)');vec($_,$-+=length(shift@@),1)=1while@@;print"$_\n"; :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) ;-) From uche.ogbuji@fourthought.com Mon Jun 10 20:12:17 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: 10 Jun 2002 13:12:17 -0600 Subject: [XML-SIG] DOM performance? In-Reply-To: <200206101719.KAA82480@ocean.lucasdigital.com> References: <87bsalucb6.fsf@nwalsh.com> <200206081649.g58GnKN20383@localhost.localdomain> <200206101719.KAA82480@ocean.lucasdigital.com> Message-ID: <1023736339.2321.88.camel@borgia.local> On Mon, 2002-06-10 at 11:19, Jed Parsons wrote: > > Regarding dom implementations: > > Option two: Even faster, but requires additional software. > > > > Install 4Suite 0.12.0. Preferably a recent CVS snapshot. Then use cDomlette > > > > import sys > > from Ft.Xml.Domlette import NonvalidatingReader > > doc = NonvalidatingReader.parseStream(sys.stdin) > > Should that be from Ft.Xml.cDomlette? > > And is there a way to instruct 4xslt to use the cDomlette parser by > default? cDomlette was made the default some time last month. I suggest not explicitly using cDomlette anymore, in order to make your code more portable. If it's on a platform on which cDomlette is supported (UNIX, Windows, OS X so far), it will be used. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s=2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From noreply@sourceforge.net Tue Jun 11 15:21:56 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 11 Jun 2002 07:21:56 -0700 Subject: [XML-SIG] [ pyxml-Bugs-567411 ] Can't find system entity (Win32 only) Message-ID: Bugs item #567411, was opened at 2002-06-11 07:21 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=567411&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Can't find system entity (Win32 only) Initial Comment: Hi, When parsing (SAX) an XML file that calls a system entity with the following code, it works perfectly in a Linux box, but it raises an IOError in urllib in a Windows box. ===main.xml=== ]> ... &list_usage.xml; ... ===/main.xml=== ===list_usage.xml=== ... ===/list_usage.xml=== ===myscript.py=== ... from xml.sax import make_parser from xml.sax.handler import feature_external_ges p = make_parser(["xml.sax.drivers2.drv_xmlproc_val"]) p.setFeature(feature_external_ges,1) dh = MyHandler() p.setContentHandler(dh) # Crash hereafter p.parse(xmlfile) ... ===/myscript.py=== ===Traceback=== ... File C:\PYTHON21\_xmlplus\sax\expatreader.py, line 109, in parse File C:\PYTHON21\_xmlplus\sax\xmlreader.py, line 123, in parse File C:\PYTHON21\_xmlplus\sax\expatreader.py, line 203, in feed File C:\PYTHON21\_xmlplus\sax\expatreader.py, line 337, in external_entity_ref File C:\PYTHON21\_xmlplus\sax\saxutils.py, line 460, in prepare_input_source File C:\PYTHON21\lib\urllib.py, line 71, in urlopen File C:\PYTHON21\lib\urllib.py, line 176, in open File C:\PYTHON21\lib\urllib.py, line 400, in open_file File C:\PYTHON21\lib\urllib.py, line 413, in open_local_file IOError: (see above) ===/Traceback=== My Windows configuration : Win98 2e + Python 2.1.3 + pyXML 0.7.1 (binary) My Linux configuration : Debian 2.2 + Python 2.1.3 (source distro) + pyXML 0.7.1 (source distro) In both cases, the xml file is parsed from the local file system. another "strange" thing : the parser finds the DTD but not the system entities (all in the same directory). Linux : /home/glt/xresources/main.xml Windows : C:\Mes Documents\xresources\main.xml Don't hesitate to contact me if you need more information. Sincerely. --Gilles ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=567411&group_id=6473 From info@mjais.de Wed Jun 12 10:25:16 2002 From: info@mjais.de (info@mjais.de) Date: Wed, 12 Jun 2002 11:25:16 +0200 Subject: [XML-SIG] understanding the sources. wher to start? Message-ID: hello. I know some python and some xml and I have been playing a bit with PyXML. I want to get a deeper understanding of all the stuff (dom, sax, how parsers work). Can you give me some advice where to start when I want to understand the sources. I bought two books about Python and XML (one from Oreilly and the other is "definitive xml development" from prentice hall) but I have not read much yet. Do you have any other recommendations of books or online resources where to find out more about this topic? thanks in advance for your help regards markus From gherman@darwin.in-berlin.de Wed Jun 12 11:10:06 2002 From: gherman@darwin.in-berlin.de (Dinu Gherman) Date: Wed, 12 Jun 2002 12:10:06 +0200 (CEST) Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: References: Message-ID: <1023876606.3d071dfe704b8@webmail.in-berlin.de> info@mjais.de: > I know some python and some xml and I have been playing > a bit with PyXML. I want to get a deeper understanding > of all the stuff (dom, sax, how parsers work). Can you > give me some advice where to start when I want to under- > stand the sources. > > I bought two books about Python and XML (one from Oreilly > and the other is "definitive xml development" from pren- > tice hall) but I have not read much yet. Do you have any > other recommendations of books or online resources > where to find out more about this topic? If you mean a "Guide to the PyXML and std. Python XML sources" you won't have much luck! I don't know the PH book, but I translated the O'Reilly one into German and while I think this is a really useful book I don't think it will help you that much with understanding the lower level package structures. Being an intro to XML with Python it was most likely not the authors' goal and that's ok. If you poked already in the code here and there and have reached some decent frustration, I know what you mean. Other people might disagree, but I think at the moment one must poke around a bit if one really wants to under- stand what's going on and how some things really work. The best advice I can give is actually to get started, maybe looking sometimes into the test suites, although this will not always suffice. After just checking the XML-HowTo it seems to me like it was expanded significantly over the last months, which is good. I'm not sure how much people here like Wikis, but that could be a way to collect people's Py- thon/XML experience, snippets and sugestions for im- provements, maybe, unless they already exist? While speaking of improvements... would anybody with the right permissions mind to add a link to pyRXP on the following page: http://pyxml.sourceforge.net/topics/software.html saying something like this: """ pyRXP pyRXP is a Python wrapper for RXP, a very fast validating XML parser (written by Richard Tobin of the University of Edinburgh) and returns Python tuple trees from XML. """ Thanks and regards, Dinu From martin@v.loewis.de Wed Jun 12 19:16:59 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 12 Jun 2002 20:16:59 +0200 Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: References: Message-ID: info@mjais.de writes: > Can you give me some advice where to start when I want to understand the > sources. I recommend you pick an API which you already know from the application level (e.g. SAX, DOM, XPath, xmlproc, ...). For that piece of software, you take some example that uses this API. For that example, you 1. find out what modules it uses, by printing sys.modules.keys() after all imports are done, and 2. put strategic print statements into those modules, to find out who calls what. HTH, Martin From akuchlin@mems-exchange.org Wed Jun 12 19:49:08 2002 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Wed, 12 Jun 2002 14:49:08 -0400 Subject: [XML-SIG] E-mail address for PyXML Web pages? Message-ID: Aahz just pointed out to me in private mail that some of the pyxml.sf.net Web pages have mailto: URLs for webmaster@python.org. No one reading the webmaster alias has access to the PyXML CVS, so that's pointless. Where should those links go instead? We could create an xml-pages@python.org alias, or we could just direct comments to the XML-SIG list. Suggestions? --amk (www.amk.ca) Such a being prefers mental anarchy. They call it freedom. -- Enlightenment, in "Four to Doomsday" From akuchlin@mems-exchange.org Wed Jun 12 20:33:07 2002 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Wed, 12 Jun 2002 15:33:07 -0400 Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: <1023876606.3d071dfe704b8@webmail.in-berlin.de> References: <1023876606.3d071dfe704b8@webmail.in-berlin.de> Message-ID: <20020612193306.GD26694@ute.mems-exchange.org> On Wed, Jun 12, 2002 at 12:10:06PM +0200, Dinu Gherman wrote: >Other people might disagree, but I think at the moment >one must poke around a bit if one really wants to under- >stand what's going on and how some things really work. I won't disagree. In fact, I'll be rougher: The PyXML package is currently too difficult to understand. Generally when doing XML work I just give up and use the smaller XML package included with Python, and updating the HOWTO in May reinforced this. The problems: * There are too many ways to do things, and no guidance about which to use. Parsing an XML document? There's qp_xml.py, pulldom.py, SAX readers, DOM readers, xmllib, pyexpat? Printing an XML document? sax/writer.py or dom.ext.Printer? What's the difference between these choices? Which ones are deprecated? * Some things, such as XSLT are simply broken; they don't work at all. (Or maybe it'll work if I installed 4Suite; the README currently says you shouldn't install the xml.xslt package from PyXML, though.) We really need to do better, but it's not clear what to do. Is it simply a documentation problem? Perhaps. But we *must* do something about this. >which is good. I'm not sure how much people here like >Wikis, but that could be a way to collect people's Py- >thon/XML experience, snippets and sugestions for im- >provements, maybe, unless they already exist? The online Python Cookbook has an XML section; Uche has also started a collection of processing tips. >While speaking of improvements... would anybody with the >right permissions mind to add a link to pyRXP on the >following page: Done. --amk (www.amk.ca) HAMLET: A little more than kin, and less than kind. -- _Hamlet_, I, ii From Juergen Hermann" Message-ID: On Wed, 12 Jun 2002 15:33:07 -0400, Andrew Kuchling wrote: >>which is good. I'm not sure how much people here like >>Wikis, but that could be a way to collect people's Py- >>thon/XML experience, snippets and sugestions for im- >>provements, maybe, unless they already exist? > >The online Python Cookbook has an XML section; Uche has also started a >collection of processing tips. Of course I'm strongly biased, but the wiki idea is the right thing. I could easily set up a dedicated PyXML wiki, or help create one on the www.python.org servers. A wiki would certainly help to focus the little = time slices most of us have into _one_ set of docs, and enable co- operative efforts. Since people tend to talk about things they use, this would also mean that only things in actual use would be documented, allowing newbies to = focus on exactly those things. What we already have (how-tos etc.) can be linked to easily. The DocBook wiki grows rather fast currently... :) Ciao, J=FCrgen From martin@v.loewis.de Wed Jun 12 21:34:43 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 12 Jun 2002 22:34:43 +0200 Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: <20020612193306.GD26694@ute.mems-exchange.org> References: <1023876606.3d071dfe704b8@webmail.in-berlin.de> <20020612193306.GD26694@ute.mems-exchange.org> Message-ID: Andrew Kuchling writes: > We really need to do better, but it's not clear what to do. > Is it simply a documentation problem? Perhaps. But we *must* > do something about this. I can speak only for myself, but I see no need for immediate action. Regards, Martin From martin@v.loewis.de Wed Jun 12 21:35:32 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 12 Jun 2002 22:35:32 +0200 Subject: [XML-SIG] E-mail address for PyXML Web pages? In-Reply-To: References: Message-ID: Andrew Kuchling writes: > Aahz just pointed out to me in private mail that some of the > pyxml.sf.net Web pages have mailto: URLs for webmaster@python.org. No > one reading the webmaster alias has access to the PyXML CVS, so that's > pointless. Where should those links go instead? We could create an > xml-pages@python.org alias, or we could just direct comments to the > XML-SIG list. Suggestions? I think referring people to xml-sig would be fine. Regards, Martin From jedp@ilm.com Wed Jun 12 22:54:24 2002 From: jedp@ilm.com (Jed Parsons) Date: Wed, 12 Jun 2002 14:54:24 -0700 (PDT) Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: References: <1023876606.3d071dfe704b8@webmail.in-berlin.de> <20020612193306.GD26694@ute.mems-exchange.org> Message-ID: <200206122154.OAA92878@ocean.lucasdigital.com> Hola - Martin v. Loewis writes: > Andrew Kuchling writes: > > > We really need to do better, but it's not clear what to do. > > Is it simply a documentation problem? Perhaps. But we *must* > > do something about this. > > I can speak only for myself, but I see no need for immediate action. ... and speaking for myself, I *would* like to see something happen. I think better documentation would be a good start. I'm not a contributor for any of the code, but I have struggled to figure out how to use some of it :-) and would be happy to assist in a documentation effort if someone had a use for me. Cheers, Jed -- 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 uche.ogbuji@fourthought.com Thu Jun 13 01:43:21 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Wed, 12 Jun 2002 18:43:21 -0600 Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: Message from martin@v.loewis.de (Martin v. Loewis) of "12 Jun 2002 20:16:59 +0200." Message-ID: <200206130043.g5D0hLX22893@localhost.localdomain> > info@mjais.de writes: > > > Can you give me some advice where to start when I want to understand the > > sources. > > I recommend you pick an API which you already know from the > application level (e.g. SAX, DOM, XPath, xmlproc, ...). For that piece > of software, you take some example that uses this API. For that > example, you > > 1. find out what modules it uses, by printing sys.modules.keys() after > all imports are done, and > 2. put strategic print statements into those modules, to find out who > calls what. 3. Help those who follow you by writing up your findings. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From uche.ogbuji@fourthought.com Thu Jun 13 01:47:11 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Wed, 12 Jun 2002 18:47:11 -0600 Subject: [XML-SIG] Up-to-date, rich documentation In-Reply-To: Message from "Juergen Hermann" of "Wed, 12 Jun 2002 21:46:40 +0200." Message-ID: <200206130047.g5D0lBJ22914@localhost.localdomain> > On Wed, 12 Jun 2002 15:33:07 -0400, Andrew Kuchling wrote: > = > >>which is good. I'm not sure how much people here like = > >>Wikis, but that could be a way to collect people's Py- > >>thon/XML experience, snippets and sugestions for im- > >>provements, maybe, unless they already exist? > > > >The online Python Cookbook has an XML section; Uche has also started a= > >collection of processing tips. = > = > Of course I'm strongly biased, but the wiki idea is the right thing. I = > could easily set up a dedicated PyXML wiki, or help create one on the = > www.python.org servers. A wiki would certainly help to focus the little= = > time slices most of us have into _one_ set of docs, and enable co- > operative efforts. > = > Since people tend to talk about things they use, this would also mean = > that only things in actual use would be documented, allowing newbies to= = > focus on exactly those things. What we already have (how-tos etc.) can = > be linked to easily. > = > The DocBook wiki grows rather fast currently... :) I think this is a good idea, as I mentioned in my Advogato diary. Well, = I = mentioned a 4Suite wiki there, but I also like the idea of a general = Python/XML processing Wiki. One of my tasks this evening is to install and get familiar with MoinMoin= on = the path towards this. You could probably tread this path much more quic= kly = than I could. Why wait for an authoritative location at python.org? I t= hink = it shuld not matter where the wiki is hosted as long as the various proje= ct = pages refer to it. -- = Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): = http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/docume= nts/s=3D 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - = http://www.xmleurope.com/2002/kttrack.asp#themodel From xanimal@eudoramail.com Thu Jun 13 04:37:07 2002 From: xanimal@eudoramail.com (L. C. Rees) Date: Wed, 12 Jun 2002 20:37:07 -0700 Subject: [XML-SIG] Extend of cDomlette DOM API support Message-ID: Is there documentation of which DOM methods are implemented in the current version of cDomlette (I'm using 0.4.11 with Python 2.2) and which methods may be added in the future? One convienient method, getElementsByTagName, isn't present. Are there plans to do this sometime in the near future? Is there a substitute? Thanks, L. C. Rees Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com From Juergen Hermann" Message-ID: On Wed, 12 Jun 2002 18:47:11 -0600, Uche Ogbuji wrote: >You could probably tread this path much more quickly >than I could. Why wait for an authoritative location at python.org? I= think >it shuld not matter where the wiki is hosted as long as the various pro= ject >pages refer to it. Indeed. http:/purl.net/wiki/xml-sig/ :) Ciao, J=FCrgen From martin@v.loewis.de Thu Jun 13 07:46:53 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 13 Jun 2002 08:46:53 +0200 Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: <200206122154.OAA92878@ocean.lucasdigital.com> References: <1023876606.3d071dfe704b8@webmail.in-berlin.de> <20020612193306.GD26694@ute.mems-exchange.org> <200206122154.OAA92878@ocean.lucasdigital.com> Message-ID: Jed Parsons writes: > > I can speak only for myself, but I see no need for immediate action. > > ... and speaking for myself, I *would* like to see something happen. Notice the difference: I would not mind something happening, either, but I won't act (except by integrating patches that other people make, and releasing the package). > I'm not a contributor for any of the code, but I have struggled to > figure out how to use some of it :-) and would be happy to assist in a > documentation effort if someone had a use for me. Just write documentation that you thing would have been useful for you if it had been available while you struggled. I would personally prefer it it went either into the howto or the reference manual, but if you think another form of documentation is more appropriate, please go ahead. Regards, Martin From Alexandre.Fayolle@logilab.fr Thu Jun 13 08:17:20 2002 From: Alexandre.Fayolle@logilab.fr (Alexandre) Date: Thu, 13 Jun 2002 09:17:20 +0200 Subject: [XML-SIG] Extend of cDomlette DOM API support In-Reply-To: References: Message-ID: <20020613071720.GA3808@orion.logilab.fr> On Wed, Jun 12, 2002 at 08:37:07PM -0700, L. C. Rees wrote: > One convienient method, getElementsByTagName, isn't present. Are there > plans to do this sometime in the near future? Is there a substitute? You can use XPath which will allow you to get a more precise control of the search. Assuming doc is a cDomlette document, you can use from Ft.Xml.XPath import Evaluate nodes = Evaluate('//tag',doc) Or if you only want the 'tag' nodes that are children of the root element (and not all 'tag' nodes in the document): nodes = Evaluate('/*/tag',doc) which will be much faster (since it avoids searching the whole tree). Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From Alexandre.Fayolle@logilab.fr Thu Jun 13 08:21:55 2002 From: Alexandre.Fayolle@logilab.fr (Alexandre) Date: Thu, 13 Jun 2002 09:21:55 +0200 Subject: [XML-SIG] Up-to-date, rich documentation In-Reply-To: References: <200206130047.g5D0lBJ22914@localhost.localdomain> Message-ID: <20020613072155.GB3808@orion.logilab.fr> On Thu, Jun 13, 2002 at 08:44:19AM +0200, Juergen Hermann wrote: > On Wed, 12 Jun 2002 18:47:11 -0600, Uche Ogbuji wrote: > > >You could probably tread this path much more quickly > >than I could. Why wait for an authoritative location at python.org? I think > >it shuld not matter where the wiki is hosted as long as the various project > >pages refer to it. > > Indeed. http:/purl.net/wiki/xml-sig/ :) Great. Just for the lazy typers who like their email client to display hyperlinks properly: http://purl.net/wiki/xml-sig/ Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From Alexandre.Fayolle@logilab.fr Thu Jun 13 08:29:40 2002 From: Alexandre.Fayolle@logilab.fr (Alexandre) Date: Thu, 13 Jun 2002 09:29:40 +0200 Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: <20020612193306.GD26694@ute.mems-exchange.org> References: <1023876606.3d071dfe704b8@webmail.in-berlin.de> <20020612193306.GD26694@ute.mems-exchange.org> Message-ID: <20020613072940.GC3808@orion.logilab.fr> On Wed, Jun 12, 2002 at 03:33:07PM -0400, Andrew Kuchling wrote: > * Some things, such as XSLT are simply broken; they don't work > at all. (Or maybe it'll work if I installed 4Suite; the > README currently says you shouldn't install the xml.xslt > package from PyXML, though.) Not it won't. I've put back 4XPath in the Debian python-xml package but the 4XSLT is not there because it does not import, unless you have a very old 4Suite installation available. My understanding is that this will be worked on and fixed once 4Suite 0.12 is available. As a sidenote, I'm currently working on a Python+XML tutorial for the Europython conference. I'll be happy to contribute the slides to a documentation. Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From gherman@darwin.in-berlin.de Thu Jun 13 09:06:29 2002 From: gherman@darwin.in-berlin.de (Dinu Gherman) Date: Thu, 13 Jun 2002 10:06:29 +0200 (CEST) Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: <20020613072940.GC3808@orion.logilab.fr> References: <1023876606.3d071dfe704b8@webmail.in-berlin.de> <20020612193306.GD26694@ute.mems-exchange.org> <20020613072940.GC3808@orion.logilab.fr> Message-ID: <1023955589.3d0852852228d@webmail.in-berlin.de> Alexandre : > As a sidenote, I'm currently working on a Python+XML tutorial for > the Europython conference. I'll be happy to contribute the slides > to a documentation. Great! If you still accept some feed-in: I'm especially in- terested in the following packages (like everybody else, I guess): - standard Python XML - PyXML - 4Suite evaluated using the following criteria: - borderlines - overlap - dependencies - versioning issues - future unification I would also like to add versioning issues for Python (and, less so, Jython) itself, but I fear I'd look like trying to be really mean. I can reassure you, I'm not, I'm just a bit confused... BTW, Jython 2.1 contains *some* of PyXML, Finn Bock said recently on the Jython-Users list. Y'day I've looked-up this SIG's mission statement, in which one key phrase says: "While Python includes basic XML processing capabilities, the goal of this SIG is to make Python become the premier language for XML processing." I clearly see this potential, but I dare having some doubts about the "multi-layered support approach" as I'd probably coin it, if I was working in a marketing department. I'm looking forward to meeting some of you at EPC 2002! Best regards, Dinu From Nicolas.Chauvat@logilab.fr Thu Jun 13 10:24:08 2002 From: Nicolas.Chauvat@logilab.fr (Nicolas Chauvat) Date: Thu, 13 Jun 2002 11:24:08 +0200 (CEST) Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: <20020612193306.GD26694@ute.mems-exchange.org> Message-ID: > We really need to do better, but it's not clear what to do. > Is it simply a documentation problem? Perhaps. But we *must* > do something about this. Logilab has a small contribution to the effort : ftp://ftp.logilab.org/pub/talks/python-uk-2002.pdf The PyXML tutorial Alexandre Fayolle presented at the 1st Python UK conference back in april. Part of the info is already covered in the Howt, I think. Stay tuned for a nicer/longer one he is preparing for EuroPython. -- Nicolas Chauvat http://www.logilab.com - "Mais où est donc Ornicar ?" - LOGILAB, Paris (France) From Alexandre.Fayolle@logilab.fr Thu Jun 13 10:33:24 2002 From: Alexandre.Fayolle@logilab.fr (Alexandre) Date: Thu, 13 Jun 2002 11:33:24 +0200 Subject: [XML-SIG] Python and XML tutorial at EPC2002 In-Reply-To: <1023955589.3d0852852228d@webmail.in-berlin.de> References: <1023876606.3d071dfe704b8@webmail.in-berlin.de> <20020612193306.GD26694@ute.mems-exchange.org> <20020613072940.GC3808@orion.logilab.fr> <1023955589.3d0852852228d@webmail.in-berlin.de> Message-ID: <20020613093324.GD3808@orion.logilab.fr> On Thu, Jun 13, 2002 at 10:06:29AM +0200, Dinu Gherman wrote: > Alexandre : > > > As a sidenote, I'm currently working on a Python+XML tutorial for > > the Europython conference. I'll be happy to contribute the slides > > to a documentation. > > Great! If you still accept some feed-in: I'm especially in- > terested in the following packages (like everybody else, > I guess): > > - standard Python XML > - PyXML > - 4Suite That's what's featured, yes. > evaluated using the following criteria: > > - borderlines > - overlap > - dependencies > - versioning issues > - future unification > > I would also like to add versioning issues for Python (and, > less so, Jython) itself, but I fear I'd look like trying to > be really mean. I can reassure you, I'm not, I'm just a bit > confused... BTW, Jython 2.1 contains *some* of PyXML, Finn > Bock said recently on the Jython-Users list. Hmm, not so sure. This is a tutorial, so the main thing is how to use it, not a comparative analysis. 90 minutes is quite short to cover SAX, DOM and XPath with detailed examples. I have a few words about "overlap, dependencies, versioning and unification", but I'm not planning on giving a full lecture about the history of PyXML and 4Suite. As for Jython, I have zero experience on the beast, so I was not going to speak about it. I imagine that xmlproc should run fine on top of it, since it pure python. Now, if you want to submit a few slides (2-3 max) about PyXML and Jython, I'll be happy to include them in the tutorial (and to give you credit for them, of course). > I'm looking forward to meeting some of you at EPC 2002! Yup. That's the nice part about such events: you get to put a face on an email adress ;o) Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From paul@boddie.net Thu Jun 13 11:50:42 2002 From: paul@boddie.net (paul@boddie.net) Date: 13 Jun 2002 10:50:42 -0000 Subject: [XML-SIG] understanding the sources. wher to start? Message-ID: <20020613105042.3434.qmail@www1.nameplanet.com> Andrew Kuchling wrote: > >Generally when doing XML work I just give up and use the smaller XML >package included with Python, and updating the HOWTO in May reinforced >this. The problems: > > * There are too many ways to do things, and no guidance about > which to use. Parsing an XML document? There's qp_xml.py, > pulldom.py, SAX readers, DOM readers, xmllib, pyexpat? > Printing an XML document? sax/writer.py or dom.ext.Printer? > What's the difference between these choices? Which ones are > deprecated? That's a really good point. It's certainly easiest to use xml.dom.minidom to do any work with the DOM, and that might suit most people, but then there's the issue of using alternative DOM implementations. Although I'm sure it's documented somewhere, I don't think it's that obvious how to write generic code which can make use of other implementations, such as pirxx, for example. (Please prove me wrong!) > * Some things, such as XSLT are simply broken; they don't work > at all. (Or maybe it'll work if I installed 4Suite; the > README currently says you shouldn't install the xml.xslt > package from PyXML, though.) I haven't dared to do anything with XSLT in Python, but then it can take some motivation to do things in XSLT at all. ;-) However, I am very impressed with the XPath implementation. >We really need to do better, but it's not clear what to do. >Is it simply a documentation problem? Perhaps. But we *must* >do something about this. It should be clearer how the following things can be done with PyXML: * Opening existing documents using SAX and DOM, using different implementations. (The "how to" only used to cover SAX.) * Creating new documents using DOM. Does one instantiate a new xml.dom.Document object, call methods on the DOM implementation? What about all those arguments to createDocument in 4DOM? * Serializing documents - what's the best way? It's tempting to use xml.dom.ext.PrettyPrint, but it doesn't always work properly (search for bug reports on SourceForge) and it might not be as fast as the 'toxml' method, but is the 'toxml' method standard or an extension? * Manipulating document nodes. It's always possible to refer people to the DOM specification for this, but then PyXML is all about a Pythonic version of the DOM. Moreover, the W3C specifications can be too heavy for the unseasoned developer. The Pythonic DOM standard really needs specifying in full. For example, there are some odd differences in the implementation of the special 'attributes' attribute between minidom and 4DOM, in my experience. Which one is correct? Must I always have to check the types and take evasive action? Dinu Gherman wrote: > >Alexandre : > >> As a sidenote, I'm currently working on a Python+XML tutorial for >> the Europython conference. I'll be happy to contribute the slides >> to a documentation. > >Great! If you still accept some feed-in: I'm especially in- >terested in the following packages (like everybody else, >I guess): > >- standard Python XML >- PyXML >- 4Suite > >evaluated using the following criteria: > >- borderlines >- overlap >- dependencies >- versioning issues This seems to be a big, recurring thing with PyXML, even though I've been reasonably lucky never to have had problems with version conflicts and broken features. However, I'm surprised it's even been possible for any books on XML processing with Python to be published because of this. >- future unification > >I would also like to add versioning issues for Python (and, >less so, Jython) itself, but I fear I'd look like trying to >be really mean. I can reassure you, I'm not, I'm just a bit >confused... BTW, Jython 2.1 contains *some* of PyXML, Finn >Bock said recently on the Jython-Users list. A PyXML API accessing JAXP would be nice, but I fear that the PyXML API isn't formal enough (unlike the DB-API accessing JDBC, as done by zxJDBC). Paul From tpassin@comcast.net Thu Jun 13 13:27:34 2002 From: tpassin@comcast.net (Thomas B. Passin) Date: Thu, 13 Jun 2002 08:27:34 -0400 Subject: [XML-SIG] understanding the sources. wher to start? References: <1023876606.3d071dfe704b8@webmail.in-berlin.de> <20020612193306.GD26694@ute.mems-exchange.org> <20020613072940.GC3808@orion.logilab.fr> Message-ID: <001201c212d5$b24f4a30$f6193044@tbp> [Alexandre] > On Wed, Jun 12, 2002 at 03:33:07PM -0400, Andrew Kuchling wrote: > > * Some things, such as XSLT are simply broken; they don't work > > at all. (Or maybe it'll work if I installed 4Suite; the > > README currently says you shouldn't install the xml.xslt > > package from PyXML, though.) > > Not it won't. I've put back 4XPath in the Debian python-xml package but > the 4XSLT is not there because it does not import, unless you have a > very old 4Suite installation available. My understanding is that this > will be worked on and fixed once 4Suite 0.12 is available. > 4xslt works on my system - 4suite 0.11, Python 1.5.2 and, as I remember, Python 2.1. Can't say about Python 2.2. I found a few bugs which I posted about some months ago. Cheers, Tom P From tpassin@comcast.net Thu Jun 13 13:31:56 2002 From: tpassin@comcast.net (Thomas B. Passin) Date: Thu, 13 Jun 2002 08:31:56 -0400 Subject: [XML-SIG] understanding the sources. wher to start? References: <20020613105042.3434.qmail@www1.nameplanet.com> Message-ID: <001d01c212d6$4e7a62a0$f6193044@tbp> [] > > I haven't dared to do anything with XSLT in Python, but then it can take some > motivation to do things in XSLT at all. ;-) However, I am very impressed with > the XPath implementation. > I use 4xslt with Zope and it works very well. I wrote an Zope External Method to send a string of XML to 4xslt and get the transformed result back, which then gets displayed. This is great because the xslt processor doesn't have a new process started each time it is called. Cheers, Tom P From Alexandre.Fayolle@logilab.fr Thu Jun 13 14:02:57 2002 From: Alexandre.Fayolle@logilab.fr (Alexandre) Date: Thu, 13 Jun 2002 15:02:57 +0200 Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: <001201c212d5$b24f4a30$f6193044@tbp> References: <1023876606.3d071dfe704b8@webmail.in-berlin.de> <20020612193306.GD26694@ute.mems-exchange.org> <20020613072940.GC3808@orion.logilab.fr> <001201c212d5$b24f4a30$f6193044@tbp> Message-ID: <20020613130257.GG3808@orion.logilab.fr> On Thu, Jun 13, 2002 at 08:27:34AM -0400, Thomas B. Passin wrote: > > Not it won't. I've put back 4XPath in the Debian python-xml package but > > the 4XSLT is not there because it does not import, unless you have a > > very old 4Suite installation available. My understanding is that this > > will be worked on and fixed once 4Suite 0.12 is available. > > > > 4xslt works on my system - 4suite 0.11, Python 1.5.2 and, as I remember, > Python 2.1. Can't say about Python 2.2. I found a few bugs which I posted > about some months ago. Which 4xslt is that? 4Suite's or PyXML's? The order of installation does matter if I recall correctly (it's a *long* time since I used 4Suite-0.11), and there are some weird cross dependencies in the two packages. Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From martin@v.loewis.de Thu Jun 13 16:54:40 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 13 Jun 2002 17:54:40 +0200 Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: <20020613072940.GC3808@orion.logilab.fr> References: <1023876606.3d071dfe704b8@webmail.in-berlin.de> <20020612193306.GD26694@ute.mems-exchange.org> <20020613072940.GC3808@orion.logilab.fr> Message-ID: Alexandre writes: > Not it won't. I've put back 4XPath in the Debian python-xml package but > the 4XSLT is not there because it does not import, unless you have a > very old 4Suite installation available. My understanding is that this > will be worked on and fixed once 4Suite 0.12 is available. Correct, although I ask myself from time to time whether I should do that even before 4Suite 0.12 is avaiable. Regards, Martin From akuchlin@mems-exchange.org Thu Jun 13 19:05:17 2002 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Thu, 13 Jun 2002 14:05:17 -0400 Subject: [XML-SIG] Up-to-date, rich documentation In-Reply-To: References: <200206130047.g5D0lBJ22914@localhost.localdomain> Message-ID: <20020613180516.GA29657@ute.mems-exchange.org> On Thu, Jun 13, 2002 at 08:44:19AM +0200, Juergen Hermann wrote: >Indeed. http:/purl.net/wiki/xml-sig/ :) I've added a link to the Wiki from the page on documentation in the XML topic guide. --amk From Juergen Hermann" Message-ID: On Thu, 13 Jun 2002 14:05:17 -0400, Andrew Kuchling wrote: >On Thu, Jun 13, 2002 at 08:44:19AM +0200, Juergen Hermann wrote: >>Indeed. http:/purl.net/wiki/xml-sig/ :) > >I've added a link to the Wiki from the page on documentation in the >XML topic guide. I hope you used a weak reference for that cycle ;) Ciao, J=FCrgen From phthenry@earthlink.net Thu Jun 13 16:52:14 2002 From: phthenry@earthlink.net (Paul Tremblay) Date: Thu, 13 Jun 2002 11:52:14 -0400 Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: <20020613105042.3434.qmail@www1.nameplanet.com> References: <20020613105042.3434.qmail@www1.nameplanet.com> Message-ID: <20020613115214.G31120@localhost.localdomain> On Thu, Jun 13, 2002 at 10:50:42AM -0000, paul@boddie.net wrote: > > This seems to be a big, recurring thing with PyXML, even though I've been > reasonably lucky never to have had problems with version conflicts and broken > features. However, I'm surprised it's even been possible for any books on XML > processing with Python to be published because of this. > I completely agree that there are problems with the version conflicts and with documentation. I also bought the O'Reilly book (*Python & XML*). I find this book straightforward, but too short. For example, it handles xslt processing in around 20 pages, when it really needs to be covered in 800. (I have the Kay book on xslt processing called *Xslt*, which is literally 800 pages long and one of the best books on computers I have bought.) I think this thread on the lack of documentation is really a good sign. Whether or not python suceeds in becoming a tool of choice for prcessing xml (I'm not sure how mainsteam it is right now) depends on readable documentation. In fact, good documentation is so important for all software and all platforms. I use linux, and I am absolutely frustrated at the terrible documentation. I often stugle with a problem for days before finding that the solution was simple--but undocumented, or poorly explained. I think one reason why java is the choice for processing xml is that you can find good, readable howtos. Sun has made sure of this. On this note I would also be willing to write and submit documentation. On another note, I switched from perl to python because of what I read, which generally deprecated perl for xml processing, but praised python. In fact, there is a series of tutorials on IBM (I beleive), which called "charming ptyhon." I think processing xml with python can be "charming," but only if it is easier to use. On the other hand, I find perl also to be kind of a mess in regards to xml. Perl is really not a class language, and there are so many different libraries written for xml, that I couldn't figure out which to use. Paul -- ************************ *Paul Tremblay * *phthenry@earthlink.net* ************************ From tpassin@comcast.net Fri Jun 14 02:45:21 2002 From: tpassin@comcast.net (Thomas B. Passin) Date: Thu, 13 Jun 2002 21:45:21 -0400 Subject: [XML-SIG] understanding the sources. wher to start? References: <1023876606.3d071dfe704b8@webmail.in-berlin.de> <20020612193306.GD26694@ute.mems-exchange.org> <20020613072940.GC3808@orion.logilab.fr> <001201c212d5$b24f4a30$f6193044@tbp> <20020613130257.GG3808@orion.logilab.fr> Message-ID: <003301c21345$25a310b0$f6193044@tbp> [Alexandre] > > > > 4xslt works on my system - 4suite 0.11, Python 1.5.2 and, as I remember, > > Python 2.1. Can't say about Python 2.2. I found a few bugs which I posted > > about some months ago. > > Which 4xslt is that? 4Suite's or PyXML's? The order of installation > does matter if I recall correctly (it's a *long* time since I used > 4Suite-0.11), and there are some weird cross dependencies in the two > packages. > I installed Pyxml first. Then I deleted the xslt and (I think there was one) xpath directories. Then I installed 4Suite. IIRC, you really do want to delete the pyxml directories first, as well as any earlier FT directories. Cheers, Tom P From uche.ogbuji@fourthought.com Fri Jun 14 05:05:19 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Thu, 13 Jun 2002 22:05:19 -0600 Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: Message from martin@v.loewis.de (Martin v. Loewis) of "13 Jun 2002 08:46:53 +0200." Message-ID: <200206140405.g5E45KB30592@localhost.localdomain> > Jed Parsons writes: > > I'm not a contributor for any of the code, but I have struggled to > > figure out how to use some of it :-) and would be happy to assist in a > > documentation effort if someone had a use for me. > > Just write documentation that you thing would have been useful for you > if it had been available while you struggled. I would personally > prefer it it went either into the howto or the reference manual, but > if you think another form of documentation is more appropriate, please > go ahead. Just to make a note: I don't mean to make my separate efforts at documentation mto detract from the HOWTO or reference manual. In fact, I expect to migrate all the appropriate items to these standard docs soon. My approach is more collation and annotation than brand new documentation. I think is the shortest path to getting some of the recent thoughts in one place. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s=2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From Juergen Hermann" Message-ID: On Thu, 13 Jun 2002 22:05:19 -0600, Uche Ogbuji wrote: >all the appropriate items to these standard docs soon. My approach is = more >collation and annotation than brand new documentation. I think is the = >shortest path to getting some of the recent thoughts in one place. Same for the wiki, btw. If a page matures to a cohesive document, it sho= uld be moved to the classic docs and replaced by a link to that. Ciao, J=FCrgen From gherman@darwin.in-berlin.de Fri Jun 14 09:20:11 2002 From: gherman@darwin.in-berlin.de (Dinu Gherman) Date: Fri, 14 Jun 2002 10:20:11 +0200 (CEST) Subject: [XML-SIG] Wiki nature (Was: understanding the sources. wher to start?) In-Reply-To: References: Message-ID: <1024042811.3d09a73bd4f60@webmail.in-berlin.de> Juergen Hermann : > Same for the wiki, btw. If a page matures to a cohesive > document, it should be moved to the classic docs and > replaced by a link to that. That was always the moment of pain with Wikis for me. I think few of them are designed in a way that would make it easy to save a page in "cleaned-up, standalone" HTML, that can be easily plugged into some other HTML "environment". For me that means there should be no more styles, images, etc. which could conflict with the target environment. On the long run I'd even advocate for an option to condense an entire Wiki space into a single PDF file, hyperlinked like hell, of course. ;-) But,-well,-on-the-long-run-we're-all-dead'ly, Dinu From mal@lemburg.com Fri Jun 14 10:48:33 2002 From: mal@lemburg.com (M.-A. Lemburg) Date: Fri, 14 Jun 2002 11:48:33 +0200 Subject: [XML-SIG] Wiki nature (Was: understanding the sources. wher to start?) References: <1024042811.3d09a73bd4f60@webmail.in-berlin.de> Message-ID: <3D09BBF1.8080005@lemburg.com> Dinu Gherman wrote: > Juergen Hermann : > > >>Same for the wiki, btw. If a page matures to a cohesive >>document, it should be moved to the classic docs and >>replaced by a link to that. > > > That was always the moment of pain with Wikis for me. > > I think few of them are designed in a way that would > make it easy to save a page in "cleaned-up, standalone" > HTML, that can be easily plugged into some other HTML > "environment". For me that means there should be no > more styles, images, etc. which could conflict with > the target environment. > > On the long run I'd even advocate for an option to > condense an entire Wiki space into a single PDF file, > hyperlinked like hell, of course. ;-) That would be nice :-) Note that MoinMoin already has a feature to download the complete wiki as XML file. Perhaps you could tweak that file format into an auto-formatted PDF file. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ Meet us at EuroPython 2002: http://www.europython.org/ From Juergen Hermann" Message-ID: On Fri, 14 Jun 2002 10:20:11 +0200 (CEST), Dinu Gherman wrote: >I think few of them are designed in a way that would >make it easy to save a page in "cleaned-up, standalone" >HTML, that can be easily plugged into some other HTML >"environment". Fortunately we chose wisely. ;) http://twistedmatrix.com/users/jh.twistd/xml- sig/moin.cgi/CommonXmlTasks?action=3Dcontent The decoration you get with some links can be switched off by UserPreferences, and I still hope I can get the conversion to XML more stable than it is now (still, with some manual tweaking, you can use the current conversion to do MOST of the work for you). >On the long run I'd even advocate for an option to >condense an entire Wiki space into a single PDF file, >hyperlinked like hell, of course. ;-) When I'm done with the formatter refactoring, I'll come back to you for = help with reportlab. :) Ciao, J=FCrgen -- J=FCrgen Hermann, Developer (jhe@webde-ag.de) WEB.DE AG, http://webde-ag.de/ From Juergen Hermann" Message-ID: On Fri, 14 Jun 2002 11:48:33 +0200, M.-A. Lemburg wrote: >Note that MoinMoin already has a feature to download the >complete wiki as XML file. Perhaps you could tweak that >file format into an auto-formatted PDF file. That feature is not (yet) completed, and also won't buy him anything, since pages will be unparsed wiki markup in a CDATA section, at least for the moment. Ciao, J=FCrgen -- J=FCrgen Hermann, Developer (jhe@webde-ag.de) WEB.DE AG, http://webde-ag.de/ From mal@lemburg.com Fri Jun 14 11:24:03 2002 From: mal@lemburg.com (M.-A. Lemburg) Date: Fri, 14 Jun 2002 12:24:03 +0200 Subject: [XML-SIG] Wiki nature (Was: understanding the sources. wher to start?) References: Message-ID: <3D09C443.4070309@lemburg.com> Juergen Hermann wrote: > On Fri, 14 Jun 2002 11:48:33 +0200, M.-A. Lemburg wrote: > > >>Note that MoinMoin already has a feature to download the >>complete wiki as XML file. Perhaps you could tweak that >>file format into an auto-formatted PDF file. > > > That feature is not (yet) completed, and also won't buy him anything, > since pages will be unparsed wiki markup in a CDATA section, at least > for the moment. Oh well. Wouldn't it be possible to recurse through all pages and use the output of the XML page links to group them together ? -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ Meet us at EuroPython 2002: http://www.europython.org/ From piedf@yahoo.fr Fri Jun 14 14:11:10 2002 From: piedf@yahoo.fr (Francis PIED) Date: Fri, 14 Jun 2002 06:11:10 -0700 (PDT) Subject: [XML-SIG] Broken link Message-ID: <20020614131110.82864.qmail@web13501.mail.yahoo.com> Hi, Just to inform you that this link : # Perl Bookmarks -- Another collection from Norm Walsh, pertaining to the Perl programming language. on this page http://pyxml.sourceforge.net/topics/xbel/ is broken. Farncis __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com From sam@webslingerZ.com Fri Jun 14 14:35:16 2002 From: sam@webslingerZ.com (Sam Brauer) Date: Fri, 14 Jun 2002 09:35:16 -0400 (EDT) Subject: [XML-SIG] xslt on windows? Message-ID: Just wanted to ask the Windows users on this list what Python interfaces to XSL transformers they are using, and which they think is best. On Unix, I've used 4xslt, libxslt, and Sablotron. Of those, I think only 4xslt works on Windows. I know that the C versions of libxslt and Sablotron are available for Windows, but I don't know whether anyone's gotten the Python interfaces to them working. Pyana (the Python interface to Xalan) seems to have been developed initially on Windows. I think I read somewhere that it's possible to interface to MSXML via COM, but I don't know if it's possible to do XSLT in that manner. Anyone have any success stories (or failure stories) they want to share? -- Sam Brauer Systems Programmer sam@webslingerZ.com From rodsenra@gpr.com.br Fri Jun 14 16:43:10 2002 From: rodsenra@gpr.com.br (Rodrigo Senra) Date: Fri, 14 Jun 2002 12:43:10 -0300 Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: <20020613115214.G31120@localhost.localdomain> References: <20020613105042.3434.qmail@www1.nameplanet.com> <20020613115214.G31120@localhost.localdomain> Message-ID: <20020614154223.5E9B81B40A0@taipe.terra.com.br> |On Thu, 13 Jun 2002 11:52:14 -0400 |Paul Tremblay wrote | about Re: [XML-SIG] understanding the sources. wher to start?: >> On Thu, Jun 13, 2002 at 10:50:42AM -0000, paul@boddie.net wrote: > > > In fact, good documentation is so important for all software and > all platforms. I use linux, and I am absolutely frustrated at > the terrible documentation. This is not a flame, but I'm curious to know that "...linux has terrible documentation" in comparison to what operating system ? > On another note, I switched from perl to python Me too. > .... Perl is really not a class language, and there > are so many different libraries written for xml, that I couldn't > figure out which to use. Although, I did not swapped Perl for Python because of that ;o) I think Python "suffers" from such abundance of choices too. Therefore, I second the need of a comparative documentation, but I blame no one, except perhaps me for not doing it myself. best regards, Senra -- Rodrigo Senra MSc Computer Engineer (GPr Sistemas Ltda) rodsenra@gpr.com.br http://www.ic.unicamp.br/~921234 (LinUxer 217.243) (ICQ 114477550) From flynt@gmx.ch Fri Jun 14 18:06:28 2002 From: flynt@gmx.ch (flynt) Date: Fri, 14 Jun 2002 19:06:28 +0200 Subject: [XML-SIG] xslt on windows? References: Message-ID: <3D0A2294.5331703@gmx.ch> Hi Sam Get the package here: http://www.zope.org/Members/philh/nXMLDocument Phil Harris is running a site with Zope and he creates html out of xml via xslt. Although this is special package for Zope: it is programmed in python and you do not need the specialities for Web-publishing an object, which would be specific to Zope. The XSLT transformation itself is pure Python, done with MSXML on Windows. So if you look at the code, it will give you a hint maybe. --- Flynt Sam Brauer wrote: > > Just wanted to ask the Windows users on this list what Python interfaces > to XSL transformers they are using, and which they think is best. > > On Unix, I've used 4xslt, libxslt, and Sablotron. > Of those, I think only 4xslt works on Windows. > I know that the C versions of libxslt and Sablotron are available for > Windows, but I don't know whether anyone's gotten the Python interfaces to > them working. > Pyana (the Python interface to Xalan) seems to have been developed > initially on Windows. > I think I read somewhere that it's possible to interface to MSXML via > COM, but I don't know if it's possible to do XSLT in that manner. > > Anyone have any success stories (or failure stories) they want to share? > > -- > Sam Brauer > Systems Programmer > sam@webslingerZ.com From info@mjais.de Fri Jun 14 18:10:23 2002 From: info@mjais.de (Markus Jais) Date: Fri, 14 Jun 2002 19:10:23 +0200 Subject: [XML-SIG] problem while installing Pyxml without xslt and xpath In-Reply-To: References: Message-ID: <200206141910.23207.info@mjais.de> hello I just wanted to install pyxml 0.7.1 in my machine (red hat 7.3, python 2.2.1) with this options python setup.py build --without-xslt --without-xpath because I want to use xpath and xslt from 4suite cvs but xpath and xslt is installed despite the --without-* option. it only works when I changed the lines 34-35 to with_xpath = 0 with_xslt = 0 I think this might confuse peope completely new to PyXML markus From vdv@dyomedea.com Fri Jun 14 19:00:22 2002 From: vdv@dyomedea.com (Eric van der Vlist) Date: Fri, 14 Jun 2002 20:00:22 +0200 Subject: [XML-SIG] Issue in XMLGenerator and proposed fix Message-ID: <3D0A2F36.8000100@dyomedea.com> Hi, XMLGenerator can be confused by unsual (but not illegal IMO) sequences of prefix mapping. For instance: #!/usr/bin/python from xml.sax.saxutils import XMLGenerator from xml.sax.xmlreader import AttributesNSImpl ch = XMLGenerator() ch.startDocument() ch.startPrefixMapping("foo", "bar") ch.endPrefixMapping("foo") ch.startPrefixMapping("foo", "baz") ch.startElementNS((None, "foo"), "foo", AttributesNSImpl({},{})) ch.endElementNS((None, "foo"), "foo") ch.endDocument() produces: To fix this, one should remove the prefix from the _undeclared_ns_maps list when needed: def endPrefixMapping(self, prefix): self._current_context = self._ns_contexts[-1] del self._ns_contexts[-1] # start of proposed modification i = 0 for p, u in self._undeclared_ns_maps: if p==prefix: del self._undeclared_ns_maps[i] break i+=1 Eric -- See you in San Diego. http://conferences.oreillynet.com/os2002/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com http://xsltunit.org http://4xt.org http://examplotron.org ------------------------------------------------------------------------ From martin@v.loewis.de Fri Jun 14 19:40:42 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 14 Jun 2002 20:40:42 +0200 Subject: [XML-SIG] problem while installing Pyxml without xslt and xpath In-Reply-To: <200206141910.23207.info@mjais.de> References: <200206141910.23207.info@mjais.de> Message-ID: Markus Jais writes: > it only works when I changed the lines 34-35 to > > with_xpath = 0 > with_xslt = 0 > > I think this might confuse peope completely new to PyXML I can't reproduce this problem. Are you sure you have been installing 0.7.1? This was a problem of 0.7 that was fixed in 0.7.1. Lines 52 and 55 implement those options. Regards, Martin From jdnier@impressions.com Fri Jun 14 19:55:34 2002 From: jdnier@impressions.com (David Niergarth) Date: Fri, 14 Jun 2002 13:55:34 -0500 Subject: [XML-SIG] understanding the sources. wher to start? References: <20020613105042.3434.qmail@www1.nameplanet.com> <20020613115214.G31120@localhost.localdomain> Message-ID: <006901c213d5$114101f0$0101c886@EP11> Paul Tremblay writes: > I completely agree that there are problems with the version > conflicts and with documentation. I also bought the O'Reilly > book (*Python & XML*). I find this book straightforward, but > too short. For example, it handles xslt processing in around 20 > pages, when it really needs to be covered in 800. Lars Marius Garshol's new book, Definitive XML Application Development, just appeared at my local bookstore. I picked up a copy yesterday but have only been able to glance at it. FYI, it has three chapters devoted to XSLT (190 pp.). The book looks very comprehensive and seems to take pains to describe not only how to do XML processing in Python but also why you might choose one technique over another. I'm not sure why Lars hasn't plugged the book yet. ;-) --David From t.c.jones@att.net Fri Jun 14 20:37:47 2002 From: t.c.jones@att.net (t.c.jones@att.net) Date: Fri, 14 Jun 2002 19:37:47 +0000 Subject: [XML-SIG] xslt on windows? Message-ID: <20020614193748.OPUQ19182.mtiwmhc21.worldnet.att.net@webmail.worldnet.att.net> or you can just pipe into msxml if you don't like com. ..tom > Hi Sam > > Get the package here: > http://www.zope.org/Members/philh/nXMLDocument > > Phil Harris is running a site with Zope and he creates html out of xml > via xslt. Although this is special package for Zope: it is programmed in > python and you do not need the specialities for Web-publishing an > object, which would be specific to Zope. The XSLT transformation itself > is pure Python, done with MSXML on Windows. So if you look at the code, > it will give you a hint maybe. > > --- Flynt > > > Sam Brauer wrote: > > > > > Just wanted to ask the Windows users on this list what Python interfaces > > to XSL transformers they are using, and which they think is best. > > > > On Unix, I've used 4xslt, libxslt, and Sablotron. > > Of those, I think only 4xslt works on Windows. > > I know that the C versions of libxslt and Sablotron are available for > > Windows, but I don't know whether anyone's gotten the Python interfaces to > > them working. > > Pyana (the Python interface to Xalan) seems to have been developed > > initially on Windows. > > I think I read somewhere that it's possible to interface to MSXML via > > COM, but I don't know if it's possible to do XSLT in that manner. > > > > Anyone have any success stories (or failure stories) they want to share? > > > > -- > > Sam Brauer > > Systems Programmer > > sam@webslingerZ.com > > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig From sam@webslingerZ.com Fri Jun 14 21:23:07 2002 From: sam@webslingerZ.com (Sam Brauer) Date: Fri, 14 Jun 2002 16:23:07 -0400 (EDT) Subject: [XML-SIG] xslt on windows? In-Reply-To: <3D0A2294.5331703@gmx.ch> Message-ID: Thanks! That's a great example that has just what I needed. On Fri, 14 Jun 2002, flynt wrote: > Hi Sam > > Get the package here: > http://www.zope.org/Members/philh/nXMLDocument > > Phil Harris is running a site with Zope and he creates html out of xml > via xslt. Although this is special package for Zope: it is programmed in > python and you do not need the specialities for Web-publishing an > object, which would be specific to Zope. The XSLT transformation itself > is pure Python, done with MSXML on Windows. So if you look at the code, > it will give you a hint maybe. > > --- Flynt > > > Sam Brauer wrote: > > > > > Just wanted to ask the Windows users on this list what Python interfaces > > to XSL transformers they are using, and which they think is best. > > > > On Unix, I've used 4xslt, libxslt, and Sablotron. > > Of those, I think only 4xslt works on Windows. > > I know that the C versions of libxslt and Sablotron are available for > > Windows, but I don't know whether anyone's gotten the Python interfaces to > > them working. > > Pyana (the Python interface to Xalan) seems to have been developed > > initially on Windows. > > I think I read somewhere that it's possible to interface to MSXML via > > COM, but I don't know if it's possible to do XSLT in that manner. > > > > Anyone have any success stories (or failure stories) they want to share? > > > > -- > > Sam Brauer > > Systems Programmer > > sam@webslingerZ.com > -- Sam Brauer Systems Programmer sam@webslingerZ.com From uche.ogbuji@fourthought.com Fri Jun 14 23:27:29 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Fri, 14 Jun 2002 16:27:29 -0600 Subject: [XML-SIG] understanding the sources. wher to start? In-Reply-To: Message from Rodrigo Senra of "Fri, 14 Jun 2002 12:43:10 -0300." <20020614154223.5E9B81B40A0@taipe.terra.com.br> Message-ID: <200206142227.g5EMRTf03987@localhost.localdomain> > I think Python "suffers" from such abundance of choices too. > Therefore, I second the need of a comparative documentation, but > I blame no one, except perhaps me for not doing it myself. I have a pat excuse for not writing such a document: I'm biased because I wrote some of the software I'd be comparing ;-) Just kidding. I've made a bit of a start on this in my little doc project. Here's the relevant page: http://uche.ogbuji.net/tech/python/pyxml/?xslt=pyxml-guide.xslt&item=http://uch e.ogbuji.net/tech/python/pyxml/pyxml-guide/choosing-software I'll have to work on trimming those URIs. Current approach is admittedly a quick hack. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From info@mjais.de Sat Jun 15 11:47:15 2002 From: info@mjais.de (Markus Jais) Date: Sat, 15 Jun 2002 12:47:15 +0200 Subject: [XML-SIG] problem while installing Pyxml without xslt and xpath In-Reply-To: References: <200206141910.23207.info@mjais.de> Message-ID: <200206151247.16161.info@mjais.de> On Friday 14 June 2002 20:40, Martin v. Loewis wrote: > Markus Jais writes: > > it only works when I changed the lines 34-35 to > > > > with_xpath = 0 > > with_xslt = 0 > > > > I think this might confuse peope completely new to PyXML > > I can't reproduce this problem. Are you sure you have been installing > 0.7.1? This was a problem of 0.7 that was fixed in 0.7.1. Lines 52 and > 55 implement those options. hello this was definitely 0.7.1. but maybe I did something wrong. anyway. it works now. markus > > Regards, > Martin -- Markus Jais http://www.mjais.de info@mjais.de The road goes ever on and on - Bilbo Baggins From paul@boddie.net Sun Jun 16 16:22:49 2002 From: paul@boddie.net (paul@boddie.net) Date: 16 Jun 2002 15:22:49 -0000 Subject: [XML-SIG] understanding the sources. wher to start? Message-ID: <20020616152249.31239.qmail@www4.nameplanet.com> Rodrigo Senra wrote: > >|On Thu, 13 Jun 2002 11:52:14 -0400 >|Paul Tremblay wrote >> >> In fact, good documentation is so important for all software and >> all platforms. I use linux, and I am absolutely frustrated at >> the terrible documentation. > >This is not a flame, but I'm curious to know >that "...linux has terrible documentation" in comparison to what >operating system ? I also use Linux, but while some applications and tools have excellent documentation, there are many areas which are not adequately covered at all. For example, I want to buy a USB-based CD burner, but it isn't exactly obvious where to find reliable/definitive information on which devices are compatible, or even which kernels are most appropriate - can I stick with a 2.2 series kernel, or do I have to upgrade to a 2.4 series kernel? Moreover, the recommended FAQ and "how to" documents are either dated, don't provide the required information (usually because it's a large job to do so), or are deficient in both respects. Thankfully, some people provide services to fill the holes in the "official" documentation. I appreciate this because it takes initiative and a lot of effort on the part of those people, and I suppose it's only appropriate to reciprocate by offering one's own documentation on subjects that one is familiar with. >I think Python "suffers" from such abundance of choices too. >Therefore, I second the need of a comparative documentation, but >I blame no one, except perhaps me for not doing it myself. I usually write documentation so that I can remember how I achieved things in the programs that I have written. Sometimes this only occurs after I first have had to work out how simple things could be done with the technologies concerned. If we can remove the seemingly unnecessary investigation process at the most elementary levels (such as: how does one create documents with the DOM API in an implementation-independent way?), Python will become a much more acceptable mainstream choice for XML processing in the future. Paul From vdv@dyomedea.com Mon Jun 17 16:21:19 2002 From: vdv@dyomedea.com (Eric van der Vlist) Date: Mon, 17 Jun 2002 17:21:19 +0200 Subject: [XML-SIG] Ann: XML Regular Fragmentation implementation Message-ID: <3D0DFE6F.1060104@dyomedea.com> Hi, Regular Fragmentations are a simple vocabulary to fragment XML nodes using regular expressions that has been proposed with a Java reference implementation last year by Simon St.Laurent: http://www.simonstl.com/projects/fragment/ I am happy to announce a Python implementation with some enhancements and an online demonstration if you want to play with it without installing the module: http://downloads.dyomedea.com/python/regfrag/ The extensions brought upon Simon's original proposal are currently been discussed on xml-dev: http://aspn.activestate.com/ASPN/Mail/Message/xml-dev/1245810 Enjoy and thanks for your feedback, Eric PS: Don't look too closely at the code, I still feel like a Python newbie and have done a very minimal amount of refactoring after my last additions. PPS: I have been told that the usage in the Python community was to keep documentation to its strict minimum and haven't wanted to break the rule :-) -- See you in San Diego. http://conferences.oreillynet.com/os2002/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com http://xsltunit.org http://4xt.org http://examplotron.org ------------------------------------------------------------------------ From Canadian Subsidy Directory" MG PUBLISHING 4865 HWY 138,R.R 1 ST-ANDREWS WEST ONTARIO, KOC 2A0 PRESS RELEASE CANADIAN SUBSIDY DIRECTORY YEAR 2002 EDITION Legal Deposit-National Library of Canada ISBN 2-922870-02-02 (2002) ISBN 2-922870-01-4 (2001) M.G. Publishing is offering to the public a revised edition of the Canadian Subsidy Directory, a guide containing more than 2800 direct and indirect financial subsidies, grants and loans offered by government departments and agencies, foundations, associations and organizations. In this new 2002 edition all programs are well described. The Canadian Subsidy Directory is the most comprehensive tool to start up a business, improve existent activities, set up a business plan, or obtain assistance from experts in fields such as: Industry, transport, agriculture, communications, municipal infrastructure, education, import-export, labor, construction and renovation, the service sector, hi-tech industries, research and development, joint ventures, arts, cinema, theatre, music and recording industry, the self employed, contests, and new talents. Assistance from and for foundations and associations, guidance to prepare a business plan, market surveys, computers, and much more! The Canadian Subsidy Directory is sold $ 49.95, to obtain a copy please call one of the following distributors: Canadian Business Ressource Center: (250)381-4822, 8am-4pm pacific time. Fureteur bookstore: (450)465-5597 Fax (450)465-8144 (credit card orders only). From Canadian Subsidy Directory" MG PUBLISHING 4865 HWY 138,R.R 1 ST-ANDREWS WEST ONTARIO, KOC 2A0 PRESS RELEASE CANADIAN SUBSIDY DIRECTORY YEAR 2002 EDITION Legal Deposit-National Library of Canada ISBN 2-922870-02-02 (2002) ISBN 2-922870-01-4 (2001) M.G. Publishing is offering to the public a revised edition of the Canadian Subsidy Directory, a guide containing more than 2800 direct and indirect financial subsidies, grants and loans offered by government departments and agencies, foundations, associations and organizations. In this new 2002 edition all programs are well described. The Canadian Subsidy Directory is the most comprehensive tool to start up a business, improve existent activities, set up a business plan, or obtain assistance from experts in fields such as: Industry, transport, agriculture, communications, municipal infrastructure, education, import-export, labor, construction and renovation, the service sector, hi-tech industries, research and development, joint ventures, arts, cinema, theatre, music and recording industry, the self employed, contests, and new talents. Assistance from and for foundations and associations, guidance to prepare a business plan, market surveys, computers, and much more! The Canadian Subsidy Directory is sold $ 49.95, to obtain a copy please call one of the following distributors: Canadian Business Ressource Center: (250)381-4822, 8am-4pm pacific time. Fureteur bookstore: (450)465-5597 Fax (450)465-8144 (credit card orders only). From Matt Gushee Tue Jun 18 16:40:56 2002 From: Matt Gushee (Matt Gushee) Date: Tue, 18 Jun 2002 09:40:56 -0600 Subject: [XML-SIG] Available; Subsidies, Grants, Loans, Financing and General help. In-Reply-To: <200206181041.g5IAf1F18920@plugngo.travelnet.ca> References: <200206181041.g5IAf1F18920@plugngo.travelnet.ca> Message-ID: <20020618154056.GC372@swordfish.havenrock.com> Hmm, that's 3 times in 2 days. Can these people (if that's what you call them) be filtered out? -- Matt Gushee Englewood, Colorado, USA mgushee@havenrock.com http://www.havenrock.com/ From fredrik@pythonware.com Tue Jun 18 16:54:32 2002 From: fredrik@pythonware.com (Fredrik Lundh) Date: Tue, 18 Jun 2002 17:54:32 +0200 Subject: [XML-SIG] Available; Subsidies, Grants, Loans, Financing and General help. References: <200206181041.g5IAf1F18920@plugngo.travelnet.ca> <20020618154056.GC372@swordfish.havenrock.com> Message-ID: <036201c216e0$7147c710$0900a8c0@spiff> Matt Gushee wrote: > Hmm, that's 3 times in 2 days. Can these people (if that's what you = call > them) be filtered out? The python.org mailing lists use spamassassin, so you can add a local filter that looks for X-Spam-Level with three or more asterisks, and moves that to a "probably spam" folder. Or better, the xml-sig administrator could add a similar rule to mailman. (I recommend setting up a local spamassassin filter as well; shouldn't take you many minutes. start here:=20 http://www.spamassassin.org/ ) regards /F From rsalz@datapower.com Tue Jun 18 18:51:02 2002 From: rsalz@datapower.com (Rich Salz) Date: Tue, 18 Jun 2002 13:51:02 -0400 Subject: [XML-SIG] Available; Subsidies, Grants, Loans, Financing and General help. References: <200206181041.g5IAf1F18920@plugngo.travelnet.ca> <20020618154056.GC372@swordfish.havenrock.com> <036201c216e0$7147c710$0900a8c0@spiff> Message-ID: <3D0F7306.6040400@datapower.com> xml-sig is already using the spamassassin stuff. I asked Greg Ward about it, and he said that some internal DNS issues are holding up checking against the RBL lists, which explains the recent leakage. Until then, the filter is tightened so more stuff will need manual approval (by me). /r$ From msph@alyra.org Tue Jun 18 19:32:47 2002 From: msph@alyra.org (Mark Humphrey) Date: Tue, 18 Jun 2002 13:32:47 -0500 Subject: [XML-SIG] Proper way of generating a parentless Node object Message-ID: <20020618133247.P5191@galadriel.alyra.org> Okay, this is a kind of odd situation, but I need to know the correct way to create a Node (Text node or Element, I actually have to create both) that is not attached to a particular document and that can be inserted into any given document. The situation is this. I am using a namespace in a document so that I can embed cross-references in the document. I want to be able to use the same cross-references in several document types. With this in mind, I've also created a Python class that can read those cross-references and then export them again in several different formats, including XHtml. The problem, though, is that this cross-reference class does not know what the parent document will be. Normally, when I need to create a node, I use code that looks like this: from xml.dom import DOMImplementation def toHtml (self): dom = DOMImplementation.DOMImplementation() doc = dom.createDocument(None, u'Target', None) target = doc.createElement(u'a') If I do this, though, I can't attach "target" to anything other than the document named "Target". So, I was thinking of doing this: from xml.dom import Node def toHtml (self): target = Node() target.nodeName = u'a' target.nodeType = Node.ELEMENT_NODE return target But that has me accessing not only internal object variables, it has me *setting* variables that the DOM spec says are supposed to be read-only. How should I really be doing this? Essentially, I'm trying to make an element that I can attach to any document. -- Mark "Markus" Humphrey http://www.alyra.org/~msph/ This email has a digital signature. If you can't verify the signature, you can't prove it's from me. Learn about encryption on my web site. From martin@v.loewis.de Tue Jun 18 21:55:12 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 18 Jun 2002 22:55:12 +0200 Subject: [XML-SIG] Proper way of generating a parentless Node object In-Reply-To: <20020618133247.P5191@galadriel.alyra.org> References: <20020618133247.P5191@galadriel.alyra.org> Message-ID: Mark Humphrey writes: > Okay, this is a kind of odd situation, but I need to know the > correct way to create a Node (Text node or Element, I actually have > to create both) that is not attached to a particular document and > that can be inserted into any given document. That is not possible. You need atleast to guarantee that the node is inserted into a Document originating from the same DOMImplementation. > from xml.dom import Node > > def toHtml (self): > target = Node() > target.nodeName = u'a' > target.nodeType = Node.ELEMENT_NODE > return target > > But that has me accessing not only internal object variables, it has > me *setting* variables that the DOM spec says are supposed to be > read-only. Furthermore, your instances are of the wrong class: "good" nodes are instances of subclasses of Node. > How should I really be doing this? I believe what you want to do is not possible with standard DOM API. So you need to revert to implementation-specific extensions. For 4DOM, you can use _4dom_setOwnerElement. Regards, Martin From Mike.Olson@fourthought.com Tue Jun 18 21:52:38 2002 From: Mike.Olson@fourthought.com (Mike Olson) Date: 18 Jun 2002 14:52:38 -0600 Subject: [XML-SIG] Proper way of generating a parentless Node object In-Reply-To: References: <20020618133247.P5191@galadriel.alyra.org> Message-ID: <1024433560.15286.14.camel@penny> On Tue, 2002-06-18 at 14:55, Martin v. Loewis wrote: > Mark Humphrey writes: > > > I believe what you want to do is not possible with standard DOM > API. So you need to revert to implementation-specific extensions. For > 4DOM, you can use _4dom_setOwnerElement. importNode will work as well. nodeToAdd = document.importNode(nodeTobeImported,deep=1) document.appendChild(nodeToAdd) or similar Mike > > Regards, > Martin > > > > _______________________________________________ > 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 x 102 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, http://4Suite.org Boulder, CO 80301-2537, USA XML strategy, XML tools, knowledge management From uche.ogbuji@fourthought.com Tue Jun 18 22:25:06 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Tue, 18 Jun 2002 15:25:06 -0600 Subject: [XML-SIG] Proper way of generating a parentless Node object In-Reply-To: Message from Mark Humphrey of "Tue, 18 Jun 2002 13:32:47 CDT." <20020618133247.P5191@galadriel.alyra.org> Message-ID: <200206182125.g5ILP6A07788@localhost.localdomain> > Okay, this is a kind of odd situation, but I need to know the correct way to create a Node (Text node or Element, I actually have to create both) that is not attached to a particular document and that can be inserted into any given document. > > The situation is this. I am using a namespace in a document so that I can embed cross-references in the document. I want to be able to use the same cross-references in several document types. With this in mind, I've also created a Python class that can read those cross-references and then export them again in several different formats, including XHtml. > > The problem, though, is that this cross-reference class does not know what the parent document will be. > > Normally, when I need to create a node, I use code that looks like this: > > from xml.dom import DOMImplementation > > def toHtml (self): > dom = DOMImplementation.DOMImplementation() > doc = dom.createDocument(None, u'Target', None) > target = doc.createElement(u'a') > > If I do this, though, I can't attach "target" to anything other than the document named "Target". So, I was thinking of doing this: > > from xml.dom import Node > > def toHtml (self): > target = Node() > target.nodeName = u'a' > target.nodeType = Node.ELEMENT_NODE > return target > > But that has me accessing not only internal object variables, it has me *setting* variables that the DOM spec says are supposed to be read-only. > > How should I really be doing this? Essentially, I'm trying to make an element that I can attach to any document. A ha. You have come up against one of the things that makes DOM such a pain. I'm not sure what the whole fanatical dopcument ownership pattern came from. Whether it was limitations on Java (but JDOM doesn't have this limitation, IIRC) or some obscure use case the WG was trying to address, but it is an eternal pain. I think all Python DOM implementations except for 4DOM and cDomlette allow you to set the ownerDocument, and I encourage you to just do so directly. However, I think it's unsafe for you to use the abstract node interface. Why not just stick to minidom Node objects? As a more general note: is it time to shrug off this handicap and extend Python DOM implementations to allow setting ownerDocument? One downside is that there are some implementation tricks based on the tight relationship with ownerDocument, but I think all of these can be solved in other ways. We would also wan to set proper reference and lifecycle management guidelines for nodes. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From bates@stat.wisc.edu Tue Jun 18 22:30:05 2002 From: bates@stat.wisc.edu (Douglas Bates) Date: 18 Jun 2002 16:30:05 -0500 Subject: [XML-SIG] Deep copy of an element from one document to another Message-ID: <6r1yb46zs2.fsf@franz.stat.wisc.edu> Using Python 2.1 or 2.2 and the recently build Debian python2.2-xml (0.7.1-1) package, I get weird behaviour when I try to copy an element from one document into another. The test script is #!/usr/bin/env python2.2 import xml.dom from xml.xpath import Evaluate from xml.dom.ext.reader import PyExpat from xml.dom.ext import PrettyPrint import os.path, re dom = PyExpat.Reader().fromUri('/tmp/foo.xml') od = xml.dom.DOMImplementation.implementation.createDocument(xml.dom.EMPTY_NAMESPACE, 'CISrecords', None) dc = Evaluate('ListRecords/record/metadata/dc', dom).pop() desc = Evaluate('description', dc).pop() nd = od.importNode(desc, 1) print nd.childNodes rec = od.documentElement for n in nd.childNodes: rec.appendChild(n) print rec.childNodes print nd.childNodes Basically I am doing a deep copy of the description node as nd then appending the children of nd to the rec node. The output shows that nd consists of both Text Nodes and Element Nodes but only the Text Nodes are being appended to rec. , , , , , , ]> , , , ]> , , ]> Should I expect this to happen? I don't see anything in the documentation that would indicate that appendNode would not append an Element Node. Is there a better way of doing this? -- Douglas Bates bates@stat.wisc.edu Statistics Department 608/262-2598 University of Wisconsin - Madison http://www.stat.wisc.edu/~bates/ From Mike.Olson@fourthought.com Tue Jun 18 22:32:31 2002 From: Mike.Olson@fourthought.com (Mike Olson) Date: 18 Jun 2002 15:32:31 -0600 Subject: [XML-SIG] Deep copy of an element from one document to another In-Reply-To: <6r1yb46zs2.fsf@franz.stat.wisc.edu> References: <6r1yb46zs2.fsf@franz.stat.wisc.edu> Message-ID: <1024435953.15247.16.camel@penny> On Tue, 2002-06-18 at 15:30, Douglas Bates wrote: > > dom = PyExpat.Reader().fromUri('/tmp/foo.xml') > od = xml.dom.DOMImplementation.implementation.createDocument(xml.dom.EMPTY_NAMESPACE, 'CISrecords', None) > dc = Evaluate('ListRecords/record/metadata/dc', dom).pop() > desc = Evaluate('description', dc).pop() > nd = od.importNode(desc, 1) > print nd.childNodes > rec = od.documentElement > for n in nd.childNodes: rec.appendChild(n) Right here, you are destroying the list as you walk over it so you end up skipping items. 1. Start loop with what is at index 0 2. Remove the firs thing from the list (with the append child) 3. Start loop with index of 1 (in the original list this will be the third item) etc. try this for n in nd.childNodes[:]: rec.appendChild(n) Mike > print rec.childNodes > print nd.childNodes > > > Basically I am doing a deep copy of the description node as nd then > appending the children of nd to the rec node. The output shows that > nd consists of both Text Nodes and Element Nodes but only the Text Nodes > are being appended to rec. > > , , , , , , ]> > , , , ]> > , , ]> > > > Should I expect this to happen? I don't see anything in the > documentation that would indicate that appendNode would not append an > Element Node. > > Is there a better way of doing this? > > -- > Douglas Bates bates@stat.wisc.edu > Statistics Department 608/262-2598 > University of Wisconsin - Madison http://www.stat.wisc.edu/~bates/ > > > _______________________________________________ > 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 x 102 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, http://4Suite.org Boulder, CO 80301-2537, USA XML strategy, XML tools, knowledge management From bates@stat.wisc.edu Tue Jun 18 22:43:41 2002 From: bates@stat.wisc.edu (Douglas Bates) Date: 18 Jun 2002 16:43:41 -0500 Subject: [XML-SIG] Deep copy of an element from one document to another In-Reply-To: <1024435953.15247.16.camel@penny> References: <6r1yb46zs2.fsf@franz.stat.wisc.edu> <1024435953.15247.16.camel@penny> Message-ID: <6rsn3k5kky.fsf@franz.stat.wisc.edu> Mike Olson writes: > On Tue, 2002-06-18 at 15:30, Douglas Bates wrote: > > > > dom = PyExpat.Reader().fromUri('/tmp/foo.xml') > > od = xml.dom.DOMImplementation.implementation.createDocument(xml.dom.EMPTY_NAMESPACE, 'CISrecords', None) > > dc = Evaluate('ListRecords/record/metadata/dc', dom).pop() > > desc = Evaluate('description', dc).pop() > > nd = od.importNode(desc, 1) > > print nd.childNodes > > rec = od.documentElement > > for n in nd.childNodes: rec.appendChild(n) > > Right here, you are destroying the list as you walk over it so you end > up skipping items. Of course! Thank you. From fdrake@acm.org Tue Jun 18 22:48:23 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Tue, 18 Jun 2002 17:48:23 -0400 Subject: [XML-SIG] Deep copy of an element from one document to another In-Reply-To: <1024435953.15247.16.camel@penny> References: <6r1yb46zs2.fsf@franz.stat.wisc.edu> <1024435953.15247.16.camel@penny> Message-ID: <15631.43687.171205.267751@grendel.zope.com> Mike Olson writes: > Right here, you are destroying the list as you walk over it so you end > up skipping items. > > 1. Start loop with what is at index 0 > 2. Remove the firs thing from the list (with the append child) > 3. Start loop with index of 1 (in the original list this will be the > third item) > etc. > > try this > for n in nd.childNodes[:]: rec.appendChild(n) Another idiom that I like is this: n = nd.firstChild while n is not None: next = n.nextSibling rec.appendChild(n) n = next This has the advantage of not creating a separate list. It is, unfortunately, more verbose. Perhaps Python DOMs should implement the iterator protocol: def _childiter(node): n = node.firstChild while n is not None: next = n.nextSibling yeild n n = next class Node: ... def __iter__(self): return _childiter(self) -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From bates@stat.wisc.edu Tue Jun 18 23:27:08 2002 From: bates@stat.wisc.edu (Douglas Bates) Date: 18 Jun 2002 17:27:08 -0500 Subject: [XML-SIG] Stripping a namespace Message-ID: <6rn0ts5ikj.fsf@franz.stat.wisc.edu> Thanks again for the replies to my earlier question about a deep copy of an element into another document. I have another complication with this operation. The element that I am copying has an xmlns attribute defined and this is propagated when I copy the children. In the new document I end up with S and I want only S I'm not sure of the terminology but I think this is a result of the original document defining a default namespace in the enclosing element. I am copying the description element from a "Dublin Core" element like On the infinite cluster of Bernoulli bond percolation in Scherk's graph Chen, Dayue 60J15 (MSC2000) 60K35 (MSC2000) Bernoulli bond percolation Scherk's graph transience Scherk's graph is a subgraph of the three-dimensional lattice. It was shown by Markvorsen, McGuinness and Thomassen (1992) that Scherk's graph is transient. Consider the Bernoulli bond percolation in Scherk's graph. We prove that the infinite cluster is transient for p > ½ and is recurrent for p < ½. This implies the well-known result of Grimmett, Kesten and Zhang (1993) on the transience of the infinite cluster of the Bernoulli bond percolation in the three-dimensional lattice for p > ½. On the other hand, Scherk's graph exhibits a new dichotomy in the supercritical region. The Applied Probability Trust 2001-12 (Issued) text application/pdf http://ProjectEuclid.org/GetRecord?id=euclid.jap/1011994175 euclid.jap/1011994175 Citation: J. Appl. Probab. 38 (2001), no. 4, 828-840 en Copyright 2001 The Applied Probability Trust From Bill la Forge" This is a multi-part message in MIME format. ------=_NextPart_000_000E_01C2170E.0F7AC400 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I've spend the last few years working on Quick, an open source Java/XML = bindery: http://www.jxml.com/2001-12/products/quick/index.html (Roughly = similar to JAXB and Castor.) Now I'm looking at implementing something similar in Python. Or has it = been done already?=20 Bill la Forge ------=_NextPart_000_000E_01C2170E.0F7AC400 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I've spend the last few years = working on=20 Quick, an open source Java/XML bindery: http://www= .jxml.com/2001-12/products/quick/index.html (Roughly=20 similar to JAXB and = Castor.)
 
Now I'm looking at implementing = something=20 similar in Python. Or has it been done=20 already?
 
Bill la = Forge
------=_NextPart_000_000E_01C2170E.0F7AC400-- From martin@v.loewis.de Wed Jun 19 06:40:50 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 19 Jun 2002 07:40:50 +0200 Subject: [XML-SIG] Stripping a namespace In-Reply-To: <6rn0ts5ikj.fsf@franz.stat.wisc.edu> References: <6rn0ts5ikj.fsf@franz.stat.wisc.edu> Message-ID: Douglas Bates writes: > I have another complication with this operation. The element that I > am copying has an xmlns attribute defined and this is propagated when I > copy the children. In the new document I end up with > > S > > and I want only > > S Can you please explain why you want this? Both documents are equal. Regards, Martin From uche.ogbuji@fourthought.com Wed Jun 19 15:43:50 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Wed, 19 Jun 2002 08:43:50 -0600 Subject: [XML-SIG] Deep copy of an element from one document to another In-Reply-To: Message from "Fred L. Drake, Jr." of "Tue, 18 Jun 2002 17:48:23 EDT." <15631.43687.171205.267751@grendel.zope.com> Message-ID: <200206191443.g5JEhoL12580@localhost.localdomain> > > Mike Olson writes: > > Right here, you are destroying the list as you walk over it so you end > > up skipping items. > > > > 1. Start loop with what is at index 0 > > 2. Remove the firs thing from the list (with the append child) > > 3. Start loop with index of 1 (in the original list this will be the > > third item) > > etc. > > > > try this > > for n in nd.childNodes[:]: rec.appendChild(n) > > Another idiom that I like is this: > > n = nd.firstChild > while n is not None: > next = n.nextSibling > rec.appendChild(n) > n = next > > This has the advantage of not creating a separate list. It is, > unfortunately, more verbose. > > Perhaps Python DOMs should implement the iterator protocol: > > def _childiter(node): > n = node.firstChild > while n is not None: > next = n.nextSibling > yeild n > n = next > > class Node: > ... > def __iter__(self): > return _childiter(self) I like this idea, except iterators are 2.2 only. I suppose the __iter__ function would be harmless in an older version, but it puts the onus on the user to write his code portably, probably restoring the verbosity the iterator would have minimized. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From uche.ogbuji@fourthought.com Wed Jun 19 15:51:07 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Wed, 19 Jun 2002 08:51:07 -0600 Subject: [XML-SIG] Stripping a namespace In-Reply-To: Message from Douglas Bates of "18 Jun 2002 17:27:08 CDT." <6rn0ts5ikj.fsf@franz.stat.wisc.edu> Message-ID: <200206191451.g5JEp7q12611@localhost.localdomain> > Thanks again for the replies to my earlier question about a deep copy > of an element into another document. > > I have another complication with this operation. The element that I > am copying has an xmlns attribute defined and this is propagated when I > copy the children. In the new document I end up with > > S > > and I want only > > S > > I'm not sure of the terminology but I think this is a result of the original > document defining a default namespace in the enclosing element. I am > copying the description element from a "Dublin Core" element like Pretty much inevitable. The element you copied has a namespaceURI property set to xmlns='http://purl.org/dc/elements/1.1/ and a prefix set to None. This causes the re-serialization you're seeing. I'm not sure what you're greater aim is, but it sounds as if you want to change these properties to eliminate the namespace. I think in many places this is an ugly approach. Perhaps you just want to create a new element on the new document which happens to have the same localname as the one in the original document, but none of its other properties. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From fdrake@acm.org Wed Jun 19 16:03:32 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Wed, 19 Jun 2002 11:03:32 -0400 Subject: [XML-SIG] Deep copy of an element from one document to another In-Reply-To: <200206191443.g5JEhoL12580@localhost.localdomain> References: <15631.43687.171205.267751@grendel.zope.com> <200206191443.g5JEhoL12580@localhost.localdomain> Message-ID: <15632.40260.594564.334951@grendel.zope.com> Uche Ogbuji writes: > I like this idea, except iterators are 2.2 only. I suppose the > __iter__ function would be harmless in an older version, but it > puts the onus on the user to write his code portably, probably > restoring the verbosity the iterator would have minimized. Regarding the iterator: it's worse than that, though: I used the "yield" keyword, which will cause a SyntaxError in Python 2.1.x and earlier. That might be a problem for some people, and is more tedious to work around. ;-( -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From uche.ogbuji@fourthought.com Wed Jun 19 16:08:14 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: 19 Jun 2002 09:08:14 -0600 Subject: [XML-SIG] Deep copy of an element from one document to another In-Reply-To: <15632.40260.594564.334951@grendel.zope.com> References: <15631.43687.171205.267751@grendel.zope.com> <200206191443.g5JEhoL12580@localhost.localdomain> <15632.40260.594564.334951@grendel.zope.com> Message-ID: <1024499299.8110.1926.camel@borgia.local> On Wed, 2002-06-19 at 09:03, Fred L. Drake, Jr. wrote: > > Uche Ogbuji writes: > > I like this idea, except iterators are 2.2 only. I suppose the > > __iter__ function would be harmless in an older version, but it > > puts the onus on the user to write his code portably, probably > > restoring the verbosity the iterator would have minimized. > > Regarding the iterator: it's worse than that, though: I used the > "yield" keyword, which will cause a SyntaxError in Python 2.1.x and > earlier. That might be a problem for some people, and is more tedious > to work around. ;-( Yes. At least iterators don't introduce new syntax. I ran into the generator problem a few weeks back when I tried to introduce more efficient DOM iterator code. No way to make a condition around a new keyword. I even tried fiddling with distutils so that it would install one file if Python 2.2 was installed, and another for older versions, but this was too much of a terror. Before I gave up, I considered a hack that would probably work, but was too ugly for contemplation: exec("yield") I decided against this :-) -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s=2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From bates@stat.wisc.edu Wed Jun 19 16:35:03 2002 From: bates@stat.wisc.edu (Douglas Bates) Date: 19 Jun 2002 10:35:03 -0500 Subject: [XML-SIG] Stripping a namespace In-Reply-To: References: <6rn0ts5ikj.fsf@franz.stat.wisc.edu> Message-ID: <6r3cvj8eoo.fsf@franz.stat.wisc.edu> martin@v.loewis.de (Martin v. Loewis) writes: > Douglas Bates writes: > > > I have another complication with this operation. The element that I > > am copying has an xmlns attribute defined and this is propagated when I > > copy the children. In the new document I end up with > > > > S > > > > and I want only > > > > S > > Can you please explain why you want this? Both documents are equal. Sorry that I didn't explain things well. I am extracting information the dc elements in the source XML document and creating or adding to another XML document. The description element within the dc element contains the abstract of the paper, sometimes with markup such as , , , elements. The dc element contains xmlns='http://purl.org/dc/elements/1.1/'. This is where my understanding gets vague. It looks like an attribute but I believe it is in fact a default namespace. Anyway, when I copy the description element into another document and PrettyPrint the target document, I end up with all the markup that appears in the source document as S showing up in the target document as S I want the abstract in the target document to appear like the abstract in the source document. Does this help? From fredrik@pythonware.com Wed Jun 19 16:52:54 2002 From: fredrik@pythonware.com (Fredrik Lundh) Date: Wed, 19 Jun 2002 17:52:54 +0200 Subject: [XML-SIG] Deep copy of an element from one document to another References: <15631.43687.171205.267751@grendel.zope.com><200206191443.g5JEhoL12580@localhost.localdomain> <15632.40260.594564.334951@grendel.zope.com> <1024499299.8110.1926.camel@borgia.local> Message-ID: <01b201c217a9$64934480$0900a8c0@spiff> uche wrote: > Before I gave up, I considered a hack that would probably work, > but was too ugly for contemplation: >=20 > exec("yield") >=20 > I decided against this :-) so did Guido: >>> def bar(): ... yield 10 ... >>> bar() Traceback (most recent call last): File "", line 1, in ? File "", line 2, in bar File "", line 1 SyntaxError: 'yield' outside function (the compiler looks for a yield keyword when compiling the function body. if found, it creates an iterator factory, not an ordinary function) From uche.ogbuji@fourthought.com Wed Jun 19 16:50:46 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: 19 Jun 2002 09:50:46 -0600 Subject: [XML-SIG] Deep copy of an element from one document to another In-Reply-To: <01b201c217a9$64934480$0900a8c0@spiff> References: <15631.43687.171205.267751@grendel.zope.com><200206191443.g5JEhoL12580@local host.localdomain> <15632.40260.594564.334951@grendel.zope.com> <1024499299.8110.1926.camel@borgia.local> <01b201c217a9$64934480$0900a8c0@spiff> Message-ID: <1024501848.8110.2022.camel@borgia.local> On Wed, 2002-06-19 at 09:52, Fredrik Lundh wrote: > uche wrote: > > > Before I gave up, I considered a hack that would probably work, > > but was too ugly for contemplation: > > > > exec("yield") > > > > I decided against this :-) > > so did Guido: > > >>> def bar(): > ... yield 10 > ... > >>> bar() > Traceback (most recent call last): > File "", line 1, in ? > File "", line 2, in bar > File "", line 1 > SyntaxError: 'yield' outside function > > (the compiler looks for a yield keyword when compiling the > function body. if found, it creates an iterator factory, not > an ordinary function) Ah. Makes perfect sense. SO I guess I'm glad I didn't venture down that road. Does anyone have any tricks they've used for dealing with syntax skew like this? -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s=2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From msph@alyra.org Wed Jun 19 17:41:55 2002 From: msph@alyra.org (Mark Humphrey) Date: Wed, 19 Jun 2002 11:41:55 -0500 Subject: [XML-SIG] Proper way of generating a parentless Node object In-Reply-To: <1024433560.15286.14.camel@penny>; from Mike.Olson@fourthought.com on Tue, Jun 18, 2002 at 02:52:38PM -0600 References: <20020618133247.P5191@galadriel.alyra.org> <1024433560.15286.14.camel@penny> Message-ID: <20020619114155.A16494@galadriel.alyra.org> On Tue, Jun 18, 2002 at 02:52:38PM -0600, Mike Olson wrote: > On Tue, 2002-06-18 at 14:55, Martin v. Loewis wrote: > > Mark Humphrey writes: > > > > > > I believe what you want to do is not possible with standard DOM > > API. So you need to revert to implementation-specific extensions. For > > 4DOM, you can use _4dom_setOwnerElement. > > importNode will work as well. > > > nodeToAdd = document.importNode(nodeTobeImported,deep=1) > document.appendChild(nodeToAdd) > > > or similar > > Mike Okay, this appears to work, so I will go with it for now. How do people normally process a document for a particular namespace? Do they have one class or a set of classes that process that namespace only? I've set my system up so that one class processes a namespace (ns1), and when it encounters a tag for another namespace (ns2), and the schema for ns1 says that's a legal tag, then it calls into the object designed to handle ns2. Does this make sense, or am I missing an important point somewhere? -- Mark "Markus" Humphrey http://www.alyra.org/~msph/ This email has a digital signature. If you can't verify the signature, you can't prove it's from me. Learn about encryption on my web site. From fdrake@acm.org Wed Jun 19 19:59:34 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Wed, 19 Jun 2002 14:59:34 -0400 Subject: [XML-SIG] Deep copy of an element from one document to another In-Reply-To: <1024501848.8110.2022.camel@borgia.local> References: <15631.43687.171205.267751@grendel.zope.com> <15632.40260.594564.334951@grendel.zope.com> <1024499299.8110.1926.camel@borgia.local> <01b201c217a9$64934480$0900a8c0@spiff> <1024501848.8110.2022.camel@borgia.local> Message-ID: <15632.54422.557674.482779@grendel.zope.com> Uche Ogbuji writes: > Does anyone have any tricks they've used for dealing with syntax skew > like this? Take a look at Python's Lib/email/Iterators.py for Barry Warsaw's approach. ;-) -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From tpassin@comcast.net Wed Jun 19 22:00:05 2002 From: tpassin@comcast.net (Thomas B. Passin) Date: Wed, 19 Jun 2002 17:00:05 -0400 Subject: [XML-SIG] Stripping a namespace References: <6rn0ts5ikj.fsf@franz.stat.wisc.edu> <6r3cvj8eoo.fsf@franz.stat.wisc.edu> Message-ID: <001601c217d4$49b06dc0$f6193044@tbp> [Douglas Bates> > Anyway, when I copy the description element into another document and > PrettyPrint the target document, I end up with all the markup that > appears in the source document as > S > showing up in the target document as > S > > I want the abstract in the target document to appear like the abstract > in the source document. > I think you have already gotten all the pieces of this. The elements you want to copy in the target document are in the dc namespace. When you copy them, the processor has to keep the namespace (since the elements are in it already), thus the declaration that you started out asking about. The solution has been suggested to: instead of just copying the nodes, create new ones in no namespace, then copy the attributes and PCDATA that you want. Alternatively, you could do it with an xslt stylesheet. You could pull out what you want and output it without a namespace prefix. You could do that with Python, for example by using 4slt. Cheers, Tom P From uche.ogbuji@fourthought.com Thu Jun 20 00:22:37 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: 19 Jun 2002 17:22:37 -0600 Subject: [XML-SIG] Deep copy of an element from one document to another In-Reply-To: <15632.54422.557674.482779@grendel.zope.com> References: <15631.43687.171205.267751@grendel.zope.com> <15632.40260.594564.334951@grendel.zope.com> <1024499299.8110.1926.camel@borgia.local> <01b201c217a9$64934480$0900a8c0@spiff> <1024501848.8110.2022.camel@borgia.local> <15632.54422.557674.482779@grendel.zope.com> Message-ID: <1024528958.8111.2947.camel@borgia.local> On Wed, 2002-06-19 at 12:59, Fred L. Drake, Jr. wrote: > > Uche Ogbuji writes: > > Does anyone have any tricks they've used for dealing with syntax skew > > like this? > > Take a look at Python's Lib/email/Iterators.py for Barry Warsaw's > approach. ;-) Hmm. Color me slow :-) I see nothing in Lib/email/Iterators.py itself. And just in case, I tried loading it with python 1.5 and got the expected blow-up. So I assume you mean something more devious than code. Barry got his utility functions packaged with Python so that he could just ship portable code, which would try to import these souped-up functions, and fall back to pre-iterator forms if not available? If so, Barry gets my Daily Machination Award ;-) -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s=2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From webb@danielwebb.us Thu Jun 20 02:10:23 2002 From: webb@danielwebb.us (Daniel Webb) Date: Wed, 19 Jun 2002 19:10:23 -0600 (MDT) Subject: [XML-SIG] 404 not found Message-ID: http://mail.python.org/pipermail/xml-sig.html gives 404 not found. It is linked to from http://pyxml.sourceforge.net/topics/xbel/ From barry@wooz.org Thu Jun 20 03:32:56 2002 From: barry@wooz.org (Barry A. Warsaw) Date: Wed, 19 Jun 2002 22:32:56 -0400 Subject: [XML-SIG] Deep copy of an element from one document to another References: <15631.43687.171205.267751@grendel.zope.com> <15632.40260.594564.334951@grendel.zope.com> <1024499299.8110.1926.camel@borgia.local> <01b201c217a9$64934480$0900a8c0@spiff> <1024501848.8110.2022.camel@borgia.local> <15632.54422.557674.482779@grendel.zope.com> <1024528958.8111.2947.camel@borgia.local> Message-ID: <15633.16088.401776.695340@anthem.wooz.org> >>>>> "UO" == Uche Ogbuji writes: UO> Hmm. Color me slow :-) UO> I see nothing in Lib/email/Iterators.py itself. And just in UO> case, I tried loading it with python 1.5 and got the expected UO> blow-up. UO> So I assume you mean something more devious than code. UO> Barry got his utility functions packaged with Python so that UO> he could just ship portable code, which would try to import UO> these souped-up functions, and fall back to pre-iterator forms UO> if not available? Fred's probably talking about Iterators.py in cvs, which is essentially just this: -------------------- snip snip -------------------- try: from email._compat22 import body_line_iterator, typed_subpart_iterator except SyntaxError: # Python 2.1 doesn't have generators from email._compat21 import body_line_iterator, typed_subpart_iterator -------------------- snip snip -------------------- Note that email._compat22.body_line_iterator has a yield statement in it, make it a Python 2.2-only generator. I only support Python 2.1 and beyond, so it will definitely raise an exception with Python 1.5, but I think the concept would hold. Whether this is a good idea or not is another story, but I wanted the email package to be both part of the Python distro, and a separate distutils package compatible with Python 2.1. UO> If so, Barry gets my Daily Machination Award ;-) Just be sure to spell my name right. That's Barry "Bank Boy" Warsaw. :) -Barry From fdrake@acm.org Thu Jun 20 04:05:58 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Wed, 19 Jun 2002 23:05:58 -0400 Subject: [XML-SIG] Deep copy of an element from one document to another In-Reply-To: <1024528958.8111.2947.camel@borgia.local> References: <15631.43687.171205.267751@grendel.zope.com> <15632.40260.594564.334951@grendel.zope.com> <1024499299.8110.1926.camel@borgia.local> <01b201c217a9$64934480$0900a8c0@spiff> <1024501848.8110.2022.camel@borgia.local> <15632.54422.557674.482779@grendel.zope.com> <1024528958.8111.2947.camel@borgia.local> Message-ID: <15633.18070.600344.538151@grendel.zope.com> Uche Ogbuji writes: > Hmm. Color me slow :-) No, that I won't! > I see nothing in Lib/email/Iterators.py itself. And just in case, I > tried loading it with python 1.5 and got the expected blow-up. > > So I assume you mean something more devious than code. > > Barry got his utility functions packaged with Python so that he could > just ship portable code, which would try to import these souped-up > functions, and fall back to pre-iterator forms if not available? > > If so, Barry gets my Daily Machination Award ;-) Hehe, yeah, that's all there is to it. email._compat22 uses Python 2.2.x-only syntax; if importing that fails, it falls back to the Python 2.1.x-compatible version in email._compat21. He doesn't support Python 1.5.2 in the email package, but doing so if similar to this; just write a group of modules that each require some feature specific to the oldest version of Python they support, and use a "master" module (email.Iterators in this example) that imports each and catches the exception from each that indicates the running Python is too old to support the implementation. For the oldest supported version, just don't catch any exceptions. The magic is all in using the right checks and exceptions types. Others call it the brute force approach. ;-) -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From vdv@dyomedea.com Thu Jun 20 10:32:08 2002 From: vdv@dyomedea.com (Eric van der Vlist) Date: 20 Jun 2002 11:32:08 +0200 Subject: [XML-SIG] Ann: Relax NG processor written in Python with some goodies Message-ID: <1024565528.24002.195.camel@ibook> --=-1ZczHUtjHmNBtxQSJ+Ba Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, xvif (attached announce) is both more and less than a Relax NG processor written in Python. Less since it's not (yet) supporting all the features of Relax NG (but the features which are implemented are fully implemented and pass the 213 tests of the official Relax NG tests suite corresponding to the subset of implemented features). To make it short, everything is implemented except any other datatype system than the built-in one and except the reference to external grammars. It's also more since it's a proof of concept for an interoperability framework allowing to define transformations to the nodes being validated (you'll find more info in the attach annoucement). Finally, I'd like to thank all the people who have helped me getting started with Python / XML, and especially Uche Ogbuji who has been more than helpfull! Enjoy, Eric -- See you in San Diego. http://conferences.oreillynet.com/os2002/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ --=-1ZczHUtjHmNBtxQSJ+Ba Content-Disposition: inline Content-Description: Forwarded message - Ann: Xml Validation Interoperability Framework (xvif) Content-Type: message/rfc822 Subject: Ann: Xml Validation Interoperability Framework (xvif) From: Eric van der Vlist To: Xml-Dev Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.7 Date: 20 Jun 2002 11:11:37 +0200 Message-Id: <1024564297.23921.176.camel@ibook> Mime-Version: 1.0 Hi, I am happy to announce a first version of Xml Validation Interoperability Framework (xvif), a proposal for embedding pipes of transformations and validations within grammar based schema languages. While the common approach is to define pipes of transformations and validations operating on complete XML documents, my purpose with xvif is to explore the possibility of defining "micro-pipes" transforming information items (ie attributes, text and element nodes) during the transformation itself. The main advantage in doing so is to bring the transformation closer to the place where it is needed. This makes it more easy to maintain, but also allows it to interoperate more closely with the schema language: with Relax NG and xvif I can say for instance that an element is valid if it gives a result 1 matching a pattern1 after a transformation 1 *or* if it gives a result 2 matching a pattern2 after a transformation 2. In this proposal, I have given the main focus to defining the interoperability framework itself, relying on existing technologies for the transformations and validations defined in my micro-pipes (XPath, XSLT, Regular Fragmentations and regular expressions are supported in the current implementation). Some of these pipes are rapidly getting quite complex which IMO shouldn't be seen as a problem of the framework itself but rather as an indication that it might be needed to define a lightweight transformation language specific to such applications. This prototype is based on a partial implementation of Relax NG written in Python (I have focussed on the features which I have found most important for my proof of concept) using the derivative algorithm described by James Clark. The following resources are available in this first version: - Strawman: http://downloads.xmlschemata.org/python/xvif/xvif.html - On line demo: http://downloads.xmlschemata.org/python/xvif/tryMe.cgi - Download: http://downloads.xmlschemata.org/python/xvif/ I assume that discussion about xvif can be carried on xml-dev, but I have also setup a more specific mailing list for XML schema related discussions at xmlschemata@xmlschemata.org: - http://lists.xmlschemata.org/xmlschemata/ Enjoy! Eric -- See you in San Diego. http://conferences.oreillynet.com/os2002/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ --=-1ZczHUtjHmNBtxQSJ+Ba-- From larsga@garshol.priv.no Thu Jun 20 12:14:48 2002 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 20 Jun 2002 13:14:48 +0200 Subject: [XML-SIG] XML Binding? In-Reply-To: <001101c2172f$a6562380$bc295b18@BHAI> References: <001101c2172f$a6562380$bc295b18@BHAI> Message-ID: Hi Bill, * Bill la Forge | | I've spend the last few years working on Quick, an open source | Java/XML bindery: | http://www.jxml.com/2001-12/products/quick/index.html (Roughly | similar to JAXB and Castor.) | | Now I'm looking at implementing something similar in Python. Or has | it been done already? As far as I know it hasn't, and it would certainly be a welcome addition. -- Lars Marius Garshol, Ontopian ISO SC34/WG3, OASIS GeoLang TC From larsga@garshol.priv.no Thu Jun 20 12:16:29 2002 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 20 Jun 2002 13:16:29 +0200 Subject: [XML-SIG] New Python/XML book published Message-ID: My book on Python and XML, which has been in the pipeline for more than two years now, is now finally published. I am not sure if you can find it in bookstores in the US yet (it hasn't come to Europe yet), but you can order it from Amazon. For more information about the book, see -- Lars Marius Garshol, Ontopian ISO SC34/WG3, OASIS GeoLang TC From Bill la Forge" Message-ID: <002301c21856$f39d46a0$bc295b18@BHAI> Lars, Thanks for the expression of interest. Now the real question is, who would be interested in working on such a project? I've been doing open source for too long to be interested in doing another project solo. Projects I'm currently managing are Quick, JXUnit, JXWeb and QARE----and QARE is more than a full time job. On the other hand, Quick is old enough that it is time for a radical overhaul. Switching to Python would do that. Quick has been through 3 name changes and 7 complete rewrites. Quick uses a tree factory pattern. Its predicessor, MDSAX, used a SAX filter patern. Before that was Coins, which was rather ad hoc. What I'm proposing for PyQ would use the Model/Control and Model/View/Control patterns. Which should be a lot easier to work with than tree factory. All of the Quick utilities currently build on M/C and M/V/C. See the section on Transforming XML in the Quick Guide at http://www.jxml.com/2001-12/products/quick/guide/index.html#transform I have found that M/C and M/V/C are powerful patterns for transforming XML and data. The Quick utilities transform XML into XML, Java Model Classes, Java [Un]Marshaling Classes and DTDs. And while Quick provided reasonable support for binding XML to pre-existing Java classes, I believe PyQ would provide even greater flexibility. For more information on Quick, you might want to take a look at the O'Reilly book, Java & XML Data Binding by Brett McLaughlin. Chapter 9 and appendix B are devoted to Quick. Bill From noreply@sourceforge.net Thu Jun 20 16:11:37 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 20 Jun 2002 08:11:37 -0700 Subject: [XML-SIG] [ pyxml-Patches-571672 ] Entity names in sgmlop Message-ID: Patches item #571672, was opened at 2002-06-20 17:11 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=571672&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Walter Dörwald (doerwalter) Assigned to: Nobody/Anonymous (nobody) Summary: Entity names in sgmlop Initial Comment: sgmlop handles entity names incorrectly in XML mode. According to http://www.w3.org/TR/2000/REC-xml-20001006#sec-references (Rule [68]): EntityRef ::= '&' Name ';' and http://www.w3.org/TR/2000/REC-xml-20001006#NT-Name (Rules [4], [5]): Name ::= (Letter | '_' | ':') (NameChar)* NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender So "-", "_" and ":" are allowed in entity names. sgmlop currently uses (ISALNUM(*p) || *p == '.') to test for legal characters inside entity names for both modes (SGML and XML). This patch adds "-", "_" and ":" to the set of allowed characters (but only for XML mode). ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=571672&group_id=6473 From dm_top@hotmail.com Thu Jun 20 23:03:10 2002 From: dm_top@hotmail.com (Dmitry Tikhostup) Date: Fri, 21 Jun 2002 06:03:10 +0800 Subject: [XML-SIG] PyXML-0.7.1 expat ext. build failed under sygwin Message-ID: Hello, --------------------------------------------------------------- Target: I need the XML SAX parser for Python under Cygwin. --------------------------------------------------------------- Precondition: *Windows 2000 Prof. *CygWin ver.: 2.194.2.22 *GCC ver.: 2.95.3-5 Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs gcc version 2.95.3-5 (cygwin special) *Python ver.: 2.2.1 $ python Python 2.2.1 (#1, Jun 6 2002, 16:53:43) [GCC 2.95.3-5 (cygwin special)] on cygwin --------------------------------------------------------------- Description of the problem: After unpacking of the tarball, the issuing the python setup.py build cause the following compiling error during building the expat extention: . . -- copying --- . . copying xml/xslt/_4xslt.py -> build/lib.cygwin-1.3.10-i686-2.2/_xmlplus/xslt copying xml/xslt/__init__.py -> build/lib.cygwin-1.3.10-i686-2.2/_xmlplus/xslt running build_ext building '_xmlplus.parsers.pyexpat' extension creating build/temp.cygwin-1.3.10-i686-2.2 gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DUSE_DL_IMPORT -DHAVE_EXPAT_H -DV ERSION="1.95.2" -DXML_NS=1 -DXML_DTD=1 -DXML_BYTE_ORDER=12 -DXML_CONTEXT_BYTES=1 024 -Iextensions/expat/lib -I/usr/local/include/python2.2 -c extensions/pyexpat. c -o build/temp.cygwin-1.3.10-i686-2.2/pyexpat.o extensions/pyexpat.c:1709: initializer element is not constant extensions/pyexpat.c:1709: (near initialization for `handler_info[2].setter') extensions/pyexpat.c:1712: initializer element is not constant extensions/pyexpat.c:1712: (near initialization for `handler_info[3].setter') extensions/pyexpat.c:1715: initializer element is not constant extensions/pyexpat.c:1715: (near initialization for `handler_info[4].setter') extensions/pyexpat.c:1718: initializer element is not constant extensions/pyexpat.c:1718: (near initialization for `handler_info[5].setter') extensions/pyexpat.c:1727: initializer element is not constant extensions/pyexpat.c:1727: (near initialization for `handler_info[8].setter') extensions/pyexpat.c:1736: initializer element is not constant extensions/pyexpat.c:1736: (near initialization for `handler_info[11].setter') extensions/pyexpat.c:1739: initializer element is not constant extensions/pyexpat.c:1739: (near initialization for `handler_info[12].setter') extensions/pyexpat.c:1742: initializer element is not constant extensions/pyexpat.c:1742: (near initialization for `handler_info[13].setter') extensions/pyexpat.c:1745: initializer element is not constant extensions/pyexpat.c:1745: (near initialization for `handler_info[14].setter') extensions/pyexpat.c:1754: initializer element is not constant extensions/pyexpat.c:1754: (near initialization for `handler_info[17].setter') extensions/pyexpat.c:1757: initializer element is not constant extensions/pyexpat.c:1757: (near initialization for `handler_info[18].setter') extensions/pyexpat.c:1760: initializer element is not constant extensions/pyexpat.c:1760: (near initialization for `handler_info[19].setter') extensions/pyexpat.c:1763: initializer element is not constant extensions/pyexpat.c:1763: (near initialization for `handler_info[20].setter') error: command 'gcc' failed with exit status 1 --------------------------------------------------------------- Workaround: the simple code review and primitive test like: void funcA(int a, int b) { printf("from A: %d, %d\n", a, b); } void funcB(int a, int b) { printf("from B: %d, %d\n", a, b); } typedef void (*PF)(int, int); struct S { const char * _F; PF _pf; }; extern struct S ars[2]; static struct S ars[] = { {"funcA", funcA }, {"funcB", funcB }, }; int main() { printf("%s ", ars[0]._F); ars[0]._pf(1, 2); printf("%s ", ars[1]._F); ars[1]._pf(3, 4); return 0; } and $ gcc -o test main.c shows that everything should be all right. But it is not... --------------------------------------------------------------- Searching the net: 1. I did not find the precompiled version of the PyXML for cygwin. Could you build and put on the site the precomiled version for the cygwin as well? I believe that cygwin's rpm would be more then enough. 2. The problem like "initializer element is not constant" is shown but the recommendations goes to the updating of the gcc compiler with unclear direction. That's possibly true, but instalation of the GNU's projects under cygwin is a different story. With the best regards, Dmitri Tikhostoup e-mail: dm_top@hotmail.com _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com From dittmar@snafu.de Thu Jun 20 23:57:26 2002 From: dittmar@snafu.de (Daniel Dittmar) Date: Fri, 21 Jun 2002 00:57:26 +0200 Subject: [XML-SIG] XML Binding? References: <001101c2172f$a6562380$bc295b18@BHAI> <002301c21856$f39d46a0$bc295b18@BHAI> Message-ID: <3D125DD6.6080102@dittmar.net> Bill la Forge wrote: > Now the real question is, who would be interested in working on such a > project? I have something similar. It can currently generate Python classes and C code for expat. The Python classes are probably quite straight forward: - each gets it's own class - attributes become instance variables, initialized to the default value - def set_attributename () is generated for each attribute - sub elements become also instance variables, initialized to None - def add_subelementname () is generated - list elements are generated as subclasses of UserList - customization is done by subclassing these classes and using a factory with these subclasses during the parse The C/expat version generates a parser which calls setter methods on independently defined classes, which seems also the way Quick works (after one very quick look into the XML Binding book) I'm going to put the code, docs and some examples on the web so that you can see if it would be along your line. By the way, I named it FOM for Fixed Object Model (this would make DOM the Dynamic Object Model). Daniel From mkane@iastate.edu Fri Jun 21 06:15:33 2002 From: mkane@iastate.edu (Mark V Kane) Date: Fri, 21 Jun 2002 00:15:33 CDT Subject: [XML-SIG] Problem Message-ID: <200206210515.AAA21224@isua5.iastate.edu> Hello, I have difficulty installing the PyXML-0.7.1 software. Though it may very well be due to my incompetence, the README said to write you. When I type in python setup.py build I get a Traceback (innermost last): File "setup.py", line 9, in ? from distutil.core import setup, Extension ImportError: No module named distutils.core Can you help? I'd greatly appreciate it! Cheers, Mark From Matt Gushee Fri Jun 21 06:40:05 2002 From: Matt Gushee (Matt Gushee) Date: Thu, 20 Jun 2002 23:40:05 -0600 Subject: [XML-SIG] Problem In-Reply-To: <200206210515.AAA21224@isua5.iastate.edu> References: <200206210515.AAA21224@isua5.iastate.edu> Message-ID: <20020621054004.GB9465@swordfish.havenrock.com> On Fri, Jun 21, 2002 at 12:15:33AM -0500, Mark V Kane wrote: > > I have difficulty installing the PyXML-0.7.1 software. Though it may > very well be due to my incompetence, the README said to write you. When > I type in > > python setup.py build > > I get a > > Traceback (innermost last): > File "setup.py", line 9, in ? > from distutil.core import setup, Extension > ImportError: No module named distutils.core The usual reason for this error is that you don't have the Distutils package installed. And the usual reason for *that* is that you have an old version of Python, say, 1.5.2. If that's the case, you can either download the Distutils from http://www.python.org/sigs/distutils-sig/download.html or upgrade to Python 2.2, which includes the Distutils by default. For the most part Python 2.x is backwards compatible with 1.5, so unless you are running a Linux distribution that makes heavy use of Python-1.5.2-based utilities (mainly RedHat, I think), you should probably just upgrade. Another option is to install 2.2 alongside the older version. There was a thread on that topic about a week ago ... shouldn't be too hard to find in the archives. -- Matt Gushee Englewood, Colorado, USA mgushee@havenrock.com http://www.havenrock.com/ From Juergen Hermann" Message-ID: On Thu, 20 Jun 2002 23:40:05 -0600, Matt Gushee wrote: >The usual reason for this error is that you don't have the Distutils >package installed. And the usual reason for *that* is that you have an >old version of Python, say, 1.5.2. The other very usual reason is the broken Debian packaging which puts di= stutils into a *-dev* package. Ciao, J=FCrgen From martin@v.loewis.de Fri Jun 21 09:42:11 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 21 Jun 2002 10:42:11 +0200 Subject: [XML-SIG] PyXML-0.7.1 expat ext. build failed under sygwin In-Reply-To: References: Message-ID: "Dmitry Tikhostup" writes: > 1. I did not find the precompiled version of the PyXML for cygwin. > Could you build and put on the site the precomiled version for the > cygwin as well? I believe that cygwin's rpm would be more then enough. I'm not sure. I accepted three or four patches into PyXML that all said that they make pyexpat compilable for Cygwin, I release the package, then somebody tells me that it won't compile. I don't know what to think. Regards, Martin From fdrake@acm.org Fri Jun 21 14:06:54 2002 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 21 Jun 2002 09:06:54 -0400 Subject: [XML-SIG] PyXML-0.7.1 expat ext. build failed under sygwin In-Reply-To: References: Message-ID: <15635.9454.642371.187518@grendel.zope.com> Martin v. Loewis writes: > I'm not sure. I accepted three or four patches into PyXML that all > said that they make pyexpat compilable for Cygwin, I release the > package, then somebody tells me that it won't compile. I don't know > what to think. It might be nice for one of the Cygwin users to take the Expat sources from the 1.95.3 Expat release and see if they improve things. I think most of the Cygwin-driven changes in this Expat release were in the build process and not the library sources, though. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From vdv@dyomedea.com Fri Jun 21 15:30:05 2002 From: vdv@dyomedea.com (Eric van der Vlist) Date: 21 Jun 2002 16:30:05 +0200 Subject: [XML-SIG] Updated xmlchargen for Namespaces productions Message-ID: <1024669806.27476.163.camel@ibook> Hi, I have forgoten to mention it before, but I needed regexp for XML Namespaces productions such as "NCName" and I have updated a version of pyxml's xmlchargen.py. This is available at: http://downloads.xmlschemata.org/python/xvif/xmlchargen.py Many thanks for this utility which saved me plenty of time! I was wondering if other such regexp utilities are available. For instance to implement W3C XML Schema patterns we would need regexps for the unicode blocks and categories. Is this available somewhere? Thanks Eric -- See you in San Diego. http://conferences.oreillynet.com/os2002/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ From hcelibate@hotmail.com Sun Jun 23 11:27:55 2002 From: hcelibate@hotmail.com (hippy) Date: Sun, 23 Jun 2002 03:27:55 -0700 Subject: [XML-SIG] Error installin PyXML Message-ID: This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C21A65.F6A765E0 Content-Type: multipart/alternative; boundary="----=_NextPart_001_000C_01C21A65.F6A765E0" ------=_NextPart_001_000C_01C21A65.F6A765E0 Content-Type: text/plain; charset="windows-874" Content-Transfer-Encoding: quoted-printable Dear Sirs, I have some problem when I installed PyXml in my computer. Please see my = attached file, it will tell what my problem is. Thank you. Regards, hippy ------=_NextPart_001_000C_01C21A65.F6A765E0 Content-Type: text/html; charset="windows-874" Content-Transfer-Encoding: quoted-printable
Dear Sirs,
 
I have some problem when I installed = PyXml in my=20 computer. Please see my attached file, it will tell what my problem is. = Thank=20 you.
 
Regards,
 
hippy
------=_NextPart_001_000C_01C21A65.F6A765E0-- ------=_NextPart_000_000B_01C21A65.F6A765E0 Content-Type: image/gif; name="pyxmlerror.gif" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="pyxmlerror.gif" R0lGODlhnAITAfcAAAAAAP///wAA/wokagslawwmaw0nbA4obQ8qbw8pbhArbxErcBEscBItcRIs cBMtchMuchQvcxUwdBUwcxYxdBcydRgzdhk0dxo1eBo1dxs2eBw3ehw3eR04eh45ex86fCA7fSE8 fSI9fiM+fyZBgh46eyE9fiM/gCRAgCVBgSdDgyhEgylFhCpGhStIhytHhixIhy1KiC1JiC5LiS9L ii9MijFOjDFNizZSjzJPjDNQjTRRjjVSjzZTkDdUkThVkjhVkTlWkjpXkztYlDxZlT1alj1alT5b lz9dmD9cl0BdmEFfmkFemUJfmkNgm0Rhm0VinEZknUhmn0dlnklooElnoEpooUtpokxro01spExq ok5tpU9upVBvplJxqFFwp1NyqVRzqlV0q1RzqVZ1q1d2rFl4rlh3rVp5r1t7sFx7sFt6r118sV9/ s159smB/tGGAtGKBtWSDt2SEt2OCtmWFuGeHumaFuWaGuWmJvGiIu22Nv2qLvWuMvm6PwG2Ov2+Q wW6Ov3GSw3CQwXKTw3GRwnSVxXOTxHOUxHaXx3WWxneYyHiZyHeYx3qbynmayXydzHmbynudy32f zX+gzn6fzYGi0ICiz4Chz4Ol0oKj0YKk0YWn1ISm04Sl0oao1Yiq1oep1Yut2Yqs2Ims142w246x 3I6w242v2oyu2ZCz3Y+y3JK135Gz3pG03pW44pS34ZO24JO235a54pW44Zi75Je645q95pm85ZzA 55y/55u+5pq95Z/D6p7B6Z7C6Z3A6KHF7KDE66TI76PH7qDD6qPG7TpupabK8NTQyMDAwICAgEBA QP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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O5jWgQAURe1URM1XYi0sAWa6WYl9mzzNsMrkipmDY8sGttPOdMwMh+p63rfQ/t0UNMzXfa0 sI6qZdIxz73FR3d0Uo/xliVoNMdcofqNxfGZTBKl2h5xpSYUXi9ZEW9xLCNqFfNyRi/ROkUnEfP1 9c7tmOKbnsI1T4oNWu+cWq91poj0Imd2j6pkZVv/dluzndFptmiXU2F29lp/tlOOtmrTrml/NGr/ 4WrHNuK2tke/toTJNm7nJ22zdUiPcW7/tm/uNkfbtokBt3E/pHBftm8fN3P/Y3InB2Y3t3TrI1ws g3VfN3Zfd2+D9nR39zwyA3iHt3iP93antnefNzNa9lqXN2yjt3u74lAftXwT9xi9t32D4nPTNybd N38jInKoN3Qvd38P+Db+t3rr9yspqBNLn3limZ950oKbdBW9NIHrsYF7Nntr6YmiLNlycr/hbld7 sSSrW+BOdoWnN3IQxXBnuI69oGWSOIUPont0HqUCUSUf9onHtlo/z4ordTKCtYuQ3hJX4p59jRGJ //M9sXLumniOw7eB1yNv+7gpJ6dcOaejYa3DHjM12hAAi14zV3KTD29nA4BrsziZOWuR1xUGa2+a C61r1CeOMylohvki57eZN9txyTT3raxsJaxVj+CBUjSIazKdz/aFn/adh4s6C/rPpNlU3rRXbzh2 3l4NE3qh76edR3flLXTaGPZgnwenhzhzXGHVyu2TNaHnXvpGH3qZR7fsukuqqzqBV3d21zqC660d xjpjyzqvFwh5/3p45y2ADzuxF7uxHzuyJ7uyLzuzN7uzPzu0R7u0Tzu1V7u1Xzu2Z7u2bzu3d3sy yTe4h7u4jzu5l7u5nzu6p7u6rzu7t7u7vzu8x3K7vM87vde7vd87vue7vu87v/e7uHNctwe8wA88 wRe8wR88wie8wi88wze8wwP8w0e8xE88xVe8xV88xme8xmv7gti6x388yIe8yI88yZe8yZ88yqe8 yq88y7e8y788zMe8zM88zde8zd88zue8zq98QAAAOw== ------=_NextPart_000_000B_01C21A65.F6A765E0-- From thehaas@binary.net Sat Jun 22 21:46:05 2002 From: thehaas@binary.net (Mike Hostetler) Date: Sat, 22 Jun 2002 15:46:05 -0500 Subject: [XML-SIG] Error installin PyXML In-Reply-To: ; from hcelibate@hotmail.com on Sun, Jun 23, 2002 at 05:27:55 -0500 References: Message-ID: <20020622204605.GA29826@gideon.om.cox.net> You grabbed the source file for PyXML and do not have a compiler (i.e. Visual C++) installed on your computer. You can download the pre-compiled version from this link: http://prdownloads.sourceforge.net/pyxml/PyXML-0.7.1.win32-py2.2.exe?download Just download the file, run it, and it will be installed. -- mikeh On 2002.06.23 05:27 hippy wrote: > Dear Sirs, > > I have some problem when I installed PyXml in my computer. Please see > my attached file, it will tell what my problem is. Thank you. > > Regards, > > hippy > From uche.ogbuji@fourthought.com Sat Jun 22 22:29:59 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: 22 Jun 2002 15:29:59 -0600 Subject: [XML-SIG] Useful Python 2.2 tools for the DOM hacker Message-ID: <1024781406.29245.1745.camel@borgia.local> --=-ZJpz5ChmaCs1c1poLgWW Content-Type: text/plain Content-Transfer-Encoding: 7bit I've kicked up a few useful routines today for DOM processing with Python 2.2. (BTW, generators kick ass). I've attched a module of these routines just in case they come in handy to others. I must say that the combo of generators/iterators and list comps makes this code extraordinarily cleaner and faster than it would have been in, say Python 1.5. BTW, if someone more graphically inclined than I wants to write the stubbed out function dom_trace and post it back here, I'd be happy to go into debt of a beer. What would really be cool is a routine that emits an SVG diagram of a DOM's contents. Based on stuff I've seen done with SVG, this should be quite feasible. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s=2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel --=-ZJpz5ChmaCs1c1poLgWW Content-Disposition: attachment; filename=DomTools.py Content-Transfer-Encoding: quoted-printable Content-Type: text/x-python; name=DomTools.py; charset=ISO-8859-1 ######################################################################## # # File Name: DomARama.py # """ DOM Processing Utilities: Python 2.2 only Copyright 2002 Uche Ogbuji http://uche.ogbuji.net http://4suite.org/ """ from __future__ import generators from xml.dom import Node def in_order_iterator(node): yield node for child in node.childNodes: for cn in in_order_iterator(child): yield cn return def in_order_iterator_filter(node, filter_func): if filter_func(node): yield node for child in node.childNodes: for cn in in_order_iterator_filter(child, filter_func): if filter_func(cn): yield cn return def get_elements_by_tag_name_ns(node, ns, local): return in_order_iterator_filter(node, lambda n: n.nodeType =3D=3D Node.= ELEMENT_NODE and n.namespaceURI =3D=3D ns and n.localName =3D=3D local) def string_value(node): text_nodes =3D in_order_iterator_filter(node, lambda n: n.nodeType =3D= =3D Node.TEXT_NODE) return u''.join([ n.data for n in text_nodes ]) #def DomTrace(node): # """ # Display a rudimentary diagram of a DOM's contents # """ if __name__ =3D=3D "__main__": DOC =3D """eggspython<= /spam> """ from Ft.Xml.Domlette import NonvalidatingReader doc =3D NonvalidatingReader.parseString(DOC, "http://spam.com/base") print "All nodes:" for node in in_order_iterator(doc): print node print "Elements only:" for node in in_order_iterator_filter( doc, lambda x: x.nodeType =3D=3D Node.ELEMENT_NODE): print node print "Get elements by tag name:" for node in get_elements_by_tag_name_ns(doc, None, 'monty'): print node print "String value:" print string_value(doc) --=-ZJpz5ChmaCs1c1poLgWW-- From uche.ogbuji@fourthought.com Mon Jun 24 08:44:32 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Mon, 24 Jun 2002 01:44:32 -0600 Subject: [XML-SIG] Uche Ogbuji's integrated guide to XML processing in Python In-Reply-To: Message from Andrew Kuchling of "Tue, 04 Jun 2002 10:45:44 EDT." <20020604144544.GD1039@ute.mems-exchange.org> Message-ID: <200206240744.g5O7iWN19528@localhost.localdomain> Uche Ogbuji wrote: > I quite firmly intend to keep up [my PyXML document collation project] As promised, it's updated with eight new items. Plenty of new code examples and pointers. http://uche.ogbuji.net/tech/akara/pyxml/ Andrew Kuchling wrote: > The online Python cookbook has 13 XML-related items. > http://aspn.activestate.com/ASPN/Cookbook/Python?kwd=XML Thanks for pointing this out. I now cover all these items, including updates and commentary where appropriate. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From noreply@sourceforge.net Mon Jun 24 09:04:19 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 24 Jun 2002 01:04:19 -0700 Subject: [XML-SIG] [ pyxml-Bugs-573011 ] minidom problem in 0.7.1 with python2.2 Message-ID: Bugs item #573011, was opened at 2002-06-24 10:04 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=573011&group_id=6473 Category: DOM Group: None Status: Open Resolution: None Priority: 5 Submitted By: Alexandre Fayolle (afayolle) Assigned to: Nobody/Anonymous (nobody) Summary: minidom problem in 0.7.1 with python2.2 Initial Comment: Putting on my Debian Maintainer cap... I've received the following bug report: From: Jenya To: alf@logilab.fr Date: Mon, 17 Jun 2002 20:17:14 +0300 Subject: python2.2-xml breakage ? Hello. I updated today python2.2-xml to latest and greatest (0.7.1-1) and bunch of other things that i didn't noticed (you know, apt-get upgrade thingie), and after executing : import xml.dom.minidom doc = xml.dom.minidom.parse("somefile.xml") expirienced following error : File "/usr/lib/python2.2/site-packages/_xmlplus/dom/minidom.py", line 962, in parse return _doparse(pulldom.parse, args, kwargs) File "/usr/lib/python2.2/site-packages/_xmlplus/dom/minidom.py", line 954, in _doparse toktype, rootNode = events.getEvent() File "/usr/lib/python2.2/site-packages/_xmlplus/dom/pulldom.py", line 265, in getEvent self.parser.feed(buf) File "/usr/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py", line 194, in feed self.reset() File "/usr/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py", line 232, in reset self._parser = expat.ParserCreate(None, " ", intern = self._interning) TypeError: 'intern' is an invalid keyword argument for this function By replacing line 232 in expatreader.py from self._parser = expat.ParserCreate(None, " ", intern = self._interning) to self._parser = expat.ParserCreate(None, " ") problem got fixed, but i am not sure how right this solution is. those days expat.ParserCreate accepts only 2 parameters : ParserCreate([encoding[, namespace_separator]]) -> parser Return a new XML parser object. Regards, Evgeny ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=573011&group_id=6473 From noreply@sourceforge.net Mon Jun 24 09:06:49 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 24 Jun 2002 01:06:49 -0700 Subject: [XML-SIG] [ pyxml-Bugs-573014 ] adr_parse skips entries and breaks tree Message-ID: Bugs item #573014, was opened at 2002-06-24 10:06 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=573014&group_id=6473 Category: XBEL Group: None Status: Open Resolution: None Priority: 5 Submitted By: Alexandre Fayolle (afayolle) Assigned to: Nobody/Anonymous (nobody) Summary: adr_parse skips entries and breaks tree Initial Comment: Please see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150763 for a full description of the bug. --------------------------------- I was having a hard time converting an Opera 6 bookmark file for use with galeon until I discovered what I consider a bug in adr_parse. The output of adr_parse was missing the first bookmark entry of all folders and also seem to have hooked the bottem part of my top-level bookmarks deeper into the tree structure. As I understand from the adr_parse source, the fields "VISITED" and "ORDER" are optional. Unfortunately, the "skip of optional fiels"-logic in the script does not work [Once a line is read and recognized as not holding the expected field, it is essentially DISCARDED. It is not compared to the next possible optional field name. This results in reading to many line for a single record and missing the next one completely (w/ "swallow_rest").] Since this problem only occures for fields that are not used later on in the script (ie. parsed needlessly), I just removed the parsing entirely and leave the skipping to swallow_rest. I can report complete success with that. - --- /usr/bin/adr_parse Sun Jun 16 09:47:35 2002 +++ xbel/adr_parse Sun Jun 23 14:00:17 2002 @@ -73,8 +73,6 @@ if line=="#FOLDER": name=readfield(infile,"NAME") created=parse_date(readfield(infile,"CREATED")) - - parse_date(readfield(infile, "VISITED", 0)) # just throw this away - - order = readfield(infile, "ORDER", 0) swallow_rest(infile) bms.add_folder(name,created) @@ -83,7 +81,6 @@ url=readfield(infile,"URL") created=parse_date(readfield(infile,"CREATED")) visited=parse_date(readfield(infile, "VISITED", 0)) - - order = readfield(infile, "ORDER", 0) swallow_rest(infile) bms.add_bookmark(name,created,visited,None,url) This solution also (like the original code intended for optional fields) does not solve the problem of parsing optional fields, but it at least allows me to parse the file properly for the given purpose. Kai ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=573014&group_id=6473 From noreply@sourceforge.net Mon Jun 24 09:08:29 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 24 Jun 2002 01:08:29 -0700 Subject: [XML-SIG] [ pyxml-Bugs-573015 ] adr_parse does not properly handle utf8 Message-ID: Bugs item #573015, was opened at 2002-06-24 10:08 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=573015&group_id=6473 Category: XBEL Group: None Status: Open Resolution: None Priority: 5 Submitted By: Alexandre Fayolle (afayolle) Assigned to: Nobody/Anonymous (nobody) Summary: adr_parse does not properly handle utf8 Initial Comment: Please see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150765 for a full description of this bug. ------------------------------------ When converting my Opera 6 bookmarks to xbel I found what could be considered a bug in adr_parse. Bookmarks containing non-ASCII characters (in my case Umlauts äöüß) are represented in utf8 in the opera6.adr file according to its header: Opera Hotlist version 2.0 Options: encoding = utf8, version=3 Using the output of adr_parse (utf8 code was copied unchanged by adr_parse) as bookmarks in galeon reveals the problem: Bookmark entries are truncated at the first non-ASCII character. A manual fix of the bookmarks.xbel seems to have solved the problem: - - + This may not be a bug in adr_parse, but in bookmark.py, as it seems to do UTF-8 encoding without declaring it. Kai ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=573015&group_id=6473 From Alexandre.Fayolle@logilab.fr Mon Jun 24 18:33:43 2002 From: Alexandre.Fayolle@logilab.fr (Alexandre) Date: Mon, 24 Jun 2002 19:33:43 +0200 Subject: [XML-SIG] XML Tutorial at Europython Message-ID: <20020624173343.GA14254@orion.logilab.fr> Hello everyone, I've put the slides for the tutorial I'll be giving at Europython online. You can get them as HTML from http://www.logilab.org/XMLTutorial/ or as pdf or postscript from http://www.logilab.org/ftp/pub/talks/ I'd appreciate if some of you could give them a look and provide some feedback before I leave for Charlerois. Cheers, Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From dharmesh@ncst.ernet.in Mon Jun 24 20:01:56 2002 From: dharmesh@ncst.ernet.in (Dharmesh Maniar) Date: Tue, 25 Jun 2002 00:31:56 +0530 (IST) Subject: [XML-SIG] Problem with msie_parse program Message-ID: Hi, I had problems with msie_parse. It gives me only hierarchy, no links.. Like this ( following is a fragment of my .xbel file generated by msie_parse program) . . . games chess cricket formula1 . . . Please guide me what should i do? what could have been wrong? The interested part is, all links automatically coming with IE, like MSN etc worked fine. But all links (favorites) created by me in IE did not come truly. I was using IE6, now i have shifted to Debian GNU/Linux and using Galeon as my browser. Hope to here from u soon.. Thanks, Dharmesh From xml@planet.nl Mon Jun 24 22:28:58 2002 From: xml@planet.nl (xml startkabel) Date: Mon, 24 Jun 2002 23:28:58 +0200 Subject: [XML-SIG] XML Startkabel updates References: <20020624173343.GA14254@orion.logilab.fr> Message-ID: <005501c21bc6$26c7d460$9600000a@dragon> ------------------------------------- Apologize for cross posting ------------------------------------- XML Startkabel (http://xml.startkabel.nl/) is THE portal site for all kinds of xml resources (tutorials, editors, database systems...). We are doing nothing but finding the best XML resources for you. Because the increasing number of XML related sites, we have to introduce sub pages to keep the main page accessible for the users. Our team on weekly basis updates the following pages: http://xml.startkabel.nl/ http://xml2.startkabel.nl/ http://xsl.startkabel.nl http://xhtml.startkabel.nl http://xml-spec.startkabel.nl http://xml-database-sys.startkabel.nl If you like what we are doing on our website, please pass the word around about http://xml.startkabel.nl/ and join our mailing list: http://groups.yahoo.com/group/xml_start_here --------------------- What's New? --------------------- 1. X-Hive Corporation Launches Version 3.0 of Its Native XML Database X-Hive Corporation announced the release of version 3.0 of X-Hive/DB, the native XML database designed for software developers who need to process and store XML data in their applications. X-Hive/DB supports all major XML standards including XML 1.0, XQuery, XPath, XPointer, XLink, XSL, XUpdate and DOM. It also offers a transaction mechanism, versioning with branching, BLOB storage and various indexing methods, as well as support for J2EE and WebDAV. Next to overall performance improvements the following features have been added or enhanced in X-Hive/DB 3.0: - Support for XQuery - Support for DOM Level 3 Abstract Schema - Support for DOM Level 3 Load & Save - New indexing method: element name indexes - Improved XPath/XPointer API - Improved administrator client - Simplified database setup X-Hive/DB 3.0 is available on Linux, Solaris and Windows. A free 30-day evaluation license can be obtained from www.x-hive.com. More information see http://xml.startkabel.nl/ section "what's new". 2. IBM developerWorks papers: 1)Counting with node sets Many common XSLT tasks, including simple loops, can be made easier by using special properties of node set operations. This tip discusses using node sets for simple and efficient loop control. (contains sample code) More information see http://xml.startkabel.nl/ section "what's new". 2) XML for Data: XSL style sheets This article examines the two most common authoring styles used to create XSL style sheets: push and pull. It takes a look at some simple XML and XSL examples and discusses the benefits and drawbacks of each approach. (contains sample code) More information see http://xml.startkabel.nl/ section "what's new". 3) Outputting HTML from an XSL style sheet ** Because HTML is so similar to XML, it should be fairly straightforward to create an XSLT style sheet that outputs HTML. Unfortunately, the differences between HTML and XML that do exist can cause pages to be displayed incorrectly in older browsers. This tip discusses those differences, and explains how to use XSLT's output element to resolve the issues they create. (contains sample code) More information see http://xml.startkabel.nl/ section "what's new". 4) Leverage the extensible DITA DTD In current approaches, DTDs are static. As a result, DTD designers try to cover every contingency and, when this effort fails, users have to force their information to fit existing types. The Darwin Information Typing Architecture (DITA) changes this situation by giving information architects and developers the power to extend a base DTD to cover their domains. This article shows you how to leverage the extensible DITA DTD to describe new domains of information. (contains sample code) More information see http://xml.startkabel.nl/ section "what's new". 5) Choose the style sheet based on the XML document Using Extensible Stylesheet Language Transformations (XSLT) is often the easiest way to transform your XML data from one form into another, as it allows you a great deal of flexibility without having to change an application. On occasion, however, you may run into a snag because the style sheet to be used is based on the content of the document itself. This article discusses two ways to base your choice of style sheet on the XML document -- the style sheet processing instruction and the data itself. More information see http://xml.startkabel.nl/ section "what's new". 6) An introduction to Web Services Gateway Web services can be accessed from applications and processes both within the corporate firewall and beyond it. Fundamental to this is how the service, deep inside your enterprise network, is exposed to external users. This article looks at the issues involved in this approach and how IBM's Web Services Gateway addresses these issues. (contains sample code) More information see http://xml.startkabel.nl/ section "what's new". ---------------------- Sponsor ---------------------- Just like every useful site, we do have sponsors: Salience (http://www.salience.nl/) Salience is a Dutch based XML company. They help organisations to get more out of information. They analyse information flows and structures, advise on how to structure them efficiently and implement the solutions put forward. What lies at the heart of their service is their expertise in the field of the application of XML. Their vision is that XML offers great value as a management tool, particularly for the organisations for which knowledge and information are vital. Many of these organisations have invested enormous amounts in information storage in recent years. In their eyes, that is an essential, but above all cautious approach. What is more relevant is how the organisation arrives at knowledge development and utilises existing knowledge. XML is a superb tool for increasing the return on information. . If you have a XML related website, link to us and when people are asking for URLs, please tell them about the content on our website. We also would like to link to your site if it is related to the XML. XML Startkabel team **************************** http://xml.startkabel.nl ***************************** From tpassin@comcast.net Tue Jun 25 00:45:08 2002 From: tpassin@comcast.net (Thomas B. Passin) Date: Mon, 24 Jun 2002 19:45:08 -0400 Subject: [XML-SIG] Problem with msie_parse program References: Message-ID: <004b01c21bd9$2d11f540$961b3044@reston01.va.comcast.net> [Dharmesh Maniar] If you can look through archives of the list, you will find a post from me several months ago with some patches to the XBEL code for Internet Explorer bookmarks. If you can't find it, write again and I'll try to find it. I just had my computer die and can't get at it right now. Cheers, Tom P > > Hi, > > I had problems with msie_parse. It gives me only hierarchy, no links.. > Like this ( following is a fragment of my .xbel file generated by > msie_parse program) > . > . > . > > games > > chess > > > cricket > > > formula1 > > > . > . > . > > Please guide me what should i do? what could have been wrong? The > interested part is, all links automatically coming with IE, like MSN etc > worked fine. But all links (favorites) created by me in IE did not come > truly. I was using IE6, now i have shifted to Debian GNU/Linux and using > Galeon as my browser. > > Hope to here from u soon.. > > Thanks, > > Dharmesh > > > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig From martin@v.loewis.de Tue Jun 25 08:29:21 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 25 Jun 2002 09:29:21 +0200 Subject: [XML-SIG] Problem with msie_parse program In-Reply-To: References: Message-ID: Dharmesh Maniar writes: > Please guide me what should i do? what could have been wrong? There might be a bug in msie_parse, or in Internet Explorer (in the sense that it changed its bookmark format after msie_parse was written). So if you you could try to find Tom's patches, and/or you could debug the program yourself, and fix any remaining problems. Alternatively, you can make a bug report at sf.net/projects/pyxml; please include the bookmark file that you wanted to convert in this case. Regards, Martin From noreply@sourceforge.net Tue Jun 25 13:08:52 2002 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 25 Jun 2002 05:08:52 -0700 Subject: [XML-SIG] [ pyxml-Bugs-573610 ] Problem with msie_parse program Message-ID: Bugs item #573610, was opened at 2002-06-25 15:08 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=573610&group_id=6473 Category: XBEL Group: None Status: Open Resolution: None Priority: 5 Submitted By: Dharmesh Maniar (dharmesh_maniar) Assigned to: Nobody/Anonymous (nobody) Summary: Problem with msie_parse program Initial Comment: Hi Folks, I have some problem with msie_parse program. I was using Windows as my primary os few months ago, now i have transfered to Debian GNU/Linux and its realy fun to use such a powerful os. I use Galeon browser now, which keeps bookmarks in XBEL format. I want to convert my Favorites i created using IE6 to xbel format which Galeon can interprete. I tried using msie_parse program, but it is not generating xbel properly. It generates only folder entry like... . . . games chess cricket formula1 . . . I don't know python, other wise i would have tried to debug this. Is the problem because i used IE6 ?? I am attaching the favorite folder gipped with this mail. Please take it and test it. Thanks, Dharmesh ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=573610&group_id=6473 From tpassin@comcast.net Tue Jun 25 14:10:07 2002 From: tpassin@comcast.net (Thomas B. Passin) Date: Tue, 25 Jun 2002 09:10:07 -0400 Subject: [XML-SIG] Problem with msie_parse program References: Message-ID: <000601c21c49$a0c5c0a0$961b3044@reston01.va.comcast.net> [Martin v. Loewis] > > There might be a bug in msie_parse, or in Internet Explorer (in the > sense that it changed its bookmark format after msie_parse was > written). > It is both. IE changed (probably extended with new features) its bookmark format, and there is a bug that prevents directories from being correctly nested in the output xml. After I fixed the code, I was able to turn my collection of IE favorites into nearly 1000 bookmarks into XBEL format, and from there using a stylesheet I created an XTM topic map from them. Cheers, Tom P From martin@v.loewis.de Tue Jun 25 20:07:21 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 25 Jun 2002 21:07:21 +0200 Subject: [XML-SIG] Problem with msie_parse program In-Reply-To: <000601c21c49$a0c5c0a0$961b3044@reston01.va.comcast.net> References: <000601c21c49$a0c5c0a0$961b3044@reston01.va.comcast.net> Message-ID: "Thomas B. Passin" writes: > After I fixed the code, I was able to turn my collection of IE favorites > into nearly 1000 bookmarks into XBEL format, and from there using a > stylesheet I created an XTM topic map from them. In that case, I'd appreciate if you or somebody else digs up your patch and puts it into the SF patch tracker. Regards, Martin From juenglin@informatik.uni-freiburg.de Wed Jun 26 07:22:47 2002 From: juenglin@informatik.uni-freiburg.de (Ralf Juengling) Date: 26 Jun 2002 08:22:47 +0200 Subject: [XML-SIG] problem with pyxml 0.7.1 Message-ID: <1025072568.6035.27.camel@leto> Hi, I just installed PyXML v. 0.7.1 and found, that resetting the expat- parser doesn't work anymore (as it did with 0.7): The bottom-part of a stacktrace: _parser.reset() File "/usr/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py", line 236,=20 self._parser =3D expat.ParserCreate(intern =3D self._interning) TypeError: 'intern' is an invalid keyword argument for this function I guess this is a known problem. Is there a bugfix or workaround=20 already? (Please respond presonally, I'm not on this list). Regards, Ralf --=20 ------------------------------------------------------------------------- Ralf J=FCngling Institut f=FCr Informatik - Lehrstuhl f. Mustererkennung & Bildverarbeitung Georges-K=F6hler-Allee Geb=E4ude 52 Tel: +49-(0)761-203-8215 79110 Freiburg Fax: +49-(0)761-203-8262 ------------------------------------------------------------------------- From sam@webslingerZ.com Wed Jun 26 18:19:44 2002 From: sam@webslingerZ.com (Sam Brauer) Date: Wed, 26 Jun 2002 13:19:44 -0400 (EDT) Subject: [XML-SIG] [ANN] maki 20020625 In-Reply-To: <3D1969BE.2040901@yahoo.com> Message-ID: I just released a new version of maki. http://maki.sourceforge.net maki is a webserving framework built on Python and XML. It allows a web developer to send an XML input document through any number of steps, where each step is either a stylesheet transformation or a custom process. A processor that evaluates embedded Python code is included. The output of each step is passed as the input to the next step (similar to a Unix pipe). Additionally, the output of each processor step can be cached for a user-specified time period. All configuration is done in XML files that allow you to specify rules based on matching paths against Unix-style wildcard patterns or regular expressions. The biggest change from previous versions is that this version can work with mod_python, FastCGI or Webware. I've also improved support of libxslt, added support for Pyana, made sure it works with the latest version of 4xslt, and added some more examples. -- Sam Brauer From tpassin@comcast.net Fri Jun 28 04:06:15 2002 From: tpassin@comcast.net (Thomas B. Passin) Date: Thu, 27 Jun 2002 23:06:15 -0400 Subject: [XML-SIG] Problem with msie_parse program References: <000601c21c49$a0c5c0a0$961b3044@reston01.va.comcast.net> Message-ID: <000601c21e50$c4aec440$961b3044@reston01.va.comcast.net> [Martin v. Loewis] > "Thomas B. Passin" writes: > > > After I fixed the code, I was able to turn my collection of IE favorites > > into nearly 1000 bookmarks into XBEL format, and from there using a > > stylesheet I created an XTM topic map from them. > > In that case, I'd appreciate if you or somebody else digs up your > patch and puts it into the SF patch tracker. > I found a backup copy of my changes. Here is the fixed script - I will see about the SF tracker another time. Actually I would appreciate someone else doing that - I'm supposed to get my replacement computer tomorrow and will be very busy setting it up and catching up with my writing for quite a while. __walk() and __geturl() both had to change. __walk() did not close folders at the right time, so they did not nest correctly. __geturl() assumed a particular format for the bookmark file, but on more recent versions of IE, the format changed. Cheers, Tom P #!/usr/bin/env python """ Small utility to convert MSIE favourites to an object structure. Originally written by Fredrik Lundh. Modified by Lars Marius Garshol 2-17-2002 tbp Now closes folder when its traverse is done. Also works with current IE shortcut format, which can differ from the format that was assumed here. """ import bookmark,os,string DIR = "Favoritter" # Norwegian version #USRDIR = os.environ["USERPROFILE"] # NT version USRDIR = r"c:\windows" # 95 version class MSIE: # internet explorer def __init__(self,bookmarks, path): self.bms=bookmarks self.root = None self.path = path self.__walk() def __walk(self, subpath=[]): # traverse favourites folder path = os.path.join(self.path, string.join(subpath, os.sep)) for file in os.listdir(path): fullname = os.path.join(path, file) if os.path.isdir(fullname): self.bms.add_folder(file,None) self.__walk(subpath + [file]) self.bms.leave_folder() else: url = self.__geturl(fullname) if url: self.bms.add_bookmark(os.path.splitext(file)[0],None, None,None,url) def __geturl(self, file): try: fp = open(file) #if fp.readline() != "[InternetShortcut]\n": # return None while 1: line=fp.readline() if not line: return None if line=="[InternetShortcut]\n": s = fp.readline() if not s: break if s[:4] == "URL=": fp.close() return s[4:-1] elif line=="[DEFAULT]\n": s = fp.readline() if not s: break if s[:8] == "BASEURL=": fp.close() return s[8:-1] except IOError: return '' fp.close() return '' # --- Testprogram if __name__ == '__main__': import sys if len(sys.argv)>1: path = sys.argv[1] else: try: import win32api, win32con except ImportError: print "The win32api module is not available on this system" print "so we can't automatically find your favorites folder." print "Please re-run this program specifiying the location of your" print "favorites folder on the command line." sys.exit(1) keyname = r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" hkey = win32api.RegOpenKey(win32con.HKEY_CURRENT_USER, keyname) path, pathtype = win32api.RegQueryValueEx(hkey, "Favorites") assert pathtype == win32con.REG_SZ msie=MSIE(bookmark.Bookmarks(), path) msie.bms.dump_xbel() From uche.ogbuji@fourthought.com Fri Jun 28 21:29:01 2002 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Fri, 28 Jun 2002 14:29:01 -0600 Subject: [XML-SIG] Problem with msie_parse program In-Reply-To: Message from "Thomas B. Passin" of "Thu, 27 Jun 2002 23:06:15 EDT." <000601c21e50$c4aec440$961b3044@reston01.va.comcast.net> Message-ID: <200206282029.g5SKT1L18728@localhost.localdomain> > [Martin v. Loewis] > > > "Thomas B. Passin" writes: > > > > > After I fixed the code, I was able to turn my collection of IE favorites > > > into nearly 1000 bookmarks into XBEL format, and from there using a > > > stylesheet I created an XTM topic map from them. > > > > In that case, I'd appreciate if you or somebody else digs up your > > patch and puts it into the SF patch tracker. > > > > I found a backup copy of my changes. Here is the fixed script - I will see > about the SF tracker another time. Actually I would appreciate someone else > doing that - I'm supposed to get my replacement computer tomorrow and will > be very busy setting it up and catching up with my writing for quite a > while. Since Tom posted an entire file rather than a patch, shall I just check it in? -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/ DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s= 2453/new1020218556549/index.html XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel From Brian.Lamarche@pnl.gov Fri Jun 28 21:50:37 2002 From: Brian.Lamarche@pnl.gov (Lamarche, Brian L) Date: Fri, 28 Jun 2002 13:50:37 -0700 Subject: [XML-SIG] tkinter in Internet Explorer Netscape Message-ID: <1B1080D3ADDF8D4AB59832DE0A02C52AF03697@pnlmse06.pnl.gov> Does anyone know if you can use Tkinter windows and graphics in Python like you can with Java? From Matt Gushee Fri Jun 28 22:11:34 2002 From: Matt Gushee (Matt Gushee) Date: Fri, 28 Jun 2002 15:11:34 -0600 Subject: [XML-SIG] tkinter in Internet Explorer Netscape In-Reply-To: <1B1080D3ADDF8D4AB59832DE0A02C52AF03697@pnlmse06.pnl.gov> References: <1B1080D3ADDF8D4AB59832DE0A02C52AF03697@pnlmse06.pnl.gov> Message-ID: <20020628211133.GA3575@swordfish.havenrock.com> On Fri, Jun 28, 2002 at 01:50:37PM -0700, Lamarche, Brian L wrote: > Does anyone know if you can use Tkinter windows and graphics in Python like > you can with Java? You mean Tkinter applets? First of all, an XML-oriented list is really not the best place for a question like this. If there isn't a Tkinter or GUI SIG, then probably comp.lang.python would be most appropriate. But since I'm answering anyway ... I think the answer is no. The closest thing I have seen to it is the Tcl Plugin that somebody (Sun?) was distributing 3-4 years ago. If you could find that, and if it were Open Source (but it's not if I remember right), you could conceivably hack it to act as a Tkinter back end. But I don't imagine you want to do that. I'm not aware of any plugin that will, out of the box, let you deploy a Tkinter applet. -- Matt Gushee Englewood, Colorado, USA mgushee@havenrock.com http://www.havenrock.com/ From martin@v.loewis.de Sat Jun 29 19:04:53 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 29 Jun 2002 20:04:53 +0200 Subject: [XML-SIG] problem with pyxml 0.7.1 In-Reply-To: <1025072568.6035.27.camel@leto> References: <1025072568.6035.27.camel@leto> Message-ID: Ralf Juengling writes: > I guess this is a known problem. Is there a bugfix or workaround > already? (Please respond presonally, I'm not on this list). This is probably caused by not compiling the pyexpat that came with PyXML. Try reinstalling with --with-pyexpat. Regards, Martin From martin@v.loewis.de Sat Jun 29 20:32:20 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 29 Jun 2002 21:32:20 +0200 Subject: [XML-SIG] Problem with msie_parse program In-Reply-To: <200206282029.g5SKT1L18728@localhost.localdomain> References: <200206282029.g5SKT1L18728@localhost.localdomain> Message-ID: Uche Ogbuji writes: > Since Tom posted an entire file rather than a patch, shall I just > check it in? It would be good to double-check that you won't undo later changes that way, but otherwise - please do. Regards, Martin From Juergen Hermann" Hi! What do you people think of adding a module that can handle the "Python = DOM" that for example PyRXP produces. I think I have code that does the = conversion between that and a SAX stream (in both directions), which would the basis for such a module. Ciao, J=FCrgen From loewis@informatik.hu-berlin.de Sun Jun 30 16:07:44 2002 From: loewis@informatik.hu-berlin.de (Martin v. =?iso-8859-1?q?L=F6wis?=) Date: Sun, 30 Jun 2002 17:07:44 +0200 (CEST) Subject: [XML-SIG] Encoding argument for toxml and toprettyxml Message-ID: <200206301507.g5UF7isO003037@paros.informatik.hu-berlin.de> Folks, I've added an encoding argument for toxml and toprettyxml both in the PyXML and the Python CVSs. Making 'utf-8' the default is unfortunately not possible for backwards compatibility. Please let me know what you think about this change, in particular whether it should be made available in Python 2.2.2 as well. Regards, Martin