From uche.ogbuji@fourthought.com Mon Jun 4 04:02:16 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sun, 03 Jun 2001 21:02:16 -0600 Subject: [XML-SIG] Side note from the bit 'o challenge Message-ID: <3B1AFA38.3A6D7FBB@fourthought.com> While struggling with the bugs reported by Stefan and Dieter it occurred to me to do a bit of timing. Stefan't test document was an empty one using Norm Walsh's docbook stylesheets. These are a veritable XSLT torture test and certainly a good performance test for the case of simple source document. Also, when I first posted my challenge earlier asking about test cases that showed 4XSLT+cDomlette performing excessively more slowly than other processors (esp. Saxon, which is the benchmark of XSLT excellence), Dieter suggested docbook. Here's what I find on my PII 366 + 192MB RAM / RH 7.0 / Python 2.1 / Blackdown JSDK 1.3 / 4XSLT current CVS and Saxon 6.3 $ time saxon-6.3.sh test.xml /usr/local/lib/xslt/db/html/docbook.xsl

real 0m59.264s user 0m10.290s sys 0m0.310s $ export BETA_DOMLETTE=1 $ time 4xslt test.xml db/html/docbook.xsl STYLESHEET MESSAGE: No "en" localization exists. END STYLESHEET MESSAGE: STYLESHEET MESSAGE: No context named "title" exists in the "en" localization. END STYLESHEET MESSAGE: STYLESHEET MESSAGE: No template named "book" exists in the context named "title" in the "en" localization. END STYLESHEET MESSAGE:

real 1m14.768s user 0m37.010s sys 0m0.290s $ export BETA_DOMLETTE= $ time 4xslt test.xml db/html/docbook.xsl

real 4m50.594s user 1m36.970s sys 0m3.210s Note that I tried several runs of each situation and got results within 10% each time. So, I think this bolsters my claim that 4XSLT+cDomlette is a very competitive processor speed-wise: 75s (4XSLT) versus 59s (Saxon 6.3). As I've always known pDomlette is a comparative slow-coach (290s). One note is that because cDomlette doesn't yet properly handle external parsed entities, it gains a bit of speed by not processing the docbook i18n. However, my tinkering (including forcing 4XSLT to load the i18n xml for a 1% speed loss) here indicates that the effect of this on performance is negligible. I guess the lesson for me is to hurry up and complete the cDomlette EntityResolver so that we can turn cDomlette on as the 4XSLT default. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA Software-engineering, knowledge-management, XML, CORBA, Linux, Python From keichwa@gmx.net Mon Jun 4 15:22:48 2001 From: keichwa@gmx.net (Karl Eichwalder) Date: 04 Jun 2001 16:22:48 +0200 Subject: [XML-SIG] Status link missing Message-ID: This page Linkname: XML-SIG Info Page URL: http://mail.python.org/mailman/listinfo/xml-sig has a link to Linkname: the XML-SIG's URL: http://mail.python.org/sigs/xml-sig/status.html but status.html isn't there. -- work : ke@suse.de | ,__o : http://www.suse.de/~ke/ | _-\_<, home : keichwa@gmx.net | (*)/'(*) From от@кого.письмо Tue Jun 5 16:35:49 2001 From: от@кого.письмо (от@кого.письмо) Date: Tue, 05 Jun 2001 11:35:49 -0400 Subject: [XML-SIG] Tema Message-ID:

Привет это рассылка сайта www.mygerls.da.ru
М ы открываем новый бесплатный фоторесурс и будем рады видеть Вас в числе своих поситителей .Все фотографии разделены по тематике и по рейтингу показов .На нашем ресурсе www.mygerls.da.ru  Вы не найдете пошлых всем приевшихся фотографий знаменитостей и прочей дребедени-здесь только Авторское фото-89 профессиональных фотохудожников ,работающих с нами это залог ВЫСОЧАЙШЕГО КАЧЕСТВА фоторподукции ,которую мы предлагаем Вам на страницах нашего сайта www.mygerls.da.ru

Если Вы не регистрировались на эту рассылку то вы можете уничтожить свою учетную запись по адресу

www.mygerls.da.ru/otkaz/

 

From от@кого.письмо Tue Jun 5 17:15:42 2001 From: от@кого.письмо (от@кого.письмо) Date: Tue, 05 Jun 2001 12:15:42 -0400 Subject: [XML-SIG] Tema Message-ID:

Привет это рассылка сайта www.mygerls.da.ru
М ы открываем новый бесплатный фоторесурс и будем рады видеть Вас в числе своих поситителей .Все фотографии разделены по тематике и по рейтингу показов .На нашем ресурсе www.mygerls.da.ru  Вы не найдете пошлых всем приевшихся фотографий знаменитостей и прочей дребедени-здесь только Авторское фото-89 профессиональных фотохудожников ,работающих с нами это залог ВЫСОЧАЙШЕГО КАЧЕСТВА фоторподукции ,которую мы предлагаем Вам на страницах нашего сайта www.mygerls.da.ru

Если Вы не регистрировались на эту рассылку то вы можете уничтожить свою учетную запись по адресу

www.mygerls.da.ru/otkaz/

 

From Alexandre.Fayolle@logilab.fr Tue Jun 5 17:30:23 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Tue, 5 Jun 2001 18:30:23 +0200 (CEST) Subject: [XML-SIG] funny behaviour with Document.createTextNode Message-ID: One of our fellow workers came up with an interesting bug with 4DOM's createTextNode. The bug is obviously in his code, and not in createTextNode, but I thought I might post this here, since it might save time to someone some day in the future... from xml.dom.ext import PrettyPrint from xml.dom.ext.reader.Sax2 import FromXml d = FromXml('') company = 'logilab' print 'I work at', company text = 'I work at', company t = doc.documentElement.appendChild(doc.createTextNode(text)) PrettyPrint(doc) This will give you a nice traceback, ending with: File "/usr/lib/python1.5/site-packages/xml/dom/ext/Printer.py", line 262, in visitText text = string.strip(text) and text TypeError: read-only character buffer, tuple For those who have not found out what the problem is, text is actually a tuple (because the comma won't concatenate the strings). Hence the crash. Alexandre Fayolle -- http://www.logilab.com Narval is the first software agent available as free software (GPL). LOGILAB, Paris (France). From martin@loewis.home.cs.tu-berlin.de Tue Jun 5 20:06:21 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Tue, 5 Jun 2001 21:06:21 +0200 Subject: [XML-SIG] funny behaviour with Document.createTextNode In-Reply-To: message from Alexandre Fayolle on Tue, 5 Jun 2001 18:30:23 +0200 (CEST) Message-ID: <200106051906.f55J6LP01620@mira.informatik.hu-berlin.de> > This will give you a nice traceback, ending with: > File "/usr/lib/python1.5/site-packages/xml/dom/ext/Printer.py", line > 262, in visitText > text = string.strip(text) and text > TypeError: read-only character buffer, tuple Depends on your Python version. In 2.x, you get AttributeError: 'tuple' object has no attribute 'strip' since string.strip(x) is now x.strip(), due to the new string methods. Regards, Martin From noreply@sourceforge.net Wed Jun 6 16:29:22 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 06 Jun 2001 08:29:22 -0700 Subject: [XML-SIG] [ pyxml-Bugs-430705 ] Argument mismatch in DOM reader for SAX Message-ID: Bugs item #430705, was updated on 2001-06-06 08:29 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=430705&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: A.M. Kuchling (akuchling) Assigned to: Nobody/Anonymous (nobody) Summary: Argument mismatch in DOM reader for SAX Initial Comment: Traceback: File "/www/python/lib/python2.1/site-packages/_xmlplus/parsers/xmlproc/xmldtd.py", line 151, in new_external_entity self.dtd_listener.new_external_entity(ent_name,pubid,sysid,ndata) File "/www/python/lib/python2.1/site-packages/_xmlplus/sax/drivers/drv_xmlproc.py", line 114, in new_external_entity self.dtd_handler.unparsedEntityDecl(name,pubid,sysid,ndata) TypeError: unparsedEntityDecl() takes exactly 4 arguments (5 given) The dtd_handler is an xml.dom.ext.reader.Sax.XmlDomGenerator instance; its unparsedEntityDecl() method doesn't have the ndata parameter. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=430705&group_id=6473 From Juergen Hermann" Hi! This week I had "fun" with external entities. ;) Consider this output (see file listings below): > python2.1 enttest.py (0, 6, 5) +++ parser is (None, 'root') root [] (None, 'param') param [((None, 'name'), 'http-port'), ((None, 'value'), '80')] (None, 'param') param [((None, 'name'), 'http-ssl'), ((None, 'value'), '443')] Now, if I move the "HTTP_SSL" entity so it appears _after_ the external entity, like this: %env; ]> ... it is not found anymore (no change to the script) and produces this traceback. > python2.1 enttest.py (0, 6, 5) +++ parser is (None, 'root') root [] (None, 'param') param [((None, 'name'), 'http-port'), ((None, 'value'), '80')] Traceback (most recent call last): File "enttest.py", line 35, in ? test = TestLoader('enttest.xml') File "enttest.py", line 27, in __init__ parser.parse(self.fileurl) File "/netsite/lib/python2.1/_xmlplus/sax/drivers2/drv_xmlproc.py", line 90, in parse parser.read_from(source.getByteStream(), bufsize) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlval.py", line 105, in read_from self.parser.read_from(file,bufsize) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 137, in read_from self.feed(buf) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 185, in feed self.do_parse() File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlproc.py", line 96, in do_parse self.parse_start_tag() File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlproc.py", line 161, in parse_start_tag a_val=self.parse_att_val() File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlproc.py", line 245, in parse_att_val self.report_error(3021,name) ## FIXME: Check standalone dcl File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlproc.py", line 63, in report_error EntityParser.report_error(self,number,args) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 372, in report_error self.err.fatal(msg) File "/netsite/lib/python2.1/_xmlplus/sax/drivers2/drv_xmlproc.py", line 214, in fatal self._err_handler.fatalError(saxlib.SAXParseException(msg, None, self)) File "/netsite/lib/python2.1/_xmlplus/sax/handler.py", line 38, in fatalError raise exception xml.sax._exceptions.SAXParseException: file:///export/home/jhe/tmp/enttest.xml:19:44: Undeclared entity 'HTTP_SSL' ~~~ SNIP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ==> enttest.py <== import os import xml.sax import xml.sax.saxutils import xml.sax.handler import xml.sax.sax2exts class TestLoader(xml.sax.saxutils.DefaultHandler): def __init__(self, filename): self.fileurl = 'file://' + os.path.abspath(filename) # create parser parser = xml.sax.sax2exts.XMLValParserFactory.make_parser() print '+++ parser is', parser parser.setFeature(xml.sax.handler.feature_namespaces, 1) parser.setFeature(xml.sax.handler.feature_validation, 1) parser.setFeature(xml.sax.handler.feature_external_ges, 1) parser.setFeature(xml.sax.handler.feature_external_pes, 1) # set handlers parser.setContentHandler(self) parser.setDTDHandler(self) parser.setErrorHandler(self) parser.setEntityResolver(self) # parse the XML into events parser.parse(self.fileurl) def startElementNS(self, name, qname, attrs): print name, qname, attrs.items() if __name__ == "__main__": print xml.version_info test = TestLoader('enttest.xml') ==> enttest.xml <== %env; ]> ==> enttest.ent <== From Juergen Hermann" Hi! This time a problem with nested entities (file listings at the end): > python2.1 ent2.py (0, 6, 5) +++ parser is Traceback (most recent call last): File "ent2.py", line 35, in ? test = TestLoader('ent2.xml') File "ent2.py", line 27, in __init__ parser.parse(self.fileurl) File "/netsite/lib/python2.1/_xmlplus/sax/drivers2/drv_xmlproc.py", line 90, in parse parser.read_from(source.getByteStream(), bufsize) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlval.py", line 105, in read_from self.parser.read_from(file,bufsize) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 137, in read_from self.feed(buf) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 185, in feed self.do_parse() File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlproc.py", line 104, in do_parse self.parse_doctype() File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlproc.py", line 482, in parse_doctype self.parse_internal_dtd() File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlproc.py", line 532, in parse_internal_dtd self.handle_internal_dtd(line,lb,self.get_region()[:-last_part_size]) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlproc.py", line 544, in handle_internal_dtd p.feed(int_dtd) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 185, in feed self.do_parse() File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/dtdparser.py", line 257, in do_parse self.parse_pe_ref() File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/dtdparser.py", line 449, in parse_pe_ref self.open_entity(sysid) # Does parsing and popping File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 102, in open_entity self.read_from(inf) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 137, in read_from self.feed(buf) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 185, in feed self.do_parse() File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/dtdparser.py", line 257, in do_parse self.parse_pe_ref() File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/dtdparser.py", line 449, in parse_pe_ref self.open_entity(sysid) # Does parsing and popping File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 102, in open_entity self.read_from(inf) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 137, in read_from self.feed(buf) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 185, in feed self.do_parse() File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/dtdparser.py", line 259, in do_parse self.parse_pi(self.dtd_consumer) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 567, in parse_pi self.parse_xml_decl() File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 493, in parse_xml_decl self.report_error(3009) File "/netsite/lib/python2.1/_xmlplus/parsers/xmlproc/xmlutils.py", line 372, in report_error self.err.fatal(msg) File "/netsite/lib/python2.1/_xmlplus/sax/drivers2/drv_xmlproc.py", line 214, in fatal self._err_handler.fatalError(saxlib.SAXParseException(msg, None, self)) File "/netsite/lib/python2.1/_xmlplus/sax/handler.py", line 38, in fatalError raise exception xml.sax._exceptions.SAXParseException: file:///export/home/jhe/tmp/ent2.xml:8:3: Multiple text declarations in a single entity To get no traceback, you can remove the xml decl in "ent2-1.ent", but I don't think this is mandated by the XML specification. ==> ent2.py <== import os import xml.sax import xml.sax.saxutils import xml.sax.handler import xml.sax.sax2exts class TestLoader(xml.sax.saxutils.DefaultHandler): def __init__(self, filename): self.fileurl = 'file://' + os.path.abspath(filename) # create parser parser = xml.sax.sax2exts.XMLValParserFactory.make_parser() print '+++ parser is', parser parser.setFeature(xml.sax.handler.feature_namespaces, 1) parser.setFeature(xml.sax.handler.feature_validation, 1) parser.setFeature(xml.sax.handler.feature_external_ges, 1) parser.setFeature(xml.sax.handler.feature_external_pes, 1) # set handlers parser.setContentHandler(self) parser.setDTDHandler(self) parser.setErrorHandler(self) parser.setEntityResolver(self) # parse the XML into events parser.parse(self.fileurl) def startElementNS(self, name, qname, attrs): print name, qname, attrs.items() if __name__ == "__main__": print xml.version_info test = TestLoader('ent2.xml') ==> ent2.xml <== %ent; ]> ==> ent2.ent <== %ent21; ==> ent2-1.ent <== From larsga@garshol.priv.no Thu Jun 7 16:35:19 2001 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 07 Jun 2001 17:35:19 +0200 Subject: [XML-SIG] BUG: External entity in the internal subset In-Reply-To: References: Message-ID: Hi Jьrgen, * Juergen Hermann | | This week I had "fun" with external entities. ;) Ouch! It looks like something has been screwed up in xmlproc's internal buffer handling. Could you report both these problems as a single bug at SourceForge, attach the XML and scripts to it, and assign it to me? I'll try to figure it out later this evening. --Lars M. From noreply@sourceforge.net Thu Jun 7 17:24:54 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 07 Jun 2001 09:24:54 -0700 Subject: [XML-SIG] [ pyxml-Bugs-431140 ] xmlproc and external entities Message-ID: Bugs item #431140, was updated on 2001-06-07 09:24 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=431140&group_id=6473 Category: xmlproc Group: None Status: Open Resolution: None Priority: 9 Submitted By: Jьrgen Hermann (jhermann) Assigned to: Lars Marius Garshol (larsga) Summary: xmlproc and external entities Initial Comment: Problem descriptions attached in form of two mails. #1 is ignoring of entities in the internal subset after reading an external entity. #2 is nesting of external entities, at depth 2 xmlproc does not accept xml decls. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=431140&group_id=6473 From MMillikan@MARKM300 Thu Jun 7 23:22:52 2001 From: MMillikan@MARKM300 (MMillikan@MARKM300) Date: 07 Jun 2001 18:22:52 -0400 Subject: [XML-SIG] xmlrpc char '/213/' becomes '<' Message-ID: A pdf file (string) sent from zope 2.3.0 in response to an xmlrpc call from a python script inside an asp page (using IIS 4.0) works perfectly, except: a few bytecodes get converted along the way. The start of the source pdf file is: %PDF-1.3 %“Њ‹ћ % 'BasicFonts' ''). There may be a view other byte codes which are converted -- I didn't check exhaustively. However, the other three '8 bit' byte codes on the second line made the transition unscathed. The libraries used were 'xmlrpclib.py version 0.9.9' and 'sgmlop.pyd' on both the zope server and the IIS server -- each running python 1.5.2. I notice that xmlrpclib uses cgi.escape() in its processing of string parameters. This seems to correlate with the resulting '<' and '>' characters in the received file. But why would characters '/213' ((guilsinglleft) and '/233' (guilsinglright) be coerced? The pdf file is using 'WinAnsiEncoding' (windows code page 1252). XML defaults to utf-8 (yes?), is this the problem? The xmlrpc call from IIS is made like so: [...] import xmlrpclib server = xmlrpclib.Server('http://rgve1') f = open('bad.pdf','wb') f.write(buffer(server.aphototest.photopdf())) f.flush() f.close() On the zope server 'photopdf' is an external method that creates a pdf file and then just: [...] return open('Photoreport.pdf','rb').read() Any suggestions? From claird@starbase.neosoft.com Sat Jun 9 00:16:40 2001 From: claird@starbase.neosoft.com (Cameron Laird) Date: Fri, 8 Jun 2001 18:16:40 -0500 (CDT) Subject: [XML-SIG] (Source) installation woes Message-ID: <200106082316.SAA72593@starbase.neosoft.com> I think I've never successfully installed PyXML stuff from source. What's the trick? When I install the Win* binary for 2.1, I can bring up Python and immediately import xml.parsers.expat That's good. Nothing I've tried on any Unix host--not RPMs, not instal- lation of expat followed by "make distclean; configure * ..." followed by every weirdness I could muster--has ever given me an expat module I can import. What's up? I've poked around in the archives. I found nothing I can relate to my question. I'd welcome a pointer that proves this territory has already been covered. From jeremy.kloth@fourthought.com Sat Jun 9 01:05:40 2001 From: jeremy.kloth@fourthought.com (Jeremy Kloth) Date: Fri, 8 Jun 2001 18:05:40 -0600 Subject: [XML-SIG] Lexical handler for minidom Message-ID: <006601c0f077$eb31fc70$f803a8c0@zeus> While testing the various DOM implementations against 4XPath, I ran into the problem of minidom not parsing comments. I looked at pulldom, and it had the comment callback, but never assigned the lexical handler property. Would anyone be against adding this to minidom? It would also entail adding the CDATA callbacks, however I think mapping those directly to the characters() callback should suffice. --- Jeremy Kloth Consultant jeremy.kloth@fourthought.com +1 303 583 9900 x 105 Fourthought, Inc. http://fourthought.com 4735 East Walnut St, Suite C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4suite.org), knowledge management From uche.ogbuji@fourthought.com Sat Jun 9 05:49:06 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Fri, 08 Jun 2001 22:49:06 -0600 Subject: [XML-SIG] (Source) installation woes In-Reply-To: Message from Cameron Laird of "Fri, 08 Jun 2001 18:16:40 CDT." <200106082316.SAA72593@starbase.neosoft.com> Message-ID: <200106090449.f594n6R04488@localhost.local> > I think I've never successfully installed PyXML stuff > from source. What's the trick? > > When I install the Win* binary for 2.1, I can bring up > Python and immediately > import xml.parsers.expat > That's good. > > Nothing I've tried on any Unix host--not RPMs, not instal- > lation of expat followed by "make distclean; configure * > ..." followed by every weirdness I could muster--has ever > given me an expat module I can import. What's up? ??? You tried standard distutils? python setup.py install ? This has worked for me on dozens of machines on several platforms. There shouldn't even be a Makefile in the PyXML package. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From Juergen Hermann" Hi! I just got this when running "python setup.py install": creating E:\PROGRAMME\PYTHON21\xmldoc\test\output\CVS copying test\output\CVS\Entries -> E:\PROGRAMME\PYTHON21\xmldoc\test\out= put\CVS copying test\output\CVS\Repository -> E:\PROGRAMME\PYTHON21\xmldoc\test\= output\CVS copying test\output\CVS\Root -> E:\PROGRAMME\PYTHON21\xmldoc\test\output= \CVS Certainly not a major problem, but a wart. Ciao, J=FCrgen From Juergen Hermann" Hi! The pyexpat test fails under Python 2.1 due to differences in repr() and an exception: 14c14 < 'root' {'attr1': 'value1', 'attr2': 'value2\341\275\200'} --- > 'root' {'attr1': 'value1', 'attr2': 'value2\xe1\xbd\x80'} 44c44 < u'root' {u'attr1': u'value1', u'attr2': u'value2\u1F40'} --- > u'root' {u'attr1': u'value1', u'attr2': u'value2\u1f40'} 74c74 < u'root' {u'attr1': u'value1', u'attr2': u'value2\u1F40'} --- > u'root' {u'attr1': u'value1', u'attr2': u'value2\u1f40'} 100c100 < ParserCreate, argument 2: expected None or string, int found --- > ParserCreate() argument 2 must be string or None, not int I've changed regrtest.py (see below) so that you can add versioned test files to the output dir, in this case "test_pyexpat.2.1". Shall I commit those changes? Index: regrtest.py =================================================================== RCS file: /cvsroot/pyxml/xml/test/regrtest.py,v retrieving revision 1.4 diff -u -r1.4 regrtest.py --- regrtest.py 2000/09/30 19:16:56 1.4 +++ regrtest.py 2001/06/09 08:56:59 @@ -197,7 +197,10 @@ class Compare: def __init__(self, filename): - self.fp = open(filename, 'r') + if os.path.exists(filename + '.' + sys.version[:3]): + self.fp = open(filename + '.' + sys.version[:3], 'r') + else: + self.fp = open(filename, 'r') def write(self, data): expected = self.fp.read(len(data)) cvs server: output/test_pyexpat.2.1 is a new entry, no comparison available From martin@loewis.home.cs.tu-berlin.de Sat Jun 9 10:22:46 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Sat, 9 Jun 2001 11:22:46 +0200 Subject: [XML-SIG] Regression tests fails in Python 2.1 In-Reply-To: "jh@web.de"'s message of Sat, 09 Jun 2001 11:01:08 +0200 Message-ID: <200106090922.f599Mk003047@mira.informatik.hu-berlin.de> > I've changed regrtest.py (see below) so that you can add versioned test > files to the output dir, in this case "test_pyexpat.2.1". Shall I commit > those changes? No. I'd rather prefer if the test case worked the same way for all Python versions. Please have a look at revision 1.7 of test_pyexpat.py; I already had the code to do this. Unfortunately, Fred has overwritten these changes later. Regards, Martin From larsga@garshol.priv.no Sat Jun 9 11:38:30 2001 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 09 Jun 2001 12:38:30 +0200 Subject: [XML-SIG] Lexical handler for minidom In-Reply-To: <006601c0f077$eb31fc70$f803a8c0@zeus> References: <006601c0f077$eb31fc70$f803a8c0@zeus> Message-ID: * Jeremy Kloth | | While testing the various DOM implementations against 4XPath, I ran | into the problem of minidom not parsing comments. I looked at | pulldom, and it had the comment callback, but never assigned the | lexical handler property. | | Would anyone be against adding this to minidom? I guess this would be OK. Some code might be surprised and break when comments suddenly show up in the tree, but most likely that would only be code liable to breakage in other common situations as well. | It would also entail adding the CDATA callbacks, however I think | mapping those directly to the characters() callback should suffice. What would this mean? The CDATA callbacks carry no data, so there is nothing to give to the characters() callback. --Lars M. From martin@loewis.home.cs.tu-berlin.de Sat Jun 9 20:29:56 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Sat, 9 Jun 2001 21:29:56 +0200 Subject: [XML-SIG] CVS dir copied when installing from CVS In-Reply-To: "jh@web.de"'s message of Sat, 09 Jun 2001 09:46:50 +0200 Message-ID: <200106091929.f59JTuw17501@mira.informatik.hu-berlin.de> > creating E:\PROGRAMME\PYTHON21\xmldoc\test\output\CVS > copying test\output\CVS\Entries -> E:\PROGRAMME\PYTHON21\xmldoc\test\output\CVS > copying test\output\CVS\Repository -> E:\PROGRAMME\PYTHON21\xmldoc\test\output\CVS > copying test\output\CVS\Root -> E:\PROGRAMME\PYTHON21\xmldoc\test\output\CVS > > Certainly not a major problem, but a wart. I think this is not worth fixing. If you don't want the CVS directories, do 'cvs export', then run setup.py in the exported tree. If you can come with a patch to solve this problem, just submit it. Regards, Martin From clean@ctv.es Sun Jun 10 22:11:52 2001 From: clean@ctv.es (Jesъs Urнa) Date: Sun, 10 Jun 2001 23:11:52 +0200 Subject: [XML-SIG] ACTIVADORES BIOLУGICOS PARA ELIMINAR OLORES. !PUBLICIDAD! Message-ID: <103882001601021115270@ross03> Activadores biol=F3gicos naturales para eliminar olores en pozos s=E9ptico= s, depuradoras, etc=2E http://www=2Ectv=2Ees/clean_world_hispania/ http://www=2Ectv=2Ees/clean_world_hispania/odour=2Ehtm http://www=2Ectv=2Ees/clean_world_hispania/fosassepticaspozossepticos=2Eht= m http://www=2Ectv=2Ees/clean_world_hispania/enviosPOZOSNEGROS=2Ehtml http://www=2Ectv=2Ees/clean_world_hispania/PEDIDO=2Ehtm !PUBLICIDAD! Bajas en clean@ctv=2Ees Nota: este correo no es un "SPAM" porque figura en el asunto la palabra !p= ublicidad! y est=E1 recopilado de una web publicada en la red=2E Clean World Hispania S=2EL=2E Jes=FAs Ur=EDa Poligono Asuar=E1n nave 16 48950 Asua Vizcaya 944710500 - Fax 944711324 From noreply@sourceforge.net Sun Jun 10 04:05:54 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Sat, 09 Jun 2001 20:05:54 -0700 Subject: [XML-SIG] [ pyxml-Patches-432129 ] Refine SGMLDOC support and add DOCTYPE s Message-ID: Patches item #432129, was updated on 2001-06-09 20:05 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=432129&group_id=6473 Category: xmlproc Group: None Status: Open Resolution: None Priority: 5 Submitted By: W. Eliot Kimber (drmacro) Assigned to: Nobody/Anonymous (nobody) Summary: Refine SGMLDOC support and add DOCTYPE s Initial Comment: Adds support for the SGMLDECL and DOCTYPE directives. Refines the patch made by Lars Marius. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=432129&group_id=6473 From tpassin@home.com Mon Jun 11 03:19:42 2001 From: tpassin@home.com (Thomas B. Passin) Date: Sun, 10 Jun 2001 22:19:42 -0400 Subject: [XML-SIG] 4xslt bug involving key() References: <006601c0f077$eb31fc70$f803a8c0@zeus> Message-ID: <004101c0f21c$fa2e0560$7cac1218@reston1.va.home.com> I've just found that a stylesheet construction that I need to use doesn't work right with 4xslt (the python 1.5.2 version I got from the 4suite.org site several weeks ago). The stylesheet takes a number of elements that have duplicated content and produce a list without duplicates. It's a simplified Muenchian method, using and key(). It works right with msxml3, saxon, and xalan, but not 4xslt. I need to use this in a project I'm in the middle of at work, so I request the 4thought people (Mike, would that be?) to take a look at it. If 4xslt doesn't implement keys (I thought it did), then at least it should throw an error. Here are the documents and the results: A B C B B D D E =============================================================== Original list: Should-be-unique list: =========================================================== Results from saxon: D:>saxon unique2.xml unique2.xsl Original list: ABCBBDDE Should-be-unique list: ABCDE Results from 4xslt (running from a batch file driver): D:>4xslt unique2.xml unique2.xsl Original list: ABCBBDDE Should-be-unique list: ABCBBDDE See the problem? Regards, Tom P From jeremy.kloth@fourthought.com Tue Jun 12 12:21:48 2001 From: jeremy.kloth@fourthought.com (Jeremy Kloth) Date: 12 Jun 2001 05:21:48 -0600 Subject: [XML-SIG] Lexical handler for minidom In-Reply-To: References: <006601c0f077$eb31fc70$f803a8c0@zeus> Message-ID: <200106121132.f5CBWqm11551@yen.fourthought.com> On 09 Jun 2001 12:38:30 +0200, Lars Marius Garshol wrote: > | It would also entail adding the CDATA callbacks, however I think > | mapping those directly to the characters() callback should suffice. > > What would this mean? The CDATA callbacks carry no data, so there is > nothing to give to the characters() callback. > My mistake, I forgot that those callbacks are just indicators of begin/end CDATA. -- Jeremy Kloth Consultant jeremy.kloth@fourthought.com (303)583-9900 x 105 Fourthought, Inc. http://www.fourthought.com Software-engineering, knowledge-management, XML, CORBA, Linux, Python From uche.ogbuji@fourthought.com Wed Jun 13 00:43:03 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Tue, 12 Jun 2001 17:43:03 -0600 Subject: [XML-SIG] ANN: 4Suite and 4SuiteServer 0.11.1 beta 2 Message-ID: <200106122343.f5CNh4L02843@localhost.local> More fixes, more features, this is it before the 0.11.1 release, hopefully Monday. Please help us test and exercise things. See http://4Suite.org/download.html for the packages (the "0.11.1b2" packages on ftp://ftp.fourthought.com/pub/4Suite). Note: Unfortunately, core structural changes in this release mean that 4ODS users must completely remove the Ft/Ods directory in their Python installation and drop and re-create all databases. 4SS users must completely remove the FtServer directory in the Python installation, drop and re-create all databases (by running "4ss_manager init"). At least you can now use "4ss_manager backup" and "4ss_manager restore" to migrate all your data from beta 1. News since beta 1: 4Suite: * Major 4ODS rewrite: performance, many new features * EXSLT support built into 4XSLT * XSLT output method fixes * Reader fixes * Support stylesheet include/import "path" in 4XSLT * Support XSLT extension element hooks before and after top-level apply-templates * Completed XUpdate support * Test suite re-write * Namespace fixes * Other fixes and speed-ups 4SS: * Experimental Java wrapper * HTTP handler improvements and fixes * Add "BuyerBase" demo * Fix "GuestBook" demo * revamp test suites * many performance and bug fixes News between 0.11.0 and beta 1: 4Suite new features: pure python parser for Xslt, XPath, and XPointer Support for unicode in the C based XSLT, XPath and XPointer parsers ODS dictionaries and type definitions ODS bug fixes and optimizations 4Suite Server new features FTP server text indexing using swish more CORBA support Backup and Restore command line tools Better security True access control lists -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From uche.ogbuji@fourthought.com Wed Jun 13 01:37:04 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Tue, 12 Jun 2001 18:37:04 -0600 Subject: [XML-SIG] 4xslt bug involving key() In-Reply-To: Message from "Thomas B. Passin" of "Sun, 10 Jun 2001 22:19:42 EDT." <004101c0f21c$fa2e0560$7cac1218@reston1.va.home.com> Message-ID: <200106130037.f5D0b4S02980@localhost.local> > If 4xslt doesn't implement keys (I thought it did), then at least it should > throw an error. We certainly do support keys. I'll look into this tonight. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From bill@janssen.org Wed Jun 13 03:35:34 2001 From: bill@janssen.org (Bill Janssen) Date: Tue, 12 Jun 2001 19:35:34 PDT Subject: [XML-SIG] How does one process HTML with the DOM support in PyXML? Message-ID: <01Jun12.193543pdt."3453"@watson.parc.xerox.com> I've been looking at the PyXML docs, to see how whether it could be used to parse HTML files. There seems to be something interesting under section 4.5 of xml-howto, entitled "Processing HTML". But the contents of that chapter say only "Intro to HTML builder". Any further tips elsewhere? Bill From fdrake@acm.org Wed Jun 13 03:52:35 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Tue, 12 Jun 2001 22:52:35 -0400 (EDT) Subject: [XML-SIG] How does one process HTML with the DOM support in PyXML? In-Reply-To: <01Jun12.193543pdt."3453"@watson.parc.xerox.com> References: <01Jun12.193543pdt."3453"@watson.parc.xerox.com> Message-ID: <15142.54643.184466.571607@cj42289-a.reston1.va.home.com> Bill Janssen writes: > I've been looking at the PyXML docs, to see how whether it could be > used to parse HTML files. There seems to be something interesting Bill, You don't say much about what you're interested in doing with the HTML, and whether you need to be able HTML "as deployed" or valid stuff. Also, what about XHTML? If HTML as deployed and XHTML are relevant, you may want to look at the HTMLParser module added to the standard library for Python 2.2. That can certainly be extracted from the CVS if it looks interesting. Basic documentation is available at: http://python.sourceforge.net/devel-docs/lib/module-HTMLParser.html It needs a little more high-level description, though! -Fred -- Fred L. Drake, Jr. PythonLabs at Digital Creations From janssen@parc.xerox.com Wed Jun 13 04:27:50 2001 From: janssen@parc.xerox.com (Bill Janssen) Date: Tue, 12 Jun 2001 20:27:50 PDT Subject: [XML-SIG] How does one process HTML with the DOM support in PyXML? In-Reply-To: Your message of "Tue, 12 Jun 2001 19:52:35 PDT." <15142.54643.184466.571607@cj42289-a.reston1.va.home.com> Message-ID: <01Jun12.202754pdt."3453"@watson.parc.xerox.com> Thanks, Fred. Well, it's "HTML as deployed" but also "Python as deployed", so I need something that's backward-compatible to 1.5.2, I think. It looks like DOM will give me some of that; I'm not sure how well it copes with 'loose' HTML, but so far it looks good. I'm looking for a faster (and cleaner) upgrade from sgmllib.SGMLParser. Bill From fdrake@acm.org Wed Jun 13 04:31:07 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Tue, 12 Jun 2001 23:31:07 -0400 (EDT) Subject: [XML-SIG] How does one process HTML with the DOM support in PyXML? In-Reply-To: <01Jun12.202754pdt."3453"@watson.parc.xerox.com> References: <15142.54643.184466.571607@cj42289-a.reston1.va.home.com> <01Jun12.202754pdt."3453"@watson.parc.xerox.com> Message-ID: <15142.56955.272944.45566@cj42289-a.reston1.va.home.com> Bill Janssen writes: > Well, it's "HTML as deployed" but also "Python as deployed", so I need > something that's backward-compatible to 1.5.2, I think. It looks like > DOM will give me some of that; I'm not sure how well it copes with > 'loose' HTML, but so far it looks good. You could certainly use HTMLParser to build a DOM builder, or write a SAX driver on top of it. Which makes sense depends on your application. > I'm looking for a faster (and cleaner) upgrade from sgmllib.SGMLParser. I think HTMLParser fits this bill nicely. -Fred -- Fred L. Drake, Jr. PythonLabs at Digital Creations From martin@loewis.home.cs.tu-berlin.de Wed Jun 13 07:13:40 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Wed, 13 Jun 2001 08:13:40 +0200 Subject: [XML-SIG] How does one process HTML with the DOM support in PyXML? In-Reply-To: <01Jun12.193543pdt."3453"@watson.parc.xerox.com> (message from Bill Janssen on Tue, 12 Jun 2001 19:35:34 PDT) References: <01Jun12.193543pdt."3453"@watson.parc.xerox.com> Message-ID: <200106130613.f5D6Ded01141@mira.informatik.hu-berlin.de> > I've been looking at the PyXML docs, to see how whether it could be > used to parse HTML files. There seems to be something interesting > under section 4.5 of xml-howto, entitled "Processing HTML". But the > contents of that chapter say only "Intro to HTML builder". Any > further tips elsewhere? I suggest to look demo/dom/dom_from_html.py. Building a DOM tree from an HTML document really isn't more than from xml.dom.ext.reader import HtmlLib from xml.dom import ext reader = HtmlLib.Reader() dom_object = reader.fromUri(fileName) Then you get all the DOM interfaces, including the ones defined only for HTML. Regards, Martin From DShriyash@pun.cognizant.com Wed Jun 13 07:31:29 2001 From: DShriyash@pun.cognizant.com (Shriyash, Divekar (CTS)) Date: Wed, 13 Jun 2001 12:01:29 +0530 Subject: [XML-SIG] UNSUBCRIBE Message-ID: <49532EE860A3D411812A00508B690B29FBC2EE@ctsinpunsxua> This is a multi-part message in MIME format. --------------InterScan_NT_MIME_Boundary Content-Type: text/plain; charset="iso-8859-1" -----Original Message----- From: Martin v. Loewis [mailto:martin@loewis.home.cs.tu-berlin.de] Sent: Wednesday, June 13, 2001 11:44 AM To: bill@janssen.org Cc: xml-sig@python.org Subject: Re: [XML-SIG] How does one process HTML with the DOM support in PyXML? > I've been looking at the PyXML docs, to see how whether it could be > used to parse HTML files. There seems to be something interesting > under section 4.5 of xml-howto, entitled "Processing HTML". But the > contents of that chapter say only "Intro to HTML builder". Any > further tips elsewhere? I suggest to look demo/dom/dom_from_html.py. Building a DOM tree from an HTML document really isn't more than from xml.dom.ext.reader import HtmlLib from xml.dom import ext reader = HtmlLib.Reader() dom_object = reader.fromUri(fileName) Then you get all the DOM interfaces, including the ones defined only for HTML. Regards, Martin _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig --------------InterScan_NT_MIME_Boundary Content-Type: text/plain; name="InterScan_Disclaimer.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="InterScan_Disclaimer.txt" This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com --------------InterScan_NT_MIME_Boundary-- From uche.ogbuji@fourthought.com Wed Jun 13 13:52:27 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Wed, 13 Jun 2001 06:52:27 -0600 Subject: [XML-SIG] How does one process HTML with the DOM support in PyXML? In-Reply-To: Message from Bill Janssen of "Tue, 12 Jun 2001 20:27:50 PDT." <01Jun12.202754pdt."3453"@watson.parc.xerox.com> Message-ID: <200106131252.f5DCqRi09834@localhost.local> > Well, it's "HTML as deployed" but also "Python as deployed", so I need > something that's backward-compatible to 1.5.2, I think. It looks like > DOM will give me some of that; I'm not sure how well it copes with > 'loose' HTML, but so far it looks good. > > I'm looking for a faster (and cleaner) upgrade from sgmllib.SGMLParser. Try the Sgmlop reader in 4DOM (comes with PyXML). It's works with Python 1.5.2 and abive, is fast, and does deal pretty leniently with broken HTML. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From dasha@hotmail.com Thu Jun 14 09:36:56 2001 From: dasha@hotmail.com (dasha@hotmail.com) Date: Thu, 14 Jun 2001 04:36:56 -0400 Subject: [XML-SIG] Help! Message-ID:

Ladies and gentlemen, If you have your own site you have to care about its promotion and advertising in the web. Newest methods of promotion enables millions of people to collect the information about your site. Besides, it`s really important to give the knowledge of your site to useful partners. Click Advertising Group www.CAG.com; developed a new technology of coaxing users into dissemination of information of your site. www.click.da.ru

 

From noreply@sourceforge.net Fri Jun 15 15:28:52 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Fri, 15 Jun 2001 07:28:52 -0700 Subject: [XML-SIG] [ pyxml-Bugs-433428 ] text mode in pDomlette.PickleDocument Message-ID: Bugs item #433428, was updated on 2001-06-15 07:28 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=433428&group_id=6473 Category: 4Suite Group: None Status: Open Resolution: None Priority: 5 Submitted By: alexander smishlajev (a1s) Assigned to: Nobody/Anonymous (nobody) Summary: text mode in pDomlette.PickleDocument Initial Comment: pickle uses readline() to read strings pickled in text mode. this means that strings pickled in text mode can not contain newlines. pDomlette.PickleDocument() on windows platform pickles in text mode producing broken pickled data. example of such broken data is value returned from FtServer.Core.Lib.SchematronStylesheet.GetSchematronInstance() which makes 4SuiteServer test Core\test_raw_file.py fail with traceback. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=433428&group_id=6473 From Achim.Gaedk@zpr.uni-koeln.de Sat Jun 16 15:12:06 2001 From: Achim.Gaedk@zpr.uni-koeln.de (Achim Gaedke) Date: Sat, 16 Jun 2001 16:12:06 +0200 Subject: [XML-SIG] Bug in expatreader module... Message-ID: <3B2B6936.6D8F72F1@zpr.uni-koeln.de> (This is the same topic as in comp.lang.python) Hello everybody! My intention is to write a recursive parser for nested data structures. In order to collect the data it is necessary to switch the contenthandler each step. This does NOT work for the character handler: This is my (lean) test program: import xml.sax.handler parser=3Dxml.sax.make_parser() class second_ch(xml.sax.handler.ContentHandler): def startElement(self,name,attrs): print "start second" def endElement(self,name): print "end second" def characters(self,content): print "second: ",content.strip() class first_ch(xml.sax.handler.ContentHandler): def startElement(self,name,attrs): print "start first" self.second=3Dsecond_ch() parser.setContentHandler(self.second) def endElement(self,name): print "end first" def characters(self,content): print "first: ",content.strip() first=3Dfirst_ch() parser.setContentHandler(first) parser.parse('members.xml') and this is the xml file members.xml: a1b1a2 more is not necessary. This is the output with python2.0 and expat-1.95.2 python2.0 xml_test.py start first first: a1 start second first: b1 end second first: a2 end second After the first line the second content handler should get the characters! The second test is with python2.1 and expat1_1: python2.1 xml_test.py start first first: a1 start second first: b1 end second first: a2 end second the result is the same. What a pity. In expat reference it is stated, that changing of handler is possible and expected. I am running Redhat Linux 7.1 with self built python interpreters. Ok, here is a workaround, I found in order to go on coding: Add the following line after each parser.setContenHandler(new_handler) for the missing functionality of parser.setContentHandler(): parser._parser.CharacterDataHandler=3Dnew_handler.characters This line is taken from xml.sax.expatreader.ExpatReader.reset() This does work after parser.reset() or after parser.parse(...) is called once (because parse() calls reset()). I think this error should be corrected somewhere else and not in my code, but I don't know where and I hope that I will address maintainers here, too. Please let me know when this bug is fixed. Yours Achim -- Achim Gaedke, ZPR Weyertal 80, 50931 K=F6ln Tel: +49 221 470 6021 From noreply@sourceforge.net Sat Jun 16 15:46:43 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Sat, 16 Jun 2001 07:46:43 -0700 Subject: [XML-SIG] [ pyxml-Bugs-433738 ] Bug with RDF sample Message-ID: Bugs item #433738, was updated on 2001-06-16 07:46 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=433738&group_id=6473 Category: 4Suite Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Bug with RDF sample Initial Comment: Hello I downloaded 4Suite v0.11.1b2 to use RDF in Python to specify a datamodel for a Web site. I tried the schema.py sample included in the distribution (for Python 2.1 on Windows 98) and I got the following Python error: Any clues ? Traceback (most recent call last): File "schema.py", line 55, in ? SchemaDemo() File "schema.py", line 26, in SchemaDemo serializer.deserialize(m, schemadoc, 'http://schema.spam.com') File "C:\Python21\Ft\Rdf\Serializers\Dom.py", line 239, in deserialize self.readObject(model, child, sourceUri) File "C:\Python21\Ft\Rdf\Serializers\Dom.py", line 247, in readObject return self.readDescription(model, node, sourceUri, impliedSubjects) File "C:\Python21\Ft\Rdf\Serializers\Dom.py", line 328, in readDescription ns = self.readPropertyElt(model, child, subjects, sourceUri) File "C:\Python21\Ft\Rdf\Serializers\Dom.py", line 507, in readPropertyElt model.add(stmt) File "C:\Python21\Ft\Rdf\Model.py", line 108, in add self._schemaHandler.checkConstraints(self, stmt) File "c:\python21\Ft\Rdf\SchemaHandler.py", line 301, in checkConstraints raise RdfsConstraintViolation (RdfsConstraintViolation.INVALID_RANGE_FOR_PROP ERTY, str(newStmt.object), str(newStmt.predicate)) Ft.Rdf.SchemaHandler.RdfsConstraintViolation: "http://s chema.spam.com/#Person" i s an invalid object for "http://www.w3.org/2000/01/rdf- schema#subClassOf" accord ing to range constraints. Thanks Best regards Joseph Canedo ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=433738&group_id=6473 From dieter@handshake.de Sat Jun 16 15:45:02 2001 From: dieter@handshake.de (Dieter Maurer) Date: Sat, 16 Jun 2001 16:45:02 +0200 (CEST) Subject: [XML-SIG] ANN: 4Suite and 4SuiteServer 0.11.1 beta 2 In-Reply-To: <503046431@toto.iv> Message-ID: <15147.28910.535383.225008@lindm.dm> Uche Ogbuji writes: > More fixes, more features, this is it before the 0.11.1 release, hopefully > Monday. Please help us test and exercise things. I updated my 4Suite CVS, built and installed and tried to run a book chapter. That's what I get: > lindm: 4xslt -o chap3a.html book.xml book.xsl > Traceback (most recent call last): > File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/Processor.py", line 157, in runUri > src = self._docReader.fromUri(uri, stripElements=self._getWsStripElements()) > File "/usr/local/lib/python2.1/site-packages/Ft/Lib/ReaderBase.py", line 76, in fromUri > rt = self.fromStream(stream, newBaseUri, ownerDoc, stripElements) > File "/usr/local/lib/python2.1/site-packages/Ft/Lib/pDomletteReader.py", line 184, in fromStream > expat.ErrorString(self.parser.ErrorCode)) > FtException: XML parse error at line 36, column 0: error in processing external entity reference > Source document (book.xml): XML parse error at line 36, column 0: error in processing external entity reference Apparently, pDomlette lost its ability to handle external entities. Dieter From fdrake@acm.org Sat Jun 16 16:57:56 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Sat, 16 Jun 2001 11:57:56 -0400 (EDT) Subject: [XML-SIG] Bug in expatreader module... In-Reply-To: <3B2B6936.6D8F72F1@zpr.uni-koeln.de> References: <3B2B6936.6D8F72F1@zpr.uni-koeln.de> Message-ID: <15147.33284.48889.815981@cj42289-a.reston1.va.home.com> Achim Gaedke writes: > Please let me know when this bug is fixed. If you file the bug using the PyXML project's bug tracker at SourceForge while logged in as a SourceForge user, you will be notified when action is taken on the bug: http://sourceforge.net/projects/pyxml/ -Fred -- Fred L. Drake, Jr. PythonLabs at Digital Creations From martin@loewis.home.cs.tu-berlin.de Sat Jun 16 17:18:51 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Sat, 16 Jun 2001 18:18:51 +0200 Subject: [XML-SIG] Bug in expatreader module... In-Reply-To: <3B2B6936.6D8F72F1@zpr.uni-koeln.de> (message from Achim Gaedke on Sat, 16 Jun 2001 16:12:06 +0200) References: <3B2B6936.6D8F72F1@zpr.uni-koeln.de> Message-ID: <200106161618.f5GGIpr03274@mira.informatik.hu-berlin.de> > I think this error should be corrected somewhere else and not in my > code, but I don't know where and I hope that I will address maintainers > here, too. The bug is in your code, not in the expatreader. After parsing has started, you must not call setContentHandler anymore. The behaviour is undefined if you do. Regards, Martin From noreply@sourceforge.net Sat Jun 16 17:28:12 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Sat, 16 Jun 2001 09:28:12 -0700 Subject: [XML-SIG] [ pyxml-Bugs-433761 ] setContentHandler broken Message-ID: Bugs item #433761, was updated on 2001-06-16 09:28 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=433761&group_id=6473 Category: SAX Group: None Status: Open Resolution: None Priority: 5 Submitted By: Achim Gaedke (achimgaedke) Assigned to: Nobody/Anonymous (nobody) Summary: setContentHandler broken Initial Comment: My intention is to write a recursive parser for nested data structures. In order to collect the data it is necessary to switch the contenthandler each step. This does NOT work for the character handler: This is my (lean) test program: import xml.sax.handler parser=xml.sax.make_parser() class second_ch(xml.sax.handler.ContentHandler): def startElement(self,name,attrs): print "start second" def endElement(self,name): print "end second" def characters(self,content): print "second: ",content.strip() class first_ch(xml.sax.handler.ContentHandler): def startElement(self,name,attrs): print "start first" self.second=second_ch() parser.setContentHandler(self.second) def endElement(self,name): print "end first" def characters(self,content): print "first: ",content.strip() first=first_ch() parser.setContentHandler(first) parser.parse('members.xml') and this is the xml file members.xml: a1b1a2 more is not necessary. This is the output with python2.0 and expat-1.95.2 python2.0 xml_test.py start first first: a1 start second first: b1 end second first: a2 end second After the first line the second content handler should get the characters! The second test is with python2.1 and expat1_1: python2.1 xml_test.py start first first: a1 start second first: b1 end second first: a2 end second the result is the same. What a pity. In expat reference it is stated, that changing of handler is possible and expected. I am running Redhat Linux 7.1 with self built python interpreters. Ok, here is a workaround, I found in order to go on coding: Add the following line after each parser.setContenHandler(new_handler) for the missing functionality of parser.setContentHandler(): parser._parser.CharacterDataHandler=new_handler.characters This line is taken from xml.sax.expatreader.ExpatReader.reset() This does work after parser.reset() or after parser.parse(...) is called once (because parse() calls reset()). I think this error should be corrected somewhere else and not in my code, but I don't know where. One of the lines in reset() are: self._parser.CharacterDataHandler = self._cont_handler.characters change to self._parser.CharacterDataHandler = self.character_data would help, but there is a note, that that should not happen?! Why? Yours! achim ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=433761&group_id=6473 From Achim.Gaedk@zpr.uni-koeln.de Sun Jun 17 02:42:28 2001 From: Achim.Gaedk@zpr.uni-koeln.de (Achim Gaedke) Date: Sun, 17 Jun 2001 03:42:28 +0200 Subject: [XML-SIG] Re: Bug in expatreader module... References: <3B2B6936.6D8F72F1@zpr.uni-koeln.de> Message-ID: <3B2C0B04.8ED2D47A@zpr.uni-koeln.de> >The bug is in your code, not in the expatreader. After parsing has >started, you must not call setContentHandler anymore. The behaviour is >undefined if you do. >Regards, >Martin This is a possible and valid answer, if you assume, that this type of programming does not make sense.... http://python.sourceforge.net/devel-docs/lib/xmlreader-objects.html states: setContentHandler(handler) Set the current ContentHandler. If no ContentHandler is set, conten= t events will be discarded. that means, that there are more than one content handler(i.e. the current= one) so this documentation does not say, that I must not call setContent= Handler again. Bye, Achim -- Achim Gaedke, ZPR Weyertal 80, 50931 K=F6ln Tel: +49 221 470 6021 From aivazis@caltech.edu Sun Jun 17 06:32:43 2001 From: aivazis@caltech.edu (Michael Aivazis) Date: Sat, 16 Jun 2001 22:32:43 -0700 Subject: [XML-SIG] Bug in expatreader module... References: <3B2B6936.6D8F72F1@zpr.uni-koeln.de> Message-ID: <3B2C40FB.77A89A9E@caltech.edu> Achim Gaedke wrote: > > (This is the same topic as in comp.lang.python) > > Hello everybody! > > My intention is to write a recursive parser for nested data structures. > In order to collect the data it is necessary to switch the > contenthandler each step. I ran into this problem some time ago. If I remember correctly, the actual problem appears to be that setContentHandler does not do all the work necessary to wire a new instance into the parsing loop. In particular, as you point out, it does not set the character handler correctly. However, this bug forced me to rethink my solution to my problem. As it turns out, it is possible to parse an XML file and construct a Composite - a nested data structure - without requiring more than one ContentHandler. If I understand your problem correctly, the need for more than one content handler is a consequence of the fact that you want to do tag-specific handling of the data, including making an object of the appropriate type and attaching it at the right spot in the nested data structure. Rather than changing the content handler, you can register a handler for each tag with a single content handler and let it dispatch to the tag handler to deal with the data in the tag. If this sounds remotely like what you are faced with, I can send you the code and an example. If anyone else on this list is interested in this problem, I would be more than happy to post all this. Regards, -- Michael Aivazis From fdrake@acm.org Sun Jun 17 07:12:50 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Sun, 17 Jun 2001 02:12:50 -0400 (EDT) Subject: [XML-SIG] Re: [ Pythonlabs ] UUNET DSL Installation (the new saga) In-Reply-To: References: <3B2B6936.6D8F72F1@zpr.uni-koeln.de> <3B2C0B04.8ED2D47A@zpr.uni-koeln.de> <200106161618.f5GGIpr03274@mira.informatik.hu-berlin.de> Message-ID: <15148.19042.73841.907067@cj42289-a.reston1.va.home.com> Martin v. Loewis writes: > The bug is in your code, not in the expatreader. After parsing has > started, you must not call setContentHandler anymore. The behaviour is > undefined if you do. Achim Gaedke writes: > setContentHandler(handler) > Set the current ContentHandler. If no ContentHandler is set, > content events will be discarded. > > that means, that there are more than one content handler(i.e. the > current one) so this documentation does not say, that I must not > call setContentHandler again. If we look at the Java SAX2 API documentation at www.megginson.com, it specifically allows handlers to be changed at any time; the new handler should replace the old one and the change should take place immediately. I think I should clarify the Python SAX documentation to correspond with the intended behavior of SAX2, and any implementation that does not conform to that expectation should be fixed so that it does. If there are no objections from the SIG, I'll make the documentation change this week, and try to squeeze in a test case for the SAX in the standard Python library. -Fred -- Fred L. Drake, Jr. PythonLabs at Digital Creations From martin@loewis.home.cs.tu-berlin.de Sun Jun 17 07:41:57 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Sun, 17 Jun 2001 08:41:57 +0200 Subject: [XML-SIG] Re: Bug in expatreader module... In-Reply-To: <3B2C0B04.8ED2D47A@zpr.uni-koeln.de> (message from Achim Gaedke on Sun, 17 Jun 2001 03:42:28 +0200) References: <3B2B6936.6D8F72F1@zpr.uni-koeln.de> <3B2C0B04.8ED2D47A@zpr.uni-koeln.de> Message-ID: <200106170641.f5H6fvS00870@mira.informatik.hu-berlin.de> > This is a possible and valid answer, if you assume, that this type of > programming does not make sense.... It's not a question whether this makes sense, but whether such programming had been anticipated. As you can see, it clearly had not been anticipated. > http://python.sourceforge.net/devel-docs/lib/xmlreader-objects.html > states: > > setContentHandler(handler) > Set the current ContentHandler. If no ContentHandler is set, content > events will be discarded. > > that means, that there are more than one content handler(i.e. the > current one) so this documentation does not say, that I must not > call setContentHandler again. So that would be a documentation error. However, I just checked the Java SAX documentation, at http://www.megginson.com/SAX/Java/javadoc/org/xml/sax/XMLReader.html#setContentHandler(org.xml.sax.ContentHandler) That says # Applications may register a new or different handler in the middle # of a parse, and the SAX parser must begin using the new handler # immediately. So I guess that your code ought to work, and that we should fix the expatreader. Regards, Martin From martin@loewis.home.cs.tu-berlin.de Sun Jun 17 07:44:05 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Sun, 17 Jun 2001 08:44:05 +0200 Subject: [XML-SIG] Re: [ Pythonlabs ] UUNET DSL Installation (the new saga) In-Reply-To: <15148.19042.73841.907067@cj42289-a.reston1.va.home.com> (fdrake@acm.org) References: <3B2B6936.6D8F72F1@zpr.uni-koeln.de> <3B2C0B04.8ED2D47A@zpr.uni-koeln.de> <200106161618.f5GGIpr03274@mira.informatik.hu-berlin.de> <15148.19042.73841.907067@cj42289-a.reston1.va.home.com> Message-ID: <200106170644.f5H6i5O00871@mira.informatik.hu-berlin.de> > If we look at the Java SAX2 API documentation at www.megginson.com, > it specifically allows handlers to be changed at any time; the new > handler should replace the old one and the change should take place > immediately. I think I should clarify the Python SAX documentation > to correspond with the intended behavior of SAX2, and any > implementation that does not conform to that expectation should be > fixed so that it does. > If there are no objections from the SIG, I'll make the documentation > change this week, and try to squeeze in a test case for the SAX in the > standard Python library. I agree, I'll try to come up with a patch to expatreader. Regards, Martin From martin@loewis.home.cs.tu-berlin.de Sun Jun 17 08:50:33 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Sun, 17 Jun 2001 09:50:33 +0200 Subject: [XML-SIG] Re: [ Pythonlabs ] UUNET DSL Installation (the new saga) In-Reply-To: <200106170644.f5H6i5O00871@mira.informatik.hu-berlin.de> (martin@loewis.home.cs.tu-berlin.de) References: <3B2B6936.6D8F72F1@zpr.uni-koeln.de> <3B2C0B04.8ED2D47A@zpr.uni-koeln.de> <200106161618.f5GGIpr03274@mira.informatik.hu-berlin.de> <15148.19042.73841.907067@cj42289-a.reston1.va.home.com> <200106170644.f5H6i5O00871@mira.informatik.hu-berlin.de> Message-ID: <200106170750.f5H7oXs01560@mira.informatik.hu-berlin.de> > I agree, I'll try to come up with a patch to expatreader. It is fixed now in both the Python and PyXML CVS. Regards, Martin From uche.ogbuji@fourthought.com Sun Jun 17 14:09:20 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sun, 17 Jun 2001 07:09:20 -0600 Subject: [4suite] Re: [XML-SIG] ANN: 4Suite and 4SuiteServer 0.11.1 beta 2 References: <15147.28910.535383.225008@lindm.dm> Message-ID: <3B2CAC00.70609@fourthought.com> Dieter Maurer wrote: > Uche Ogbuji writes: > > More fixes, more features, this is it before the 0.11.1 release, hopefully > > Monday. Please help us test and exercise things. > I updated my 4Suite CVS, built and installed and tried to run a book chapter. > That's what I get: > > >>lindm: 4xslt -o chap3a.html book.xml book.xsl >>Traceback (most recent call last): >> File "/usr/local/lib/python2.1/site-packages/_xmlplus/xslt/Processor.py", line 157, in runUri >> src = self._docReader.fromUri(uri, stripElements=self._getWsStripElements()) >> File "/usr/local/lib/python2.1/site-packages/Ft/Lib/ReaderBase.py", line 76, in fromUri >> rt = self.fromStream(stream, newBaseUri, ownerDoc, stripElements) >> File "/usr/local/lib/python2.1/site-packages/Ft/Lib/pDomletteReader.py", line 184, in fromStream >> expat.ErrorString(self.parser.ErrorCode)) >>FtException: XML parse error at line 36, column 0: error in processing external entity reference >>Source document (book.xml): XML parse error at line 36, column 0: error in processing external entity reference Thanks for the reminder, but I'm unable to reproduce this. Now I've had problems reproducing bugs triggered by nwalsh's stylesheets before until I did things just a certain way, so let me tell you just what I did so you can tell me where I took a wrong turn. I added a print to the pDomletteReader entityRef handler in order to trace things down: --- Lib/ReaderBase.py 2001/06/12 17:45:36 1.18 +++ Lib/ReaderBase.py 2001/06/17 13:06:23 @@ -334,6 +334,7 @@ _entity_stack= None def entityRef(self, context, base, sysid, pubid): + print "entityRef", context, base, sysid, pubid stream = self.resolveEntity(pubid, _combineSysid(base, sysid)) if self._entity_stack is None: self._entity_stack = [] Then I copied the book.xml you posted earlier to a directory. Then I created an empty chap3.xml file in the same directory. This is the result of running the nwalsh docbook html stylesheet (the "db" dir is the root directory of the 1.39 docbook stylesheets) $ 4xslt book.xml db/html/docbook.xsl entityRef ca /usr/local/lib/xslt/db/common/l10n.xml ca.xml None entityRef cs /usr/local/lib/xslt/db/common/l10n.xml cs.xml None entityRef da /usr/local/lib/xslt/db/common/l10n.xml da.xml None entityRef de /usr/local/lib/xslt/db/common/l10n.xml de.xml None entityRef el /usr/local/lib/xslt/db/common/l10n.xml el.xml None entityRef en /usr/local/lib/xslt/db/common/l10n.xml en.xml None entityRef es /usr/local/lib/xslt/db/common/l10n.xml es.xml None entityRef et /usr/local/lib/xslt/db/common/l10n.xml et.xml None entityRef fi /usr/local/lib/xslt/db/common/l10n.xml fi.xml None entityRef fr /usr/local/lib/xslt/db/common/l10n.xml fr.xml None entityRef hu /usr/local/lib/xslt/db/common/l10n.xml hu.xml None entityRef id /usr/local/lib/xslt/db/common/l10n.xml id.xml None entityRef it /usr/local/lib/xslt/db/common/l10n.xml it.xml None entityRef ja /usr/local/lib/xslt/db/common/l10n.xml ja.xml None entityRef ko /usr/local/lib/xslt/db/common/l10n.xml ko.xml None entityRef nl /usr/local/lib/xslt/db/common/l10n.xml nl.xml None entityRef no /usr/local/lib/xslt/db/common/l10n.xml no.xml None entityRef pl /usr/local/lib/xslt/db/common/l10n.xml pl.xml None entityRef pt /usr/local/lib/xslt/db/common/l10n.xml pt.xml None entityRef pt_br /usr/local/lib/xslt/db/common/l10n.xml pt_br.xml None entityRef ro /usr/local/lib/xslt/db/common/l10n.xml ro.xml None entityRef ru /usr/local/lib/xslt/db/common/l10n.xml ru.xml None entityRef sk /usr/local/lib/xslt/db/common/l10n.xml sk.xml None entityRef sl /usr/local/lib/xslt/db/common/l10n.xml sl.xml None entityRef sr /usr/local/lib/xslt/db/common/l10n.xml sr.xml None entityRef sv /usr/local/lib/xslt/db/common/l10n.xml sv.xml None entityRef zh_cn /usr/local/lib/xslt/db/common/l10n.xml zh_cn.xml None entityRef zh_tw /usr/local/lib/xslt/db/common/l10n.xml zh_tw.xml None Building Dynamic WebSites with Zope

Building Dynamic WebSites with Zope

Concepts, Components, Programming

Dieter Maurer

Permission to use, copy, modify and distribute under the terms of the Open Content License Version 1.0 is hereby granted.

Important

Note that this book is provided as is, without any warranty whatsoever, as specified by the Open Content License.


Table of Contents

1 Introduction
2 The project

Chapter 1. Introduction

...

Chapter 2. The project

...

$ -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From dieter@handshake.de Sun Jun 17 21:23:59 2001 From: dieter@handshake.de (Dieter Maurer) Date: Sun, 17 Jun 2001 22:23:59 +0200 (CEST) Subject: [4suite] Re: [XML-SIG] ANN: 4Suite and 4SuiteServer 0.11.1 beta 2 In-Reply-To: <3B2CAC00.70609@fourthought.com> References: <15147.28910.535383.225008@lindm.dm> <3B2CAC00.70609@fourthought.com> Message-ID: <15149.4575.430585.554863@lindm.dm> --eNIT2rXqug Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Dear Uche, Uche Ogbuji writes: > .... > Thanks for the reminder, but I'm unable to reproduce this. Now I've had problems reproducing > > bugs triggered by nwalsh's stylesheets before until I did things just a certain way, > > so let me tell you just what I did so you can tell me where I took a > wrong turn. Everything looks good! > I added a print to the pDomletteReader entityRef handler in order to > trace things down: > > --- Lib/ReaderBase.py 2001/06/12 17:45:36 1.18 > +++ Lib/ReaderBase.py 2001/06/17 13:06:23 > @@ -334,6 +334,7 @@ > > _entity_stack= None > def entityRef(self, context, base, sysid, pubid): > + print "entityRef", context, base, sysid, pubid > stream = self.resolveEntity(pubid, _combineSysid(base, sysid)) > > if self._entity_stack is None: self._entity_stack = [] I followed your lead... > Then I copied the book.xml you posted earlier to a directory. Then I > created an empty chap3.xml file in the same directory. > > This is the result of running the nwalsh docbook html stylesheet > > (the "db" dir is the root directory of the 1.39 docbook stylesheets) > > $ 4xslt book.xml db/html/docbook.xsl > entityRef ca /usr/local/lib/xslt/db/common/l10n.xml ca.xml None > ... > entityRef zh_tw /usr/local/lib/xslt/db/common/l10n.xml zh_tw.xml None Hm, you notice that the reference to "chap3" is not reported? But, I get similar results when "chap3.xml" is an empty file. For me, the "chap3" reference is listed. Apparently, the problem has to do with the content of "chap3.xml". I validated its content with "nsgmls", thus it is not the structure. I have had similar problems with 4suite 0.9. Then, I tracked the problem down to a weird (and very difficult to reproduce) bug in "xmlparse.c" in connection with CDATA sections. I have submitted the bug and patch to xml-sig a long time ago, but never heard anything about it. Maybe, the bug was not fixed. And indeed! I applied my patch to "xmlparse" and the problem went away. I attach the patch. Sorry for my impatience! Earlier, I have been unable to come up with a short test case to reproduce the "xmlparse" problem. I could provide the book sources, but it they are about 250 kB. Dieter --eNIT2rXqug Content-Type: application/octet-stream Content-Description: Patch for weird xmlparse problem that may occur in very rare cases in connection with external entities and CDATA sections Content-Disposition: attachment; filename="xmlparse.pat" Content-Transfer-Encoding: base64 LS0tIDp4bWxwYXJzZS5jCUZyaSBTZXAgMjQgMDQ6MTg6MzggMTk5OQorKysgeG1scGFyc2Uu YwlTYXQgRmViIDE3IDIyOjQ3OjMxIDIwMDEKQEAgLTMwMSw2ICszMDEsNyBAQAogICB2b2lk ICgqbV91bmtub3duRW5jb2RpbmdSZWxlYXNlKSh2b2lkICopOwogICBQUk9MT0dfU1RBVEUg bV9wcm9sb2dTdGF0ZTsKICAgUHJvY2Vzc29yICptX3Byb2Nlc3NvcjsKKyAgUHJvY2Vzc29y ICptX2JlZm9yZUNkYXRhUHJvY2Vzc29yOwogICBlbnVtIFhNTF9FcnJvciBtX2Vycm9yQ29k ZTsKICAgY29uc3QgY2hhciAqbV9ldmVudFB0cjsKICAgY29uc3QgY2hhciAqbV9ldmVudEVu ZFB0cjsKQEAgLTM2MCw2ICszNjEsNyBAQAogI2RlZmluZSBucyAoKChQYXJzZXIgKilwYXJz ZXIpLT5tX25zKQogI2RlZmluZSBwcm9sb2dTdGF0ZSAoKChQYXJzZXIgKilwYXJzZXIpLT5t X3Byb2xvZ1N0YXRlKQogI2RlZmluZSBwcm9jZXNzb3IgKCgoUGFyc2VyICopcGFyc2VyKS0+ bV9wcm9jZXNzb3IpCisjZGVmaW5lIGJlZm9yZUNkYXRhUHJvY2Vzc29yICgoKFBhcnNlciAq KXBhcnNlciktPm1fYmVmb3JlQ2RhdGFQcm9jZXNzb3IpCiAjZGVmaW5lIGVycm9yQ29kZSAo KChQYXJzZXIgKilwYXJzZXIpLT5tX2Vycm9yQ29kZSkKICNkZWZpbmUgZXZlbnRQdHIgKCgo UGFyc2VyICopcGFyc2VyKS0+bV9ldmVudFB0cikKICNkZWZpbmUgZXZlbnRFbmRQdHIgKCgo UGFyc2VyICopcGFyc2VyKS0+bV9ldmVudEVuZFB0cikKQEAgLTEzODQsNiArMTM4Niw5IEBA CiAgICAgY2FzZSBYTUxfVE9LX0NEQVRBX1NFQ1RfT1BFTjoKICAgICAgIHsKIAllbnVtIFhN TF9FcnJvciByZXN1bHQ7CisKKwliZWZvcmVDZGF0YVByb2Nlc3Nvcj0gcHJvY2Vzc29yOwor CiAJaWYgKHN0YXJ0Q2RhdGFTZWN0aW9uSGFuZGxlcikKICAgCSAgc3RhcnRDZGF0YVNlY3Rp b25IYW5kbGVyKGhhbmRsZXJBcmcpOwogI2lmIDAKQEAgLTE3MzEsOCArMTczNiw4IEBACiB7 CiAgIGVudW0gWE1MX0Vycm9yIHJlc3VsdCA9IGRvQ2RhdGFTZWN0aW9uKHBhcnNlciwgZW5j b2RpbmcsICZzdGFydCwgZW5kLCBlbmRQdHIpOwogICBpZiAoc3RhcnQpIHsKLSAgICBwcm9j ZXNzb3IgPSBjb250ZW50UHJvY2Vzc29yOwotICAgIHJldHVybiBjb250ZW50UHJvY2Vzc29y KHBhcnNlciwgc3RhcnQsIGVuZCwgZW5kUHRyKTsKKyAgICAvKiBwcm9jZXNzb3IgPSBjb250 ZW50UHJvY2Vzc29yOyAqLworICAgIHJldHVybiBwcm9jZXNzb3IocGFyc2VyLCBzdGFydCwg ZW5kLCBlbmRQdHIpOwogICB9CiAgIHJldHVybiByZXN1bHQ7CiB9CkBAIC0xNzY3LDYgKzE3 NzIsOSBAQAogICAgICpldmVudEVuZFBQID0gbmV4dDsKICAgICBzd2l0Y2ggKHRvaykgewog ICAgIGNhc2UgWE1MX1RPS19DREFUQV9TRUNUX0NMT1NFOgorCisgICAgICBwcm9jZXNzb3I9 IGJlZm9yZUNkYXRhUHJvY2Vzc29yOworCiAgICAgICBpZiAoZW5kQ2RhdGFTZWN0aW9uSGFu ZGxlcikKIAllbmRDZGF0YVNlY3Rpb25IYW5kbGVyKGhhbmRsZXJBcmcpOwogI2lmIDAK --eNIT2rXqug-- From uche.ogbuji@fourthought.com Mon Jun 18 00:01:00 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sun, 17 Jun 2001 17:01:00 -0600 Subject: [4suite] Re: [XML-SIG] ANN: 4Suite and 4SuiteServer 0.11.1 beta 2 References: <15147.28910.535383.225008@lindm.dm> <3B2CAC00.70609@fourthought.com> <15149.4575.430585.554863@lindm.dm> Message-ID: <3B2D36AC.6040004@fourthought.com> Dieter Maurer wrote: > > > > $ 4xslt book.xml db/html/docbook.xsl > > entityRef ca /usr/local/lib/xslt/db/common/l10n.xml ca.xml None > > ... > > entityRef zh_tw /usr/local/lib/xslt/db/common/l10n.xml zh_tw.xml None > Hm, you notice that the reference to "chap3" is not reported? > > But, I get similar results when "chap3.xml" is an empty file. > For me, the "chap3" reference is listed. Actually, it's listed for me as well. I had other print statements in there and tried to be clever cuttin ghtme out, and I also cut out the "chap3.xml" listing. So it looks like we're seeing the same thing. > Apparently, the problem has to do with the content of "chap3.xml". > I validated its content with "nsgmls", thus it is not the structure. > > I have had similar problems with 4suite 0.9. Then, I tracked > the problem down to a weird (and very difficult to reproduce) > bug in "xmlparse.c" in connection with CDATA sections. > I have submitted the bug and patch to xml-sig a long time > ago, but never heard anything about it. > Maybe, the bug was not fixed. > > > And indeed! I applied my patch to "xmlparse" and the problem > went away. I attach the patch. Hmm. This looks like a bug in expat itself, which may be why it was not picked up by the local SIGgers. For instance, this same bug would need to be fixed in Python's expat extension, and Perl's XML::Parse, etc. However, I think Fred Drake is a core expat developer. What do you think, Fred? I can apply this patch and check it into PyXML, but I don't know enough about expat's test suite (if any) to be able to make sure it doesn't break anything else (thought from my reading, I can't see that it would break anything else). > Sorry for my impatience! Not at all. As usual, your bug reports are of huge value. Keep on writing those king-sized books! ;-) -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From martin@loewis.home.cs.tu-berlin.de Mon Jun 18 02:05:24 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Mon, 18 Jun 2001 03:05:24 +0200 Subject: [4suite] Re: [XML-SIG] ANN: 4Suite and 4SuiteServer 0.11.1 beta 2 In-Reply-To: <3B2D36AC.6040004@fourthought.com> (message from Uche Ogbuji on Sun, 17 Jun 2001 17:01:00 -0600) References: <15147.28910.535383.225008@lindm.dm> <3B2CAC00.70609@fourthought.com> <15149.4575.430585.554863@lindm.dm> <3B2D36AC.6040004@fourthought.com> Message-ID: <200106180105.f5I15ON00847@mira.informatik.hu-berlin.de> >> I have submitted the bug and patch to xml-sig a long time >> ago, but never heard anything about it. >> Maybe, the bug was not fixed. > Hmm. This looks like a bug in expat itself, which may be why it was > not picked up by the local SIGgers. For instance, this same bug > would need to be fixed in Python's expat extension, and Perl's > XML::Parse, etc. [...] > I can apply this patch and check it into PyXML I think at a minimum, the patch should should be contributed to http://sourceforge.net/projects/expat or else it will get lost again. From a shallow look, it seems ok to me as well, so I wouldn't mind getting it installed in PyXML. For the record, I don't recall seeing Dieter's patch on the xml-sig list; anything that ought to get attention should be submitted to SF. Regards, Martin From walter@livinglogic.de Mon Jun 18 13:15:48 2001 From: walter@livinglogic.de (Walter =?iso-8859-1?Q?D=F6rwald?=) Date: Mon, 18 Jun 2001 14:15:48 +0200 Subject: [XML-SIG] ANN: XIST 1.0 Message-ID: <3B2DF0F4.5C3DD0F7@livinglogic.de> XIST 1.0 has been released! What is it? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D XIST is an XML based extensible HTML generator written in Python. XIST is also a DOM parser (built on top of SAX2) with a very simple and pythonesque tree API. Every XML element type corresponds to a Python class and these Python classes provide a conversion method to transform the XML tree (e.g. into HTML). XIST can be considered "object oriented XSL". Some of the significant features of XIST include: * Easily extensible with new XML elements, * Can be used for offline or online page generation, * Allows embedding Python code in XML files, * Supports separation of layout and logic, * Can be used together with mod_python, PyWX or Webware to generate dynamic pages, * Fully supports Unicode, * Provides features to use XIST together with JSP/struts, * Simplifies handling of deeply nested directory trees, * Automatically generates HEIGHT and WIDTH attributes for images. XIST was written as a replacement for the HTML preprocessor HSC, and borrows some features and ideas from it. It also borrows the basic ideas (XML/HTML elements as Python objects) from HTMLgen and HyperText. What's new in version 1.0? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D A lot! * New module for WML 1.3. * There is now a tool dtd2xsc.py in the scripts directory that creates a skeleton XIST module from a DTD (this requires xmlproc from the PyXML package). * New preliminary module for DocBook 4.12. (Incomplete: convert methods and Unicode character entities are missing; any volunteers for implementing 375 classes?) * New module ruby.py that implements the W3C Ruby draft. * New namespace modules ns/jsp.py and ns/struts_html.py have been added that allow you to use JSP and Struts tags with XIST. * A new method asText was added, that returns the node as a formatted plain ASCII text (this requires that w3m is installed.) * sql.py has been removed from XIST, but is available as a separate module. * All the asHTML methods now have an additional argument converter. This makes it possible to implement different processing modes or stages for new elements. All currently implemented elements and entities ignore this argument, but pass it on in the call to their childrens' asHTML method. As the name asHTML no longer makes sense, asHTML has been renamed to convert. * The parsing interface has been changed. Parsing is now done with the functions parseFile, parseString, parseURL and parseTidyURL in the module parsers. It's now possible to specify which parser should be used for parsing by passing a SAX2 parser instance to any of these functions. XIST now includes a rudimentary SAX2 driver for sgmlop and a rudimentary HTML parser that emits SAX2 events. * The python-quotes example has been updated to work with expat. * Added a new example: media. * The publishing interface has changed internally and publishing should be faster now. * Publishers now support a new parameter: usePrefix, which specifies if namespace prefixes should be output for the element names. * Part of the implementation of the publishing stuff has been moved to C, so now you'll need a C compiler to install XIST. * When publishing ", it will now only be replaced with " inside attributes. * All abbreviation entities have been moved to a new module abbr.py. * All the modules that provide new elements and entitites have been moved to a subpackage ns. * Frag and Element now have new methods sorted, reversed, filtered and shuffled that return sorted, reversed, filtered and shuffled versions of the Frag/Element object. * make.py has been renamed to xscmake.py and moved to the scripts directory, it will be installed as a callable script with python setup.py install_scripts. * xscmake.py has a new option --files/-f. The argument is a file containing a list of filenames (one name per line) that should be converted. * xscmake.py has a new option -r/--parser for specifying which parser to use. Allowed values are sgmlop and expat. * xscmake.py has a new option -n/--namespace that can be used for appending Namespace objects to the Namespaces object used by xscmake.py. xscmake.py -n html -n spam eggs.xsc With this call the parser will find element classes from the module with the prefix name spam before those from html and those before anything else. * xist.url.URL no longer has an attribute ext. file and ext are merged. * The special treatment of sequences as constructor arguments to Frag and Element has be removed, so XIST will no longer remove one level of nesting. If you still want that, use a * argument. * Frag and Element now have a new method mapped, that recursively maps the nodes through a function. This is like convert but via an external function. * Attribute handling has been improved thanks to a suggestion by Hartmut Goebel: Element.__getitem__ now always works as long as the attribute name is legal. If the attribute is not set, an empty attribute will be returned. All empty attributes will be considered as being not set and so hasAttr returns 0 for them, and publish doesn't publish them. This simplifies several very common cases: 1. Copying an attribute from one element to another works regardless of whether the attribute is set or not; 2. Testing for an attributes presence can now be done much simpler: if element["attrname"] instead of if element.hasAttr ("attrname") (which still works, and should be a little faster); 3. When you construct a DOM tree and the presence or absence of an attribute is tied to a condition, you can construct the attribute in advance and use it afterwards in the tree construction: if condition: align =3D "right" else: align =3D None node =3D html.div("spam", align=3Dalign) So, when the condition is false, the node will not have the attribute align set. * xist.ns.cond.If (and xist.ns.cond.ElIf) can now be used to test for attributes of the converter. I.e. it's possible to write the following XML: Title =DCberschrift * URL handling has be completely changed and is much, much simpler now. There are no more path markers. To specify an URL that is relative to the current directory use the scheme root (e.g. root: main.css). Where can I get it? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D XIST can be downloaded from ftp://titan.bnbt.de/pub/livinglogic/xist/ Web pages are at http://www.livinglogic.de/Python/xist/ Bye, Walter D=F6rwald From noreply@sourceforge.net Mon Jun 18 13:48:46 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 18 Jun 2001 05:48:46 -0700 Subject: [XML-SIG] [ pyxml-Bugs-434153 ] CommandLineApp with invalid options Message-ID: Bugs item #434153, was updated on 2001-06-18 05:48 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=434153&group_id=6473 Category: 4Suite Group: None Status: Open Resolution: None Priority: 5 Submitted By: alexander smishlajev (a1s) Assigned to: Nobody/Anonymous (nobody) Summary: CommandLineApp with invalid options Initial Comment: running 4Suite (or 4SuiteServer) command-line script with invalid option produces traceback like this: >4rdf --foo=bar Traceback (most recent call last): File "", line 1, in ? File "Ft\Lib\CommandLine\CommandLineApp.py", line 85, in run cmd = self.parse_command_line() File "Ft\Lib\CommandLine\CommandLineApp.py", line 106, in parse_command_line raise SystemExit(help + '\n' + msg.args[1]) TypeError: __add__ nor __radd__ defined for these operands note: msg.args[1] is getopt.GetoptError instance, not a string. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=434153&group_id=6473 From Alexandre.Fayolle@logilab.fr Mon Jun 18 19:30:57 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Mon, 18 Jun 2001 20:30:57 +0200 (CEST) Subject: [XML-SIG] Debian package of PyXML Message-ID: Hello, Does anyone know what is in the python-xml 0.6.5-2 debian package currently available in the unstable distribution ? It looks like the packaged code is posterior to PyXML-0.6.5.tar.gz, at least from one bug report I received about Narval (which seem to show that in this package, a 4DOM Document's ownerDocument is None and not self as in 0.6.5) If someone here could confirm this, it would greatly ease my bug hunt. Cheers. Alexandre Fayolle -- http://www.logilab.com Narval is the first software agent available as free software (GPL). LOGILAB, Paris (France). From msanborn@Adobe.COM Mon Jun 18 20:48:59 2001 From: msanborn@Adobe.COM (Michael Sanborn) Date: Mon, 18 Jun 2001 12:48:59 -0700 Subject: [XML-SIG] PyXML for MacOS 9 Message-ID: <4.3.2.7.2.20010618124740.02251b68@mailsj-v1> Is there a way to get PyXML working on MacOS 9? For instance, is there a binary available somewhere? Thanks, Michael Sanborn From jerome.marant@free.fr Mon Jun 18 21:50:59 2001 From: jerome.marant@free.fr (=?ISO-8859-1?Q?J=E9r=F4me_Marant?=) Date: Mon, 18 Jun 2001 22:50:59 +0200 (MEST) Subject: [XML-SIG] Debian package of PyXML In-Reply-To: References: Message-ID: <992897459.3b2e69b3c081f@imp.free.fr> En rйponse а Alexandre Fayolle : > Hello, > > Does anyone know what is in the python-xml 0.6.5-2 debian package > currently available in the unstable distribution ? It looks like the > packaged code is posterior to PyXML-0.6.5.tar.gz, at least from one > bug > report I received about Narval (which seem to show that in this package, > a > 4DOM Document's ownerDocument is None and not self as in 0.6.5) > > If someone here could confirm this, it would greatly ease my bug hunt. Hi ! I'm responsible for the debian package. I'm always using the stable release of a PyXML tarball and I never used a CVS version. The only difference is the tarball whose filename is renamed like this: mv PyXML-.tar.gz python-xml-.orig.tar.gz So, I do not change the md5 sum. I downloaded PyXML-0.6.5.tar.gz and I got the following: chambord:~$ md5sum PyXML-0.6.5.tar.gz 366c2405b1427f7997b2bd25a00ecbfe PyXML-0.6.5.tar.gz chambord:~$ md5sum python-xml_0.6.5.orig.tar.gz 366c2405b1427f7997b2bd25a00ecbfe python-xml_0.6.5.orig.tar.gz So, you can see that those files are identical. Cheers, From Alexandre.Fayolle@logilab.fr Tue Jun 19 08:15:11 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Tue, 19 Jun 2001 09:15:11 +0200 (CEST) Subject: [XML-SIG] Debian package of PyXML In-Reply-To: <992897459.3b2e69b3c081f@imp.free.fr> Message-ID: On Mon, 18 Jun 2001, Jйrфme Marant wrote: > Hi ! > > I'm responsible for the debian package. I'm always using the stable > release of a PyXML tarball and I never used a CVS version. The only Well, OK. I was hoping this was the problem. I'll dig further into this. Thanks for the quick answer (and thanks for maintaining the debian package) Alexandre Fayolle -- http://www.logilab.com Narval is the first software agent available as free software (GPL). LOGILAB, Paris (France). From Alexandre.Fayolle@logilab.fr Tue Jun 19 17:45:55 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Tue, 19 Jun 2001 18:45:55 +0200 (CEST) Subject: [XML-SIG] Re: Narval 1.0 and Python 2.1 In-Reply-To: <3B0D27B1.FDFAFDAD@fourthought.com> Message-ID: Hey, Uche, do you remember the bug you ran into while trying out Narval with a fresh-out-of cvs version of pyxml : On Thu, 24 May 2001, Uche Ogbuji wrote: > OK. Now Engine works, but I get the following running Horn: > > Traceback (most recent call last): > File "/home/uogbuji/lib/narval/narval/Horn.py", line 32, in ? > from gui.PreferencesManager import HORN_PREFERENCES_MANAGER > File "/home/uogbuji/lib/narval/narval/gui/PreferencesManager.py", line > 356, in ? > 'data/horn_preferences.xml'))) > File "/home/uogbuji/lib/narval/narval/gui/PreferencesManager.py", line > 45, in __init__ > > self.tree=read_domtree_from_file(filename,validate=1,catName=cat_path) > File "/home/uogbuji/lib/narval/narval/lib.py", line 221, in > read_domtree_from_file > d = StripXml(fragment) > File > "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/__init__.py", > line 148, in StripXml > snit = startNode.ownerDocument.createNodeIterator(startNode, > NodeFilter.SHOW_TEXT, None, 0) > AttributeError: 'None' object has no attribute 'createNodeIterator' I have someone here, running into exactly the same bug, and I really can't figure out why, especially since he's using pyxml 0.6.5 (and not the cvs version). I had thought at first that someone had changed a Document's ownerDocument to be None to match the W3C spec, and you had agreed and fixed StripXml to match this. I have checked out the pyxml cvs and it looks like this is not true. in Document.py, if find def _get_ownerDocument(self): return self I'm totally unable to reproduce this behaviour on any of our machines (getting a 4DOM Document with None as the ownerDocument). Is there anyone here with an idea on what's going on ? TIA Alexandre Fayolle -- http://www.logilab.com Narval is the first software agent available as free software (GPL). LOGILAB, Paris (France). From noreply@sourceforge.net Wed Jun 20 16:40:31 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 20 Jun 2001 08:40:31 -0700 Subject: [XML-SIG] [ pyxml-Bugs-434828 ] 0.11.1b2 : pDomlette reader bug Message-ID: Bugs item #434828, was updated on 2001-06-20 08:40 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=434828&group_id=6473 Category: 4Suite Group: None Status: Open Resolution: None Priority: 5 Submitted By: Alexandre Fayolle (afayolle) Assigned to: Nobody/Anonymous (nobody) Summary: 0.11.1b2 : pDomlette reader bug Initial Comment: I get a very strange behaviour when trying to use PyExpatReader: Python 1.5.2 (#1, Dec 21 2000, 15:29:08) [GCC egcs-2.91.66 19990314/Linux (egcs - on linux-i386 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> from Ft.Lib.pDomletteReader import PyExpatReader >>> r = PyExpatReader() >>> d = r.fromString('') Traceback (innermost last): File "", line 1, in ? File "/home/alf/lib/python/Ft/Lib/ReaderBase.py", line 67, in fromString rt = self.fromStream(stream, refUri, ownerDoc, stripElements) File "/home/alf/lib/python/Ft/Lib/pDomletteReader.py", line 175, in fromStream self.parser.ParseFile(stream) File "/home/alf/lib/python/Ft/Lib/pDomletteReader.py", line 94, in startElement include_depth = self._handleIncludes(name, qname, nsattribs) File "/home/alf/lib/python/Ft/Lib/ReaderBase.py", line 159, in _handleIncludes from Ft.Lib.XInclude import XINCLUDE_NAMESPACE, XIncludeException File "/home/alf/lib/python/Ft/Lib/XInclude.py", line 17, in ? from Ft import XPointer File "/home/alf/lib/python/Ft/XPointer/__init__.py", line 13, in ? g_readerClass = pDomlette.PyExpatReader AttributeError: PyExpatReader I've looked at the source straight in the eyes, and I cannot imagine how I can get Ft.Lib.pDomlette.PyExpatReader Now, if I tweak things a little and import pDomlette first, then things work fine : >>> from Ft.Lib import pDomlette >>> from Ft.Lib.pDomletteReader import PyExpatReader >>> r = PyExpatReader() >>> d = r.fromString('') >>> There are many places where this problem can occur, most of them are related to the BETA_DOMLETTE environment variable. Cheers. Alexandre Fayolle ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=434828&group_id=6473 From noreply@sourceforge.net Wed Jun 20 16:49:44 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 20 Jun 2001 08:49:44 -0700 Subject: [XML-SIG] [ pyxml-Bugs-434835 ] 0.11.1b2 : pDomlette Document problem Message-ID: Bugs item #434835, was updated on 2001-06-20 08:49 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=434835&group_id=6473 Category: 4Suite Group: None Status: Open Resolution: None Priority: 5 Submitted By: Alexandre Fayolle (afayolle) Assigned to: Nobody/Anonymous (nobody) Summary: 0.11.1b2 : pDomlette Document problem Initial Comment: a pDomlette document has None as the ownerDocument. This makes it impossible to use with code that expects 4DOM like Documents (which has self as the ownerDocument), in pyXML 0.6.5. >>> from Ft.Lib import pDomlette >>> from Ft.Lib.pDomletteReader import PyExpatReader >>> r = PyExpatReader() >>> d = r.fromString('') >>> d >>> d.ownerDocument >>> from xml.dom.ext import StripXml >>> StripXml(d) Traceback (innermost last): File "", line 1, in ? File "/home/alf/lib/python/xml/dom/ext/__init__.py", line 148, in StripXml snit = startNode.ownerDocument.createNodeIterator(startNode, NodeFilter.SHOW_TEXT, None, 0) AttributeError: 'None' object has no attribute 'createNodeIterator' The version of PyXML in CVS fixes this, however, it is not yet released. I feel that either * release of 0.11.1 should be delayed until a suitable version of PyXML is available * pDomlette (and possibly cDomlette) should be made backward compatible with 4DOM in this regard, at least until pyxml 0.6.6 (0.7 ?) is released. Please note that I think this difference in behaviour highly confusing when working with the different DOM implementations available with python. the Document.ownerDocument being equal to self is a very nice extension to the spec, and I'm personnally in favor of keeping it. Cheers Alexandre Fayolle ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=434835&group_id=6473 From noreply@sourceforge.net Wed Jun 20 18:45:53 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 20 Jun 2001 10:45:53 -0700 Subject: [XML-SIG] [ pyxml-Patches-434857 ] compatability with non-threading python Message-ID: Patches item #434857, was updated on 2001-06-20 10:45 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=434857&group_id=6473 Category: 4Suite Group: None Status: Open Resolution: None Priority: 5 Submitted By: Samuel Brauer (sbrauer) Assigned to: Nobody/Anonymous (nobody) Summary: compatability with non-threading python Initial Comment: I recently had to use a version of Python without thread support and found that various PyXML/4Suite modules would not work because they assume threading is enabled. I was able to isolate all of the places in the code that prevented my application from working, but there may be other places where threading is assumed that I missed. One file that I know of is Ft/Ods/Database.py. I skipped this file because I haven't used it and the threading code in it looks more involved than the code in the files I patched. By the way, these patches are against PyXML-0.6.5 and 4Suite-0.11.0. The changes I made should have no affect on users of thread-enabled Python. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=434857&group_id=6473 From DKGunter@lbl.gov Wed Jun 20 19:24:42 2001 From: DKGunter@lbl.gov (Dan Gunter) Date: Wed, 20 Jun 2001 11:24:42 -0700 Subject: [XML-SIG] XML code documentation? Message-ID: <3B30EA6A.8767EDC5@lbl.gov> Is anyone aware of software which can produce XML documentation from python source code? I know about HappyDoc, but I would be happier still with something that could be easily extended to process Javadoc-style "@param Name Comment" markup in the docstrings, or better yet which already had this facility. Thanks in advance for any help, - Dan -- # # Dan Gunter # http://www-didc.lbl.gov/~dang/ # From noreply@sourceforge.net Wed Jun 20 22:19:16 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 20 Jun 2001 14:19:16 -0700 Subject: [XML-SIG] [ pyxml-Patches-434932 ] Allow excess whitespace in XML marshals Message-ID: Patches item #434932, was updated on 2001-06-20 14:19 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=434932&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: A.M. Kuchling (akuchling) Assigned to: Nobody/Anonymous (nobody) Summary: Allow excess whitespace in XML marshals Initial Comment: If you pretty print a marshalled XML file, xml.marshal.generic breaks because it expects to get no characters outside of certain elements. This patch causes all unexpected characters to be dropped; it could be made stricter by checking that if accumulate_chars == 1, the data being passed to characters() is all whitespace. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=434932&group_id=6473 From Alexandre.Fayolle@logilab.fr Thu Jun 21 08:16:30 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Thu, 21 Jun 2001 09:16:30 +0200 (CEST) Subject: [XML-SIG] Re: Narval 1.0 and Python 2.1 In-Reply-To: <3B30EB80.AE79DB14@FourThought.com> Message-ID: On Wed, 20 Jun 2001, Mike Olson wrote: > Alexandre Fayolle wrote: > > > > Hey, Uche, do you remember the bug you ran into while trying out Narval > > with a fresh-out-of cvs version of pyxml : > > Are you sure it is a 4DOM node? pDomlette just changed so that its > ownerDocument is None. Well, I *was* sure it was a 4DOM node in that case. It turned out the DOM abstraction layer in Narval was broken somehow broken and in this very case the used DOM is pDomlette. The bug occurs in other places where a pDomlette is expected and it is not possible to StripXml an element because 0.11.1b2 is not compatible with PyXML 0.6.5 in this regard. I have filed in bug #434835 on this issue. I think that 0.11.1 being incompatible with PyXML 0.6.5 is not a Good Thing, since it gets end users very confused. We cannot request that they should use an unreleased version of PyXML (which has fixes in xml.dom.ext for this). Could you consider rolling back this change until the next release of PyXML ? Alexandre Fayolle -- http://www.logilab.com Narval is the first software agent available as free software (GPL). LOGILAB, Paris (France). From implast Mon Jun 18 22:02:20 2001 From: implast (implast) Date: Tue, 19 Jun 2001 00:02:20 +0300 Subject: [XML-SIG] =?koi8-r?B?TW9uZXlSLi4uIChPcHBvcnR1bml0eSBvZiBlYXJuaW5ncykgKPfP2s3P1s7P?= =?koi8-r?B?09gg2sHSwcLP1MvBISk=?= Message-ID: <18450717161.20010619000220@neti.ee> Hello, Thank you for giving attention to this message. The work is connected with processing and sending of electronic mail. You can make up your own flexible schedule (we offer full-time and part-time job). You can work at any time, which is convenient for you, at home or at office. For the work you need the computer connected to the Internet with the functions of sending the electronic messages. You will earn from $ 900 up to $ 4.000 working for 7-14 hours per week. The income will make more than $ 9.000 if you work 30 and more hours per week in the Internet monthly. Everything depends on your diligence and desire. To receive the further instructions write to the following e-mail address: implast@neti.ee. In the column Subject write "Report". In the message write: " I’d like to get the further instructions” and do not forget to write your e-mail. The detailed information will be sent to you, and all the questions will be answered. P.S. This letter is not a spam. If you are not interested in it, simply remove and forget about it, it will not be sent to you again. If this letter has caused you any inconveniences, accept my deep apologies!!! I wish you success! (Cyrillic KOI8-R) вМБЗПДБТА чБУ ЪБ ФП, ЮФП чЩ ХДЕМЙМЙ ЧОЙНБОЙЕ ЬФПНХ УППВЭЕОЙА. чБН РТЕДМБЗБЕФУС ТБВПФБ РП УЧПВПДОПНХ ЗТБЖЙЛХ (РПМОБС ЙМЙ ЮБУФЙЮОБС ЪБОСФПУФШ), УЧСЪБООБС У ПВТБВПФЛПК Й ПФРТБЧЛПК ЬМЕЛФТПООПК РПЮФЩ. чЩ НПЦЕФЕ ТБВПФБФШ Ч МАВПЕ ХДПВОПЕ ДМС чБУ ЧТЕНС ДПНБ ЙМЙ Ч ПЖЙУЕ. дМС ТБВПФЩ чБН ОЕПВИПДЙН рл, ДПУФХР Ч йОФЕТОЕФ У ЖХОЛГЙСНЙ ПФРТБЧЛЙ ЬМЕЛФТПООЩИ УППВЭЕОЙК. рТПЧПДС ЪБ ЛПНРШАФЕТПН 7-14 ЮБУПЧ Ч ОЕДЕМА, чЩ ВХДЕФЕ ЪБТБВБФЩЧБФШ ПФ $900 ДП $4.000. тБВПФБС 30 Й ВПМШЫЕ ЮБУПЧ Ч ОЕДЕМА Ч йОФЕТОЕФЕ чБЫ ЕЦЕНЕУСЮОЩК ДПИПД УПУФБЧЙФ ВПМЕЕ $9.000. зМБЧОПЕ - ЧУЈ ЪБЧЙУЙФ ПФ чБЫЕЗП ФТХДПМАВЙС Й ЦЕМБОЙС. дМС РПМХЮЕОЙС ДБМШОЕКЫЙИ ЙОУФТХЛГЙК ОБРЙЫЙФЕ НОЕ РП БДТЕУХ: implast@neti.ee . ч ЗТБЖЕ фЕНБ ХЛБЦЙФЕ Report. ч УППВЭЕОЙЙ ОБРЙЫЙФЕ: "рТПЫХ ЧЩУМБФШ ДБМШОЕКЫЙЕ ЙОУФТХЛГЙЙ Й ОЕ ЪБВХДШФЕ ХЛБЪБФШ УЧПК Email. чБН ВХДЕФ ЧЩУМБОБ ЧУС РПДТПВОБС ЙОЖПТНБГЙС, ВХДХФ ДБОЩ ЙУЮЕТРЩЧБАЭЙЕ ПФЧЕФЩ ОБ ЧУЕ ЙОФЕТЕУХАЭЙЕ чБУ ЧПРТПУЩ. P.S. ьФП РЙУШНП ОЕ ЕУФШ ОБЗМЩК Й ОБДПЕДМЙЧЩК УРБН. еУМЙ чБУ ЬФП РТЕДМПЦЕОЙЕ ОЕ ЪБЙОФЕТЕУПЧБМП, ФП РТПУФП ХДБМЙФЕ Й ЪБВХДФЕ П ОЕН, ВПМШЫЕ ПОП Л чБН ОЕ РТЙКДЕФ. еУМЙ ЬФП РЙУШНП РТЙЮЙОЙМП чБН ЛБЛЙЕ МЙВП ОЕХДПВУФЧБ, ФП РТЙНЙФЕ НПЙ ЗМХВПЛЙЕ ЙЪЧЙОЕОЙС!!! впмшыйи чбн хуреипч!!! -- Best regards, Aleksei K. mailto:implast@neti.ee From martin@loewis.home.cs.tu-berlin.de Thu Jun 21 08:45:53 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Thu, 21 Jun 2001 09:45:53 +0200 Subject: [XML-SIG] Re: Narval 1.0 and Python 2.1 In-Reply-To: (message from Alexandre Fayolle on Thu, 21 Jun 2001 09:16:30 +0200 (CEST)) References: Message-ID: <200106210745.f5L7jrm01579@mira.informatik.hu-berlin.de> > I think that 0.11.1 being incompatible with PyXML 0.6.5 is not a Good > Thing, since it gets end users very confused. We cannot request that they > should use an unreleased version of PyXML (which has fixes in xml.dom.ext > for this). Could you consider rolling back this change until the next > release of PyXML ? I haven't followed this discussion too closely, but releasing 0.6.6 with just some urgent bug fixes (ie. without anything that has been added to PyXML since 0.6.5 except for bug fixes) is still an option. Regards, Martin From Mike.Olson@fourthought.com Fri Jun 22 16:39:09 2001 From: Mike.Olson@fourthought.com (Mike Olson) Date: Fri, 22 Jun 2001 09:39:09 -0600 Subject: [XML-SIG] Re: Narval 1.0 and Python 2.1 References: <200106210745.f5L7jrm01579@mira.informatik.hu-berlin.de> Message-ID: <3B33669D.9EB0C620@FourThought.com> "Martin v. Loewis" wrote: > > > I think that 0.11.1 being incompatible with PyXML 0.6.5 is not a Good > > Thing, since it gets end users very confused. We cannot request that they > > should use an unreleased version of PyXML (which has fixes in xml.dom.ext > > for this). Could you consider rolling back this change until the next > > release of PyXML ? > > I haven't followed this discussion too closely, but releasing 0.6.6 > with just some urgent bug fixes (ie. without anything that has been > added to PyXML since 0.6.5 except for bug fixes) is still an option. We might need some of the stuff in xml.dom.ext but I wanted to look into it more before I asked about a 0.6.6. Thanks for the offer, I'll look into it to see what is needed. Just out of curiousity, what is the timeline for 0.7.0? Mike > > Regards, > Martin -- Mike Olson Principal Consultant mike.olson@fourthought.com +1 303 583 9900 x 102 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From rsalz@zolera.com Sat Jun 23 02:11:54 2001 From: rsalz@zolera.com (Rich Salz) Date: Fri, 22 Jun 2001 21:11:54 -0400 Subject: [XML-SIG] femto-dom? Message-ID: <3B33ECDA.A59B6CFD@zolera.com> This is a multi-part message in MIME format. --------------8BE50EE5E03BF832881B3001 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit We needed a way to create XML fragments that we could then output within other documents. The DOM API is way too heavyweight. So we took the Canonicalize() routine, looked at the attributes it uses, and created this femto-DOM. Is there any interest in this? If so I'll document it (where?) and check it in. /r$ --------------8BE50EE5E03BF832881B3001 Content-Type: text/plain; charset=us-ascii; name="simplenode.py" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="simplenode.py" #! /usr/bin/env python '''Simple DOM node builder. ''' from xml.dom import Node from xml.ns import XMLNS def _splitname(name): '''Split a name, returning prefix, localname, qualifiedname. ''' i = name.find(':') if i == -1: return '', name, name return name[:i], name[i + 1:], name def _initattrs(n, type): '''Set the initial node attributes. ''' n.attributes = [] n.childNodes = [] n.nodeType = type n.parentNode = None n.namespaceURI = '' class SimpleContentNode: '''A CDATA, TEXT, or COMMENT node. ''' def __init__(self, type, text): _initattrs(self, type) self.data = text class SimplePINode: '''A PI node. ''' def __init__(self, name, value): _initattrs(self, Node.PROCESSING_INSTRUCTION_NODE) self.name, self.value, self.nodeValue = name, value, value class SimpleAttributeNode: '''An element attribute node. ''' def __init__(self, name, value): _initattrs(self, Node.ATTRIBUTE_NODE) self.value, self.nodeValue = value, value self.prefix, self.localName, self.nodeName = _splitname(name) class SimpleElementNode: '''An element. Might have children, text, and attributes. ''' def __init__(self, name, nsdict = None, newline = 1): if nsdict: self.nsdict = nsdict.copy() else: self.nsdict = {} _initattrs(self, Node.ELEMENT_NODE) self.prefix, self.localName, self.nodeName = _splitname(name) self.namespaceURI = self.nsdict.get(self.prefix, None) for k,v in self.nsdict.items(): self.AddNSAttr(k, v) if newline: self.AddText('\n') def nslookup(self, key): n = self while n: if n.nsdict.has_key(key): return n.nsdict[key] n = n.parentNode raise KeyError, "namespace prefix %s not found" % key def AddAttr(self, name, value): n = SimpleAttributeNode(name, value) n.parentNode = self if not n.prefix: n.namespaceURI = None else: n.namespaceURI = self.nslookup(n.prefix) self.attributes.append(n) return self def AddNSAttr(self, prefix, value): if prefix: n = SimpleAttributeNode("xmlns:" + prefix, value) else: n = SimpleAttributeNode("xmlns", value) n.parentNode, n.namespaceURI = self, XMLNS.BASE self.attributes.append(n) self.nsdict[prefix] = value return self def AddDefaultNSAttr(self, value): return self.AddNSAttr('', value) def AddChild(self, n): n.parentNode = self if n.namespaceURI == None: n.namespaceURI = self.namespaceURI self.childNodes.append(n) return self def AddText(self, text): n = SimpleContentNode(Node.TEXT_NODE, text) return self.AddChild(n) def AddCDATA(self, text): n = SimpleContentNode(Node.CDATA_SECTION_NODE, text) return self.AddChild(n) def AddComment(self, text): n = SimpleContentNode(Node.COMMENT_NODE, text) return self.AddChild(n) def AddPI(self, name, value): n = SimplePINode(name, value) return self.AddChild(n) return self def AddElement(self, name, nsdict = None, newline = 1): n = SimpleElementNode(name, nsdict, newline) self.AddChild(n) return n if __name__ == '__main__': e = SimpleElementNode('z', {'': 'uri:example.com', 'q':'q-namespace'}) n = e.AddElement('zchild') n.AddNSAttr('d', 'd-uri') n.AddAttr('foo', 'foo-value') n.AddText('some text for d\n') n.AddElement('d:k2').AddText('innermost txt\n') e.AddElement('q:e-child-2').AddComment('This is a comment') e.AddText('\n') e.AddElement('ll:foo', { 'll': 'example.org'}) e.AddAttr('eattr', '''eat at joe's''') from xml.dom.ext import Canonicalize print Canonicalize(e, comments=1) --------------8BE50EE5E03BF832881B3001-- From fdrake@acm.org Sat Jun 23 03:53:20 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 22 Jun 2001 22:53:20 -0400 (EDT) Subject: [XML-SIG] femto-dom? In-Reply-To: <3B33ECDA.A59B6CFD@zolera.com> References: <3B33ECDA.A59B6CFD@zolera.com> Message-ID: <15156.1184.62047.801802@cj42289-a.reston1.va.home.com> Rich Salz writes: > We needed a way to create XML fragments that we could then output within > other documents. The DOM API is way too heavyweight. So we took the > Canonicalize() routine, looked at the attributes it uses, and created > this femto-DOM. Is the problem that the API is too heavy (it is!), or the DOM objects? I think an API that wraps a DOM implementation would be very nice to have, all would allow the resultant DOM to still be used with tools that expect the full DOM. I expect the wrapper could be completely independent of the actual DOM implementation. I like the idea of an easier-to-use API. I can also imagine having an API this easy to use that supports both SAX and DOM back-ends. The SAX backend would be really nice when generating a lot of output that doesn't need to be stored in memory. -Fred -- Fred L. Drake, Jr. PythonLabs at Digital Creations From martin@loewis.home.cs.tu-berlin.de Sat Jun 23 08:51:31 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Sat, 23 Jun 2001 09:51:31 +0200 Subject: [XML-SIG] Question about namespace declarations In-Reply-To: <14980.12893.917059.581182@cj42289-a.reston1.va.home.com> (fdrake@acm.org) References: <14980.12893.917059.581182@cj42289-a.reston1.va.home.com> Message-ID: <200106230751.f5N7pVv01171@mira.informatik.hu-berlin.de> > This makes me think that both "xmlns" and "xmlns:*" should be > presented as attributes without namespaces in the DOM. Can anyone > point to references that extend or override this recommendation? I think you are right, and I'm about to check in patch http://sourceforge.net/tracker/?func=detail&aid=432117&group_id=5470&atid=305470 that does that for minidom. Regards, Martin From rsalz@zolera.com Sat Jun 23 14:05:37 2001 From: rsalz@zolera.com (Rich Salz) Date: Sat, 23 Jun 2001 09:05:37 -0400 Subject: [XML-SIG] femto-dom? References: <3B33ECDA.A59B6CFD@zolera.com> <15156.1184.62047.801802@cj42289-a.reston1.va.home.com> Message-ID: <3B349421.1939C9E6@zolera.com> > Is the problem that the API is too heavy (it is!), or the DOM > objects? I'd say the former, which influenced the latter, althugh I don't care, since I'm already using the DOM elsewhere in our app. I just want to build up bits of an XML document and then output it, using something a little more elegant than string-pasting. > I think an API that wraps a DOM implementation would be very > nice to have, all would allow the resultant DOM to still be used with > tools that expect the full DOM. I expect the wrapper could be > completely independent of the actual DOM implementation. That makes sense. I'd have to learn more of the DOM API, which I don't have time to do, but I'd gladly "loan" :) the API, tweak it a bit (e.g., add a SimpleDocument object), and document it if there are folks who would work on the other parts. > I like the idea of an easier-to-use API. I can also imagine having > an API this easy to use that supports both SAX and DOM back-ends. The easier API has definitely come up here before, so I'm not doing anything particularly new here. If by "this easy to use" you are referring to what I posted, well gee, thanks. > The SAX backend would be really nice when generating a lot of output > that doesn't need to be stored in memory. This sounds interesting, but I don't think I really understand what you mean. I keep thinking of co-routines -- push nodes onto the front, get SAX events out the back -- but since "yield" is fairly new, I don't think that's what you're getting at. How else to avoid keeping the whole thing incore? /r$ -- Zolera Systems, Securing web services (XML, SOAP, Signatures, Encryption) http://www.zolera.com From tpassin@home.com Sat Jun 23 15:26:51 2001 From: tpassin@home.com (Thomas B. Passin) Date: Sat, 23 Jun 2001 10:26:51 -0400 Subject: [XML-SIG] Question about namespace declarations References: <14980.12893.917059.581182@cj42289-a.reston1.va.home.com> <200106230751.f5N7pVv01171@mira.informatik.hu-berlin.de> Message-ID: <000801c0fbf0$8bef1c00$7cac1218@reston1.va.home.com> [Martin v. Loewis] > > This makes me think that both "xmlns" and "xmlns:*" should be > > presented as attributes without namespaces in the DOM. Can anyone > > point to references that extend or override this recommendation? > Strictly speaking, "xmlns" is a "reserved attribute (Namespaces Rec, section 2). That means it has special behavior that ordinary attributes don't. DOM level 2 (Core) (section 1.1.8) says: "As far as the DOM is concerned, special attributes used for declaring XML namespaces are still exposed and can be manipulated just like any other attribute. However, nodes are permanently bound to namespace URIs as they get created. Consequently, moving a node within a document, using the DOM, in no case results in a change of its namespace prefix or namespace URI. Similarly, creating a node with a namespace prefix and namespace URI, or changing the namespace prefix of a node, does not result in any addition, removal, or modification of any special attributes for declaring the appropriate XML namespaces. " I'm not clear, though, whether this would require any different handling from ordinary attributes. I don't see how "xmlns:" could be seen as an attribute because it doesn't get used by itself that way. Cheers, Tom P From junkster@rochester.rr.com Sun Jun 24 17:05:32 2001 From: junkster@rochester.rr.com (Benjamin Schollnick) Date: Sun, 24 Jun 2001 12:05:32 -0400 Subject: [XML-SIG] XML problem with Python v2.0?? programmer error? Message-ID: > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --MS_Mac_OE_3076229132_143460_MIME_Part Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit I'm attempting to finish a pseudo webdav interface class... The only problem is that the XML results I'm receiving aren't being handled correctly.... This test application seems to be ignoring several of the entries from the captured stream. The XML looks AOK to me, but I haven't written XML before, and I'm not sure if I'm reading this correctly. Could anyone chime up, and point out any errors that I may have caused? - Benjamin ------------------------ Cut here test_data = """ http://xww.psg-techservices.world.xerox.com/docushare/Collection-22 TSA - Material in Transit TSA - Material in Transit (Temporary Files) Benjamin Schollnick admin HTTP/1.1 200 OK""" #from xml.dom.minidom import parse, parseString #dom = parseString (test_data) #print dom.getElementsByTagName ("parents") #print dom.getElementsByTagName ("handle") import xml.parsers.expat def start_element(name, attrs): print "Start :",name, "\t\tattrs: ",attrs def end_element(name): print "End :",name pass def char_data (data): print "Character : ", repr(data) pass parser = xml.parsers.expat.ParserCreate() parser.EndElementHandler = end_element parser.StartElementHandler = start_element print "XML.Parsers.Expat \n------------------------------------------" parser.Parse (test_data) #print "xml.sax \n------------------------------------------" #import xml.sax #dparser2 = xml.sax.make_parser() #print xml.sax.parseString(test_data, dparser2) --MS_Mac_OE_3076229132_143460_MIME_Part Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable XML problem with Python v2.0?? programmer error? I'm attempting to finish a pseudo webdav interface class...

The only problem is that the XML results I'm receiving aren't being
handled correctly....

This test application seems to be ignoring several of the entries from
the captured stream.

The XML looks AOK to me, but I haven't written XML before, and I'm not
sure if I'm reading this correctly.

Could anyone chime up, and point out any errors that I may have caused?

        - Benjamin

------------------------ Cut here
test_data =3D """<?xml version=3D"1.0" ?>
<multistatus>
 <response>
   
<href>http://xww.psg-techservices.world.xero= x.com/docushare/Collection-22
</href
>
   <propstat>
    <prop>
 <displayname>TSA - Material in Transit</displayname>
 <displayname>TSA - Material in Transit</displayname>
 <summary>(Temporary Files)</summary>
<entityowner><dsref handle=3D"User-2"><displayname&g= t;Benjamin
Schollnick</displayname>
<username>admin</username></dsref></entityowner> <parents>
<dsref handle=3D"Collection-10"><displayname><![CDAT= A[TSE - Test Support &
Automation Folder]]></displayname></dsref>
</parents>
    </prop>
    <status>HTTP/1.1 200 OK</status>"= ""

#from xml.dom.minidom import parse, parseString
#dom =3D parseString (test_data)
#print dom.getElementsByTagName ("parents")
#print dom.getElementsByTagName ("handle")

import xml.parsers.expat

def     start_element(name, attrs):
       print "Start :",name, = "\t\tattrs: ",attrs

def     end_element(name):
       print "End :",name
       pass
       
def     char_data (data):
       print "Character : ", = repr(data)
       pass
       
parser =3D xml.parsers.expat.ParserCreate()
parser.EndElementHandler        =3D end_el= ement
parser.StartElementHandler      =3D start_element print "XML.Parsers.Expat \n------------------------------------------&= quot;
parser.Parse (test_data)
#print "xml.sax \n------------------------------------------"

#import xml.sax
#dparser2 =3D xml.sax.make_parser()
#print xml.sax.parseString(test_data, dparser2)
--MS_Mac_OE_3076229132_143460_MIME_Part-- From resume-reply@unlistednet.com Sun Jun 24 18:08:13 2001 From: resume-reply@unlistednet.com (Dave Winson) Date: Sun, 24 Jun 2001 09:08:13 -0800 Subject: [XML-SIG] I Saw Your Resume Posted on the Internet Message-ID: <5ed31l73q80c3h21.38j3nk10gu@mail7.unlistednet.com>

From: David Winsen - Director - High Tech Executive Search

I have viewed your resume on the Internet and believe you may be a fit for one of our positions.

High Tech Executive Search is an established national Executive Search and Consulting Firm who has been serving the High Tech Industries for over 25 years. We are a member of a National Network of 500+ other Executive Search firms with multiple specialties. Now you can work with one Search Firm and have access to over 500 through one central source.

PLEASE READ CAREFULLY AND RESPOND AS FOLLOWS:

1). Please review our web site frequently at www.hotjobs2000.com and Select HOT JOBS that you fit, 500 new positions are posted weekly.  

When you obtain a 90% or better match to the Job Order, write a cover letter addressing your background to the Job Order. 

2). Submit your cover letter and resume and we will do the rest.

This approach is called "The Art of Packaging" and it works. General resumes and cover letters are not effective in today's highly competitive market place. The more specific you are to the Job Order and Industry the greater are your chances in receiving an interview and an offer.

Let HIGH TECH EXECUTIVE SEARCH assist you in getting Interviews and Offers!

The time to act is NOW. So don't delay. Please share this valuable service with your friends and associates, so we can assist them also.

High Technology Executive Search
18425 Burbank Blvd. # 102-C
Tarzana, CA. 91356

From tpassin@home.com Sun Jun 24 17:58:30 2001 From: tpassin@home.com (Thomas B. Passin) Date: Sun, 24 Jun 2001 12:58:30 -0400 Subject: [XML-SIG] XML problem with Python v2.0?? programmer error? References: Message-ID: <001801c0fcce$e69104a0$7cac1218@reston1.va.home.com> [Benjamin Schollnick] > > The XML looks AOK to me, but I haven't written XML before, and I'm not > sure if I'm reading this correctly. > What you posted is not AOK. It is not well-formed XML and so cannot be processed. You need to close the propstat, response, and multistatus elements. Tom P From martin@loewis.home.cs.tu-berlin.de Sun Jun 24 18:13:27 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Sun, 24 Jun 2001 19:13:27 +0200 Subject: [XML-SIG] XML problem with Python v2.0?? programmer error? In-Reply-To: (message from Benjamin Schollnick on Sun, 24 Jun 2001 12:05:32 -0400) References: Message-ID: <200106241713.f5OHDRn01030@mira.informatik.hu-berlin.de> > The XML looks AOK to me, but I haven't written XML before, and I'm not > sure if I'm reading this correctly. The XML is incorrect. Every opening tag must have a closing tag. I cannot see either
nor ; there may be other XML errors as well. Regards, Martin From graham@coms.com Mon Jun 25 08:43:11 2001 From: graham@coms.com (Graham Ashton) Date: Mon, 25 Jun 2001 08:43:11 +0100 Subject: [XML-SIG] Choosing SAX parsers Message-ID: <20010625084311.A32734@ratchet.hq.coms.com> I posted the following to comp.lang.python, and it was suggested I subscribe and sent it here instead... I've just started playing with xml.sax and the XML HOWTO. I had to recompile python to include expat as I didn't have any other parsers available (python 2.1, built from source, Debian Linux). This is fine, and xml.sax works nicely with expat now that I've recompiled, but I was a bit surprised that expat was the only parser availble after the docs had been telling me how I could choose between parsers, etc. Am I missing some stuff? What I'd really like is a parser that knows how to enforce DTDs, which I know expat-1.x doesn't. Speed isn't an issue for me as my documents are very small. What's my best bet? Installing PyXML? If I do, will it overwrite the xml.* module tree that I've got already? Are there any issues installing it over the top of the stuff in the standard library (some of which I believe is the same codebase)? Any pointers would be much appreciated. Thanks. -- Graham From larsga@garshol.priv.no Mon Jun 25 09:28:49 2001 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 25 Jun 2001 10:28:49 +0200 Subject: [XML-SIG] Choosing SAX parsers In-Reply-To: <20010625084311.A32734@ratchet.hq.coms.com> References: <20010625084311.A32734@ratchet.hq.coms.com> Message-ID: * Graham Ashton | | This is fine, and xml.sax works nicely with expat now that I've | recompiled, but I was a bit surprised that expat was the only parser | availble after the docs had been telling me how I could choose between | parsers, etc. Am I missing some stuff? You are. expat is the only parser with a SAX driver that comes with Python 2.x, but the XML-SIG package contains more. | What I'd really like is a parser that knows how to enforce DTDs, | which I know expat-1.x doesn't. Speed isn't an issue for me as my | documents are very small. Then you want to use xmlproc. xmlproc can validate XML documents against a DTD if you ask it to, by setting the feature xml.sax.handler.feature_validation to true. [larsga@pc36 larsga]$ python2.1 Python 2.1 (#1, May 5 2001, 06:49:59) [GCC 2.95.1 19990816/Linux (release)] on linux2 Type "copyright", "credits" or "license" for more information. >>> from xml.sax import make_parser >>> make_parser() >>> make_parser("xml.sax.drivers2.drv_xmlproc") >>> p = make_parser("xml.sax.drivers2.drv_xmlproc") >>> from xml.sax.handler import feature_validation >>> p.setFeature(feature_validation, 1) | What's my best bet? Installing PyXML? Yes. | If I do, will it overwrite the xml.* module tree that I've got | already? Are there any issues installing it over the top of the | stuff in the standard library (some of which I believe is the same | codebase)? This should work just fine. The XML-SIG package puts itself in a package called _xmlplus and does some import trickery to make sure that it is imported when you say import xml. --Lars M. From graham@coms.com Mon Jun 25 09:53:29 2001 From: graham@coms.com (Graham Ashton) Date: Mon, 25 Jun 2001 09:53:29 +0100 Subject: [XML-SIG] Choosing SAX parsers In-Reply-To: ; from larsga@garshol.priv.no on Mon, Jun 25, 2001 at 10:28:49AM +0200 References: <20010625084311.A32734@ratchet.hq.coms.com> Message-ID: <20010625095329.A625@ratchet.hq.coms.com> On Mon, Jun 25, 2001 at 10:28:49AM +0200, Lars Marius Garshol wrote: > > | What's my best bet? Installing PyXML? > > [snip] > > This should work just fine. The XML-SIG package puts itself in a > package called _xmlplus and does some import trickery to make sure > that it is imported when you say import xml. Excellent, thanks very much. I'll do that and see how I get on... -- Graham From noreply@sourceforge.net Mon Jun 25 18:48:51 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: 25 Jun 2001 17:48:51 -0000 Subject: [XML-SIG] [ pyxml-Patches-436143 ] WDDX fixes Message-ID: <20010625174851.23862.qmail@ragingknowledge.com> Patches item #436143, was opened at 2001-06-25 10:56 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=436143&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nathan (nathan0x00) Assigned to: Nobody/Anonymous (nobody) Summary: WDDX fixes Initial Comment: The wddx specifies that the data should be wrapped in the tags. WDDX also specifies allowance for the tag, which allows characters to be encoded in hex. This patch adds support for both of these. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=436143&group_id=6473 From noreply@sourceforge.net Wed Jun 27 07:48:26 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 26 Jun 2001 23:48:26 -0700 Subject: [XML-SIG] [ pyxml-Bugs-436623 ] calculation of Inf Message-ID: Bugs item #436623, was opened at 2001-06-26 23:48 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=436623&group_id=6473 Category: 4Suite Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jan Peter Riegel (jpriegel) Assigned to: Nobody/Anonymous (nobody) Summary: calculation of Inf Initial Comment: In XPath/__init__.py there is a calculation of Inf = 1e300 ** 2. On my system this results in an overflow error. Inf = 1e300 * 1e300 is working correctly. My System: Python 2.1 (#1, May 30 2001, 15:55:43) [GCC 2.95.2 19991024 (release)] on hp-uxB ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=436623&group_id=6473 From noreply@sourceforge.net Wed Jun 27 07:53:25 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 26 Jun 2001 23:53:25 -0700 Subject: [XML-SIG] [ pyxml-Bugs-436626 ] Bug in XmlWriter Message-ID: Bugs item #436626, was opened at 2001-06-26 23:53 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=436626&group_id=6473 Category: 4Suite Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jan Peter Riegel (jpriegel) Assigned to: Nobody/Anonymous (nobody) Summary: Bug in XmlWriter Initial Comment: In Xslt/XmlWriter.py in the method text() (Line 75ff in 4Suite-0.11.1b2) There is an reference to the local variable last_chars in the else-part of an if-statement, but last_chars is only defined in the if-part. Probably the lines if text and text[0] == '>': last_chars = self._lastChars else: last_chars = '' Have to occur before the if-statement. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=436626&group_id=6473 From noreply@sourceforge.net Wed Jun 27 12:51:39 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Wed, 27 Jun 2001 04:51:39 -0700 Subject: [XML-SIG] [ pyxml-Patches-436698 ] sgmlop and processing instructions Message-ID: Patches item #436698, was opened at 2001-06-27 04:51 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=436698&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Walter Dцrwald (doerwalter) Assigned to: Nobody/Anonymous (nobody) Summary: sgmlop and processing instructions Initial Comment: This patch adds correct handling of processing instructions to sgmlop. In XML mode a processing instruction will be terminated at '?>' and not at '>'. (see http://www.w3.org/TR/2000/REC-xml-20001006#sec-pi) ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=436698&group_id=6473 From Alexandre.Fayolle@logilab.fr Wed Jun 27 13:22:34 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Wed, 27 Jun 2001 14:22:34 +0200 (CEST) Subject: [XML-SIG] module iso8601 and python 1.5 Message-ID: Hello, Just a side note, in case some people are not aware of this, the xml.utils.iso8601 module from CVS won't work with python 1.5: line 102, there is the following statement: year = int(m.group("year"), 10) which causes a TypeError on python 1.5. I'm going back to migrating Narval to python 2.1 Alexandre Fayolle -- http://www.logilab.com Narval is the first software agent available as free software (GPL). LOGILAB, Paris (France). From fdrake@acm.org Wed Jun 27 15:09:57 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Wed, 27 Jun 2001 10:09:57 -0400 (EDT) Subject: [XML-SIG] module iso8601 and python 1.5 In-Reply-To: References: Message-ID: <15161.59701.291244.280472@cj42289-a.reston1.va.home.com> Alexandre Fayolle writes: > Just a side note, in case some people are not aware of this, the > xml.utils.iso8601 module from CVS won't work with python 1.5: line 102, > there is the following statement: > year = int(m.group("year"), 10) > which causes a TypeError on python 1.5. I think this is acceptable; it works under Python 1.5.2. Are there any compelling reasons that system can't be upgraded, at least to Python 1.5.2? -Fred -- Fred L. Drake, Jr. PythonLabs at Digital Creations From ians@etrials.com Wed Jun 27 18:56:56 2001 From: ians@etrials.com (Ian Sparks) Date: Wed, 27 Jun 2001 13:56:56 -0400 Subject: [XML-SIG] Wrapping a DOM class. Message-ID: <3758A5EAF91DD411AF3600B0D02188DD4DD56D@mail.etrials.com> I confess the XML support for Python confuses me. I thought I understood the DOM but I'm having problems with the Python DOM implementations. The following sample shows what I am *trying* to do. I know the minidom won't get me here so what implementation will? If someone could convert to a working sample I'd be very grateful. from xml.dom.minidom import Document, parse, parseString class xdoc: dom = Document def __init__(self): self.dom = parseString('') def __getattr__(self,key): return self.dom.documentElement.getAttributeNS('',key) def __setattr__(self,key,value): self.dom.documentElement.setAttributeNS('',key,value) x = xdoc() x.walk = 'funny' print x.walk print x.att Thanks for your attention. From fdrake@acm.org Wed Jun 27 19:33:13 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Wed, 27 Jun 2001 14:33:13 -0400 (EDT) Subject: [XML-SIG] Wrapping a DOM class. In-Reply-To: <3758A5EAF91DD411AF3600B0D02188DD4DD56D@mail.etrials.com> References: <3758A5EAF91DD411AF3600B0D02188DD4DD56D@mail.etrials.com> Message-ID: <15162.9961.559841.76317@cj42289-a.reston1.va.home.com> Ian Sparks writes: > I confess the XML support for Python confuses me. I thought I understood the > DOM but I'm having problems with the Python DOM implementations. The > following sample shows what I am *trying* to do. I know the minidom won't > get me here so what implementation will? If someone could convert to a > working sample I'd be very grateful. minidom will work just fine; the problem you're having has nothing to do with the DOM. What's happening is that you are defining an attribute for xdoc instances named "dom"; that's a class object, and has no documentElement attribute itself. You can get rid of the "dom = Document" assignment in the class definition. Once that's out of the way, the constructor will attempt to create the "dom" attribute, but that will go through the __setattr__() hook, which then expects to find the not-yet-created "dom" attribute, so the __getattr__() is called with the name "dom". That then uses the not-yet-created "dom" attribute to get the document object, causing a recursive call to __getattr__() -- this will eventually fail. If you change the constructor to avoid the __setattr__(), the rest of the class needs no change: ------------------------------------------------------------------------ class xdoc: def __init__(self): self.__dict__['dom'] = parseString('') def __getattr__(self,key): return self.dom.documentElement.getAttributeNS('',key) def __setattr__(self,key,value): self.dom.documentElement.setAttributeNS('',key,value) ------------------------------------------------------------------------ And it works now, to boot! -Fred -- Fred L. Drake, Jr. PythonLabs at Digital Creations From barlow@forwiss.uni-passau.de Wed Jun 27 20:45:30 2001 From: barlow@forwiss.uni-passau.de (Steve Barlow) Date: Wed, 27 Jun 2001 21:45:30 +0200 Subject: [XML-SIG] Reader() newbie question Message-ID: <000f01c0ff41$c4cf9730$14a8a8c0@tigger> Hi, I am just starting out with XML and python so these questions might be REALLY silly. Sorry. My basic first goal is to read an XML file into a DOM tree with validation. I am a little confused about which of the following methods is most appropriate. My first try was simply something like this... from xml.dom.ext.reader import Sax xml_object = Sax.FromXmlFile(filename, validate=1) O.K. I figured out that the FromXmlFile method is deprecated and I should switch to FromXmlUri (I think). I also think that this then uses xmlproc as the parser. Is this correct? I also saw that these FromXml* methods have the argument "parser = none." Assuming I could say something like "parser=xmlproc" (and I am honestly not sure what exactly parser= does) is there any advantage to "parser=" over "validate="? Where my confusion really starts is that in most examples I have seen (i.e. xmldoc/doc/demo/dom) a slightly different method seems to be used, i.e... from xml.dom.ext.reader import PyExpat from xml.dom.ext.reader import Sax reader = PyExpat.Reader() xml_object = reader.fromUri(xmluri) This is fine, but I really want a validating parser. Is is possible for me to do something like reader=ValidatingParser.Reader()? Which validating parser can I instanciate like that? xmlproc? What are the advantages from one method over the other? Thanks a lot for the help - being a newbie can but fun and frustrating at the same time. If these are questions that I should have been able to quickly answer from the documentation I would appreciate a pointer to the right place/doc so that I don't need to waste people's time in the future. Steve From uche.ogbuji@fourthought.com Wed Jun 27 22:14:40 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Wed, 27 Jun 2001 15:14:40 -0600 Subject: [XML-SIG] [ pyxml-Bugs-436623 ] calculation of Inf In-Reply-To: Message from noreply@sourceforge.net of "Tue, 26 Jun 2001 23:48:26 PDT." Message-ID: <200106272114.f5RLEel02061@localhost.local> All, I need help with > http://sourceforge.net/tracker/?func=detail&atid=106473&aid=436623&group_id=6473 I got the trick of hacking out Inf as follows: Inf = 1e300 ** 2 >From a clpy posting of Tim Peters. Jan says it only works on his HPUX as Inf = 1e300 * 1e300 Which I could change to easily enough, but I wonder whether this would screw up other platforms. Any ideas? Thanks. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From uche.ogbuji@fourthought.com Wed Jun 27 22:24:19 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Wed, 27 Jun 2001 15:24:19 -0600 Subject: [XML-SIG] Reader() newbie question In-Reply-To: Message from "Steve Barlow" of "Wed, 27 Jun 2001 21:45:30 +0200." <000f01c0ff41$c4cf9730$14a8a8c0@tigger> Message-ID: <200106272124.f5RLOJd02108@localhost.local> > Where my confusion really starts is that in most examples I have seen (i.e. > xmldoc/doc/demo/dom) a slightly different method seems to be used, i.e... > > from xml.dom.ext.reader import PyExpat > from xml.dom.ext.reader import Sax > reader = PyExpat.Reader() > xml_object = reader.fromUri(xmluri) > > This is fine, but I really want a validating parser. Is is possible for me > to do something like reader=ValidatingParser.Reader()? Which validating > parser can I instanciate like that? xmlproc? What are the advantages from > one method over the other? > > Thanks a lot for the help - being a newbie can but fun and frustrating at > the same time. If these are questions that I should have been able to > quickly answer from the documentation I would appreciate a pointer to the > right place/doc so that I don't need to waste people's time in the future. from xml.dom.ext.reader import Sax from xml.sax.saxexts import make_parser p = make_parser("xml.sax.drivers.drv_xmlproc") reader = Sax.Reader(parser=p) If this works for you, do you mind contributing back a demo that illustrates this? Just a very brief script that does something after having created a validating parser. We'd check it in alongside the other demos in the demo/dom directory of PyXML. You can look at these others for examples. This way this tip could help many others as well. In general to all: I've got a lot of mail about lack of good 4DOM examples (Greg Wilson will be happy to know he's not alone). I keep meaning to do so, but time is really short these days. If anyone wants to comment up some of their quick and dirty DOM scripts for includion in the demos, please consider this. I'm happy to gather them, test them and check them in. Thanks. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From tim.one@home.com Wed Jun 27 22:40:55 2001 From: tim.one@home.com (Tim Peters) Date: Wed, 27 Jun 2001 17:40:55 -0400 Subject: [XML-SIG] [ pyxml-Bugs-436623 ] calculation of Inf In-Reply-To: <200106272114.f5RLEel02061@localhost.local> Message-ID: [Uche Ogbuji] > I need help with > > http://sourceforge.net/tracker/?func=detail&atid=106473&aid=436623 > &group_id=6473 > > I got the trick of hacking out Inf as follows: > > Inf = 1e300 ** 2 > > From a clpy posting of Tim Peters. Jan says it only works on his > HPUX as > > Inf = 1e300 * 1e300 > > Which I could change to easily enough, but I wonder whether this > would screw up other platforms. I'm afraid it's impossible to say: the C standard doesn't define anything about what happens in IEEE-754 endcases, and platform behavior is all over the map. This report is especially mysterious, since in C terms Python merely does a C-level double z = x * x; return z; in *both* cases (floatobject.c's float_pow special-cases an integer exponent and turns the power into an efficient sequence of multiplies then). The bug report is too vague to say any more about it. Hmm. In the pow case, we actually end up doing (unrolling the loop): double p = 1e300; double r = 1.0; p *= p; r *= p; /* i.e., 1. * +Inf */ p *= p; /* i.e., +Inf * +Inf */ return r; So maybe this is some uniquely stupid-ass platform that incorrectly complains about a +Inf *input* but not a +Inf *result*. In that case, ya, a straight multiply is safer. Until somebody volunteers x-platform 754 support, though, it's a crapshoot. Don't hold your breath . In the meantime, 1e300 * 1e300 is as safe as it gets (although I *would* have said the same about 1e300**2!). From Tammy.Wong@efi.com Thu Jun 28 00:20:39 2001 From: Tammy.Wong@efi.com (Tammy Wong) Date: Wed, 27 Jun 2001 16:20:39 -0700 Subject: [XML-SIG] installing PyXML Message-ID: This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C0FF5F.C716A560 Content-Type: text/plain; charset="iso-8859-1" Hi, I am trying to install PyXML-0.6.2. >From running "python setup.py install" it appears to create the package at /local/lib/python2.0/site-packages/_xmlplns how can I modify this such that I can specify where I want the package to be created? Thank you. Tammy ------_=_NextPart_001_01C0FF5F.C716A560 Content-Type: text/html; charset="iso-8859-1" installing PyXML

Hi,

I am trying to install PyXML-0.6.2.
From running "python setup.py install" it appears to create
the package at /local/lib/python2.0/site-packages/_xmlplns

how can I modify this such that I can specify where I want the
package to be created?

Thank you.

Tammy

------_=_NextPart_001_01C0FF5F.C716A560-- From Alexandre.Fayolle@logilab.fr Thu Jun 28 09:23:39 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Thu, 28 Jun 2001 10:23:39 +0200 (CEST) Subject: [XML-SIG] module iso8601 and python 1.5 In-Reply-To: <15161.59701.291244.280472@cj42289-a.reston1.va.home.com> Message-ID: On Wed, 27 Jun 2001, Fred L. Drake, Jr. wrote: > Alexandre Fayolle writes: > > Just a side note, in case some people are not aware of this, the > > xml.utils.iso8601 module from CVS won't work with python 1.5: line 102, > > there is the following statement: > > year = int(m.group("year"), 10) > > which causes a TypeError on python 1.5. > > I think this is acceptable; it works under Python 1.5.2. Are there > any compelling reasons that system can't be upgraded, at least to > Python 1.5.2? I was meaning 1.5.2, indeed (just being lazy on that one). I cound not find an int() function with an arity of 2 (i.e. with an optional radix argument) in python 1.5.2 : [alf@leo alf]$ python Python 1.5.2 (#1, Dec 21 2000, 15:29:08) [GCC egcs-2.91.66 19990314/Linux (egcs- on linux-i386 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> int("10",10) Traceback (innermost last): File "", line 1, in ? TypeError: int requires exactly 1 argument; 2 given Alexandre Fayolle -- http://www.logilab.com Narval is the first software agent available as free software (GPL). LOGILAB, Paris (France). From Alexandre.Fayolle@logilab.fr Thu Jun 28 09:44:38 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Thu, 28 Jun 2001 10:44:38 +0200 (CEST) Subject: [XML-SIG] unicode, latin-1 and DOM... Message-ID: Hello everyone, I'm struggling with unicode and stuff (so expect some mails in the coming days). Here's the first one. I'm aware that the XML document being parsed in not correct (no encoding header), bug I'm surprised by the resut I get: >>> from xml.dom.ext.reader import Sax2 >>> d = Sax2.FromXml('йtй') >>> from xml.dom.ext import PrettyPrint >>> PrettyPrint(d) >>> d.documentElement I'm using python 2.1 the cvs version of PyXML with 4Suite 0.11.1b2. I would have expected a parse error when the latin-1 characters where encountered, and not a silent failure to create the Text node. Cheers, Alexandre Fayolle -- http://www.logilab.com Narval is the first software agent available as free software (GPL). LOGILAB, Paris (France). From Alexandre.Fayolle@logilab.fr Thu Jun 28 10:21:34 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Thu, 28 Jun 2001 11:21:34 +0200 (CEST) Subject: [XML-SIG] DOM and non ascii element or attribute names Message-ID: >From my reading of the DOM L2 spec, it should be possible to create DOM nodes (elements or attributes) with non-ascii characters in their name. 4DOM seems to be preventing this, with 2 lines in Document.py : #FIXME: should allow combining characters: fix when Python gets Unicode g_namePattern = re.compile('[a-zA-Z_:][\w\.\-_:]*\Z') My unicode-fu is a bit too low right now to write a patch (it should improve soon), but I'll be glad to do some testing. Cheers, Alexandre Fayolle -- http://www.logilab.com Narval is the first software agent available as free software (GPL). LOGILAB, Paris (France). From noreply@sourceforge.net Thu Jun 28 12:05:31 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 28 Jun 2001 04:05:31 -0700 Subject: [XML-SIG] [ pyxml-Bugs-437035 ] PrettyPrint unicode problem with attribu Message-ID: Bugs item #437035, was opened at 2001-06-28 04:05 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=437035&group_id=6473 Category: 4Suite Group: None Status: Open Resolution: None Priority: 5 Submitted By: Alexandre Fayolle (afayolle) Assigned to: Nobody/Anonymous (nobody) Summary: PrettyPrint unicode problem with attribu Initial Comment: I have problems when PrettyPrinting documents with latin-1 characters in attribute values. Sample script: from xml.dom.ext.reader import Sax2 from xml.dom.ext import PrettyPrint d = Sax2.FromXml('''''') print '-'*15 PrettyPrint(d) print '-'*15 PrettyPrint(d,encoding='iso-8859-1') Output: --------------- --------------- Message-ID: <001401c0ffca$fcede660$7cac1218@reston1.va.home.com> I tried out your example (by cut-and-paste) in XML Cooktop, which uses the Microsoft parser. Sure enough, it didn't validate, complaining about the illegal characters. If I added an xml declaration with encoding='iso-8859-1", it was happy. Just what you'd expect. This was in Windows98. I've been hoping that the encoding issues would have gone silently away with Python 2.0+, but I knew it wasn't really going to happen so easily! Cheers, Tom P [Alexandre Fayolle]> > I'm struggling with unicode and stuff (so expect some mails in the coming > days). Here's the first one. I'm aware that the XML document being parsed > in not correct (no encoding header), bug I'm surprised by the resut I get: > > >>> from xml.dom.ext.reader import Sax2 > >>> d = Sax2.FromXml('йtй') > >>> from xml.dom.ext import PrettyPrint > >>> PrettyPrint(d) > > > > >>> d.documentElement > > From uche.ogbuji@fourthought.com Thu Jun 28 14:19:00 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Thu, 28 Jun 2001 07:19:00 -0600 Subject: [XML-SIG] unicode, latin-1 and DOM... In-Reply-To: Message from Alexandre Fayolle of "Thu, 28 Jun 2001 10:44:38 +0200." Message-ID: <200106281319.f5SDJ0D04671@localhost.local> > Hello everyone, > = > I'm struggling with unicode and stuff (so expect some mails in the comi= ng > days). Here's the first one. I'm aware that the XML document being pars= ed > in not correct (no encoding header), bug I'm surprised by the resut I g= et: = > = > >>> from xml.dom.ext.reader import Sax2 > >>> d =3D Sax2.FromXml('=E9t=E9') > >>> from xml.dom.ext import PrettyPrint > >>> PrettyPrint(d) > > > > >>> d.documentElement > > = > I'm using python 2.1 the cvs version of PyXML with 4Suite 0.11.1b2. = > = > I would have expected a parse error when the latin-1 characters where > encountered, and not a silent failure to create the Text node. The parser is probably blowing up, and 4DOM's improperly masking the erro= r. Or maybe not. pDomlette shows the same problem >>> from Ft.Lib.pDomlette import PyExpatReader >>> reader =3D PyExpatReader() = >>> doc =3D reader.fromString('=E9t=E9') >>> doc.documentElement >>> = I'll have a quick look. Note: you shouldn't be using the deprecated Sax2 "From*" functions. -- = Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com = 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From Alexandre.Fayolle@logilab.fr Thu Jun 28 15:07:54 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Thu, 28 Jun 2001 16:07:54 +0200 (CEST) Subject: [XML-SIG] Sax2 deprecated functions In-Reply-To: <200106281319.f5SDJ0D04671@localhost.local> Message-ID: On Thu, 28 Jun 2001, Uche Ogbuji wrote: > Note: you shouldn't be using the deprecated Sax2 "From*" functions. So I heard... On the other hand, it's sooooo nice to have them for a quick test... I promise I'll try to use the reader interface next time I submit an example. ;o) Alexandre Fayolle -- http://www.logilab.com Narval is the first software agent available as free software (GPL). LOGILAB, Paris (France). From Alexandre.Fayolle@logilab.fr Thu Jun 28 15:26:19 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Thu, 28 Jun 2001 16:26:19 +0200 (CEST) Subject: [XML-SIG] [OT] working unicode strings Message-ID: Ahem, sorry for posting this here, since it is slightly off-topic, but this list is a place where I know I'll find people who have played with unicode strings in Python. So, I have a UTF8 encoded unicode string, that I got it by reading a text node in a DOM. I want to write it somewhere on the disk. s= u'йtй' f=open('/tmp/foo','w') f.write(s) This gets me Traceback (most recent call last): File "", line 1, in ? UnicodeError: ASCII encoding error: ordinal not in range(128) By experimenting a bit, it appears that I can call f.write(s) when f is a StringIO.StringIO, but not when it is a cStringIO.StringIO, a file, or a standard stream (sys.stdout). Needless to say, I'm quite disapointed. So the first question is, how do you manage to work with unicode strings in PyXML/4Suite (a pointer to the right source file is a valuable answer). The second question is, where is the right place to discuss these issues ? The third question is, does anyone know if this state of things is likely to change in python 2.2 ? Alexandre Fayolle -- http://www.logilab.com Narval is the first software agent available as free software (GPL). LOGILAB, Paris (France). From larsga@garshol.priv.no Thu Jun 28 16:00:14 2001 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 28 Jun 2001 17:00:14 +0200 Subject: [XML-SIG] [OT] working unicode strings In-Reply-To: References: Message-ID: * Alexandre Fayolle | | So, I have a UTF8 encoded unicode string, that I got it by reading a text | node in a DOM. I want to write it somewhere on the disk. | | s= u'йtй' | f=open('/tmp/foo','w') | f.write(s) The problem with this is that Python doesn't know how to write non-ASCII characters into a file, since it doesn't know what encoding to use. The solution is to use a codec that writes to the encoding you want to use: import codecs s= u'йtй' f=codecs.open('/tmp/foo','w',"utf-8") f.write(s) | So the first question is, how do you manage to work with unicode | strings in PyXML/4Suite (a pointer to the right source file is a | valuable answer). Once you find out about the codecs module and the unicode function (in __builtins__) it's actually quite easy. One makes occasional gaffes, of course, but it's really not very hard. --Lars M. From mal@lemburg.com Thu Jun 28 17:47:06 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Thu, 28 Jun 2001 18:47:06 +0200 Subject: [XML-SIG] [OT] working unicode strings References: Message-ID: <3B3B5F8A.36DAAFDC@lemburg.com> Alexandre Fayolle wrote: > > Ahem, sorry for posting this here, since it is slightly off-topic, but > this list is a place where I know I'll find people who have played with > unicode strings in Python. > > So, I have a UTF8 encoded unicode string, that I got it by reading a text > node in a DOM. I want to write it somewhere on the disk. > > s= u'йtй' > f=open('/tmp/foo','w') > f.write(s) > > This gets me > Traceback (most recent call last): > File "", line 1, in ? > UnicodeError: ASCII encoding error: ordinal not in range(128) > > By experimenting a bit, it appears that I can call f.write(s) when f is a > StringIO.StringIO, but not when it is a cStringIO.StringIO, a file, or a > standard stream (sys.stdout). Needless to say, I'm quite disapointed. Python's IO will try to write your Unicode string as 8-bit string and to do so first convert it to the default encoding which is ASCII. f.write(s.encode('latin-1')) should get you the results you are probably looking for. Altenatively, open the file using codecs.open() -- it let's you specfiy the encoding of the file and does the converting for you. > So the first question is, how do you manage to work with unicode strings > in PyXML/4Suite (a pointer to the right source file is a valuable answer). I'll punt on this one... > The second question is, where is the right place to discuss these issues ? Sure. > The third question is, does anyone know if this state of things is likely > to change in python 2.2 ? Things always change from one Python release to the next ;-) Seriously, there are no plans for changing this behaviour; otherwise Python would have to guess your encoding in some way (one way is by looking at your locale settings; see site.py for details). IMO, explicit is better than implicit. So the codecs.open() approach should be preferred. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From martin@loewis.home.cs.tu-berlin.de Thu Jun 28 23:28:37 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Fri, 29 Jun 2001 00:28:37 +0200 Subject: [XML-SIG] [OT] working unicode strings In-Reply-To: (message from Alexandre Fayolle on Thu, 28 Jun 2001 16:26:19 +0200 (CEST)) References: Message-ID: <200106282228.f5SMSbr01777@mira.informatik.hu-berlin.de> > Ahem, sorry for posting this here, since it is slightly off-topic, but > this list is a place where I know I'll find people who have played with > unicode strings in Python. i18n-sig@python.org is the canonical place. > The third question is, does anyone know if this state of things is likely > to change in python 2.2 ? No, the notion of ASCII being the default encoding will stay. Of course, as Lars Marius explains, it is quite easy to pick the output encoding of your choice. Regards, Martin From martin@loewis.home.cs.tu-berlin.de Fri Jun 29 00:12:53 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Fri, 29 Jun 2001 01:12:53 +0200 Subject: [XML-SIG] DOM and non ascii element or attribute names In-Reply-To: (message from Alexandre Fayolle on Thu, 28 Jun 2001 11:21:34 +0200 (CEST)) References: Message-ID: <200106282312.f5SNCr301903@mira.informatik.hu-berlin.de> > >From my reading of the DOM L2 spec, it should be possible to create DOM > nodes (elements or attributes) with non-ascii characters in their > name. 4DOM seems to be preventing this, with 2 lines in Document.py : > > #FIXME: should allow combining characters: fix when Python gets Unicode > g_namePattern = re.compile('[a-zA-Z_:][\w\.\-_:]*\Z') > > My unicode-fu is a bit too low right now to write a patch (it should > improve soon), but I'll be glad to do some testing. If you have the CVS version available, just try using g_namePattern = xml.utils.characters.re_Name Not sure what the \Z in the end is good for; it might be "more right" to write g_namePattern = re.compile(xml.utils.characters.Name + "\Z") instead. The constants literally taken from the XML recommendation; if there are problems wiht that, I'd like to know about them. If you find this working, it would be a valuable contribution to find all such regular expressions in 4DOM and replace them with the xml.utils.characters equivalents. If you find anything missing there, please let me know. Regards, Martin From martin@loewis.home.cs.tu-berlin.de Fri Jun 29 00:20:01 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Fri, 29 Jun 2001 01:20:01 +0200 Subject: [XML-SIG] unicode, latin-1 and DOM... In-Reply-To: (message from Alexandre Fayolle on Thu, 28 Jun 2001 10:44:38 +0200 (CEST)) References: Message-ID: <200106282320.f5SNK1W01934@mira.informatik.hu-berlin.de> > I would have expected a parse error when the latin-1 characters where > encountered, and not a silent failure to create the Text node. Using plain SAX, I get >>> xml.sax.parseString('=E9t=E9') Traceback (most recent call last): File "", line 1, in ? TypeError: parseString() takes at least 2 arguments (1 given) >>> xml.sax.parseString('=E9t=E9',xml.sax.ContentHandler()) Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.2/site-packages/_xmlplus/sax/__init__.py", l= ine 47, in parseString parser.parse(inpsrc) File "/usr/local/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py"= , line 43, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/local/lib/python2.2/site-packages/_xmlplus/sax/xmlreader.py", = line 123, in parse self.feed(buffer) File "/usr/local/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py"= , line 96, in feed self._parser.Parse(data, isFinal) UnicodeError: UTF-8 decoding error: invalid data What appears to happen is that Expat accepts the string and passes it to the character handler (not sure why it does that); the pyexpat character handler then assumes that it is UTF-8, and raises a UnicodeError as it cannot convert it from Unicode. Most likely, the DOM reader masks the UnicodeError. xml.dom.minidom.parseString produces the same error. Regards, Martin From martin@loewis.home.cs.tu-berlin.de Thu Jun 28 23:23:53 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Fri, 29 Jun 2001 00:23:53 +0200 Subject: [XML-SIG] Sax2 deprecated functions In-Reply-To: (message from Alexandre Fayolle on Thu, 28 Jun 2001 16:07:54 +0200 (CEST)) References: Message-ID: <200106282223.f5SMNrc01776@mira.informatik.hu-berlin.de> > > Note: you shouldn't be using the deprecated Sax2 "From*" functions. > > So I heard... On the other hand, it's sooooo nice to have them for a quick > test... I promise I'll try to use the reader interface next time I submit > an example. ;o) I also think it will be hard to phase them out. There are good reasons not to add new features to them, but I agree they have a big plus when it comes to convenience, so people are unlikely to stop using them. Regards, Martin From uche.ogbuji@fourthought.com Fri Jun 29 04:05:19 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Thu, 28 Jun 2001 21:05:19 -0600 Subject: [XML-SIG] unicode, latin-1 and DOM... In-Reply-To: Message from "Martin v. Loewis" of "Fri, 29 Jun 2001 01:20:01 +0200." <200106282320.f5SNK1W01934@mira.informatik.hu-berlin.de> Message-ID: <200106290305.f5T35J403131@localhost.local> > What appears to happen is that Expat accepts the string and passes it > to the character handler (not sure why it does that); Clearly a pyexpat bug. Of course I cringe at the thought of going back t= o = spelunk through the expat encoding magic code again. The horror. The ho= rror. -- = Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com = 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From martin@loewis.home.cs.tu-berlin.de Fri Jun 29 06:15:00 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Fri, 29 Jun 2001 07:15:00 +0200 Subject: [XML-SIG] installing PyXML In-Reply-To: (message from Tammy Wong on Wed, 27 Jun 2001 16:20:39 -0700) References: Message-ID: <200106290515.f5T5F0m00945@mira.informatik.hu-berlin.de> > I am trying to install PyXML-0.6.2. > >From running "python setup.py install" it appears to create > the package at /local/lib/python2.0/site-packages/_xmlplns Unless your python is in /local/bin/python, it should go to /usr/local/lib/python2.0/site-packages/_xmlplus instead by default. > how can I modify this such that I can specify where I want the > package to be created? You can give a --prefix option to setup.py. See the distutils documentation, or setup.py --help, for details. Regards, Martin From fdrake@acm.org Fri Jun 29 15:13:12 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 29 Jun 2001 10:13:12 -0400 (EDT) Subject: [XML-SIG] module iso8601 and python 1.5 In-Reply-To: References: <15161.59701.291244.280472@cj42289-a.reston1.va.home.com> Message-ID: <15164.36088.457858.823353@cj42289-a.reston1.va.home.com> Alexandre Fayolle writes: > I was meaning 1.5.2, indeed (just being lazy on that one). I cound not > find an int() function with an arity of 2 (i.e. with an optional radix Yeah, I remember "arity". I don't remember anyone using that term except in reference to Prolog though! You're right -- int(string, radix) made it's grand debut in Python 1.6. I was too quick in just making sure that the 1.5.2 int() took strings, and didn't check the radix specifically. I'll check in a fixed version; thanks for catching this! -Fred -- Fred L. Drake, Jr. PythonLabs at Digital Creations From akrug@mps.de Sat Jun 30 12:37:50 2001 From: akrug@mps.de (Arne Krug) Date: Sat, 30 Jun 2001 13:37:50 +0200 Subject: [XML-SIG] SAX event: internalEntityDecl In-Reply-To: <15164.36088.457858.823353@cj42289-a.reston1.va.home.com> References: Message-ID: <3B3DD62E.22498.3C2354@localhost> hi, is there a way to distinguish between SAX entity-events: one Entity is declared in an external dtd and the other one is directly in the xml-file I want to know thru an event or whatever if the Entity is located in the DTD-File or in the XML-File I use the SAXparser xmlproc... example: mail.xml: ]> &henning; &ingo; Mon, 21 Apr 1997 09:27:55 +0200 XML literature mail.dtd: thanks for any help arne --- Arne Krug: --- --- ufcx@rz.uni-karlsruhe.de --- --- akrug@mps.de --- From Mike.Olson@fourthought.com Sat Jun 30 15:49:46 2001 From: Mike.Olson@fourthought.com (Mike Olson) Date: Sat, 30 Jun 2001 08:49:46 -0600 Subject: [XML-SIG] 4xslt bug involving key() References: <006601c0f077$eb31fc70$f803a8c0@zeus> <004101c0f21c$fa2e0560$7cac1218@reston1.va.home.com> Message-ID: <3B3DE70A.653002A6@FourThought.com> "Thomas B. Passin" wrote: Thomas, I forget if someone replied to you, but this appears to be fixed in CVS. Mike > > I've just found that a stylesheet construction that I need to use doesn't > work right with 4xslt (the python 1.5.2 version I got from the 4suite.org > site several weeks ago). > > The stylesheet takes a number of elements that have duplicated content and > produce a list without duplicates. It's a simplified Muenchian method, > using and key(). It works right with msxml3, saxon, and xalan, > but not 4xslt. I need to use this in a project I'm in the middle of at > work, so I request the 4thought people (Mike, would that be?) to take a look > at it. > > If 4xslt doesn't implement keys (I thought it did), then at least it should > throw an error. > > Here are the documents and the results: > > > A > B > C > B > B > D > D > E > > =============================================================== > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > > > > > > select="/items/a > [generate-id()=generate-id(key('item',.)[1])]"/> > > > > Original list: > > Should-be-unique list: > > > > =========================================================== > Results from saxon: > > D:>saxon unique2.xml unique2.xsl > > Original list: > ABCBBDDE > Should-be-unique list: > ABCDE > > Results from 4xslt (running from a batch file driver): > > D:>4xslt unique2.xml unique2.xsl > > Original list: > ABCBBDDE > Should-be-unique list: > ABCBBDDE > > See the problem? > > Regards, > > Tom P > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig -- Mike Olson Principal Consultant mike.olson@fourthought.com +1 303 583 9900 x 102 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From martin@loewis.home.cs.tu-berlin.de Sat Jun 30 17:34:13 2001 From: martin@loewis.home.cs.tu-berlin.de (Martin v. Loewis) Date: Sat, 30 Jun 2001 18:34:13 +0200 Subject: [XML-SIG] Re: Narval 1.0 and Python 2.1 In-Reply-To: <3B33669D.9EB0C620@FourThought.com> (message from Mike Olson on Fri, 22 Jun 2001 09:39:09 -0600) References: <200106210745.f5L7jrm01579@mira.informatik.hu-berlin.de> <3B33669D.9EB0C620@FourThought.com> Message-ID: <200106301634.f5UGYDQ08994@mira.informatik.hu-berlin.de> > Just out of curiousity, what is the timeline for 0.7.0? It won't be that much driven by time events, but rather by state events. I wanted to integrate 4XSLT into PyXML, in a way that does not require 4Suite. I should be looking into integrating 4Suite 0.11 some time, but I'll be away for two weeks, so nothing will happen soon. Afterwards, once 4XSLT is working as well in PyXML as it does in 4Suite, PyXML 0.7 can be released. Now, if somebody things we should not wait any longer and release what we have (perhaps excluding the xslt code); that would be another option. Regards, Martin From rsalz@zolera.com Sat Jun 30 18:00:23 2001 From: rsalz@zolera.com (Rich Salz) Date: Sat, 30 Jun 2001 13:00:23 -0400 Subject: [XML-SIG] Re: Narval 1.0 and Python 2.1 References: <200106210745.f5L7jrm01579@mira.informatik.hu-berlin.de> <3B33669D.9EB0C620@FourThought.com> <200106301634.f5UGYDQ08994@mira.informatik.hu-berlin.de> Message-ID: <3B3E05A7.CA87E510@zolera.com> > I wanted to integrate 4XSLT into PyXML, in a way that does not > require 4Suite. That means 4XPATH also, right? /r$ -- Zolera Systems, Securing web services (XML, SOAP, Signatures, Encryption) http://www.zolera.com