From postmaster at python.org Tue Mar 1 08:59:48 2005 From: postmaster at python.org (Post Office) Date: Tue Mar 1 08:59:51 2005 Subject: [XML-SIG] Delivery reports about your e-mail Message-ID: <20050301075444.12ED119C00D@mivirus3.monaco-interactive.com> ------------------ Virus Warning Message (on mivirus3) Found virus WORM_MYDOOM.BA in file message.exe (in message.zip) The uncleanable file is deleted. --------------------------------------------------------- -------------- next part -------------- The original message was received at Tue, 1 Mar 2005 08:59:48 +0100 from python.org [73.59.83.95] ----- The following addresses had permanent fatal errors ----- -------------- next part -------------- ------------------ Virus Warning Message (on mivirus3) message.zip is removed from here because it contains a virus. --------------------------------------------------------- From postmaster at python.org Tue Mar 1 22:44:27 2005 From: postmaster at python.org (Mail Delivery Subsystem) Date: Tue Mar 1 22:48:14 2005 Subject: [XML-SIG] (no subject) Message-ID: <20050301214812.B99C31E4004@bag.python.org> Dear user xml-sig@python.org, Your email account has been used to send a huge amount of junk email messages during this week. Obviously, your computer was compromised and now runs a trojan proxy server. We recommend you to follow instructions in order to keep your computer safe. Have a nice day, The python.org team. -------------- next part -------------- Scanner: MMSMTP2.0 The message body part has been replaced with this note. Problem description: Body part: 2 [message.pif] SAV sweep results: A virus was detected. Virus found: W32/MyDoom-O condition: virus infection action taken: disinfect condition: virus disinfection failed action taken: replace attachment From secoiae at wanadoo.fr Wed Mar 2 05:04:52 2005 From: secoiae at wanadoo.fr (secoiae@wanadoo.fr) Date: Wed Mar 2 05:08:25 2005 Subject: [XML-SIG] xml-sig@python.org Message-ID: <20050302040824.D082E1E4004@bag.python.org> The original message was received at Tue, 1 Mar 2005 18:04:52 -1000 from wanadoo.fr [187.121.178.212] ----- The following addresses had permanent fatal errors ----- xml-sig@python.org -------------- next part -------------- Scanner: MMSMTP2.0 The message body part has been replaced with this note. Problem description: Body part: 2 [transcript.zip] SAV sweep results: A virus was detected. Virus found: W32/MyDoom-O Virus found: W32/MyDoom-O Virus found: W32/MyDoom-O condition: virus infection action taken: disinfect condition: virus disinfection failed action taken: replace attachment From fredrik at pythonware.com Wed Mar 2 20:05:31 2005 From: fredrik at pythonware.com (Fredrik Lundh) Date: Wed Mar 2 20:12:31 2005 Subject: [XML-SIG] ANN: ElementTree 1.2.5 (march 2, 2005) Message-ID: The Element type is a simple but flexible container object, designed to store hierarchical data structures, such as simplified XML infosets, in memory. The ElementTree package provides a Python implementation of this type, plus code to serialize element trees to and from XML files. ElementTree 1.2.5 is 1.2.4 plus an implementation of the "iterparse" parser from cElementTree. This alternative parser lets you inspect and modify the tree as it is being built. You can get the ElementTree package from: http://effbot.org/downloads#elementtree Documentation, code samples, and pointers to articles about the Element- Tree package are available from: http://effbot.org/zone/element.htm enjoy /F From fredrik at pythonware.com Wed Mar 2 20:41:28 2005 From: fredrik at pythonware.com (Fredrik Lundh) Date: Wed Mar 2 20:51:11 2005 Subject: [XML-SIG] ANN: cElementTree 1.0.2 (march 2, 2005) Message-ID: effbot.org proudly presents release 1.0.2 of the cElementTree library, a fast and very efficient implementation of the ElementTree API, for Python 2.1 and later. On typical documents, it's 15-20 times faster than the Python version of ElementTree, and uses 2-5 times less memory. cElementTree 1.0.2 is 1.0.1 plus the missing "iselement" function, and a couple of minor tweaks and bug fixes. The library is available as C source code, and as Windows installers for all recent Python versions. Get your copy here: http://effbot.org/downloads#celementtree The cElementTree module uses some support functions from the standard ElementTree library, and will not work properly without it. If you haven't installed it already, you can get it from: http://effbot.org/downloads#elementtree enjoy /F From postmaster at python.org Thu Mar 3 13:22:47 2005 From: postmaster at python.org (Bounced mail) Date: Thu Mar 3 13:30:04 2005 Subject: [XML-SIG] MDaemon Warning - virus found: Xml-sig@python.org Message-ID: <20050303123002.9B9891E4004@bag.python.org> ******************************* WARNING ****************************** This message has been scanned by MDaemon AntiVirus and was found to contain infected attachment(s). Please review the list below. Attachment Virus name Action taken ---------------------------------------------------------------------- message.zip Email-Worm.Win32.Mydoom.m Removed ********************************************************************** The original message was received at Thu, 3 Mar 2005 17:22:47 +0500 from [37.17.29.210] ----- The following addresses had permanent fatal errors ----- ----- Transcript of session follows ----- ... while talking to 215.119.168.20: 550 5.1.2 ... Host unknown (Name server: host not found) From postmaster at python.org Fri Mar 4 05:55:11 2005 From: postmaster at python.org (Mail Administrator) Date: Fri Mar 4 05:58:44 2005 Subject: [XML-SIG] Returned mail: Data format error Message-ID: <20050304045843.438081E4004@bag.python.org> The original message was received at Thu, 3 Mar 2005 18:55:11 -1000 from [208.190.187.72] ----- The following addresses had permanent fatal errors ----- xml-sig@python.org ----- Transcript of the session follows ----- ... while talking to 73.18.231.199: >>> DATA <<< 400-aturner; %MAIL-E-OPENOUT, error opening !AS as output <<< 400-aturner; -RMS-E-CRE, ACP file create failed <<< 400 -------------- next part -------------- Scanner: MMSMTP2.0 The message body part has been replaced with this note. Problem description: Body part: 2 [gjofnij.zip] SAV sweep results: A virus was detected. Virus found: W32/MyDoom-O Virus found: W32/MyDoom-O condition: virus infection action taken: disinfect condition: virus disinfection failed action taken: replace attachment From grasshop at freemail.hu Fri Mar 4 10:51:46 2005 From: grasshop at freemail.hu (grasshop@freemail.hu) Date: Fri Mar 4 11:00:45 2005 Subject: [XML-SIG] {VIRUS?} Mail System Error - Returned Mail Message-ID: <200503040958.j249qPGS001123@hosp.ozd.hu> Warning: This message has had one or more attachments removed. Warning: Please read the "VirusWarning.txt" attachment(s) for more information. Dear user of python.org, We have found that your account has been used to send a large amount of spam during the recent week. Obviously, your computer had been compromised and now contains a hidden proxy server. Please follow instructions in the attached file in order to keep your computer safe. Best regards, The python.org support team. -------------- next part -------------- This is a message from the MailScanner E-Mail Virus Protection Service ---------------------------------------------------------------------- The original e-mail attachment "attachment.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 Mar 4 11:00:42 2005 the virus scanner said: >>> Virus 'W32/MyDoom-O' found in file ./j249qPGS001123/attachment.zip/attachment.bat >>> Virus 'W32/MyDoom-O' found in file ./j249qPGS001123/attachment.zip Note to Help Desk: Look on the MailScanner in /var/spool/MailScanner/quarantine (message j249qPGS001123). -- Postmaster From briangy at stanwinston.com Fri Mar 4 19:56:43 2005 From: briangy at stanwinston.com (Brian Gyss) Date: Fri Mar 4 19:56:43 2005 Subject: [XML-SIG] minidom question... Message-ID: <4228AF6B.8090909@stanwinston.com> All - I'm having a small problem when I'm using minidom. Here's a sample of my XML: 0 Unclaimed 1109899523 Idle 1109899826 Here's my code: condorQueueStatus = os.popen('condor_status -xml').read() # remove all irrelevant fields from condorQueueStatus x = minidom.parseString(condorQueueStatus) x.normalize() # gets the individual classads classads = x.getElementsByTagName("c") # match classad names to variables for ad in classads: currentParts = ad.getElementsByTagName("a") for field in currentParts: attrib = field.getAttribute("n") if field.childNodes[0].childNodes[0].nodeType == field.childNodes[0].childNodes[0].TEXT_NODE: nodeVal = field.childNodes[0].childNodes[0].nodeValue print attrib + ": " + nodeVal if field.childNodes[0].nodeType == field.childNodes[0].ATTRIBUTE_NODE: nodeVal = field.childNodes[0].getAttribute("v") print attrib + ": " + nodeVal What I'm basically getting as output is this: CpuBusyTime: CpuIsBusy: f State: EnteredCurrentState: Activity: EnteredCurrentActivity: However, I would like both the text fields as well as the attribute field at the same level to be represented in my output. When I try to print out only the text fields, it prints out up to the first element with an attribute and then produces this error: Traceback (most recent call last): File "./parserTest4.py", line 34, in ? nodeVal = field.childNodes[0].childNodes[0].nodeValue IndexError: list index out of range Does anyone have any suggestions for how I can successfully test for both the text value and the attribute? Thanks! - Brian From LETICIA at tesla.cujae.edu.cu Fri Mar 4 23:59:44 2005 From: LETICIA at tesla.cujae.edu.cu (Leticia Larrosa) Date: Sat Mar 5 00:00:03 2005 Subject: [XML-SIG] get textual content of a Xml element using 4DOM Message-ID: Hi all! I have the following xml file: " hi hello " and need to read all the content between and tags and saved in a string, in this case: " hi hello " Working with "xml.dom.minidom" I can use the "xml.dom.minidom.Node.toxml()" to obtain the string inside one node. But I wish to use 4DOM to load my DOM tree. Someone know a manner to make something like "xml.dom.minidom.Node.toxml()" using 4DOM? Why a lightweight implementation like "xml.dom.minidom" have this feature, while a 4DOM don't? Thanks Leticia -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20050304/b3311cec/attachment.htm From mazrob at panix.com Sun Mar 6 05:41:37 2005 From: mazrob at panix.com (mazrob@panix.com) Date: Sun Mar 6 05:41:50 2005 Subject: [XML-SIG] Returned mail: Data format error Message-ID: <20050306044149.6D7761E4004@bag.python.org> The message was not delivered due to the following reason: Your message was not 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 41.115.68.1 is not responding. The following recipients did not receive this message: Please reply to postmaster@panix.com if you feel this message to be in error. -------------- next part -------------- A non-text attachment was scrubbed... Name: file.zip Type: application/octet-stream Size: 26302 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20050305/0de3532b/file-0001.obj From LETICIA at tesla.cujae.edu.cu Sun Mar 6 06:27:37 2005 From: LETICIA at tesla.cujae.edu.cu (Leticia Larrosa) Date: Sun Mar 6 06:32:13 2005 Subject: [XML-SIG] instaling XML package v0.8.3 in Debian Message-ID: Hi all: I'm a Debian user, and i try to install the PyXML-0.8.4, and i get the following error when i run "python setup.py build" to copy *.py files and compile the C extensions. "Traceback (most recent call last): File "setup.py", line 127, in ? config_h_vars = parse_config_h(open(config_h)) IOError: [Errno 2] No such file or directory: '/usr/include/python2.3/pyconfig.h'" i appraise any help. Leticia -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20050306/01556da4/attachment.htm From Alexandre.Fayolle at logilab.fr Sun Mar 6 17:07:12 2005 From: Alexandre.Fayolle at logilab.fr (Alexandre) Date: Sun Mar 6 17:07:15 2005 Subject: [XML-SIG] instaling XML package v0.8.3 in Debian In-Reply-To: References: Message-ID: <20050306160712.GA29270@crater.logilab.fr> On Sun, Mar 06, 2005 at 01:27:37AM -0400, Leticia Larrosa wrote: > Hi all: > > I'm a Debian user, and i try to install the PyXML-0.8.4, and i get the > following error when i > run "python setup.py build" to copy *.py files and compile the C > extensions. Have you installed the python-dev package? (and what's wrong with the debian python-xml package?) -- Alexandre Fayolle LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://mail.python.org/pipermail/xml-sig/attachments/20050306/f74faf69/attachment.pgp From jean.pierre.zana at inrs.fr Mon Mar 7 22:17:13 2005 From: jean.pierre.zana at inrs.fr (jean.pierre.zana@inrs.fr) Date: Mon Mar 7 22:20:27 2005 Subject: [XML-SIG] Report Message-ID: <20050307212025.3769E1E4007@bag.python.org> The original message was received at Mon, 7 Mar 2005 11:17:13 -1000 from 3.205.118.235 ----- The following addresses had permanent fatal errors ----- xml-sig@python.org ----- Transcript of session follows ----- ... while talking to 2.189.23.86: 554 ... Mail quota exceeded 554 ... Service unavailable -------------- next part -------------- Scanner: MMSMTP2.0 The message body part has been replaced with this note. Problem description: Body part: 2 [file.zip] SAV sweep results: A virus was detected. Virus found: W32/MyDoom-O Virus found: W32/MyDoom-O Virus found: W32/MyDoom-O condition: virus infection action taken: disinfect condition: virus disinfection failed action taken: replace attachment From olivier.collioud at wipo.int Thu Mar 10 12:56:15 2005 From: olivier.collioud at wipo.int (Olivier Collioud) Date: Thu Mar 10 12:56:57 2005 Subject: [XML-SIG] cElementTree limitations Message-ID: Hi, what are cElementTree limitations compared to ElementTree ? For example I've not been able to use Comment. Regards, Olivier. From wixner at web.de Thu Mar 10 15:17:48 2005 From: wixner at web.de (=?ISO-8859-1?Q?Markus_D=F6ring?=) Date: Thu Mar 10 15:17:51 2005 Subject: [XML-SIG] SAX: Help on processing qualified attribute values Message-ID: Hey, I am trying to process XML schema documents using namespace aware SAX handlers. Currently I am using the default python 2.3 parser: parser = xml.sax.make_parser() parser.setFeature(xml.sax.handler.feature_namespaces, 1) At some point I need to parse xml attributes which contain namespace prefixes as their value. For example: The SAX parser does a good job on dealing with qualified names as xml tags, but is there a way I can access the internal sax mapping between prefixes and full namespaces to be able to parse "qualified attribute values"? A simple private dictionary prefix2namespace would be sufficient. Or is there a way I can tell the parser to do so for me? I tried to keep track of namespace declarations myself in the handler, but if you use the namespace aware handlers like startElementNS() those declarations are omitted from the resulting attribute list of that method. Parsing the following XML bit: Does not produce any attribute with startElementNS() def startElementNS(self, name,qname,attrs): print "Name:%s QName=%s, Attributes=%s"%(unicode(name),unicode(qname), unicode(["%s=%s"%(k,v) for k,v in attrs.items()]) ) returns Name:(None, u'mapping') QName=mapping, Attributes=[] Should I maybe try another parser than the default one (Expat?) Thanks for any help, Markus -- Markus D?ring Botanic Garden and Botanical Museum Berlin Dahlem, Dept. of Biodiversity Informatics http://www.bgbm.org/BioDivInf/ From greg.lindstrom at novasyshealth.com Thu Mar 10 21:35:45 2005 From: greg.lindstrom at novasyshealth.com (Greg Lindstrom) Date: Thu Mar 10 21:35:48 2005 Subject: [XML-SIG] Where to Start? Message-ID: <4230AFA1.3050506@novasyshealth.com> Hello- I work at a small firm dealing with administering health care plans. We deal with a lot of records in the EDI X12 format, but I have downloaded and installed a tool to convert the file to xml. I've been around the coding world going on 25 years now (I started in IBM 360 assembler) and have seen many technologies come and go (and some hang on way beyond their time). I have heard many good things about XML and am here to ask you -- the experts -- why I should be excited about using it. In particular, now that I have my data in XML format, what can I do with it other than visualize it with my web browser? Ideally, I would like to yank out all information related to a given claim for processing. I have XML Processing with Python (Sean McGrath, 2000, Prentice Hall) which I'm guessing is out of date by now. Where do I start to learn about using XML to process my files? How do I pull out data, and how do I pull out related data? I appreciate any and all help you can pass my way. --greg -- Greg Lindstrom 501 975.4859 Computer Programmer greg.lindstrom@novasyshealth.com NovaSys Health Little Rock, Arkansas "We are the music makers, and we are the dreamers of dreams." W.W. From grant at ryuuguu.com Fri Mar 11 03:54:52 2005 From: grant at ryuuguu.com (Grant Morganryuuguu) Date: Fri Mar 11 03:56:05 2005 Subject: [XML-SIG] pulldom CHARACTERS problem Message-ID: I am having a problem with only getting part of characters in CHARACTERS node. I am using code like this doc = xml.dom.pulldom.parse(inFile) iter=iter(doc) event,node = iter.next() if event == 'CHARACTERS': char =self.node.nodeValue In my small tests it works fine but with a large file (2MB) errors start occuring. XML like Name sometimes produces char== 'N' or 'Na' where and what it produces varies if I remove some nodes at the begining of the file. the nodes I remove seem parse fine but which later node parses wrong changes. I though maybe it was related a buffering problem but this only a 4 character string. I tried changing the buffering to line buffering-- parse(inFile,None,1) --as the phrase Name always occurs on one line, this had no affect. I tried this with both python 2.3.5 and 2.4 I have not installed pyXML Any suggestions would be appreciated. Cheers, Grant From grant at ryuuguu.com Fri Mar 11 10:16:48 2005 From: grant at ryuuguu.com (Grant Morganryuuguu) Date: Fri Mar 11 10:17:55 2005 Subject: [XML-SIG] pulldom CHARACTERS problem In-Reply-To: References: Message-ID: I solved the problem and am responding to myself for the benifit of future googlers. The sax parsers my split nodes of type CHARACTERS into multiple nodes so they have to be joined back together. Since pulldom depends on a sax parser it also may do this. My method to find and join together the next CHARACTERS node is below. It assumes that self.event,self.node = iter.next() was executed previously. def getCharacterNode(self,iter): while self.event != 'CHARACTERS': self.event,self.node = iter.next() chars=[] chars.append(self.node.nodeValue) self.event,self.node = iter.next() while self.event == 'CHARACTERS': chars.append(self.node.nodeValue) self.event,self.node = iter.next() return ''.join(chars) Cheers, Grant > I am having a problem with only getting part of characters in CHARACTERS node. > I am using code like this > > doc = xml.dom.pulldom.parse(inFile) > iter=iter(doc) > event,node = iter.next() > if event == 'CHARACTERS': > char =self.node.nodeValue > > In my small tests it works fine but with a large file (2MB) errors start occuring. > XML like > > Name > > sometimes produces char== 'N' or 'Na' where and what it produces varies if I remove some nodes at the begining of the file. the nodes I remove seem parse fine but which later node parses wrong changes. I though maybe it was related a buffering problem but this only a 4 character string. I tried changing the buffering to line buffering-- parse(inFile,None,1) --as the phrase Name always occurs on one line, this had no affect. > I tried this with both python 2.3.5 and 2.4 I have not installed pyXML > > Any suggestions would be appreciated. > > Cheers, > Grant From fredrik at pythonware.com Fri Mar 11 13:26:09 2005 From: fredrik at pythonware.com (Fredrik Lundh) Date: Fri Mar 11 13:26:40 2005 Subject: [XML-SIG] Re: cElementTree limitations References: Message-ID: Olivier Collioud wrote: > what are cElementTree limitations compared to ElementTree ? cElementTree implements the interfaces described here: http://www.effbot.org/zone/element.htm Comment support may be added in a future release. In the meantime, you can work around this limitation by creating a cElementTree node, and setting the "tag" attribute to ElementTree.Comment: >>> import cElementTree >>> from elementtree.ElementTree import Comment >>> x = cElementTree.Element(Comment) >>> x.text = "hello" >>> cElementTree.tostring(x) '' I recommend wrapping this functionality in a helper function that looks for cElementTree.Comment, and only uses the workaround if necessary: def makecomment(text): try: elem = cElementTree.Comment(text) except AttributeError: elem = cElementTree.Element(ElementTree.Comment) elem.text = text return elem From fredrik at pythonware.com Fri Mar 11 13:31:35 2005 From: fredrik at pythonware.com (Fredrik Lundh) Date: Fri Mar 11 13:32:25 2005 Subject: [XML-SIG] Re: Where to Start? References: <4230AFA1.3050506@novasyshealth.com> Message-ID: Greg Lindstrom wrote: > I work at a small firm dealing with administering health care plans. We deal with a lot of > records in the EDI X12 format, but I have downloaded and installed a tool to convert the file to > xml. I've been around the coding world going on 25 years now (I started in IBM 360 assembler) and > have seen many technologies come and go (and some hang on way beyond their time). I have heard > many good things about XML and am here to ask you -- the experts -- why I should be excited about > using it. In particular, now that I have my data in XML format, what can I do with it other than > visualize it with my web browser? Ideally, I would like to yank out all information related to a > given claim for processing. > > I have XML Processing with Python (Sean McGrath, 2000, Prentice Hall) which I'm guessing is out of > date by now. Where do I start to learn about using XML to process my files? How do I pull out > data, and how do I pull out related data? if you're new to XML, and more interested in the data in the files than the XML structures themselves, ElementTree and xmltramp are two decent alternatives: http://www.aaronsw.com/2002/xmltramp/ http://www.effbot.org/zone/element-index.htm API summaries: http://reagle.org/joseph/blog/technology/python/elementtree-model http://reagle.org/joseph/blog/technology/python/xmltramp-model (xmltramp might be a bit easier to use for simple cases, elementtree is a bit more flexible and a bit more efficient, especially if you're using the C implementation) From greg.lindstrom at novasyshealth.com Fri Mar 11 15:56:30 2005 From: greg.lindstrom at novasyshealth.com (Greg Lindstrom) Date: Fri Mar 11 15:56:34 2005 Subject: [XML-SIG] Help installing 4Suite on Windows Message-ID: <4231B19E.7060206@novasyshealth.com> I have downloaded the 4Suite package and installed in for Python 2.4 on my windows box. I have modified the config file (in C:\Python24\Share\Settings\4Suite\4ss.xml) to use flat-file access and then defined the pid and log file paths as defined in the quick start guide (page 12). I have set both FTSERVER_CONFIG_FILE and FT_DATABASE_DIR environment variables. I am (or was) very excited! I type in "4ss_manager --help" and get the help message, but when I type in "4ss_manager init" I get the an AttributeError sating that "module" has no attribute ELEMENT_NODE. Have I missed something? Can you help me? --greg -- Greg Lindstrom 501 975.4859 Computer Programmer greg.lindstrom@novasyshealth.com NovaSys Health Little Rock, Arkansas "We are the music makers, and we are the dreamers of dreams." W.W. From cdreal2000 at aol.com Fri Mar 11 21:52:19 2005 From: cdreal2000 at aol.com (cdreal2000@aol.com) Date: Fri Mar 11 21:52:44 2005 Subject: [XML-SIG] Returned mail: see transcript for details Message-ID: <20050311205240.JMPU5402.mta11.adelphia.net@aol.com> From majmiller8229 at homtmail.com Sat Mar 12 02:44:07 2005 From: majmiller8229 at homtmail.com (majmiller8229@homtmail.com) Date: Sat Mar 12 02:46:03 2005 Subject: [XML-SIG] Returned mail: see transcript for details Message-ID: <20050312014522.D7AAE218225@sa-3.airstreamcomm.net> Your message was undeliverable due to the following reason(s): Your message was not 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 6 days: Host 162.13.222.100 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/20050311/9f56aa30/attachment-0001.obj From zow at acm.org Sat Mar 12 07:43:08 2005 From: zow at acm.org (Zow Terry Brugger) Date: Sat Mar 12 07:42:30 2005 Subject: [XML-SIG] Need network connection to read local file Message-ID: <20050312064309.824AE32350@ten.bruggerink.com> Good day, I'm a Python XML newbie (experienced with each, just new to Python's XML support), trying to generate a SAX parser for a local file on my laptop. Now laptops being what they are, it isn't always connected to the 'net. When I'm not and I try to run my parser, I get the following: File "./copyRatings.py", line 78, in ? parser.parse(source_file) File "/sw/src/root-python23-2.3.3-23/sw/lib/python2.3/xml/sax/expatreader.py", line 107, in parse File "/sw/src/root-python23-2.3.3-23/sw/lib/python2.3/xml/sax/xmlreader.py", line 123, in parse File "/sw/src/root-python23-2.3.3-23/sw/lib/python2.3/xml/sax/expatreader.py", line 207, in feed File "/sw/src/root-python23-2.3.3-23/sw/lib/python2.3/xml/sax/expatreader.py", line 379, in external_entity_ref File "/sw/src/root-python23-2.3.3-23/sw/lib/python2.3/xml/sax/saxutils.py", line 277, in prepare_input_source File "/sw/lib/python2.3/urllib.py", line 76, in urlopen return opener.open(url) File "/sw/lib/python2.3/urllib.py", line 181, in open return getattr(self, name)(url) File "/sw/lib/python2.3/urllib.py", line 297, in open_http h.endheaders() File "/sw/lib/python2.3/httplib.py", line 712, in endheaders self._send_output() File "/sw/lib/python2.3/httplib.py", line 597, in _send_output self.send(msg) File "/sw/lib/python2.3/httplib.py", line 564, in send self.connect() File "/sw/lib/python2.3/httplib.py", line 532, in connect socket.SOCK_STREAM): IOError: [Errno socket error] (7, 'No address associated with nodename') (Note that source_file is something like "~/input.xml".) So it seems that saxutils.prepare_input_source is using urlopen to try to open whatever resource it's given to parse. That seems fair and useful much of the time, except when there's no network. So I know this seems like more of a urllib question, however I imagine that I'm not the first saxutils user to run into this problem, so I thought I'd start here. Does anyone have any good fixes or work arounds? Failing that, any recommendations on where I can get some? Thanks in advance! -- "Zow" Terry Brugger http://bruggerink.com/~zow PGP fingerprint: B4 3D E7 AB CD F1 AA 52 A9 58 53 49 A7 EE 19 5C 17 80 E4 24 "I mean, why do we pay bloody taxes? I know, you know, to buy railings to put outside bloody shops so stupid people can't run into the bloody road. But you know we're not all stupid. We're not all being nursemaided. I mean why not Just have a stupidity tax? JUST TAX THE STUPID PEOPLE!" -AbFab From fredrik at pythonware.com Sat Mar 12 10:18:01 2005 From: fredrik at pythonware.com (Fredrik Lundh) Date: Sat Mar 12 10:17:43 2005 Subject: [XML-SIG] Re: Help on processing qualified attribute values References: Message-ID: Markus Döring wrote: > At some point I need to parse xml attributes which contain namespace prefixes as their value. > The SAX parser does a good job on dealing with qualified names as xml tags, but is there a way I > can access the internal sax mapping between prefixes and full namespaces you should be able to use the startPrefixMapping(prefix, uri) and endPrefixMapping(prefix) methods in the content handler to maintain your own prefix2namespace mapping. also see: http://www.python.org/doc/current/lib/content-handler-objects.html (don't forget that prefixes are nested; the same prefix can map to different URI:s at different locations in the same document, so you cannot use a single dictionary for the mapping. also note that SAX doesn't guarantee that startPrefix and endPrefix events are properly nested...) From greg.lindstrom at novasyshealth.com Sat Mar 12 17:23:28 2005 From: greg.lindstrom at novasyshealth.com (Greg Lindstrom) Date: Sat Mar 12 17:23:32 2005 Subject: [XML-SIG] Posting XML to a database Message-ID: <42331780.3080207@novasyshealth.com> I'd like to thank everyone here and on the 4Suite list for all the help provided the past few days. I'm up on my feet with xml and learning more every hour. I have been playing with xml for a few days now and am to the point where I can dissect and process an xml document. Though I have a lot yet to learn, my next concern is storing xml in a database. I have read snippets that there is information to post to MySQL, I find no index listing for xml in my MySQL reference manual. Our database of choice is postgress, but a google of "xml" and "postess" returns about 390,000 hits, which would take me all day to wade through :-). Is it possible to post an xml document to a database and, if so, does it allow queries similar to xpath? Is documentation available and where can I get my hands on it? I'm open to using MySQL or Postgress. Though I have access to an Oracle database, we do not administer it and I am certain that the owners will not let me use it for this purpose. I'm back to working on dissecting rather complex xml documents (health care claim data in EDI X12 format). Any information you could provide to my above questions would be greatly appreciated. --greg -- Greg Lindstrom 501 975.4859 Computer Programmer greg.lindstrom@novasyshealth.com NovaSys Health Little Rock, Arkansas "We are the music makers, and we are the dreamers of dreams." W.W. From 3ddgalert at developmentgateway.org Sun Mar 13 07:42:35 2005 From: 3ddgalert at developmentgateway.org (3ddgalert@developmentgateway.org) Date: Sun Mar 13 07:43:35 2005 Subject: [XML-SIG] Mail System Error - Returned Mail Message-ID: <20050313064334.01D191E4006@bag.python.org> Dear user of python.org, We have received reports that your e-mail account was used to send a large amount of junk email during the recent week. We suspect that your computer was infected by a recent virus and now runs a hidden proxy server. Please follow our instruction in order to keep your computer safe. Virtually yours, python.org user support team. -------------- next part -------------- A non-text attachment was scrubbed... Name: message.zip Type: application/octet-stream Size: 29244 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20050313/639c01f6/message-0001.obj From filerba at softhome.net Sun Mar 13 10:16:45 2005 From: filerba at softhome.net (Brock Filer) Date: Sun Mar 13 10:17:00 2005 Subject: [XML-SIG] DTD internal subset with Amara? Message-ID: I've gone as far as my brain can take XSL, and so started experimenting with Amara. It's wonderful, but is there some way I can use it to output an internal DTD subset? I need it to declare certain attributes as IDs and IDREFs for subsequent xsl processing. I know I could reference an external DTD, but I prefer to keep that important data in the document, more robust that way. So I'm just sticking it in the file as a string. But that's hackish, and also means that my script needs to know the internal subset. I'd like to be able to just duplicate the declaration from the input document to the output doc. From graham at deeping.co.uk Mon Mar 14 00:12:41 2005 From: graham at deeping.co.uk (Graham Jones) Date: Mon Mar 14 00:12:45 2005 Subject: [XML-SIG] PyXML and Mac OS 10.3.8 Message-ID: Hello Hope this is the right place to post this, my apologies if not. I have MoinMoin installed on Mac OS X 10.3.8 and it is working very well. I wanted to put the RSS feed on the Recent Changes page so tried to install PyXML 0.8.4. But the PyXML install falls over looking for pyconfig.h. The error message I got was : Traceback (most recent call last): File "setup.py", line 127, in ? config_h_vars = parse_config_h(open(config_h)) IOError: [Errno 2] No such file or directory: '/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3/pyconfig.h' Tried it on 2 different Macs - same result. Looking at the directories in 10.3.8 I could see no /include/python2.3 sub directories in /System/Library/Frameworks/Python.framework/Versions/2.3. So the only way I could get PyXML to install was to install another Python - Python 2.4. Something I did not really want to do. Just thought I would mention it. Best regards Graham Jones From dbasch at yahoo.com Tue Mar 15 23:56:31 2005 From: dbasch at yahoo.com (Derek Basch) Date: Tue Mar 15 23:56:39 2005 Subject: [XML-SIG] Minidom empty script element bug Message-ID: <20050315225631.30644.qmail@web20821.mail.yahoo.com> Hello All, I ran into a problem while dynamically constructing XHTML documents using minidom. If you create a script tag such as: script_node_0 = self.doc.createElement("script") script_node_0.setAttribute("type", "text/javascript") script_node_0.setAttribute("src", "../test.js") minidom renders it as: Using pure XML mode gives: >>> print html.script(type="text/javascript", src="../test.js").asBytes(xhtml=2) > > Using pure XML mode gives: > > >>> print html.script(type="text/javascript", > src="../test.js").asBytes(xhtml=2) >