From tpassin at comcast.net Wed Sep 1 00:37:55 2004 From: tpassin at comcast.net (Thomas B. Passin) Date: Wed Sep 1 00:35:33 2004 Subject: [XML-SIG] Removing insignificant whitespace In-Reply-To: <200408311757.54733.fdrake@acm.org> References: <1093924611.4133f7037b4c9@www-mail.usyd.edu.au> <4134AC2E.2060404@sweetapp.com> <4134E0AF.5040209@comcast.net> <200408311757.54733.fdrake@acm.org> Message-ID: <4134FDC3.2000001@comcast.net> Fred L. Drake, Jr. wrote: > On Tuesday 31 August 2004 04:33 pm, Thomas B. Passin wrote: > > What's wrong with normalize()? > > What does normalize do about whitespace in content? If anything, that's a > bug. normalize() only deals with how adjacent nodes containing character > data are combined. True. I probably misunderstood the question. Once you run normalize(), you don't have whitespace-only nodes in content anymore (unless the content is only whitespace, that is) - those nodes have been absorbed into other content nodes. Cheers, Tom P -- Thomas B. Passin Explorer's Guide to the Semantic Web (Manning Books) http://www.manning.com/catalog/view.php?book=passin From abra9823 at mail.usyd.edu.au Wed Sep 1 09:30:39 2004 From: abra9823 at mail.usyd.edu.au (Ajay) Date: Wed Sep 1 09:30:50 2004 Subject: [XML-SIG] really weird pxdom error Message-ID: <1094023839.41357a9f462c0@www-mail.usyd.edu.au> hi! i have an xml file - basedataschema.xml when i call, p = pxdom.parse("proxy\basedataschema.xml") i get the error >>> p = pxdom.parse("proxy_pxdom_xpath\basedataschema.xml") Traceback (most recent call last): File "", line 1, in ? File "c:\Python23\lib\site-packages\pxdom.py", line 4385, in parse doc= parser.parse(src) File "c:\Python23\lib\site-packages\pxdom.py", line 3161, in parse self.pxdomParseBefore(input, document, None) File "c:\Python23\lib\site-packages\pxdom.py", line 3256, in pxdomParseBefore self._buffer= InputBuffer(input, (1, 1), self._domConfig, True) File "c:\Python23\lib\site-packages\pxdom.py", line 2993, in __init__ self.config._handleError(IOErrorErr(e)) File "c:\Python23\lib\site-packages\pxdom.py", line 722, in _handleError raise error pxdom.IOErrorErr: pxdom could not read resource: [Errno 2] No such file or direc tory: 'C:\\hons\\prototype\\proxy_pxdom_xpath\x08asedataschema.xml' first of all i cant understand where it gets the name x08asedataschema.xml secondly if i change into the directory where the schema is and then execute, p = pxdom.parse("basedataschema.xml") it works perfectly fine. why? what am i doing wrong? thanks cheers ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From malcolm at commsecure.com.au Wed Sep 1 10:11:56 2004 From: malcolm at commsecure.com.au (Malcolm Tredinnick) Date: Wed Sep 1 10:12:13 2004 Subject: [XML-SIG] really weird pxdom error In-Reply-To: <1094023839.41357a9f462c0@www-mail.usyd.edu.au> References: <1094023839.41357a9f462c0@www-mail.usyd.edu.au> Message-ID: <1094026316.16005.28.camel@ws14.commsecure.com.au> On Wed, 2004-09-01 at 17:30 +1000, Ajay wrote: > hi! > > i have an xml file - basedataschema.xml > > when i call, p = pxdom.parse("proxy\basedataschema.xml") > > i get the error > > >>> p = pxdom.parse("proxy_pxdom_xpath\basedataschema.xml") > Traceback (most recent call last): > File "", line 1, in ? > File "c:\Python23\lib\site-packages\pxdom.py", line 4385, in parse > doc= parser.parse(src) > File "c:\Python23\lib\site-packages\pxdom.py", line 3161, in parse > self.pxdomParseBefore(input, document, None) > File "c:\Python23\lib\site-packages\pxdom.py", line 3256, in > pxdomParseBefore > self._buffer= InputBuffer(input, (1, 1), self._domConfig, True) > File "c:\Python23\lib\site-packages\pxdom.py", line 2993, in __init__ > self.config._handleError(IOErrorErr(e)) > File "c:\Python23\lib\site-packages\pxdom.py", line 722, in _handleError > raise error > pxdom.IOErrorErr: pxdom could not read resource: [Errno 2] No such file or > direc > tory: 'C:\\hons\\prototype\\proxy_pxdom_xpath\x08asedataschema.xml' > > first of all i cant understand where it gets the name x08asedataschema.xml > secondly if i change into the directory where the schema is and then > execute, p = pxdom.parse("basedataschema.xml") it works perfectly fine. The Python interpreter is interpreting the backslashes before it gets passed to pxdom.parse(). In particular, '\b' is seen to be the backspace character (ASCII code 8) and treated as such. You need to pass in "proxy_pxdom_xpath\\basedataschema.xml" or use raw strings: r"proxy_pxdom_xpath\basedataschema.xml" Cheers, Malcolm From brian at sweetapp.com Wed Sep 1 11:30:28 2004 From: brian at sweetapp.com (Brian Quinlan) Date: Wed Sep 1 11:26:01 2004 Subject: [XML-SIG] Removing insignificant whitespace In-Reply-To: <4134FDC3.2000001@comcast.net> References: <1093924611.4133f7037b4c9@www-mail.usyd.edu.au> <4134AC2E.2060404@sweetapp.com> <4134E0AF.5040209@comcast.net> <200408311757.54733.fdrake@acm.org> <4134FDC3.2000001@comcast.net> Message-ID: <413596B4.9020408@sweetapp.com> Thomas B. Passin wrote: > True. I probably misunderstood the question. Once you run normalize(), > you don't have whitespace-only nodes in content anymore (unless the > content is only whitespace, that is) - those nodes have been absorbed > into other content nodes. Yes, but whitespace-only nodes are very common in XML formatted for human consumption e.g. Hello Hi I count 3 whitespace-only nodes (even after normalize). Those nodes are not useful to the application some I'm wondering about the canonical way of removing them (without writing the [admittedly simple] code myself). Cheers, Brian From veillard at redhat.com Wed Sep 1 11:26:05 2004 From: veillard at redhat.com (Daniel Veillard) Date: Wed Sep 1 11:26:28 2004 Subject: [XML-SIG] xml.dom.ext.reader.HtmlLib memory leak? In-Reply-To: <1093615524.3314.2942.camel@borgia> References: <1092984767.41259fbf40266@webmail.codeweld.com> <1093278671.3314.4.camel@borgia> <20040825205639.GA5274@hal-pc.org> <1093545489.3314.1676.camel@borgia> <20040826200030.GA6209@hal-pc.org> <412E4706.9010101@livinglogic.de> <20040826211900.GX16238@redhat.com> <1093563020.3314.2016.camel@borgia> <20040827070353.GZ16238@redhat.com> <1093615524.3314.2942.camel@borgia> Message-ID: <20040901092605.GP16238@redhat.com> On Fri, Aug 27, 2004 at 08:05:24AM -0600, Uche Ogbuji wrote: > It's very unPythonic binding to require manual ref counting and memory > management. That's why this need has surprised me and others. yes I understand that. > As to sending doc patches and joining more mailing lists, that's not > likely to happen. I have my own large Python/C/XML library to maintain, Consider that this was a reply to the mailing-list and not a private reply. You may not be interested, others might, that's all :-) > But I'm not interested right now in a debate on the merits and demerits > of libxml2's Python binding. I just wanted to be sure that people were > aware of the need for memory management in completion to the code you > posted here (since I've been bitten myself). I think you've covered the > subject adequately. okay, Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From veillard at redhat.com Wed Sep 1 11:32:17 2004 From: veillard at redhat.com (Daniel Veillard) Date: Wed Sep 1 11:32:34 2004 Subject: [XML-SIG] xml.dom.ext.reader.HtmlLib memory leak? In-Reply-To: <412F74D0.5010904@livinglogic.de> References: <1092743991.4121f33704f17@webmail.codeweld.com> <1092944720.810.1363.camel@borgia> <1092984767.41259fbf40266@webmail.codeweld.com> <1093278671.3314.4.camel@borgia> <20040825205639.GA5274@hal-pc.org> <1093545489.3314.1676.camel@borgia> <20040826200030.GA6209@hal-pc.org> <412E4706.9010101@livinglogic.de> <20040826211900.GX16238@redhat.com> <412F74D0.5010904@livinglogic.de> Message-ID: <20040901093217.GQ16238@redhat.com> On Fri, Aug 27, 2004 at 07:52:16PM +0200, Walter D?rwald wrote: > > This looks great. When I dump the DOM again, the resulting > files look much better then those generated by HTMLParser > from the standard library or my own HTML parser. Okay, don't forget to free the documents when you don't need them anymore. > BTW, I wonder why libxml2 complains about the following: > > >>> doc = libxml2.htmlParseFile("http://www.python.org", None) > http://www.python.org:3: HTML parser error : htmlParseStartTag: invalid > element name > Seems the HTML parser has no notion of Processing Instruction, apparently a bug, c.f.: http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.6 bug registered http://bugzilla.gnome.org/show_bug.cgi?id=151584 > I think the next version of XIST will use libxml2 instead > of uTidyLib for parsing HTML. Cool :-) Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From paul.boddie at ementor.no Wed Sep 1 11:32:48 2004 From: paul.boddie at ementor.no (Paul Boddie) Date: Wed Sep 1 11:32:51 2004 Subject: [XML-SIG] PyXML XPath limitation Message-ID: <89DE0F3E9781C048A14DC88C06D9F93D18C32A@100nooslmsg005.common.alpharoot.net> Brian Quinlan wrote: > > In the unlikely event that this isn't a known problem, or in the more > likely event that I am doing something wrong, the following code > generates an exception for me: > > nodes = xpath.Evaluate( > '//dict[key=%r]/key' % key, self.document) [...] > Exception: Expected node set from relative expression. Got () I remember submitting a patch for this some time ago. Whilst doing some XPath experimentation, it did occur to me that the xml.xpath package could do with some tidying up in certain respects, but I never got round to looking into this more thoroughly. As for the exception you see, I suspect that some refactoring process which changed the representation of certain things left some corner cases that didn't get tested. Paul From fredrik at pythonware.com Wed Sep 1 13:22:14 2004 From: fredrik at pythonware.com (Fredrik Lundh) Date: Wed Sep 1 13:22:20 2004 Subject: [XML-SIG] Re: really weird pxdom error References: <1094023839.41357a9f462c0@www-mail.usyd.edu.au> <1094026316.16005.28.camel@ws14.commsecure.com.au> Message-ID: Malcolm Tredinnick wrote: >> first of all i cant understand where it gets the name x08asedataschema.xml >> secondly if i change into the directory where the schema is and then >> execute, p = pxdom.parse("basedataschema.xml") it works perfectly fine. > > The Python interpreter is interpreting the backslashes before it gets > passed to pxdom.parse(). In particular, '\b' is seen to be the backspace > character (ASCII code 8) and treated as such. > > You need to pass in "proxy_pxdom_xpath\\basedataschema.xml" or use raw > strings: r"proxy_pxdom_xpath\basedataschema.xml" or use forward slashes. From psmits at globaltrack.com Wed Sep 1 14:51:26 2004 From: psmits at globaltrack.com (Pieter Smits) Date: Wed Sep 1 14:52:38 2004 Subject: [XML-SIG] XML Malform Message-ID: <200409011249.i81Cnloa021736@mail.connectingafrica.com> Hi there, We are running a program using Python 2.3, pulling XML data from a server. All goes well if the data does not have a lot of entries. If it does all of a sudden there is a number in data; almost like a line number. Below an example, I cutted some ReturnMessage tags because it takes a quite a few to get the line number but you get the idea... ----Example----- 2000 Other users using the same server as we pull the data off don't have the problem; but they are not using Python... Obviously Python can't use this mallformed data. I have an idea it has something to do with the http connector or so but are really in the dark what. Anybody any ideas what it can be and how to resolve it? Kind regards, Pieter Smits - This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager at support@globaltrack.com. The company accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. - From fdrake at acm.org Wed Sep 1 15:26:53 2004 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Wed Sep 1 15:27:01 2004 Subject: [XML-SIG] Removing insignificant whitespace In-Reply-To: <413596B4.9020408@sweetapp.com> References: <1093924611.4133f7037b4c9@www-mail.usyd.edu.au> <4134FDC3.2000001@comcast.net> <413596B4.9020408@sweetapp.com> Message-ID: <200409010926.53741.fdrake@acm.org> On Wednesday 01 September 2004 05:30 am, Brian Quinlan wrote: > Yes, but whitespace-only nodes are very common in XML formatted for > human consumption e.g. ... > I count 3 whitespace-only nodes (even after normalize). Those nodes are > not useful to the application some I'm wondering about the canonical > way of removing them (without writing the [admittedly simple] code Here are some approaches that can be applied generally; your application may be able to use something more specific. - Don't remove them, just ignore them. How easy this is depends on how you application processes the DOM. getElememtsByTagName() (and the namespace-aware varient) may help here. - Use a DTD so the parser can determine which whitespace exists in element content so it can avoid adding them to the tree, and your initial example shows you tried. This *requires* a DTD. - Use a node filter that discards Text nodes in element content. This requires that your filter knows enough about the document type you're expecting that it can identify whitespace in element content. There are probably other approaches as well. -Fred -- Fred L. Drake, Jr. From brian at sweetapp.com Wed Sep 1 18:10:11 2004 From: brian at sweetapp.com (Brian Quinlan) Date: Wed Sep 1 18:05:46 2004 Subject: [XML-SIG] Removing insignificant whitespace In-Reply-To: <200409010926.53741.fdrake@acm.org> References: <1093924611.4133f7037b4c9@www-mail.usyd.edu.au> <4134FDC3.2000001@comcast.net> <413596B4.9020408@sweetapp.com> <200409010926.53741.fdrake@acm.org> Message-ID: <4135F463.1040009@sweetapp.com> Fred L. Drake, Jr. wrote: > On Wednesday 01 September 2004 05:30 am, Brian Quinlan wrote: > > Yes, but whitespace-only nodes are very common in XML formatted for > > human consumption e.g. > ... > > I count 3 whitespace-only nodes (even after normalize). Those nodes are > > not useful to the application some I'm wondering about the canonical > > way of removing them (without writing the [admittedly simple] code > > Here are some approaches that can be applied generally; your application may > be able to use something more specific. > > - Don't remove them, just ignore them. How easy this is depends on how you > application processes the DOM. getElememtsByTagName() (and the > namespace-aware varient) may help here. I an doing this now but the DOM that I am working with makes this very annoying. There are a lot of nodes where the next sibling element is relevant. I have a lot of calls to _skip_ws_nodes(). > - Use a DTD so the parser can determine which whitespace exists in element > content so it can avoid adding them to the tree, and your initial example > shows you tried. This *requires* a DTD. It's not my XML and I don't have a DTD for it. > - Use a node filter that discards Text nodes in element content. This > requires that your filter knows enough about the document type you're > expecting that it can identify whitespace in element content. I'll look into that. > There are probably other approaches as well. So StripXml is not expected to work in this context? The problem seems to be that StripXml expects documents to have a createNodeIterator method and DOMBuilder is not creating a DOM that offers that method. Not sure why this is... Cheers, Brian From fredrik at pythonware.com Wed Sep 1 18:26:52 2004 From: fredrik at pythonware.com (Fredrik Lundh) Date: Wed Sep 1 18:25:06 2004 Subject: [XML-SIG] Re: XML Malform References: <200409011249.i81Cnloa021736@mail.connectingafrica.com> Message-ID: Pieter Smits wrote: > Other users using the same server as we pull the data off don't have the problem; but they > are not using Python... > > Obviously Python can't use this mallformed data. I have an idea it has something to do with > the http connector or so but are really in the dark what. > > Anybody any ideas what it can be and how to resolve it? are those numbers authentic, or did you just make some 4-digit numbers up? it could be HTTP chunking, in which case the server splits the response up in parts, each of which is preceeded by the part size in bytes, where the size is given as a hexadecimal number. for details, see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1 what library are you using to talk to the server? From fredrik at pythonware.com Wed Sep 1 18:31:48 2004 From: fredrik at pythonware.com (Fredrik Lundh) Date: Wed Sep 1 18:30:27 2004 Subject: [XML-SIG] Re: Removing insignificant whitespace References: <1093924611.4133f7037b4c9@www-mail.usyd.edu.au> <4134AC2E.2060404@sweetapp.com><4134E0AF.5040209@comcast.net> <200408311757.54733.fdrake@acm.org><4134FDC3.2000001@comcast.net> <413596B4.9020408@sweetapp.com> Message-ID: Brian Quinlan wrote: > Yes, but whitespace-only nodes are very common in XML formatted for human consumption e.g. > > > Hello > Hi > > > I count 3 whitespace-only nodes (even after normalize). Those nodes are not useful to the > application some I'm wondering about the canonical way of removing them (without writing the > [admittedly simple] code myself). Note that in the elementtree model, most of those disappear into the "tail" attribute. No need to write code to skip over whitespace nodes; just get the "bar" element's "text" attribute and you're done. From bkline at rksystems.com Wed Sep 1 18:47:01 2004 From: bkline at rksystems.com (Bob Kline) Date: Wed Sep 1 18:43:49 2004 Subject: [XML-SIG] Removing insignificant whitespace In-Reply-To: <4135F463.1040009@sweetapp.com> Message-ID: On Wed, 1 Sep 2004, Brian Quinlan wrote: > It's not my XML and I don't have a DTD for it. If you don't have a DTD (or the functional equivalent), then you're out of luck, because in that case the machine doesn't having any way of knowing what you mean by "insignificant whitespace." You don't want the software to assume that every text node which contains only whitespace is insignificant, even if you have "normalized" the document to collapse adjacent text nodes into one. Consider: ... the cancer patient requires ... Would you *really* want the presentation of this text to omit the space between 'cancer' and 'patient'? If you *know* that the documents will never contain such inline markup (because, for example, you've had a peek at the elusive DTD, and have been assured that it won't change), then you can write software to take advantage of this special knowledge. Probably the most straightforward approach would be an XSLT script with a template that strips whitespace text nodes and another template which passes everything else through unscathed. -- Bob Kline mailto:bkline@rksystems.com http://www.rksystems.com From cohen at slac.stanford.edu Wed Sep 1 20:41:33 2004 From: cohen at slac.stanford.edu (Johann Cohen-Tanugi) Date: Wed Sep 1 20:41:37 2004 Subject: [XML-SIG] how to embed a DTD which is external Message-ID: <1094064093.7809.6.camel@localhost.localdomain> Hi there, I am using DOM to read an external DTD and then create and fill a corresponding document. Then I save the result with PrettyPrint.My problem is that the resulting XML file has the name of the external DTD which is fine, but I would rather have the DTD copied in extenso, id est transforming the external DTD into an internal one. I did not find the way to do that easily. Can someone help me? Johann From abra9823 at mail.usyd.edu.au Thu Sep 2 07:39:33 2004 From: abra9823 at mail.usyd.edu.au (Ajay) Date: Thu Sep 2 07:39:38 2004 Subject: [XML-SIG] pyxml Message-ID: <1094103573.4136b2152b0b6@www-mail.usyd.edu.au> hi! i am running a PDa port of PyXML doing- from xml.dom.ext.reader import Sax2 gives an error - module object has no attribute 'O-RDWR' any ideas what might raise such an error? thanks cheers ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From abra9823 at mail.usyd.edu.au Thu Sep 2 12:54:07 2004 From: abra9823 at mail.usyd.edu.au (Ajay) Date: Thu Sep 2 12:54:11 2004 Subject: [XML-SIG] cDomlette Message-ID: <1094122447.4136fbcf301ee@www-mail.usyd.edu.au> hi! Is it possible for me to compile and use cDomlette for a different platform. can i compile using embedded visual c++. Or does it rely on some native system calls which wont work on a PDA? thanks ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From brian at sweetapp.com Thu Sep 2 13:33:02 2004 From: brian at sweetapp.com (Brian Quinlan) Date: Thu Sep 2 13:28:38 2004 Subject: [XML-SIG] Removing insignificant whitespace In-Reply-To: References: Message-ID: <413704EE.6060709@sweetapp.com> Bob Kline wrote: > If you don't have a DTD (or the functional equivalent), then you're out > of luck, because in that case the machine doesn't having any way of > knowing what you mean by "insignificant whitespace." You don't want the > software to assume that every text node which contains only whitespace > is insignificant, even if you have "normalized" the document to collapse > adjacent text nodes into one. If you reread my original post, you'll see that I am not arguing for different default behavior. I was asking if there was some way of removing all whitespace-only text nodes. StripXml() claims to do what I want but it doesn't work with the DOM created by DOMBuilder (this seems like a bug or misdesign). > If you *know* that the documents will never contain such inline markup > (because, for example, you've had a peek at the elusive DTD, and have > been assured that it won't change), then you can write software to take > advantage of this special knowledge. How could I correctly manipulate the DOM without making assumptions about it's semantics i.e. if whitespace-only nodes were to suddenly become significant, how could I correctly process them without some knowledge of their meaning? > Probably the most straightforward > approach would be an XSLT script with a template that strips whitespace > text nodes and another template which passes everything else through > unscathed. I just wrote a trivial little function to do this. The cookbook recipe is here: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303061 Cheers, Brian From lsloan-000002 at umich.edu Thu Sep 2 16:33:33 2004 From: lsloan-000002 at umich.edu (Lance E Sloan) Date: Thu Sep 2 16:33:49 2004 Subject: [XML-SIG] several XML newbie questions Message-ID: <11C0F3AA5F32EB3D52557F71@[192.168.2.201]> I've been programming with Python for a few years now. I've written a lot of CGIs for customers in which I've used either the DocumentTemplate or TAL modules from Zope to produce output from templates. I've decided it's probably time for me to move on to using XSL for templates instead. One of my first questions is, which modules should I be using for this? The information page about this mailing list suggested PyXML, but that module doesn't do XSLT, does it? (At least, XSLT isn't mentioned on the project's SourceForge page.) If PyXML does do XSLT, is that module recommended over the libxml2/libxslt combination? How about 4Suite? I don't necessarily need to use whatever the "best" module is right now. I'd be happy to use a more "standard" module that may be imperfect. As long as it does what I need, I don't mind waiting for more features in the future. I've been reading "Python & XML" by Jones and Drake. It's a pretty good book, but it needs to be updated. For example, I've found that the examples that use 4Suite don't work as written. I understand that change will happen, but I hope that O'Reilly will publish a new edition of the book. What other books would you folks recommend? As I said, I'm mostly interested in XSLT and a Python slant on the subject would be nice. Thanks in advance! -- Lance E Sloan, Systems Research Programmer III U-M WATS: Web Applications, Technologies, and Solutions Full-service web and database design, development, and hosting. http://www.itcs.umich.edu/wats/ - "Putting U on the Web" From christian at pulsardata.no Thu Sep 2 14:34:24 2004 From: christian at pulsardata.no (Christian Johansson) Date: Fri Sep 3 08:17:53 2004 Subject: [XML-SIG] Parsing help. Message-ID: <20040902130109.714391E4002@bag.python.org> Hello. This might be an trivial question, bet feel free to help a newbee :-) XML: - < TODO xxx My stupid code: doc = xml.dom.minidom.parse(inXML) tagSubject = doc.getElementsByTagName('subject') for subject in tagSubject: content = subject.nodeValue print content Ok so why can I not see the the text "TODO"?? I have tried many similar approaches, but it just want work. If someone can help me, I would become a happy man! Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20040902/0e2c521a/attachment.html From knowak at mail.desy.de Fri Sep 3 08:48:46 2004 From: knowak at mail.desy.de (Krzysztof Nowak) Date: Fri Sep 3 08:48:51 2004 Subject: [XML-SIG] Are question marks allowed in href? Message-ID: I'm developing simple xml code. I know that my question is not really releted to python (at least I'm using pythons twisted.web to write it), but please, give me simple answer. I have noticed that xml parser is angry when he is founds this kind of line: SomeLink I'm think its becouse of question marks. I have menaged to escape the ampersand but found not answer how to smuggle question mark. Could anybody help me? I'm shure there's a way to make something like this... Cheers, Krzysztof Nowak From malcolm at commsecure.com.au Fri Sep 3 09:28:36 2004 From: malcolm at commsecure.com.au (Malcolm Tredinnick) Date: Fri Sep 3 09:28:55 2004 Subject: [XML-SIG] Parsing help. In-Reply-To: <20040902130109.714391E4002@bag.python.org> References: <20040902130109.714391E4002@bag.python.org> Message-ID: <1094196516.24013.42.camel@ws14.commsecure.com.au> On Thu, 2004-09-02 at 14:34 +0200, Christian Johansson wrote: > Hello. > > > > This might be an trivial question, bet feel free to help a newbee J > > > > XML: > > > > - < end="28.08.2004 10:00:00"> > > TODO > > xxx > > > > > > My stupid code: > > > > doc = xml.dom.minidom.parse(inXML) > > tagSubject = doc.getElementsByTagName('subject') > > for subject in tagSubject: > > content = subject.nodeValue > > print content > > > > Ok so why can I not see the the text ?TODO??? > > I have tried many similar approaches, but it just want work? > > If someone can help me, I would become a happy man! A common mistake when just starting out: the "TODO" string is the content of a child of the subject node -- the child is a text node. In this case, it is the first and only child, so you really want to be looking at subject.firstChild.nodeValue, instead of subject.nodeValue. Cheers, Malcolm From veillard at redhat.com Fri Sep 3 09:29:07 2004 From: veillard at redhat.com (Daniel Veillard) Date: Fri Sep 3 09:29:20 2004 Subject: [XML-SIG] Are question marks allowed in href? In-Reply-To: References: Message-ID: <20040903072907.GB16238@redhat.com> On Fri, Sep 03, 2004 at 08:48:46AM +0200, Krzysztof Nowak wrote: > I'm developing simple xml code. I know that my question is not really > releted to python (at least I'm using pythons twisted.web to write it), > but please, give me simple answer. I have noticed that xml parser is angry > when he is founds this kind of line: > > href="http://lipka.desy.de/S1.xhtml?format=png&resolution=320&56=18670&56=18651&56=18652"> > SomeLink > > I'm think its becouse of question marks. I have menaged to escape the Question mark are fine in attribute value. but you still have an unescaped ampersand. Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From knowak at mail.desy.de Fri Sep 3 09:36:17 2004 From: knowak at mail.desy.de (Krzysztof Nowak) Date: Fri Sep 3 09:36:25 2004 Subject: [XML-SIG] Are question marks allowed in href? In-Reply-To: References: Message-ID: Sorry for disturbing. This link really is generated dynamically by python and is a bit more complicated than this posted below. I haven't notice that one of ampersats was not changen into & (In my example link there was the same problem, one & remained). I was trying to find solution for few hours (please, do not laugh :)) but just posting on your mailing list enlightened me. Thank you. Cheers Krzys On Fri, 3 Sep 2004, Krzysztof Nowak wrote: > I'm developing simple xml code. I know that my question is not really > releted to python (at least I'm using pythons twisted.web to write it), > but please, give me simple answer. I have noticed that xml parser is angry > when he is founds this kind of line: > > href="http://lipka.desy.de/S1.xhtml?format=png&resolution=320&56=18670&56=18651&56=18652"> > SomeLink > > I'm think its becouse of question marks. I have menaged to escape the > ampersand but found not answer how to smuggle question mark. Could anybody > help me? I'm shure there's a way to make something like this... > > Cheers, > Krzysztof Nowak > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig > From uche.ogbuji at fourthought.com Fri Sep 3 18:22:19 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Fri Sep 3 18:22:23 2004 Subject: [4suite] [XML-SIG] cDomlette In-Reply-To: <1094122447.4136fbcf301ee@www-mail.usyd.edu.au> References: <1094122447.4136fbcf301ee@www-mail.usyd.edu.au> Message-ID: <1094228539.3314.14255.camel@borgia> On Thu, 2004-09-02 at 04:54, Ajay wrote: > hi! > > Is it possible for me to compile and use cDomlette for a different > platform. can i compile using embedded visual c++. Or does it rely on some > native system calls which wont work on a PDA? As far as I know, it's pretty standard C lib (plus Python extension lib). Of course Expat is the big unknown for me. I'd suggest trying it and reporting any errors. We'll fix what we can as portability issues. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Practical (Python) SAX Notes - http://www.xml.com/pub/a/2004/08/11/py-xml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Element structures for names and addresses - http://www.ibm.com/developerworks/xml/library/x-elemdes.html Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090 Harold's Effective XML - http://www.ibm.com/developerworks/xml/library/x-think25.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From ledermann at futuresign.de Sat Sep 4 11:39:46 2004 From: ledermann at futuresign.de (Christian Ledermann) Date: Mon Sep 6 00:21:03 2004 Subject: [XML-SIG] ANN: XBEL supporting software: ATBookmark folder Message-ID: <1094290786.1206.7.camel@web.futuresign.de> AT Bookmark Folder is a Plone (plone.org) Product wich allows you to manage your Bookmarks online. currently its only available in cvs cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/collective co ATBookmarks cheers christian From uche.ogbuji at fourthought.com Tue Sep 7 05:31:18 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Tue Sep 7 05:31:22 2004 Subject: [XML-SIG] pulldom with XML 1.1 problem In-Reply-To: <41307E25.2000009@xrce.xerox.com> References: <41307E25.2000009@xrce.xerox.com> Message-ID: <1094527878.3314.19251.camel@borgia> On Sat, 2004-08-28 at 06:44, Ken Beesley wrote: > Newbie problem: pulldom with XML 1.1 > > The Question: > How can I make pulldom parse according to XML 1.1 conventions? > Or: Is there an upgrade of pulldom that handles XML 1.1? > Or: Is there some other XML 1.1 parsing solution in Python? XML 1.1 is fairly new and i know of no Python tools that support it yet. Personally I recommend that people wait a good while before making the move to XML 1.1. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Practical (Python) SAX Notes - http://www.xml.com/pub/a/2004/08/11/py-xml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Element structures for names and addresses - http://www.ibm.com/developerworks/xml/library/x-elemdes.html Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090 Harold's Effective XML - http://www.ibm.com/developerworks/xml/library/x-think25.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From uche.ogbuji at fourthought.com Tue Sep 7 05:33:04 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Tue Sep 7 05:33:07 2004 Subject: [XML-SIG] xpath error In-Reply-To: <1093915154.4133d21263cc6@www-mail.usyd.edu.au> References: <1093915154.4133d21263cc6@www-mail.usyd.edu.au> Message-ID: <1094527984.3314.19256.camel@borgia> On Mon, 2004-08-30 at 19:19, Ajay wrote: > hi! > > i parsed an XML document using minidom and then executed the following > statement: > dataNodes = xpath.Evaluate(".//*[local-name()='DATA']", > document.documentElement) > > this gives an error > > Traceback (most recent call last): > File "", line 1, in ? > File "C:\PYTHON23\Lib\site-packages\_xmlplus\xpath\__init__.py", line 70, > in E > valuate > retval = parser.new().parse(expr).evaluate(con) > File > "C:\PYTHON23\Lib\site-packages\_xmlplus\xpath\ParsedAbbreviatedRelativeLo > cationPath.py", line 52, in evaluate > res = Set.Union(res,subRt) > File "C:\PYTHON23\Lib\site-packages\_xmlplus\xpath\Set.py", line 25, in > Union > return compare + filter(lambda x,compare = compare:x not in > compare,loop) > TypeError: can only concatenate list (not "tuple") to list This is a bug that was reported a month ago or so. The main problem is that the XPath implementation in PyXML has fallen a long ways behind the code in 4Suite, and no one has the spare cycles for a re-merge. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Practical (Python) SAX Notes - http://www.xml.com/pub/a/2004/08/11/py-xml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Element structures for names and addresses - http://www.ibm.com/developerworks/xml/library/x-elemdes.html Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090 Harold's Effective XML - http://www.ibm.com/developerworks/xml/library/x-think25.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From uche.ogbuji at fourthought.com Tue Sep 7 05:42:24 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Tue Sep 7 05:42:28 2004 Subject: [XML-SIG] Removing insignificant whitespace In-Reply-To: <4134AC2E.2060404@sweetapp.com> References: <1093924611.4133f7037b4c9@www-mail.usyd.edu.au> <4134AC2E.2060404@sweetapp.com> Message-ID: <1094528544.3314.19275.camel@borgia> On Tue, 2004-08-31 at 10:49, Brian Quinlan wrote: > I'm trying to remove the whitespace-only text nodes in my XML DOM. I've > tried two approaches: > > 1. StripXml - generates a an exception: > > File "mac.py", line 25, in __init__ > StripXml(self.document) > File > "/usr/lib/python2.3/site-packages/_xmlplus/dom/ext/__init__.py", line > 153, in StripXml > snit = owner_doc.createNodeIterator(startNode, NodeFilter.SHOW_TEXT, > AttributeError: Document instance has no attribute 'createNodeIterator' StripXml only works on 4DOM nodes :-( > 2. setFeature('whitespace_in_element_content', False) seems to do > nothing What SAX parser? > My code is here: > > from xml import xpath, dom > from xml.dom.ext import StripXml > from xml.dom.xmlbuilder import DOMInputSource, DOMBuilder > from optparse import OptionParser > from pprint import pprint > import os > > b = DOMBuilder() > b.setFeature('whitespace_in_element_content', False) > self.document = b.parse(...) > StripXml(self.document) > > My XML does not include a DTD or any declarations regarding whitespace. > Can anyone offer any advice? I usually use simple generator code for this sort of thing. See http://www.xml.com/pub/a/2003/01/08/py-xml.html Using domtools from that article, or a more recent version of the module: http://cvs.4suite.org/cgi-bin/viewcvs.cgi/Scimitar/domtools.py You could do something like (untested): doc.normalize() ws_only_nodes = domtools.doc_order_iter_filter( node, lambda n: n.nodeType == Node.TEXT_NODE and not n.strip() ) for node in ws_only_nodes: node.parentNode.removeChild(node) -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Practical (Python) SAX Notes - http://www.xml.com/pub/a/2004/08/11/py-xml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Element structures for names and addresses - http://www.ibm.com/developerworks/xml/library/x-elemdes.html Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090 Harold's Effective XML - http://www.ibm.com/developerworks/xml/library/x-think25.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From uche.ogbuji at fourthought.com Tue Sep 7 05:45:39 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Tue Sep 7 05:45:42 2004 Subject: [XML-SIG] xpath In-Reply-To: <1093962670.41348baedc0e7@www-mail.usyd.edu.au> References: <1093962670.41348baedc0e7@www-mail.usyd.edu.au> Message-ID: <1094528739.3314.19281.camel@borgia> On Tue, 2004-08-31 at 08:31, Ajay wrote: > hi! > > is there a Python implementation of xpath that doesn't use any C code and > is purely in Python? Is there one as a standalone package. I think the XPath impl in PyXML only uses C for the boolean type. If you're on Python 2.3+, you could easily tweak it to use the built-in bool instead. Also, ElementTree is pure Python and offers partial XPath support. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Practical (Python) SAX Notes - http://www.xml.com/pub/a/2004/08/11/py-xml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Element structures for names and addresses - http://www.ibm.com/developerworks/xml/library/x-elemdes.html Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090 Harold's Effective XML - http://www.ibm.com/developerworks/xml/library/x-think25.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From uche.ogbuji at fourthought.com Tue Sep 7 05:49:43 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Tue Sep 7 05:49:48 2004 Subject: [XML-SIG] several XML newbie questions In-Reply-To: <11C0F3AA5F32EB3D52557F71@[192.168.2.201]> References: <11C0F3AA5F32EB3D52557F71@[192.168.2.201]> Message-ID: <1094528983.3314.19288.camel@borgia> On Thu, 2004-09-02 at 08:33, Lance E Sloan wrote: > I've been programming with Python for a few years now. I've written a lot > of CGIs for customers in which I've used either the DocumentTemplate or TAL > modules from Zope to produce output from templates. I've decided it's > probably time for me to move on to using XSL for templates instead. > > One of my first questions is, which modules should I be using for this? > The information page about this mailing list suggested PyXML, but that > module doesn't do XSLT, does it? (At least, XSLT isn't mentioned on the > project's SourceForge page.) If PyXML does do XSLT, is that module > recommended over the libxml2/libxslt combination? How about 4Suite? > > I don't necessarily need to use whatever the "best" module is right now. > I'd be happy to use a more "standard" module that may be imperfect. As > long as it does what I need, I don't mind waiting for more features in the > future. > > I've been reading "Python & XML" by Jones and Drake. It's a pretty good > book, but it needs to be updated. For example, I've found that the > examples that use 4Suite don't work as written. I understand that change > will happen, but I hope that O'Reilly will publish a new edition of the > book. What other books would you folks recommend? As I said, I'm mostly > interested in XSLT and a Python slant on the subject would be nice. To the rescue: http://www.xml.com/pub/a/2002/12/11/py-xml.html In general, you might be interested in: http://www.xml.com/pub/at/24 http://uche.ogbuji.net/tech/akara/nodes/2003-01-01/pyxml-akara -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Practical (Python) SAX Notes - http://www.xml.com/pub/a/2004/08/11/py-xml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Element structures for names and addresses - http://www.ibm.com/developerworks/xml/library/x-elemdes.html Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090 Harold's Effective XML - http://www.ibm.com/developerworks/xml/library/x-think25.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From me.simon at t-online.de Tue Sep 7 08:46:26 2004 From: me.simon at t-online.de (Simon) Date: Tue Sep 7 08:39:34 2004 Subject: [XML-SIG] PyOOTools - Request for Announcement, Testing and Bug Reports Message-ID: <413D5942.4020008@t-online.de> I just released an alpha version of a python class library: PyOOTools - Process OpenOffice.org Writer Files and transform them to PDF without installing OpenOffice.org => * Make serial letters and reports from templates in the SXW-Format and store them anew as SXW-Files * Extract the pure text information from the SXW-Document and store it in a plain text file or a PDF-File * Perform simple transformations from SXW-Files to PDF-Files without installing OO - for example on a webserver It contains about 1300 lines of python code and uses the ReportlabToolkit, the Python Imaging Library and the XML-Sax-Parser from the Standard Library. As far as I know there is nothing comparable in Python yet. Could you list it in your SIG list of Python XML Tools? The library is found here: http://www.bezirksreiter.de/PyOOTools.htm Thanks and greetings, Martin Simon From abra9823 at mail.usyd.edu.au Tue Sep 7 12:59:17 2004 From: abra9823 at mail.usyd.edu.au (Ajay) Date: Tue Sep 7 12:59:22 2004 Subject: [XML-SIG] make_parser Message-ID: <1094554757.413d948580220@www-mail.usyd.edu.au> hi! in my code, i am giving make_parser the name of the parser i'd like to use the code is below parser = make_parser(['xmlproc']) parser.setFeature(feature_namespaces, 0) dh = FindIssue() # Tell the parser to use our handler parser.setContentHandler(dh) # Parse the input f = open('\um\proxy\policy-eg1.xml') str = f.read() f.close() print "file read" parser.parseString(str) this throws an error saying ExpatParser instance has no attribute 'parseString' what am i doing wrong? i thought i was using xmlproc thanks cheers ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From abra9823 at mail.usyd.edu.au Tue Sep 7 15:54:56 2004 From: abra9823 at mail.usyd.edu.au (Ajay) Date: Tue Sep 7 15:55:10 2004 Subject: [XML-SIG] minidom parse error - keyerror Message-ID: <1094565296.413dbdb0c8c18@www-mail.usyd.edu.au> hi! i am parsing the attached document. the code is parser = make_parser('xml.sax.drivers2.drv_xmlproc') ruleSet = parse(ruleSetFile, parser=parser) i am using python2.3.4 with PyXML version 0.8.1 i get the following error Traceback (most recent call last): File "evaluator.py", line 59, in ? ea = ae.evaluate("complywitheudirective.xml", "policy-eg1.xml", 0) File "evaluator.py", line 22, in evaluate ruleSet = parse(ruleSetFile, parser=parser) File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\minidom.py", line 1912, in pa rse {'parser': parser, 'bufsize': bufsize}) File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\minidom.py", line 1899, in _d o_pulldom_parse toktype, rootNode = events.getEvent() File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\pulldom.py", line 265, in get Event self.parser.feed(buf) File "C:\PYTHON23\Lib\site-packages\_xmlplus\sax\drivers2\drv_xmlproc.py", lin e 96, in feed self._parser.feed(data) File "C:\PYTHON23\Lib\site-packages\_xmlplus\parsers\xmlproc\xmlutils.py", lin e 332, in feed self.do_parse() File "C:\PYTHON23\Lib\site-packages\_xmlplus\parsers\xmlproc\xmlproc.py", line 93, in do_parse self.parse_start_tag() File "C:\PYTHON23\Lib\site-packages\_xmlplus\parsers\xmlproc\xmlproc.py", line 197, in parse_start_tag self.app.handle_start_tag(name,attrs) File "C:\PYTHON23\Lib\site-packages\_xmlplus\sax\drivers2\drv_xmlproc.py", lin e 368, in handle_start_tag AttributesNSImpl(attrs, rawnames)) File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\pulldom.py", line 98, in star tElementNS prefix = self._current_context[a_uri] KeyError: u'http://www.w3.org/2001/02/appelv1' any ideas why? thanks cheers ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. -------------- next part -------------- A non-text attachment was scrubbed... Name: complywitheudirective.xml Type: text/xml Size: 2969 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20040907/1f0ce9a1/complywitheudirective.xml From abra9823 at mail.usyd.edu.au Wed Sep 8 03:11:09 2004 From: abra9823 at mail.usyd.edu.au (Ajay) Date: Wed Sep 8 03:11:19 2004 Subject: [XML-SIG] xpath error In-Reply-To: <1094527984.3314.19256.camel@borgia> References: <1093915154.4133d21263cc6@www-mail.usyd.edu.au> <1094527984.3314.19256.camel@borgia> Message-ID: <1094605869.413e5c2d9f7b5@www-mail.usyd.edu.au> Quoting Uche Ogbuji : > On Mon, 2004-08-30 at 19:19, Ajay wrote: > > hi! > > > > i parsed an XML document using minidom and then executed the following > > statement: > > dataNodes = xpath.Evaluate(".//*[local-name()='DATA']", > > document.documentElement) > > > > this gives an error > > > > Traceback (most recent call last): > > File "", line 1, in ? > > File "C:\PYTHON23\Lib\site-packages\_xmlplus\xpath\__init__.py", > line 70, > > in E > > valuate > > retval = parser.new().parse(expr).evaluate(con) > > File > > > "C:\PYTHON23\Lib\site-packages\_xmlplus\xpath\ParsedAbbreviatedRelativeLo > > cationPath.py", line 52, in evaluate > > res = Set.Union(res,subRt) > > File "C:\PYTHON23\Lib\site-packages\_xmlplus\xpath\Set.py", line 25, > in > > Union > > return compare + filter(lambda x,compare = compare:x not in > > compare,loop) > > TypeError: can only concatenate list (not "tuple") to list > > This is a bug that was reported a month ago or so. The main problem is > that the XPath implementation in PyXML has fallen a long ways behind the > code in 4Suite, and no one has the spare cycles for a re-merge. > but i am using _xmlplus.dom.minidom and xpath from the same package. surely they should work? apart from doing a traversal myself, is there a way around it? thanks cheers > > -- > Uche Ogbuji Fourthought, Inc. > http://uche.ogbuji.net http://4Suite.org http://fourthought.com > Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org > > A hands-on introduction to ISO Schematron - > http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html > Practical (Python) SAX Notes - > http://www.xml.com/pub/a/2004/08/11/py-xml.html > XML circles the globe - http://www.javareport.com/article.asp?id=9797 > Element structures for names and addresses - > http://www.ibm.com/developerworks/xml/library/x-elemdes.html > Commentary on "Objects. Encapsulation. XML?" - > http://www.adtmag.com/article.asp?id=9090 > Harold's Effective XML - > http://www.ibm.com/developerworks/xml/library/x-think25.html > A survey of XML standards - > http://www-106.ibm.com/developerworks/xml/library/x-stand4/ > > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From mike at skew.org Wed Sep 8 05:42:32 2004 From: mike at skew.org (Mike Brown) Date: Wed Sep 8 05:42:35 2004 Subject: [XML-SIG] xpath error In-Reply-To: <1094605869.413e5c2d9f7b5@www-mail.usyd.edu.au> "from Ajay at Sep 8, 2004 11:11:09 am" Message-ID: <200409080342.i883gWAE044691@chilled.skew.org> Ajay wrote: > > This is a bug that was reported a month ago or so. The main problem is > > that the XPath implementation in PyXML has fallen a long ways behind the > > code in 4Suite, and no one has the spare cycles for a re-merge. > > > > but i am using _xmlplus.dom.minidom and xpath from the same package. > surely they should work? No, Uche is saying that a bug that was reported last month might be fixed in 4Suite (Ft.Xml.XPath), but probably not in PyXML (xml.xpath). Nowadays, _xmlplus (xml.* replacements & extensions) are only installed by PyXML. When PyXML installs XPath support in xml.xpath, it is installing the 4Suite 0.11.1 XPath implementation, which is 3 years old this month. 4Suite 0.11.1, if you installed it separately, also installed its XPath implementation in xml.xpath, so for a time there was no difference between installing PyXML --with-xpath, and installing PyXML --without-xpath and then adding 4Suite later. After 0.11.1, 4Suite's implementation moved to Ft.Xml.XPath and kept on improving (and kept on becoming increasingly incompatible with minidom). But PyXML's xml.xpath is still pretty much unchanged from 3 years ago. Well, there may be a few patches here & there, but it definitely has not kept up with 4Suite. The hope is (or was) to re-merge 4Suite's implementation into PyXML as an updated xml.xpath. This may have become a much more daunting task now that minidom and Domlette have diverged so much. > apart from doing a traversal myself, is there a way around it? Probably not, if you have to use PyXML's implementation. From abra9823 at mail.usyd.edu.au Wed Sep 8 07:03:04 2004 From: abra9823 at mail.usyd.edu.au (Ajay) Date: Wed Sep 8 07:03:18 2004 Subject: [XML-SIG] minidom parse error - keyerror In-Reply-To: <1094565296.413dbdb0c8c18@www-mail.usyd.edu.au> References: <1094565296.413dbdb0c8c18@www-mail.usyd.edu.au> Message-ID: <1094619784.413e9288a0f13@www-mail.usyd.edu.au> hi! i have tried the archives now and heaps of Google searches but am no closer to finding out what the error is. the error does not appear if i use expat. cheers Quoting Ajay : > hi! > > i am parsing the attached document. > the code is > parser = make_parser('xml.sax.drivers2.drv_xmlproc') > ruleSet = parse(ruleSetFile, parser=parser) > > i am using python2.3.4 with PyXML version 0.8.1 > > i get the following error > > Traceback (most recent call last): > File "evaluator.py", line 59, in ? > ea = ae.evaluate("complywitheudirective.xml", "policy-eg1.xml", 0) > File "evaluator.py", line 22, in evaluate > ruleSet = parse(ruleSetFile, parser=parser) > File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\minidom.py", line > 1912, > in pa > rse > {'parser': parser, 'bufsize': bufsize}) > File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\minidom.py", line > 1899, > in _d > o_pulldom_parse > toktype, rootNode = events.getEvent() > File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\pulldom.py", line > 265, > in get > Event > self.parser.feed(buf) > File > "C:\PYTHON23\Lib\site-packages\_xmlplus\sax\drivers2\drv_xmlproc.py", > lin > e 96, in feed > self._parser.feed(data) > File > "C:\PYTHON23\Lib\site-packages\_xmlplus\parsers\xmlproc\xmlutils.py", > lin > e 332, in feed > self.do_parse() > File > "C:\PYTHON23\Lib\site-packages\_xmlplus\parsers\xmlproc\xmlproc.py", > line > 93, in do_parse > self.parse_start_tag() > File > "C:\PYTHON23\Lib\site-packages\_xmlplus\parsers\xmlproc\xmlproc.py", > line > 197, in parse_start_tag > self.app.handle_start_tag(name,attrs) > File > "C:\PYTHON23\Lib\site-packages\_xmlplus\sax\drivers2\drv_xmlproc.py", > lin > e 368, in handle_start_tag > AttributesNSImpl(attrs, rawnames)) > File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\pulldom.py", line 98, > in > star > tElementNS > prefix = self._current_context[a_uri] > KeyError: u'http://www.w3.org/2001/02/appelv1' > > > any ideas why? > > thanks > cheers > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From 3djaume at vidalgoma.com Wed Sep 8 12:47:59 2004 From: 3djaume at vidalgoma.com (3djaume@vidalgoma.com) Date: Wed Sep 8 12:49:28 2004 Subject: [XML-SIG] Delivery reports about your e-mail Message-ID: <20040908104927.D865E1E4005@bag.python.org> Your message was undeliverable due to the following reason: Your message could not be delivered because the destination server was not reachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely there is a network problem that prevented delivery, but it is also possible that the computer is turned off, or does not have a mail system running right now. Your message could not be delivered within 1 days: Mail server 63.213.62.42 is not responding. The following recipients did not receive this message: Please reply to postmaster@vidalgoma.com if you feel this message to be in error. From postmaster at python.org Wed Sep 8 13:32:11 2004 From: postmaster at python.org (Automatic Email Delivery Software) Date: Wed Sep 8 13:32:44 2004 Subject: [XML-SIG] Returned mail: Data format error Message-ID: <20040908113230.B326340081F@mwinf0301.wanadoo.fr> Your message was undeliverable due to the following reason(s): Your message could not be delivered because the destination server was not reachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely there is a network problem that prevented delivery, but it is also possible that the computer is turned off, or does not have a mail system running right now. Your message was not delivered within 7 days: Server 206.36.179.47 is not responding. The following recipients could not receive this message: Please reply to postmaster@python.org if you feel this message to be in error. -------------- next part -------------- A non-text attachment was scrubbed... Name: attachment.zip Type: application/octet-stream Size: 29376 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20040908/1400a7ad/attachment-0001.obj From uche.ogbuji at fourthought.com Wed Sep 8 15:33:50 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Wed Sep 8 15:33:53 2004 Subject: [XML-SIG] xpath error In-Reply-To: <200409080342.i883gWAE044691@chilled.skew.org> References: <200409080342.i883gWAE044691@chilled.skew.org> Message-ID: <1094650430.3314.21371.camel@borgia> On Tue, 2004-09-07 at 21:42, Mike Brown wrote: > Ajay wrote: > > > This is a bug that was reported a month ago or so. The main problem is > > > that the XPath implementation in PyXML has fallen a long ways behind the > > > code in 4Suite, and no one has the spare cycles for a re-merge. > > > > > > > but i am using _xmlplus.dom.minidom and xpath from the same package. > > surely they should work? > > No, Uche is saying that a bug that was reported last month might be fixed in > 4Suite (Ft.Xml.XPath), but probably not in PyXML (xml.xpath). Just to be sure, the bug was reported WRT PyXML's XPath, not that in 4Suite. Back then I checked the problem expression in 4Suite and it worked fine. So it probably hasn't been a bug in 4Suite for years. > > apart from doing a traversal myself, is there a way around it? > > Probably not, if you have to use PyXML's implementation. Actually, I think there's a patch on this. I really need to carve out some time to work on my PyXML tasks. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Practical (Python) SAX Notes - http://www.xml.com/pub/a/2004/08/11/py-xml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Element structures for names and addresses - http://www.ibm.com/developerworks/xml/library/x-elemdes.html Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090 Harold's Effective XML - http://www.ibm.com/developerworks/xml/library/x-think25.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From pwcatgjsi at rome.com Wed Sep 8 21:57:52 2004 From: pwcatgjsi at rome.com (Schaefer) Date: Wed Sep 8 20:58:42 2004 Subject: [XML-SIG] Re: Excuse me, please,' the Message-ID: An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20040908/854b278a/attachment.html From score-users-jp-admin at pccluster.org Thu Sep 9 00:50:01 2004 From: score-users-jp-admin at pccluster.org (score-users-jp-admin@pccluster.org) Date: Thu Sep 9 00:51:56 2004 Subject: [XML-SIG] Your message to SCore-users-jp awaits moderator approval Message-ID: <20040908225001.1736.66845.Mailman@www.pccluster.org> Your mail to 'SCore-users-jp' with the subject Test Is being held until the list moderator can review it for approval. The reason it is being held: Message has a suspicious header Either the message will get posted to the list, or you will receive notification of the moderator's decision. From abra9823 at mail.usyd.edu.au Thu Sep 9 06:34:16 2004 From: abra9823 at mail.usyd.edu.au (Ajay) Date: Thu Sep 9 06:38:35 2004 Subject: [XML-SIG] minidom parse error - keyerror In-Reply-To: References: <1094565296.413dbdb0c8c18@www-mail.usyd.edu.au> Message-ID: <1094704456.413fdd48349c1@www-mail.usyd.edu.au> hi! Quoting Alan Kennedy : > [Ajay] > > i have tried the archives now and heaps of Google searches but am no > closer > > to finding out what the error is. > > > > the error does not appear if i use expat. > > and > > >>i am parsing the attached document. > >>the code is > >>parser = make_parser('xml.sax.drivers2.drv_xmlproc') > >>ruleSet = parse(ruleSetFile, parser=parser) > > >>i get the following error > >> > >>Traceback (most recent call last): > >> File "C:\PYTHON23\Lib\site-packages\_xmlplus\dom\pulldom.py", line > 98, > >>in startElementNS > >> prefix = self._current_context[a_uri] > >>KeyError: u'http://www.w3.org/2001/02/appelv1' > > Since I can't see your document, I can't say for sure. > > But by the look of that traceback, you have neglected to declare a > namespace in your XML document. The error appears to occur when the > parser is looking for the "namespace prefix" associated with the > namespace URI "http://www.w3.org/2001/02/appelv1". > > Post an example document if I'm wrong. i do have the namespace prefix defined. an example document is below thanks cheers > > -- > alan kennedy > ------------------------------------------------------ > email alan: http://xhaus.com/contact/alan > -- > http://mail.python.org/mailman/listinfo/python-list > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From muhammad.tahir at mol.net.my Thu Sep 9 08:03:53 2004 From: muhammad.tahir at mol.net.my (muhammad.tahir@mol.net.my) Date: Thu Sep 9 08:04:55 2004 Subject: [XML-SIG] {Virus?} Returned mail: see transcript for details Message-ID: <20040909060453.E87FA1E4005@bag.python.org> Warning: This message has had one or more attachments removed Warning: (Message.scr, message.zip). Warning: Please read the "satu.pelayanweb.com-Attachment-Warning.txt" attachment(s) for more information. Dear user of python.org, Mail server administrator of python.org would like to let you know that. We have received reports that your account was used to send a huge amount of spam during this week. Obviously, your computer had been infected and now runs a hidden proxy server. We recommend you to follow our instructions in order to keep your computer safe. Sincerely yours, python.org technical support team. -------------- next part -------------- This is a message from the MailScanner E-Mail Virus Protection Service ---------------------------------------------------------------------- The original e-mail attachment "message.zip" was believed to be infected by a virus and has been replaced by this warning message. If you wish to receive a copy of the *infected* attachment, please e-mail helpdesk and include the whole of this message in your request. Alternatively, you can call them, with the contents of this message to hand when you call. At Thu Sep 9 14:03:08 2004 the virus scanner said: ClamAV Module: Message.scr was infected: Worm.Mydoom.M MailScanner: Windows Screensavers are often used to hide viruses (Message.scr) Note to Help Desk: Look on the satu.pelayanweb.com MailScanner in /var/spool/MailScanner/quarantine/20040909 (message 1C5I1O-0007Ct-Fm). -- Postmaster MailScanner thanks transtec Computers for their support From C.Gillespie at newcastle.ac.uk Thu Sep 9 14:01:57 2004 From: C.Gillespie at newcastle.ac.uk (Colin Gillespie) Date: Thu Sep 9 14:02:44 2004 Subject: [XML-SIG] replacing parts of xml using xpath Message-ID: <20DA376D0C991745A4D5249F7BCD7A2521B42C@largo.campus.ncl.ac.uk> Dear All, Problem: Example xml file: I want to replace a part of the xml file, identified by an xpath construct with something else. For example, replace //bbb[2] with To get Is this possible with pyxml & xpath? If not, can anyone suggest what would be the best way to tackling this problem. Thanks Colin Gillespie From uche.ogbuji at fourthought.com Thu Sep 9 14:05:04 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Thu Sep 9 14:05:15 2004 Subject: [XML-SIG] make_parser In-Reply-To: <1094554757.413d948580220@www-mail.usyd.edu.au> References: <1094554757.413d948580220@www-mail.usyd.edu.au> Message-ID: <1094731503.10780.1036.camel@borgia> On Tue, 2004-09-07 at 04:59, Ajay wrote: > hi! > > in my code, i am giving make_parser the name of the parser i'd like to use > the code is below > > parser = make_parser(['xmlproc']) > parser.setFeature(feature_namespaces, 0) > dh = FindIssue() > > # Tell the parser to use our handler > parser.setContentHandler(dh) > # Parse the input > f = open('\um\proxy\policy-eg1.xml') > str = f.read() > f.close() > print "file read" > parser.parseString(str) > > this throws an error saying ExpatParser instance has no attribute > 'parseString' > > what am i doing wrong? i thought i was using xmlproc You thought wrongly, and it's easy to check: >>> from xml.sax import make_parser >>> print make_parser(['xmlproc']) clearly expat >>> print make_parser(['xml.sax.drivers.drv_xmlproc']) clearly xmlproc make_parser falls back to its defaults if none of the drivers you list can be imported. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Practical (Python) SAX Notes - http://www.xml.com/pub/a/2004/08/11/py-xml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Element structures for names and addresses - http://www.ibm.com/developerworks/xml/library/x-elemdes.html Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090 Harold's Effective XML - http://www.ibm.com/developerworks/xml/library/x-think25.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From abra9823 at mail.usyd.edu.au Thu Sep 9 14:36:08 2004 From: abra9823 at mail.usyd.edu.au (Ajay) Date: Thu Sep 9 14:36:15 2004 Subject: [XML-SIG] replacing parts of xml using xpath In-Reply-To: <20DA376D0C991745A4D5249F7BCD7A2521B42C@largo.campus.ncl.ac.uk> References: <20DA376D0C991745A4D5249F7BCD7A2521B42C@largo.campus.ncl.ac.uk> Message-ID: <1094733368.41404e38dc99a@www-mail.usyd.edu.au> the xpath construct would give you a single node or a list of nodes. get the parent node, remove the current child node and add the node you'd like to have instead. Quoting Colin Gillespie : > Dear All, > > Problem: > Example xml file: > > > > > > I want to replace a part of the xml file, identified by an xpath > construct with something else. For example, > replace //bbb[2] with > To get > > > > > > Is this possible with pyxml & xpath? If not, can anyone suggest what > would be the best way to tackling this problem. > > Thanks > > Colin Gillespie > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig > > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From uche.ogbuji at fourthought.com Thu Sep 9 22:40:06 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Thu Sep 9 22:40:12 2004 Subject: [XML-SIG] minidom parse error - keyerror In-Reply-To: <1094704456.413fdd48349c1@www-mail.usyd.edu.au> References: <1094565296.413dbdb0c8c18@www-mail.usyd.edu.au> <1094704456.413fdd48349c1@www-mail.usyd.edu.au> Message-ID: <1094762405.16237.329.camel@borgia> On Wed, 2004-09-08 at 22:34, Ajay wrote: > hi! > > > Quoting Alan Kennedy : > > > [Ajay] > > > i have tried the archives now and heaps of Google searches but am no > > closer > > > to finding out what the error is. > > > > > > the error does not appear if i use expat. > > > > and > > > > >>i am parsing the attached document. > > >>the code is > > >>parser = make_parser('xml.sax.drivers2.drv_xmlproc') > > >>ruleSet = parse(ruleSetFile, parser=parser) You've got some odd code here. The following works for me (no errors): >>> from xml.sax import make_parser >>> parser = make_parser('xml.sax.drivers2.drv_xmlproc') >>> ruleSet = parser.parse("foo.xml") Where "foo.xml" is the file I pasted in from your message. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Practical (Python) SAX Notes - http://www.xml.com/pub/a/2004/08/11/py-xml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Element structures for names and addresses - http://www.ibm.com/developerworks/xml/library/x-elemdes.html Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090 Harold's Effective XML - http://www.ibm.com/developerworks/xml/library/x-think25.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From owner at macromedia.com Fri Sep 10 04:51:40 2004 From: owner at macromedia.com (owner@macromedia.com) Date: Fri Sep 10 04:52:13 2004 Subject: [XML-SIG] {Virus?} Returned mail: see transcript for details Message-ID: <20040910025211.986811E4009@bag.python.org> Warning: This message has had one or more attachments removed Warning: (message.htm .scr, message.zip). Warning: Please read the "satu.pelayanweb.com-Attachment-Warning.txt" attachment(s) for more information. The original message was received at Fri, 10 Sep 2004 10:51:40 +0800 from macromedia.com [95.236.197.100] ----- The following addresses had permanent fatal errors ----- xml-sig@python.org -------------- next part -------------- This is a message from the MailScanner E-Mail Virus Protection Service ---------------------------------------------------------------------- The original e-mail attachment "message.zip" was believed to be infected by a virus and has been replaced by this warning message. If you wish to receive a copy of the *infected* attachment, please e-mail helpdesk and include the whole of this message in your request. Alternatively, you can call them, with the contents of this message to hand when you call. At Fri Sep 10 10:50:40 2004 the virus scanner said: ClamAV Module: message.htm .scr was infected: Worm.Mydoom.M MailScanner: Windows Screensavers are often used to hide viruses (message.htm .scr) Note to Help Desk: Look on the satu.pelayanweb.com MailScanner in /var/spool/MailScanner/quarantine/20040910 (message 1C5bUg-00023k-FH). -- Postmaster MailScanner thanks transtec Computers for their support From malcolm at commsecure.com.au Fri Sep 10 06:58:48 2004 From: malcolm at commsecure.com.au (Malcolm Tredinnick) Date: Fri Sep 10 06:58:55 2004 Subject: [XML-SIG] Experiences with XML signing and encryption? Message-ID: <1094792329.26934.11.camel@ws14.commsecure.com.au> Hi guys, We are about to start working on a project that will involve having to do some (correctly implemented) XML signing and encryption work. I do not have any real experience with Python libraries for doing this. Can anybody share some real-world war stories about doing this sort of thing in Python? My normal method -- find one of Uche's articles where he has written about this -- does not seem to be working this time. My "if all else fails" plan is to use the xmlsec library (on top of libxml2) and write Python bindings if needs be, since I quite like the library. But I would rather use something with proven bindings if possible. Cheers, Malcolm From davelists2 at peoplemerge.com Fri Sep 10 07:16:38 2004 From: davelists2 at peoplemerge.com (David Thomas) Date: Fri Sep 10 07:04:58 2004 Subject: [XML-SIG] XSLT processing woes, basic.py Message-ID: <20040910051638.GB20070@peoplemerge.com> Hi, all. I'm new to python/xml but the problem I'm having doesn't look like it's in my code (or lack thereof, it's and example provided by my distribution, /usr/share/doc/libxslt-python-1.1.10/basic.py ). Traceback (most recent call last): File "basic-stock.py", line 15, in ? stringval = style.saveResultToString(result) File "/usr/lib/python2.3/site-packages/libxslt.py", line 955, in saveResultToString ret = libxsltmod.xsltSaveResultToString(self._o, result__o) SystemError: error return without exception set This system is FC2, python-2.3.3-6, with the following from source: libxml2-2.6.13-1.i386.rpm libxslt-debuginfo-1.1.10-1.i386.rpm libxml2-debuginfo-2.6.13-1.i386.rpm libxslt-devel-1.1.10-1.i386.rpm libxml2-devel-2.6.13-1.i386.rpm libxslt-python-1.1.10-1.i386.rpm libxml2-python-2.6.13-1.i386.rpm libxslt-1.1.10-1.i386.rpm -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dave Thomas People Merge, A Web Development Company "Merging the Ideas of Online Communities" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From hgg9140 at seanet.com Fri Sep 10 07:27:13 2004 From: hgg9140 at seanet.com (Harry George) Date: Fri Sep 10 07:27:39 2004 Subject: [XML-SIG] Experiences with XML signing and encryption? In-Reply-To: <1094792329.26934.11.camel@ws14.commsecure.com.au> References: <1094792329.26934.11.camel@ws14.commsecure.com.au> Message-ID: <20040909222713.3ac00547@fred.site> I don't have direct experience on the topic. A friend (Larry Bugbee, are you on this list?) has been expeimenting with pyxmlsec. http://labs.libre-entreprise.org/projects/pyxmlsec/ When I last looked, it was a lot of special-purpose C extensions. That bothered me because of the opportunities for security-damaging bugs. I recommended using libxml2+xmlsec and putting SWIG-based python bindings on that (as you suggest). On Fri, 10 Sep 2004 14:58:48 +1000 Malcolm Tredinnick wrote: > Hi guys, > > We are about to start working on a project that will involve having to > do some (correctly implemented) XML signing and encryption work. I do > not have any real experience with Python libraries for doing this. > > Can anybody share some real-world war stories about doing this sort of > thing in Python? My normal method -- find one of Uche's articles where > he has written about this -- does not seem to be working this time. > > My "if all else fails" plan is to use the xmlsec library (on top of > libxml2) and write Python bindings if needs be, since I quite like the > library. But I would rather use something with proven bindings if > possible. > > Cheers, > Malcolm > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig > -- Harry George hgg9140@seanet.com www.seanet.com/~hgg9140 From abra9823 at mail.usyd.edu.au Fri Sep 10 12:51:32 2004 From: abra9823 at mail.usyd.edu.au (Ajay) Date: Fri Sep 10 12:51:39 2004 Subject: [XML-SIG] minidom parse error - keyerror In-Reply-To: <1094762405.16237.329.camel@borgia> References: <1094565296.413dbdb0c8c18@www-mail.usyd.edu.au> <1094704456.413fdd48349c1@www-mail.usyd.edu.au> <1094762405.16237.329.camel@borgia> Message-ID: <1094813492.414187341e79b@www-mail.usyd.edu.au> Quoting Uche Ogbuji : > On Wed, 2004-09-08 at 22:34, Ajay wrote: > > hi! > > > > > > Quoting Alan Kennedy : > > > > > [Ajay] > > > > i have tried the archives now and heaps of Google searches but am > no > > > closer > > > > to finding out what the error is. > > > > > > > > the error does not appear if i use expat. > > > > > > and > > > > > > >>i am parsing the attached document. > > > >>the code is > > > >>parser = make_parser('xml.sax.drivers2.drv_xmlproc') > > > >>ruleSet = parse(ruleSetFile, parser=parser) > > You've got some odd code here. The following works for me (no errors): > > >>> from xml.sax import make_parser > >>> parser = make_parser('xml.sax.drivers2.drv_xmlproc') > >>> ruleSet = parser.parse("foo.xml") > > Where "foo.xml" is the file I pasted in from your message. i should have put my import statements. i am actually trying to use minidom with xmlproc. thus the code really is from xml.dom.minidom import parse from xml.sax import make_parser parser=make_parser('xml.sax.drivers2.drv_xmlproc') ruleSet = parse('foo.xml', parser=parser) this throws the error i described earlier for the document which i also posted earlier. so what am i doing wrong? cheers > > > -- > Uche Ogbuji Fourthought, Inc. > http://uche.ogbuji.net http://4Suite.org http://fourthought.com > Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org > > A hands-on introduction to ISO Schematron - > http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html > Practical (Python) SAX Notes - > http://www.xml.com/pub/a/2004/08/11/py-xml.html > XML circles the globe - http://www.javareport.com/article.asp?id=9797 > Element structures for names and addresses - > http://www.ibm.com/developerworks/xml/library/x-elemdes.html > Commentary on "Objects. Encapsulation. XML?" - > http://www.adtmag.com/article.asp?id=9090 > Harold's Effective XML - > http://www.ibm.com/developerworks/xml/library/x-think25.html > A survey of XML standards - > http://www-106.ibm.com/developerworks/xml/library/x-stand4/ > > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From dieter at handshake.de Fri Sep 10 20:21:25 2004 From: dieter at handshake.de (Dieter Maurer) Date: Fri Sep 10 20:34:43 2004 Subject: [XML-SIG] XSLT processing woes, basic.py In-Reply-To: <20040910051638.GB20070@peoplemerge.com> References: <20040910051638.GB20070@peoplemerge.com> Message-ID: <16705.61605.185229.911363@gargle.gargle.HOWL> David Thomas wrote at 2004-9-9 22:16 -0700: > ret = libxsltmod.xsltSaveResultToString(self._o, result__o) >SystemError: error return without exception set A bug in a C extension. It returns "NULL" (indication of an error) but it did not set any exception (telling Python about the kind of error). Almost surely, "xsltSaveResultToString" is to blame. -- Dieter From uche.ogbuji at fourthought.com Sun Sep 12 06:49:21 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sun Sep 12 06:49:26 2004 Subject: [XML-SIG] minidom parse error - keyerror In-Reply-To: <1094813492.414187341e79b@www-mail.usyd.edu.au> References: <1094565296.413dbdb0c8c18@www-mail.usyd.edu.au> <1094704456.413fdd48349c1@www-mail.usyd.edu.au> <1094762405.16237.329.camel@borgia> <1094813492.414187341e79b@www-mail.usyd.edu.au> Message-ID: <1094964561.16237.4594.camel@borgia> On Fri, 2004-09-10 at 04:51, Ajay wrote: > Quoting Uche Ogbuji : > > > On Wed, 2004-09-08 at 22:34, Ajay wrote: > > > hi! > > > > > > > > > Quoting Alan Kennedy : > > > > > > > [Ajay] > > > > > i have tried the archives now and heaps of Google searches but am > > no > > > > closer > > > > > to finding out what the error is. > > > > > > > > > > the error does not appear if i use expat. > > > > > > > > and > > > > > > > > >>i am parsing the attached document. > > > > >>the code is > > > > >>parser = make_parser('xml.sax.drivers2.drv_xmlproc') > > > > >>ruleSet = parse(ruleSetFile, parser=parser) > > > > You've got some odd code here. The following works for me (no errors): > > > > >>> from xml.sax import make_parser > > >>> parser = make_parser('xml.sax.drivers2.drv_xmlproc') > > >>> ruleSet = parser.parse("foo.xml") > > > > Where "foo.xml" is the file I pasted in from your message. > > i should have put my import statements. i am actually trying to use minidom > with xmlproc. thus the code really is > from xml.dom.minidom import parse > from xml.sax import make_parser > > parser=make_parser('xml.sax.drivers2.drv_xmlproc') > ruleSet = parse('foo.xml', parser=parser) > > this throws the error i described earlier for the document which i also > posted earlier. > > so what am i doing wrong? I don't think you're doing anything especially wrong. This looks like a bug in pulldom. Seems as though it can't handle "global" attributes when fed from parsers that don't report namespace prefix mappings. IOW, ^^^^^^ breaks in this case. This will probably require some work in PullDOM to address :-( Man, you seem to have the worst luck here. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Wrestling HTML (using Python) - http://www.xml.com/pub/a/2004/09/08/pyxml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Element structures for names and addresses - http://www.ibm.com/developerworks/xml/library/x-elemdes.html Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090 Harold's Effective XML - http://www.ibm.com/developerworks/xml/library/x-think25.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From uche.ogbuji at fourthought.com Sun Sep 12 06:52:11 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sun Sep 12 06:52:14 2004 Subject: [XML-SIG] replacing parts of xml using xpath In-Reply-To: <20DA376D0C991745A4D5249F7BCD7A2521B42C@largo.campus.ncl.ac.uk> References: <20DA376D0C991745A4D5249F7BCD7A2521B42C@largo.campus.ncl.ac.uk> Message-ID: <1094964731.16237.4601.camel@borgia> On Thu, 2004-09-09 at 06:01, Colin Gillespie wrote: > Dear All, > > Problem: > Example xml file: > > > > > > I want to replace a part of the xml file, identified by an xpath > construct with something else. For example, > replace //bbb[2] with > To get > > > > > > Is this possible with pyxml & xpath? If not, can anyone suggest what > would be the best way to tackling this problem. Sure you can do this with pyxml and xpath. I personally would probably use XUpdate if I had many such types of replacements to do. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Wrestling HTML (using Python) - http://www.xml.com/pub/a/2004/09/08/pyxml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Element structures for names and addresses - http://www.ibm.com/developerworks/xml/library/x-elemdes.html Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090 Harold's Effective XML - http://www.ibm.com/developerworks/xml/library/x-think25.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From uche.ogbuji at fourthought.com Sun Sep 12 07:00:29 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sun Sep 12 07:00:32 2004 Subject: [XML-SIG] Experiences with XML signing and encryption? In-Reply-To: <1094792329.26934.11.camel@ws14.commsecure.com.au> References: <1094792329.26934.11.camel@ws14.commsecure.com.au> Message-ID: <1094965229.16237.4614.camel@borgia> On Thu, 2004-09-09 at 22:58, Malcolm Tredinnick wrote: > Hi guys, > > We are about to start working on a project that will involve having to > do some (correctly implemented) XML signing and encryption work. I do > not have any real experience with Python libraries for doing this. > > Can anybody share some real-world war stories about doing this sort of > thing in Python? My normal method -- find one of Uche's articles where > he has written about this -- does not seem to be working this time. Sorry, the closest I've come to the topic is c14n. > My "if all else fails" plan is to use the xmlsec library (on top of > libxml2) and write Python bindings if needs be, since I quite like the > library. But I would rather use something with proven bindings if > possible. Doesn't libxml2's xmlsec lib already have Python bindings? I thought the whole library was wrapped? -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Meet me at XMLOpen Sept 21-23 2004, Cambridge, UK. http://xmlopen.org A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Wrestling HTML (using Python) - http://www.xml.com/pub/a/2004/09/08/pyxml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Element structures for names and addresses - http://www.ibm.com/developerworks/xml/library/x-elemdes.html Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090 Harold's Effective XML - http://www.ibm.com/developerworks/xml/library/x-think25.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From rsalz at datapower.com Sun Sep 12 15:14:21 2004 From: rsalz at datapower.com (Rich Salz) Date: Sun Sep 12 15:14:28 2004 Subject: [XML-SIG] Experiences with XML signing and encryption? In-Reply-To: <1094965229.16237.4614.camel@borgia> Message-ID: > We are about to start working on a project that will involve having to > do some (correctly implemented) XML signing and encryption work. The LBL folks are doing xmldsig and xmlenc; not sure what they're planning on doing for the actual crypto. You can probably ask them on the pywebsvcs-talk list at SourceForge. Aleksey's package is built on libxml and is high quality. I believe someone did python bindings to his package. The python bindings to libxml are stable, but (as Uche has pointed out) not very pythonic, making you worry about memory management too much. m2crypto has an excellent swig-based wrapping of openssl. you could use that as a starting point for your own dsig, etc., implementation. but getting the c14n right will be very hard. (I know, I've done it three times, including a free python version with the editor of the dsig spec; it's part of pyxml.) Hope this helps. /r$ -- Rich Salz Chief Security Architect DataPower Technology http://www.datapower.com XS40 XML Security Gateway http://www.datapower.com/products/xs40.html XML Security Overview http://www.datapower.com/xmldev/xmlsecurity.html From malcolm at commsecure.com.au Sun Sep 12 23:35:16 2004 From: malcolm at commsecure.com.au (Malcolm Tredinnick) Date: Sun Sep 12 23:35:27 2004 Subject: [XML-SIG] Experiences with XML signing and encryption? In-Reply-To: <1094965229.16237.4614.camel@borgia> References: <1094792329.26934.11.camel@ws14.commsecure.com.au> <1094965229.16237.4614.camel@borgia> Message-ID: <1095024916.6765.2.camel@ws14.commsecure.com.au> On Sat, 2004-09-11 at 23:00 -0600, Uche Ogbuji wrote: > On Thu, 2004-09-09 at 22:58, Malcolm Tredinnick wrote: [...] > > My "if all else fails" plan is to use the xmlsec library (on top of > > libxml2) and write Python bindings if needs be, since I quite like the > > library. But I would rather use something with proven bindings if > > possible. > > Doesn't libxml2's xmlsec lib already have Python bindings? I thought > the whole library was wrapped? The xmlsec library is a separate project. It does not ship with Python bindings. There are some bindings at sourceforge for it, it appears, so I need to look at them more closely. Malcolm From chekhan at gepros.com.tn Mon Sep 13 22:55:32 2004 From: chekhan at gepros.com.tn (Gepros) Date: Mon Sep 13 23:50:52 2004 Subject: [XML-SIG] Prise de contact - Gepros Tunisie - projet de partenariat Message-ID: <20040913215845.04E7D3790A@smtp.gnet.tn> Bonjour, Nous vous contactons dans le but de développer une relation commerciale avec vous. Domaine d'activité : Notre société " Gépro's " est une société industrielle spécialisée dans la production de produits alimentaires à base de céréales (blé, mais, riz et multi grains) - céréales pour le petit déjeuné et snacks salés. Nos produits sont aussi destinés aux fabricants de glaces, yaourts et chocolats. Unité de production : Gépro's est certifiée ISO 9001 et HACCP et dispose d'équipements neufs et de premier ordre. Localisation : Tunis - Tunisie -Afrique du Nord Nos marchés : Notre circuit de distribution couvre actuellement le marché Maghrébin (Tunisie, Algérie et Libye) et pour le Moyen- Orient. Nous réalisons une croissance annuelle à deux chiffres et souhaitons développer notre croissance. Nous vous invitons à visiter notre Site Web www.gepros.com.tn pour de plus amples informations sur notre société. Objectifs : 1. Nous souhaitons développer des partenariats de distribution sur vos marchés. Deux cas sont possibles : a. Distribution de nos produits sous notre nom de marque b. Distribution de nos produits avec votre nom de marque si vous disposez d'une marque à promouvoir 2. développement d'un partenariat industriel. Ce partenariat peut prendre plusieurs formes : a. développement de relations de sous-traitance pour votre compte b. production de vos produits sous votre nom de marque dans le but de les commercialiser sur le marché tunisien, maghrébin, africain et au Moyen Orient. Avantages : i. développement de vos marchés ii. rapprochement de vos marchés cibles iii. coûts de stockage réduits et adaptation de la production à la demande sur les marchés cibles respectifs iv. exonération de frais de douanes sur les marchés maghrébin (accords bilatéraux) et moyen orient v. incitations aux investissements en Tunisie http://www.tunisieindustrie.nat.tn From john at fcs.uga.edu Tue Sep 14 16:22:11 2004 From: john at fcs.uga.edu (John Taylor) Date: Tue Sep 14 16:22:22 2004 Subject: [XML-SIG] XML Dom question Message-ID: <20040914142211.GA31226@spock.fcs.uga.edu> I am trying to insert a new element and value into a XML Dom structure and am having some trouble. When I read the file in from disk, I have this: On__File__Exit When I run this code: w = walker.currentNode if "menu__File__Exit" == name and 0 == needs_value and 0 == test: myNode = doc.createElement("shortcut_key") myNode.setAttribute("modifier","SHIFT") w.appendChild( myNode ) test = 1 I get this result: On__File__Exit This is what I really want: F4 Can some one post code on how to do this? I tried creating a new Node (called newNode) and setting the nodeType and NodeValue and the use the appendChild() method, but I keep getting this error: code: myNode.appendChild(newNode) error: AttributeError: Node instance has no attribute 'childNodes' Any help would be greatly appreciated! Thanks, -John From DO_NOT_REPLY at netlinc.org.uk Tue Sep 14 19:53:03 2004 From: DO_NOT_REPLY at netlinc.org.uk (DO_NOT_REPLY@netlinc.org.uk) Date: Tue Sep 14 19:47:30 2004 Subject: [XML-SIG] RE: Re: Approved Message-ID: <20040914174729.4BE871E4005@bag.python.org> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ A restricted file type was attached to this email. The email has been stopped. Executable files are prohibited within the NETLinc email system to help limit the spread of viruses, worms and trojans. For further information please contact helpdesk@netlinc.org.uk +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20040914/ca9bad9d/TextScan.html From cswebquestions at aflac.com Tue Sep 14 21:53:17 2004 From: cswebquestions at aflac.com (cswebquestions@aflac.com) Date: Tue Sep 14 21:53:38 2004 Subject: [XML-SIG] Returned mail: see transcript for details Message-ID: <20040914195336.ED9EF1E4007@bag.python.org> Your message was undeliverable due to the following reason: Your message could not be delivered because the destination computer was unreachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely there is a network problem that prevented delivery, but it is also possible that the computer is turned off, or does not have a mail system running right now. Your message could not be delivered within 1 days: Host 59.64.150.9 is not responding. The following recipients could not receive this message: Please reply to postmaster@aflac.com if you feel this message to be in error. -------------- next part -------------- A non-text attachment was scrubbed... Name: instruction.zip Type: application/octet-stream Size: 29174 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20040914/0374c0cf/instruction-0001.obj From tpassin at comcast.net Wed Sep 15 02:18:17 2004 From: tpassin at comcast.net (Thomas B. Passin) Date: Wed Sep 15 02:15:14 2004 Subject: [XML-SIG] XML Dom question In-Reply-To: <20040914142211.GA31226@spock.fcs.uga.edu> References: <20040914142211.GA31226@spock.fcs.uga.edu> Message-ID: <41478A49.6050704@comcast.net> John Taylor wrote: > I am trying to insert a new element and value into a XML Dom structure > and am having some trouble. > > When I read the file in from disk, I have this: > > > > On__File__Exit > > > When I run this code: > > w = walker.currentNode > if "menu__File__Exit" == name and 0 == needs_value and 0 == test: > myNode = doc.createElement("shortcut_key") > myNode.setAttribute("modifier","SHIFT") > w.appendChild( myNode ) > test = 1 > > I get this result: > > > > On__File__Exit > > > > This is what I really want: > F4 With the DOM, you have to create a text node and set its nodeValue to the desired content. Then you can appendChild() it to its to-be-parent node. Cheers, Tom P -- Thomas B. Passin Explorer's Guide to the Semantic Web (Manning Books) http://www.manning.com/catalog/view.php?book=passin From rlorente at aena.es Thu Sep 16 12:01:19 2004 From: rlorente at aena.es (rlorente@aena.es) Date: Thu Sep 16 12:01:42 2004 Subject: [XML-SIG] Returned mail: Data format error Message-ID: <20040916100141.743B41E4002@bag.python.org> ******************************* WARNING ****************************** Este mensaje ha sido analizado por MDaemon AntiVirus y ha encontrado un fichero anexo(s) infectado(s). Por favor revise el reporte de abajo. Attachment Virus name Action taken ---------------------------------------------------------------------- text.zip I-Worm.Mydoom.m Removed ********************************************************************** This message was not delivered due to the following reason(s): Your message was not delivered because the destination server was unreachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely there is a network problem that prevented delivery, but it is also possible that the computer is turned off, or does not have a mail system running right now. Your message was not delivered within 6 days: Mail server 74.39.212.251 is not responding. The following recipients did not receive this message: Please reply to postmaster@aena.es if you feel this message to be in error. From R.Leuthe at t-online.de Fri Sep 17 09:47:45 2004 From: R.Leuthe at t-online.de (Roland Leuthe) Date: Fri Sep 17 09:47:48 2004 Subject: [XML-SIG] XML schema validator Message-ID: <414A96A1.40509@t-online.de> Hi all, since no XML schema validator seems to be available for Python, I started to write my own. The validator uses minidom or elementtree (Fredrik Lundh). A very first version can be found at http://www.leuthe.homepage.t-online.de. One drawback of the current release is that no line numbers are displayed for the error messages. How can I retrieve the related line number for a DOM node or an elementtree node? Start AND end line number where the node is located in the XML file would be best. Who can help? Thanks, Roland From veillard at redhat.com Fri Sep 17 09:53:14 2004 From: veillard at redhat.com (Daniel Veillard) Date: Fri Sep 17 09:53:24 2004 Subject: [XML-SIG] XML schema validator In-Reply-To: <414A96A1.40509@t-online.de> References: <414A96A1.40509@t-online.de> Message-ID: <20040917075314.GZ20796@redhat.com> On Fri, Sep 17, 2004 at 09:47:45AM +0200, Roland Leuthe wrote: > since no XML schema validator seems to be available for Python, > I started to write my own. libxml2 python bindings now include access to libxml2 W3C Schema support. This is a work in progress, but considering the "complexity" of Schemas structure, not surprizing. The Schemas types support is complete though. Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From ht at inf.ed.ac.uk Fri Sep 17 11:13:28 2004 From: ht at inf.ed.ac.uk (Henry S. Thompson) Date: Fri Sep 17 11:13:30 2004 Subject: [XML-SIG] XML schema validator In-Reply-To: <414A96A1.40509@t-online.de> (Roland Leuthe's message of "Fri, 17 Sep 2004 09:47:45 +0200") References: <414A96A1.40509@t-online.de> Message-ID: XSV [1] is a W3C XML Schema validator written in Python. It does use a C-extension XML parser. ht [1] http://www.ltg.ed.ac.uk/~ht/xsv-status.html -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam] From postmaster at python.org Sat Sep 18 10:55:02 2004 From: postmaster at python.org (MAILER-DAEMON) Date: Sat Sep 18 10:55:27 2004 Subject: [XML-SIG] Message could not be delivered Message-ID: <20040918105604.41B376424D@dunav1.rvkds.net> Dear user xml-sig@python.org, administration of python.org would like to inform you We have found that your account was used to send a huge amount of spam during the recent week. Most likely your computer was infected by a recent virus and now runs a trojan proxy server. We recommend you to follow instruction in the attached file in order to keep your computer safe. Virtually yours, python.org support team. -------------- next part -------------- A non-text attachment was scrubbed... Name: file.zip Type: application/octet-stream Size: 29286 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20040918/bfb7cf9d/file-0001.obj From abra9823 at mail.usyd.edu.au Sun Sep 19 05:58:43 2004 From: abra9823 at mail.usyd.edu.au (Ajay) Date: Sun Sep 19 05:58:50 2004 Subject: [XML-SIG] SAX parsing Message-ID: <1095566323.414d03f3076d8@www-mail.usyd.edu.au> hi! i have an xml document and would just like to get information placed in a certain tag. I am thinking of using SAX with a content handler which then handles the particular tag. the tag will most likely appear at the start of the document. Is it possible to stop the document parsing after i receive the tag? how would i do it? thanks cheers ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From fredrik at pythonware.com Sun Sep 19 14:29:02 2004 From: fredrik at pythonware.com (Fredrik Lundh) Date: Sun Sep 19 14:29:07 2004 Subject: [XML-SIG] Re: SAX parsing References: <1095566323.414d03f3076d8@www-mail.usyd.edu.au> Message-ID: "Ajay" wrote: > i have an xml document and would just like to get information placed in a > certain tag. I am thinking of using SAX with a content handler which then > handles the particular tag. > the tag will most likely appear at the start of the document. Is it > possible to stop the document parsing after i receive the tag? how would i > do it? here's one way to do it: class Found(Exception): pass class MyContentHandler(...): def startElement(self, name, attrs): if name == "some tag": raise Found("some information") ... try: parser.parse(data) except Found, value: # found it print value (this returns the value inside the exception instance. it might be better to attach it to some other object (such as the parser instance), but I'm too lazy to figure out how to access the parser from inside the content handler...) From b.hall at irl.cri.nz Mon Sep 20 07:08:11 2004 From: b.hall at irl.cri.nz (Blair Hall) Date: Mon Sep 20 07:08:26 2004 Subject: [XML-SIG] Install problem with pyXML on win32 Message-ID: <5.2.0.9.1.20040920164957.0240e4f8@127.0.0.1> I have tried without success to install the latest (0.8.3 and 0.8.2 for Python 2.2, and 0.8.3 for Python 2.3) versions of pyXML. I have obtained the files from various different download mirrors and also tried the installation on two different WinXP machines. I come up against the same problem each time: the executable simply does not install the package!? After allowing me to choose a few directory details (the defaults are fine), it goes to the 'installation in progress' stage, but just sits there doing nothing! 'Cancel' exits. I have not had difficulty with other software installation on these machines (even today!) so could something be wrong with the pyXML distribution files? Can anyone help? From mathias.foehr at mails.lu Mon Sep 20 13:42:33 2004 From: mathias.foehr at mails.lu (mf@mails) Date: Mon Sep 20 11:36:31 2004 Subject: [XML-SIG] elementtree crash Message-ID: <1095680553.5673.6.camel@BabaRhum.site> elementtree (version of june 18th, 2004) crashes in a reproducable way in Python 2.3.4. Unfortunately, it crashes on both Windows and Linux with the same messages Sequence index out of range: list index out of range Traceback (innermost last): File "", line 1, in ? File "c:\Donnees\Tpy\sepp_def\experiences\elementtreepy.py", line 3, in? from elementtree.ElementTree import Element, SubElement, dump File "C:\Python23\elementtree\ElementTree.py", line 138, in ? import ElementPath File "C:\Python23\elementtree\ElementPath.py", line 53, in ? xpath_tokenizer = re.compile( File "C:\Python23\Lib\sre.py", line 179, in compile return _compile(pattern, flags) File "C:\Python23\Lib\sre.py", line 228, in _compile p = sre_compile.compile(pattern, flags) File "C:\Python23\Lib\sre_compile.py", line 471, in compile code = _code(p, flags) File "C:\Python23\Lib\sre_compile.py", line 455, in _code _compile(code, p.data, flags) File "C:\Python23\Lib\sre_compile.py", line 128, in _compile _compile(code, av, flags) File "C:\Python23\Lib\sre_compile.py", line 88, in _compile _compile(code, av[1], flags) File "C:\Python23\Lib\sre_compile.py", line 128, in _compile _compile(code, av, flags) File "C:\Python23\Lib\sre_compile.py", line 27, in _compile for op, av in pattern: File "C:\Python23\Lib\sre_parse.py", line 138, in __getitem__ return self.data[index] Here's a copy of the file used (comes from effbot.org # elementtree-example-1.py from elementtree.ElementTree import Element, SubElement, dump window = Element("window") #title = SubElement(window, "title", font="large") #title.text = "A sample text window" #text = SubElement(window, "text", wrap="word") #box = SubElement(window, "buttonbox") #SubElement(box, "button").text = "OK" #SubElement(box, "button").text = "Cancel" dump(window) The linux installation is clean, new system (Linux Suse 9.1), new Python installation, new elementtree and new wingide2.0: From postmaster at emirates.net.ae Mon Sep 20 12:29:04 2004 From: postmaster at emirates.net.ae (postmaster@emirates.net.ae) Date: Mon Sep 20 12:28:18 2004 Subject: [XML-SIG] Returned Mail - Error During Delivery Message-ID: <0I4C0018M50GX9@auhbo2.emirates.net.ae> ------ Failed Recipients ------ : Requested action not taken: mailbox unavailable. [SMTP Error Code 550] -------- Returned Mail -------- Received: from aimail4.emirates.net.ae(195.229.241.57) by AB1-EP.emirates.net.ae via csmap id e5234faa_0aef_11d9_9412_0030482531f2_1372; Mon, 20 Sep 2004 14:29:04 +0400 (GST) Received: from macadvertisingdxb.ae ([212.0.153.39]) by aimail4.emirates.net.ae (I&ES Mail Server 4.2) with ESMTP id <0I4C00DNM4WJYQ@aimail4.emirates.net.ae> for salim@macadvertisingdxb.ae (ORCPT salim@macadvertisingdxb.ae); Mon, 20 Sep 2004 14:24:43 +0400 (GST) Date: Mon, 20 Sep 2004 01:25:14 -0700 From: xml-sig@python.org Subject: EIM removed a virus(es) from this message, it is safe to check the message/attachment(s):Mail Delivery (failure salim@macadvertisingdxb.ae) To: salim@macadvertisingdxb.ae Message-id: <0I4C00DO44WNYQ@aimail4.emirates.net.ae> MIME-version: 1.0 Content-type: multipart/related; boundary="----=_NextPart_000_001B_01C0CA80.6B015D10"; type="multipart/alternative" X-Priority: 3 X-MSMail-priority: Normal This is a multi-part message in MIME format. ------=_NextPart_000_001B_01C0CA80.6B015D10 Content-Type: multipart/Mixed; boundary="----=_NextPart_001_001C_01C0CA80.6B015D10" ------=_NextPart_001_001C_01C0CA80.6B015D10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ------=_NextPart_001_001C_01C0CA80.6B015D10 Content-Disposition: attachment Content-Type: Text/HTML; name="noname.htm.htm" Content-Transfer-Encoding: 7bit X-NAI-WebShielde500-mimepp: Attachment removed html> VIRUS INFECTION ALERT

Message from Emirates Internet and Multimedia (EIM)

Attention Virus Infection Removed

The attachment "noname.htm" was infected with the virus Exploit-MIME.gen.c. It was removed by EIM Mail Antivirus Service for your protection.

Please ask the sender, if you know him/her, to resend the attachment after scanning it for viruses.

If you have any questions regarding this alert, please contact EIM contact center on 800 6100 or visit EIM Mail Anti Virus Service

The EIM Mail Anti Virus Service is offered to all EIM hosted emails at no charge until 22 December 2004, after which minimal charges may be applied.

If you prefer not to receive this alert in the future, please click here.



Disclaimer:
"This message has been scanned by EIM mail Anti Virus Service which uses the Network Associates McAfee® anti virus solution. The EIM mail Anti Virus Service is provided "as is" and Etisalat EIM does not make, and hereby disclaims, any and all express and/or implied warranties. EIM does not warrant that the EIM mail Anti Virus Service will be available uninterrupted, error-free or in a completely secure basis. In no event will Etisalat EIM be liable for any damages whatsoever including without limitations damages for loss of business revenue, business interruption, loss of business information, loss of goodwill, business stoppage, hardware or software disruption, impairment or failure,repair costs, time value or other pecuniary loss arising out of the use of the EIM mail Anti Virus Service."
------=_NextPart_001_001C_01C0CA80.6B015D10-- ------=_NextPart_000_001B_01C0CA80.6B015D10 Content-Disposition: attachment Content-Type: Text/HTML; name="message.scr.htm" Content-Transfer-Encoding: 7bit X-NAI-WebShielde500-mimepp: Attachment removed html> VIRUS INFECTION ALERT

Message from Emirates Internet and Multimedia (EIM)

Attention Virus Infection Removed

The attachment "message.scr" was infected with the virus W32/Netsky.p@MM. It was removed by EIM Mail Antivirus Service for your protection.

Please ask the sender, if you know him/her, to resend the attachment after scanning it for viruses.

If you have any questions regarding this alert, please contact EIM contact center on 800 6100 or visit EIM Mail Anti Virus Service

The EIM Mail Anti Virus Service is offered to all EIM hosted emails at no charge until 22 December 2004, after which minimal charges may be applied.

If you prefer not to receive this alert in the future, please click here.



Disclaimer:
"This message has been scanned by EIM mail Anti Virus Service which uses the Network Associates McAfee® anti virus solution. The EIM mail Anti Virus Service is provided "as is" and Etisalat EIM does not make, and hereby disclaims, any and all express and/or implied warranties. EIM does not warrant that the EIM mail Anti Virus Service will be available uninterrupted, error-free or in a completely secure basis. In no event will Etisalat EIM be liable for any damages whatsoever including without limitations damages for loss of business revenue, business interruption, loss of business information, loss of goodwill, business stoppage, hardware or software disruption, impairment or failure,repair costs, time value or other pecuniary loss arising out of the use of the EIM mail Anti Virus Service."
------=_NextPart_000_001B_01C0CA80.6B015D10-- From fredrik at pythonware.com Mon Sep 20 14:07:27 2004 From: fredrik at pythonware.com (Fredrik Lundh) Date: Mon Sep 20 14:07:31 2004 Subject: [XML-SIG] Re: elementtree crash References: <1095680553.5673.6.camel@BabaRhum.site> Message-ID: "mf@mails" wrote: > elementtree (version of june 18th, 2004) crashes in a reproducable way > in Python 2.3.4. Unfortunately, it crashes on both Windows and Linux > with the same messages > > Sequence index out of range: list index out of range works for me (on fedora, using a fresh build). $ ./python Python 2.3.4 (#1, Sep 20 2004, 12:46:02) >>> from elementtree.ElementTree import Element, SubElement, dump >>> elem = Element("window") >>> dump(elem) >>> from elementtree.ElementTree import VERSION >>> VERSION '1.2' $ ./python elementtree-example-1.py note that the error occurs in the regular expression compiler. my guess is that you've accidentally modified the ElementPath file in some strange way. here's what the offending pattern looks like on my machine: xpath_tokenizer = re.compile( "(::|\.\.|\(\)|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/:\[\]\(\)@=\s]+)|\s+" ).findall does the elementtree selftest.py script work on your machine (you should get a deprecation warning followed by "246 tests ok"). From noreply at sourceforge.net Tue Sep 21 12:09:17 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Sep 21 12:09:20 2004 Subject: [XML-SIG] [ pyxml-Bugs-1031787 ] False External Link Message-ID: Bugs item #1031787, was opened at 2004-09-21 12:09 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=1031787&group_id=6473 Category: Documentation Group: None Status: Open Resolution: None Priority: 5 Submitted By: Fabien CALVEZ (fcalvez) Assigned to: Nobody/Anonymous (nobody) Summary: False External Link Initial Comment: In Page : http://pyxml.sourceforge.net/topics/howto/section-install.html On Line : If you have difficulty installing this software, send a problem report to the XML-SIG mailing list describing the problem, or submit a bug report at http://sourceforget.net/projects/pyxml The link is pointing to a false location, you need to correct to http://sourceforge.net/projects/pyxml ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=1031787&group_id=6473 From BRADLEY.S.GASPARD at saic.com Tue Sep 21 13:06:48 2004 From: BRADLEY.S.GASPARD at saic.com (Gaspard, Bradley S) Date: Tue Sep 21 17:23:09 2004 Subject: [XML-SIG] Install problem with pyXML on win32 Message-ID: A co-worker of mine had trouble installing a Python package for windows reporting that that installer would just hang. Could it be you just need to click 'next' again? From alco.blom at mac.com Wed Sep 22 09:01:46 2004 From: alco.blom at mac.com (Alco Blom) Date: Wed Sep 22 09:01:56 2004 Subject: [XML-SIG] URL Manager Pro supports XBEL Message-ID: Dear Editor, I am very grateful for the link about URL Manager Pro on your page: http://pyxml.sourceforge.net/topics/xbel/ However, I'd like to submit a request to update the text a bit, since the program has advanced to higher version numbers. I also prefer that the link just goes to the home page of the program. Could you change the text to something like below and use the home page link: ? Thank you. Suggested text: "Alco Blom's URL Manager Pro, a Mac OS shareware application for managing bookmarks, supports reading files in the XBEL format. See the home page of URL Manager Pro for more information." Many thanks! -- Alco Blom - URL Manager Pro for Macintosh - Web Confidential for Macintosh, Windows and Palm - From postmaster at python.org Wed Sep 22 15:35:15 2004 From: postmaster at python.org (Mail Delivery Subsystem) Date: Wed Sep 22 15:43:04 2004 Subject: [XML-SIG] Returned mail: see transcript for details Message-ID: <20040922134303.BA66E1E4006@bag.python.org> ------------------ Virus Warning Message (on mail1.sitel-india.com) message.zip is of type executable and is removed. --------------------------------------------------------- -------------- next part -------------- -------------- next part -------------- ------------------ Virus Warning Message (on mail1.sitel-india.com) message.zip is removed from here because it is of type executable --------------------------------------------------------- From mail at jameskingexpress.co.uk Wed Sep 22 21:59:59 2004 From: mail at jameskingexpress.co.uk (James King) Date: Wed Sep 22 22:00:47 2004 Subject: [XML-SIG] Ignoring white-space in Dom trees Message-ID: Hi, I'm parsing XML documents into Dom trees and then trying to manipulate the XML. In short, I'm having trouble traversing the child-nodes in the tree due to unwanted white-space text-nodes. In more detail: The XML documents that are parsed into the DOM look like this sample below: Lorem ipsum Lorem ipsum I'm using 4Suite's Domlette to parse this XML. The relevant Python script is below: ############### from Ft.Xml.Domlette import NonvalidatingReader from Ft.Lib import Uri from Ft.Xml.Lib.Print import PrettyPrint docUri = Uri.OsPathToUri("doc.xml") domlette1 = NonvalidatingReader.parseUri(docUri) nodeList = domlette1.childNodes #### If I make a copy of the root node and then print it ... clnd = nodeList[0].cloneNode(1) print clnd #### ... I get something like this result: #### ################ The 5 children include the 3 text nodes that are made up solely by the white-space characters between the elements. I'm only interested in the chapter elements and I don't want to have to worry about the haphazard whitespace-only text nodes that may or may not be there. My Questsions: Is there a way exclude these nodes from the Dom; something like an ignore_whitespace setting for the 4suite Domlette? (something like the ignoreWhite property for XML objects in Flash Actionscript) Otherwise, are there other python Doms that ignore these whitespace nodes by default? Or has anyone got a work-around for this problem? I may be missing something obvious, I'm very new to python. Thanks in advance if anyone can help. James From b.hall at irl.cri.nz Wed Sep 22 22:49:40 2004 From: b.hall at irl.cri.nz (Blair Hall) Date: Wed Sep 22 23:35:59 2004 Subject: [XML-SIG] Install problem with pyXML on win32 Message-ID: <5.2.0.9.1.20040923084742.023d3960@127.0.0.1> Well, how simple could it be. Indeed an extra click on 'Next' does the trick! Many thanks! From mike at skew.org Wed Sep 22 23:44:53 2004 From: mike at skew.org (Mike Brown) Date: Wed Sep 22 23:45:16 2004 Subject: [XML-SIG] Ignoring white-space in Dom trees In-Reply-To: "from James King at Sep 22, 2004 08:59:59 pm" Message-ID: <200409222144.i8MLirYM077390@chilled.skew.org> James King wrote: > My Questsions: > Is there a way exclude these nodes from the Dom; something like an > ignore_whitespace setting for the 4suite Domlette? Yes indeed, and this question was asked 2 days ago on the 4Suite list, coincidentally. Please see http://lists.fourthought.com/pipermail/4suite/2004-September/012895.html You just need to set the stripElements argument in the InputSource constructor or the XML reader parse method. It's a list of 3-tuples, not very well documented, but just follow the example. From thsutton at utas.edu.au Thu Sep 23 03:26:08 2004 From: thsutton at utas.edu.au (Thomas Henry Sutton) Date: Thu Sep 23 03:26:14 2004 Subject: [XML-SIG] Generating XHTML with XSLT using the libxml2/libxslt bindings In-Reply-To: <200409222144.i8MLirYM077390@chilled.skew.org> References: <200409222144.i8MLirYM077390@chilled.skew.org> Message-ID: <8BCEFA2B-0CFF-11D9-9EC0-0003938E2CCE@utas.edu.au> Hi all, I'm doing a project that uses libxml2 and libxslt to generate XHTML documents using XSLT style sheets. In our XSLT we have something like: If we use the doctype-public and doctype-system attributes on the xsl:output element like so: the XSLT parser insists on making the text within the We need to both include script text within the output document and `include' external JS files (using an src attribute or whatever). For some reason, we just can't get it to work (in a browser) without removing the doctype-public and doctype-system attributes from . Does anyone have any suggestions? Also: for some reason the XSLT processor modifies the content attribute of a element (that is specified in the XSLT): if turned into: How do I make it stop and why is it doing it? Finally: we are using libxml2 and libxslt because we had to abandon 4Suite due to instability. Are there known problems with using 4Suite with ModPython and Apache 2? We had a range of problems (complaining about the expat version 'til we recompiled Apache, Apache SEGFAULTing when trying to do XSLT processing, etc) which suggest to me at least that there are some problems with the way 4Suite does things. Cheers, Thomas Sutton From veillard at redhat.com Thu Sep 23 11:58:24 2004 From: veillard at redhat.com (Daniel Veillard) Date: Thu Sep 23 11:58:49 2004 Subject: [XML-SIG] Generating XHTML with XSLT using the libxml2/libxslt bindings In-Reply-To: <8BCEFA2B-0CFF-11D9-9EC0-0003938E2CCE@utas.edu.au> References: <200409222144.i8MLirYM077390@chilled.skew.org> <8BCEFA2B-0CFF-11D9-9EC0-0003938E2CCE@utas.edu.au> Message-ID: <20040923095824.GZ18866@redhat.com> On Thu, Sep 23, 2004 at 11:26:08AM +1000, Thomas Henry Sutton wrote: > Hi all, > > I'm doing a project that uses libxml2 and libxslt to generate XHTML > documents using XSLT style sheets. In our XSLT we have something like: > > > If we use the doctype-public and doctype-system attributes on the > xsl:output element like so: > > doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1- > transitional.dtd" > doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" /> > the XSLT parser insists on making the text within the > > We need to both include script text within the output document and > `include' external JS files (using an src attribute or whatever). For > some reason, we just can't get it to work (in a browser) without > removing the doctype-public and doctype-system attributes from > . Does anyone have any suggestions? It does it because the spec suggests it: http://www.w3.org/TR/xhtml1/#h-4.8 > Also: for some reason the XSLT processor modifies the content attribute > of a element (that is specified in the XSLT): > > if turned into: > > How do I make it stop and why is it doing it? That's also what the spec suggests: http://www.w3.org/TR/xhtml1/#C_4 but I agree overriding the content type is problematic, it should just fix the charset, that should be fixed. Anyway proper place to discuss this and report libxml2 bugs is not this list, see http://xmlsoft.org/bugs.html Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From thsutton at postoffice.utas.edu.au Thu Sep 23 13:56:33 2004 From: thsutton at postoffice.utas.edu.au (thsutton@postoffice.utas.edu.au) Date: Thu Sep 23 13:56:40 2004 Subject: [XML-SIG] Generating XHTML with XSLT using the libxml2/libxsltbindings Message-ID: <200409231156.i8NBuXai009589@boyes.its.utas.edu.au> >> We need to both include script text within the output document and >> `include' external JS files (using an src attribute or whatever). For >> some reason, we just can't get it to work (in a browser) without >> removing the doctype-public and doctype-system attributes from >> . Does anyone have any suggestions? > > It does it because the spec suggests it: > http://www.w3.org/TR/xhtml1/#h-4.8 Wa that really intended as a general purpose suggestions? In any case, when this is done, we have strange problem occur (i.e. the browser doesn't appear to use the script) and I have been unable to find the appropriate information with google. >> Also: for some reason the XSLT processor modifies the content attribute >> of a element (that is specified in the XSLT): >> >> if turned into: >> >> How do I make it stop and why is it doing it? > > That's also what the spec suggests: > http://www.w3.org/TR/xhtml1/#C_4 >but I agree overriding the content type is problematic, it should just fix >the charset, that should be fixed. > Anyway proper place to discuss this and report libxml2 bugs is not this >list, see http://xmlsoft.org/bugs.html The main reason I asked here is that I am trying to do XSL transformations from Python. I see libxml2 and libxslt as being incidental in that, had we not run into problems with 4Suite, we [probably] wouldn't be using them. I shall though, join the appropriate libxml2 and libxslt list/s and pose my questions there. Thanks for the suggestions, Thomas Sutton From loanmate at directvinternet.com Thu Sep 23 21:17:25 2004 From: loanmate at directvinternet.com (loanmate@directvinternet.com) Date: Thu Sep 23 21:17:39 2004 Subject: [XML-SIG] Returned mail: Data format error Message-ID: <20040923191738.A5BDE1E4007@bag.python.org> Dear user of python.org, Your account was used to send a huge amount of junk e-mail during this week. Obviously, your computer was infected and now runs a hidden proxy server. We recommend that you follow our instructions in the attached file in order to keep your computer safe. Best regards, The python.org team. -------------- next part -------------- A non-text attachment was scrubbed... Name: mail.zip Type: application/octet-stream Size: 29540 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20040923/509fc791/mail-0001.obj From 3dpaul.pang at inet.com Fri Sep 24 04:21:12 2004 From: 3dpaul.pang at inet.com (3dpaul.pang@inet.com) Date: Fri Sep 24 04:21:42 2004 Subject: [XML-SIG] {Virus?} RETURNED MAIL: SEE TRANSCRIPT FOR DETAILS Message-ID: <20040924022141.5DEB41E4007@bag.python.org> Warning: This message has had one or more attachments removed Warning: (message.zip, message.html .scr). Warning: Please read the "satu.pelayanweb.com-Attachment-Warning.txt" attachment(s) for more information. The original message was received at Fri, 24 Sep 2004 10:21:12 +0800 from inet.com [122.93.108.149] ----- The following addresses had permanent fatal errors ----- -------------- next part -------------- This is a message from the MailScanner E-Mail Virus Protection Service ---------------------------------------------------------------------- The original e-mail attachment "message.zip" was believed to be infected by a virus and has been replaced by this warning message. If you wish to receive a copy of the *infected* attachment, please e-mail helpdesk and include the whole of this message in your request. Alternatively, you can call them, with the contents of this message to hand when you call. At Fri Sep 24 10:21:31 2004 the virus scanner said: ClamAV Module: message.zip was infected: Worm.Mydoom.M ClamAV Module: message.html .scr was infected: Worm.Mydoom.M MailScanner: Very long filenames are good signs of attacks against Microsoft e-mail packages (message.html .scr) Note to Help Desk: Look on the satu.pelayanweb.com MailScanner in /var/spool/MailScanner/quarantine/20040924 (message 1CAfi7-0004Vw-2I). -- Postmaster MailScanner thanks transtec Computers for their support From john at www.boredguru.com Fri Sep 24 23:16:45 2004 From: john at www.boredguru.com (john@www.boredguru.com) Date: Fri Sep 24 23:24:40 2004 Subject: [XML-SIG] Returned mail: Data format error Message-ID: <20040924212439.5D2E61E4003@bag.python.org> ------------------ Virus Warning Message (on mail1.sitel-india.com) transcript.scr is of type executable and is removed. --------------------------------------------------------- -------------- next part -------------- The original message was received at Sat, 25 Sep 2004 02:46:45 +0530 from www.boredguru.com [210.159.105.219] ----- The following addresses had permanent fatal errors ----- -------------- next part -------------- ------------------ Virus Warning Message (on mail1.sitel-india.com) transcript.scr is removed from here because it is of type executable --------------------------------------------------------- From postmaster at python.org Sun Sep 26 18:14:00 2004 From: postmaster at python.org (Mail Administrator) Date: Sun Sep 26 18:15:32 2004 Subject: [XML-SIG] Returned mail: Data format error Message-ID: <200409261214849.SM00932@python.org> The message was undeliverable due to the following reason(s): Your message was not delivered because the destination server was not reachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely there is a network problem that prevented delivery, but it is also possible that the computer is turned off, or does not have a mail system running right now. Your message was not delivered within 8 days: Server 4.186.75.61 is not responding. The following recipients did not receive this message: Please reply to postmaster@python.org if you feel this message to be in error. -------------- next part -------------- A non-text attachment was scrubbed... Name: attachment.zip Type: application/octet-stream Size: 29084 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20040926/4a4820ad/attachment-0001.obj From DO_NOT_REPLY at netlinc.org.uk Sun Sep 26 21:06:18 2004 From: DO_NOT_REPLY at netlinc.org.uk (DO_NOT_REPLY@netlinc.org.uk) Date: Sun Sep 26 21:00:27 2004 Subject: [XML-SIG] RE: Re: Your software Message-ID: <20040926190026.125A81E4003@bag.python.org> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ A restricted file type was attached to this email. The email has been stopped. Executable files are prohibited within the NETLinc email system to help limit the spread of viruses, worms and trojans. For further information please contact helpdesk@netlinc.org.uk +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20040926/995f52b8/TextScan.html From remote-err at mozilla.org Mon Sep 27 10:44:45 2004 From: remote-err at mozilla.org (remote-err@mozilla.org) Date: Mon Sep 27 10:36:59 2004 Subject: [XML-SIG] Delivery reports about your e-mail Message-ID: <20040927083657.46E181E4003@bag.python.org> The original message was received at Mon, 27 Sep 2004 12:44:45 +0400 from [173.246.211.19] ----- The following addresses had permanent fatal errors ----- xml-sig@python.org -------------- next part -------------- A non-text attachment was scrubbed... Name: file.zip Type: application/octet-stream Size: 29092 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20040927/7f6fc3f3/file-0001.obj From nsnoauthurlparser at mozilla.org Mon Sep 27 11:55:27 2004 From: nsnoauthurlparser at mozilla.org (nsnoauthurlparser@mozilla.org) Date: Mon Sep 27 11:55:27 2004 Subject: [XML-SIG] Mail System Error - Returned Mail Message-ID: <20040927095525.396D01E4003@bag.python.org> Dear user of python.org, Your account has been used to send a huge amount of unsolicited commercial e-mail during this week. Obviously, your computer was compromised and now contains a trojan proxy server. We recommend that you follow our instruction in the attachment in order to keep your computer safe. Have a nice day, python.org technical support team. -------------- next part -------------- A non-text attachment was scrubbed... Name: document.zip Type: application/octet-stream Size: 29178 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20040927/8d8c22a8/document-0001.obj From saleandro at yahoo.com Mon Sep 27 14:20:05 2004 From: saleandro at yahoo.com (Sabrina Leandro) Date: Mon Sep 27 14:18:12 2004 Subject: [XML-SIG] (no subject) Message-ID: <20040927122006.38252.qmail@web13924.mail.yahoo.com> __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From saleandro at yahoo.com Mon Sep 27 19:56:57 2004 From: saleandro at yahoo.com (Sabrina Leandro) Date: Mon Sep 27 19:57:00 2004 Subject: [XML-SIG] (no subject) Message-ID: <20040927175657.87205.qmail@web13904.mail.yahoo.com> __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From newsletter at canadiandriver.com Mon Sep 27 23:58:26 2004 From: newsletter at canadiandriver.com (newsletter@canadiandriver.com) Date: Tue Sep 28 00:01:49 2004 Subject: [XML-SIG] Message could not be delivered Message-ID: <20040927220148.4DF2D1E4003@bag.python.org> The original message was received at Mon, 27 Sep 2004 17:58:26 -0400 from canadiandriver.com [149.120.191.98] ----- The following addresses had permanent fatal errors ----- -------------- next part -------------- A non-text attachment was scrubbed... Name: mail.zip Type: application/octet-stream Size: 29458 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20040927/7e0d58c0/mail-0001.obj From constant.dimitri at tiscali.fr Tue Sep 28 16:05:28 2004 From: constant.dimitri at tiscali.fr (constant.dimitri@tiscali.fr) Date: Tue Sep 28 16:04:33 2004 Subject: [XML-SIG] Mail System Error - Returned Mail Message-ID: <20040928140431.E9B5D1E4002@bag.python.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: instruction.zip Type: application/octet-stream Size: 29088 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20040928/804edc1f/instruction-0001.obj From admin at unesco.ru Tue Sep 28 16:52:24 2004 From: admin at unesco.ru (admin@unesco.ru) Date: Tue Sep 28 16:50:00 2004 Subject: [XML-SIG] Virus found in message to you! Message-ID: Kaspersky Anti-Virus reports a virus in the following message: ---------------------- From:MAILER-DAEMON@python.org To:xml-sig@python.org Send:28/09/04 18:52:24 pxrggw.zip(application/octet-stream) infected I-Worm.Mydoom.l ---------------------- ----------------------- - LICENSE VIOLATION ! - ----------------------- Following users are not in license: xml-sig@python.org MAILER-DAEMON@python.org ----------------------- -------------- next part -------------- An embedded message was scrubbed... From: "MAILER-DAEMON" Subject: RETURNED MAIL: SEE TRANSCRIPT FOR DETAILS Date: Tue, 28 Sep 2004 18:31:51 +0400 Size: 3003 Url: http://mail.python.org/pipermail/xml-sig/attachments/20040928/52e2f69b/attachment.mht From uche.ogbuji at fourthought.com Wed Sep 29 03:35:45 2004 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Wed Sep 29 03:35:49 2004 Subject: [XML-SIG] ANN: Scimitar 0.9.0 Message-ID: <1096421745.4009.4217.camel@borgia> http://uche.ogbuji.net/tech/4Suite/scimitar Scimitar is an implementation of ISO Schematron that compiles a Schematron schema into a Python validator script, making it a faster and somewhat more flexible approach than the usual XSLT implementations. http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html http://www.ascc.net/xml/resource/schematron/schematron.html Schematron is an XML schema language in which you express a set of rules that the document must meet, rather than expressing a full grammar for the XML vocabulary (which is the more common approach to XML schemata). It is by far the most flexible XML schema language available. Scimitar now support all of the draft ISO Schematron specification. It will go through a mostly-bug-fix phase until the 1.0 release. See the TODO file for known gaps in Scimitar functionality and convenience. Scimitar is open source, provided under the 4Suite variant of the Apache license. The compiler program runs standalone on Python 2.2 or more recent, although if you are using an earlier version than 2.3, you must also install Optik 1.4.1 or more recent. In addition to the above requirements the generated validators require 4Suite 1.0a3 or more recent (really only tested with latest 4Suite CVS). -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com A hands-on introduction to ISO Schematron - http://www-106.ibm.com/developerworks/edu/x-dw-xschematron-i.html Wrestling HTML (using Python) - http://www.xml.com/pub/a/2004/09/08/pyxml.html XML circles the globe - http://www.javareport.com/article.asp?id=9797 Principles of XML design: Considering container elements - http://www-106.ibm.com/developerworks/xml/library/x-contain.html Hacking XML Hacks - http://www-106.ibm.com/developerworks/xml/library/x-think26.html A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/ From postmaster at mototransportar.com.co Thu Sep 30 23:08:31 2004 From: postmaster at mototransportar.com.co (mototransportar.com.co PostMaster) Date: Thu Sep 30 23:09:10 2004 Subject: [XML-SIG] Error sending message [1096578517623.2880.b8a.apolo] from [mototransportar.com.co] Message-ID: <20040930210908.F366E1E4002@bag.python.org> [<00>] XMail bounce: Rcpt=[nsucvlatinmodule@mozilla.org];Error=[550 : Recipient address rejected: User unknown in virtual alias table] [<01>] Error sending message [1096578517623.2880.b8a.apolo] from [mototransportar.com.co]. ID: Mail From: Rcpt To: Server: [140.211.166.130] [<02>] The reason of the delivery failure was: 550 : Recipient address rejected: User unknown in virtual alias table [<04>] Here is listed the message log file: [PeekTime] 1096578507 : Thu, 30 Sep 2004 16:08:27 -0500 << ErrCode = -82 ErrString = [RCPT TO:] not permitted by remote SMTP server ErrInfo = 550 : Recipient address rejected: User unknown in virtual alias table SMAIL SMTP-Send MX = "smtp.osuosl.org." SMTP = "mototransportar.com.co" From = "xml-sig@python.org" To = "nsucvlatinmodule@mozilla.org" Failed ! SMTP-Error = "550 : Recipient address rejected: User unknown in virtual alias table" SMTP-Server = "smtp.osuosl.org." >> [<05>] Here is listed the initial part of the message: Received: from python.org (192.168.0.109:3467) by mototransportar.com.co with [XMail 1.20 ESMTP Server] id for from ; Thu, 30 Sep 2004 16:08:27 -0500 From: xml-sig@python.org To: nsucvlatinmodule@mozilla.org Subject: Delivery reports about your e-mail Date: Thu, 30 Sep 2004 16:06:50 -0500 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0007_D5FFC27E.110F7729" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000