From dieter at handshake.de Fri Jul 1 20:10:11 2005 From: dieter at handshake.de (Dieter Maurer) Date: Fri, 1 Jul 2005 20:10:11 +0200 Subject: [XML-SIG] losing entities when parsing then texting In-Reply-To: References: Message-ID: <17093.34563.249605.966647@gargle.gargle.HOWL> Greg Wilson wrote at 2005-6-30 12:19 -0400: >This one must have come up several times before, but neither Google nor >the Cookbook have given me an answer. I'm doing this: > >data = sys.stdin.read() >doc = xml.dom.minidom.parseString(data) >root = doc.documentElement >...add and modify some nodes... >sys.stdout.write(root.toxml('utf-8')) > >A typical input looks like this: > > > > > > > blah > blah & blah > blah&emdash;blah > > > > "Minidom"s support for entities is weak. Try to avoid them (beside the standard XML entities) by using the corresponding Unicode characters instead. -- Dieter From gvwilson at cs.utoronto.ca Sat Jul 2 22:20:01 2005 From: gvwilson at cs.utoronto.ca (Greg Wilson) Date: Sat, 02 Jul 2005 16:20:01 -0400 Subject: [XML-SIG] losing entities when parsing then texting In-Reply-To: <17093.34563.249605.966647@gargle.gargle.HOWL> References: <17093.34563.249605.966647@gargle.gargle.HOWL> Message-ID: Dieter Maurer wrote: > "Minidom"s support for entities is weak. > > Try to avoid them (beside the standard XML entities) by > using the corresponding Unicode characters instead. I realize I should include the Unicode characters directly in my files, but that's not possible in this case---I have to accommodate people who are using editors that only handle 7-bit ASCII. Thanks, Greg From mike at skew.org Sun Jul 3 19:56:22 2005 From: mike at skew.org (Mike Brown) Date: Sun, 3 Jul 2005 11:56:22 -0600 (MDT) Subject: [XML-SIG] losing entities when parsing then texting In-Reply-To: Message-ID: <200507031756.j63HuNWD000785@chilled.skew.org> Greg Wilson wrote: > Dieter Maurer wrote: > > "Minidom"s support for entities is weak. > > > > Try to avoid them (beside the standard XML entities) by > > using the corresponding Unicode characters instead. > > I realize I should include the Unicode characters directly in my files, > but that's not possible in this case---I have to accommodate people who > are using editors that only handle 7-bit ASCII. ]> • é means exactly the same as ߦ é so why not just use the latter? No need for entities when you can use numeric character references. Accommodating 7-bit editors is basically what they exist for. Mike From dieter at handshake.de Sun Jul 3 22:53:42 2005 From: dieter at handshake.de (Dieter Maurer) Date: Sun, 3 Jul 2005 22:53:42 +0200 Subject: [XML-SIG] losing entities when parsing then texting In-Reply-To: References: <17093.34563.249605.966647@gargle.gargle.HOWL> Message-ID: <17096.20566.404577.919377@gargle.gargle.HOWL> Greg Wilson wrote at 2005-7-1 15:45 -0400: >I realize I should include the Unicode characters directly in my files, >but that's not possible in this case---I have to accommodate people who >are using editors that only handle 7-bit ASCII. Then, you need to implement an entity reference node (DOM extension) and let the parser's "SkippedEntityHandler" create such nodes. -- Dieter From noreply at sourceforge.net Mon Jul 4 05:31:49 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 03 Jul 2005 20:31:49 -0700 Subject: [XML-SIG] [ pyxml-Bugs-1231997 ] Memory leak in sgmlop.SGMLParser.register? Message-ID: Bugs item #1231997, was opened at 2005-07-03 22:31 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=1231997&group_id=6473 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: DOM Group: None Status: Open Resolution: None Priority: 5 Submitted By: Bryan Rink (holopoj) Assigned to: Nobody/Anonymous (nobody) Summary: Memory leak in sgmlop.SGMLParser.register? Initial Comment: The following code runs fine: from xml.dom.ext.reader import Sgmlop from xml.parsers import sgmlop while True: a = Sgmlop.HtmlParser() b = sgmlop.SGMLParser() #a.parser = b b.register(a) But if the commented line is uncommented this leaks memory (very quickly). The garbage collector must be having trouble with the fact the two objects reference each other. This isn't a contrived example, the code above was adopted from lines 48-51 of xml.dom.reader.Sgmlop.py: def initParser(self, parser): self._parser = parser self._parser.register(self) return And HtmlParser.initParser calls that function like this: SgmlopParser.initParser(self, sgmlop.SGMLParser()) initParser is called from xml.ext.dom.reader.HtmlLib.Reader.fromStream which is how I came across this error. I was parsing many html documents and creating a new Reader for each one. There is no problem if I use only one reader, so that's the solution I will take, but it still seems that the first snippet of code above should not leak memory. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=1231997&group_id=6473 From and-xml at doxdesk.com Wed Jul 6 15:19:56 2005 From: and-xml at doxdesk.com (Andrew Clover) Date: Wed, 06 Jul 2005 15:19:56 +0200 Subject: [XML-SIG] losing entities when parsing then texting In-Reply-To: References: <17093.34563.249605.966647@gargle.gargle.HOWL> Message-ID: <42CBDA7C.6000401@doxdesk.com> Greg Wilson wrote: > I realize I should include the Unicode characters directly in my files, > but that's not possible in this case---I have to accommodate people who > are using editors that only handle 7-bit ASCII. Theoretically, .toxml('us-ascii') should generate usable output. Unfortunately minidom doesn't really do this properly and you'll get a UnicodeError. As a workaround you could just take the UTF-8 encoded version and .encode('us-ascii', 'xmlcharrefreplace') on it... which is technically the wrong thing if nodeNames or CDATASections or whatever have non-ASCII characters in, but that probably doesn't matter to you. ObStandardPlug: pxdom supports both proper charref-escaping (using DOM3LS DOMOutput.encoding) and keeping EntityReference nodes (using DOM3Core DOMConfiguration.setParameter('entities', True) or pxdom.parse(file, {'entities': True}).) -- Andrew Clover mailto:and at doxdesk.com http://www.doxdesk.com/ From mike at skew.org Thu Jul 7 00:47:18 2005 From: mike at skew.org (Mike Brown) Date: Wed, 6 Jul 2005 16:47:18 -0600 (MDT) Subject: [XML-SIG] minidom .toxml() brokenness Message-ID: <200507062247.j66MlIYZ039970@chilled.skew.org> In 4Suite we have a fairly robust and speedy set of DOM serialization routines. To date, we've made sure it works equally well with both minidom and Domlette. Is there any interest in porting this into minidom as a replacement for the buggy .toxml()? Seems like it would alleviate a bit of frustration. In 4Suite, the public interface is the Print() and PrettyPrint() functions in Ft.Xml.Domlette; you just call one or the other, passing in what you want to serialize, and they'll walk the DOM, generating SAX-like events that are handled by an instance of the right kind of serializer. The walker detects the type of DOM (HTML or XML) automatically, but this can be overridden to force a certain kind of output. The user can also choose the output stream (file-like object) and character encoding, of course. (user functions and DOM walker) =============================== http://cvs.4suite.org/viewcvs/4Suite/Ft/Xml/Lib/Print.py?view=markup (DOM walker handlers for different kinds of serialization) ========================================================== http://cvs.4suite.org/viewcvs/4Suite/Ft/Xml/Lib/XmlPrinter.py?view=markup http://cvs.4suite.org/viewcvs/4Suite/Ft/Xml/Lib/XmlPrettyPrinter.py?view=markup http://cvs.4suite.org/viewcvs/4Suite/Ft/Xml/Lib/HtmlPrinter.py?view=markup http://cvs.4suite.org/viewcvs/4Suite/Ft/Xml/Lib/HtmlPrettyPrinter.py?view=markup (entity/char ref-aware stream writer needed by all of the above) ================================================================ current version (a Python C extension only): http://cvs.4suite.org/viewcvs/4Suite/Ft/Xml/src/StreamWriter.c?view=markup last pure-Python version (no longer maintained, but is just 1 patch behind the C version, presently): http://cvs.4suite.org/viewcvs/4Suite/Ft/Xml/Lib/StreamWriter.py?hideattic=0&view=markup -Mike From jeffzhg at yahoo.com Fri Jul 8 21:41:01 2005 From: jeffzhg at yahoo.com (Jeff Zhang) Date: Fri, 8 Jul 2005 12:41:01 -0700 (PDT) Subject: [XML-SIG] prettyprint Message-ID: <20050708194101.37878.qmail@web33305.mail.mud.yahoo.com> Hi, I'm looking for xml.dom.ext.prettyprint module, I downloaded latest PyXml pkg, but didn't see the module in it. I read a document on the web, saying you can use prettyprint with PyXml pkg 0.6.6, is it not available after 0.6.6 or I didn't look in the right place? Thanks in advance, -Jeff __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20050708/e0dd8069/attachment.htm From jasj at miller.cs.uwm.edu Fri Jul 8 22:22:32 2005 From: jasj at miller.cs.uwm.edu (Jason Michael Jurkowski) Date: Fri, 8 Jul 2005 15:22:32 -0500 (CDT) Subject: [XML-SIG] prettyprint In-Reply-To: <20050708194101.37878.qmail@web33305.mail.mud.yahoo.com> Message-ID: PrettyPrint is a function in the xml.dom.ext module. see below. Python 2.2 (#1, 11/12/02, 23:31:59) [GCC Apple cpp-precomp 6.14] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import xml.dom.ext.prettyprint Traceback (most recent call last): File "", line 1, in ? ImportError: No module named prettyprint >>> from xml.dom.ext import PrettyPrint >>> dir(xml.dom.ext) Traceback (most recent call last): File "", line 1, in ? NameError: name 'xml' is not defined >>> import xml.dom.ext >>> dir(xml.dom.ext) ['Canonicalize', 'DOMException', 'FtDomException', 'GetAllNs', 'GetElementById', 'HTML_4_TRANSITIONAL_INLINE', 'IsDOMString', 'Node', 'NodeFilter', 'NodeTypeDict', 'NodeTypeToClassName', 'PrettyPrint', 'Print', 'ReleaseNode', 'SeekNss', 'SplitQName', 'StripHtml', 'StripXml', 'XHtmlPrettyPrint', 'XHtmlPrint', 'XMLNS_NAMESPACE', 'XML_NAMESPACE', 'XmlSpaceState', '__builtins__', '__doc__', '__file__', '__name__', '__path__', '_id_key', 'c14n', 're', 'string', 'sys', 'types'] >>> On Fri, 8 Jul 2005, Jeff Zhang wrote: > Hi, > I'm looking for xml.dom.ext.prettyprint module, I downloaded latest PyXml pkg, but didn't see the module in it. I read a document on the web, saying you can use prettyprint with PyXml pkg 0.6.6, is it not available after 0.6.6 or I didn't look in the right place? > > Thanks in advance, > > -Jeff > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com From Uche.Ogbuji at fourthought.com Sat Jul 9 16:11:49 2005 From: Uche.Ogbuji at fourthought.com (Uche Ogbuji) Date: Sat, 09 Jul 2005 08:11:49 -0600 Subject: [XML-SIG] minidom .toxml() brokenness In-Reply-To: <200507062247.j66MlIYZ039970@chilled.skew.org> References: <200507062247.j66MlIYZ039970@chilled.skew.org> Message-ID: <1120918310.32181.205.camel@borgia> On Wed, 2005-07-06 at 16:47 -0600, Mike Brown wrote: > In 4Suite we have a fairly robust and speedy set of DOM serialization > routines. To date, we've made sure it works equally well with both minidom and > Domlette. Is there any interest in porting this into minidom as a replacement > for the buggy .toxml()? Seems like it would alleviate a bit of frustration. Personally, I think this is a good idea, but I'm not sure I'd expect much action on it. We seem to have reached a bit of a stagnation point with PyXML, and the wheels would be very slow to turn for any sort of change. I also wonder about resistance to add more C extensions, at least to the profile of minidom that makes its way into the standard library. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://fourthought.com http://copia.ogbuji.net http://4Suite.org Use CSS to display XML, part 2 - http://www-128.ibm.com/developerworks/edu/x-dw-x-xmlcss2-i.html XML Output with 4Suite & Amara - http://www.xml.com/pub/a/2005/04/20/py-xml.html Use XSLT to prepare XML for import into OpenOffice Calc - http://www.ibm.com/developerworks/xml/library/x-oocalc/ Schema standardization for top-down semantic transparency - http://www-128.ibm.com/developerworks/xml/library/x-think31.html From uche.ogbuji at fourthought.com Sun Jul 10 05:53:50 2005 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat, 09 Jul 2005 21:53:50 -0600 Subject: [XML-SIG] XBEL and hyperlink tagging In-Reply-To: <200506301456.37833.junkc@fh-trier.de> References: <200506171758.j5HHwmYG006534@ms-smtp-03-eri0.ohiordc.rr.com> <200506301456.37833.junkc@fh-trier.de> Message-ID: <1120967630.12944.8.camel@borgia> On Thu, 2005-06-30 at 14:56 +0200, Christian Junk wrote: > Hi, Danielle! > > It's nice to see, that there are some people out there who still want to work > on a standardised way to store and share hyperlinks. > > But the XBEL format isn't ready to the job! Months ago I proposed to resume > the work on XBEL and perhaps make it a independent project. But at that time > there wasn't enough interest. > > We should dare! > > Regards, > Christian > > P.S.: Perhaps you like to take a look at the xml-sig archive to find the old > discussion (dec 04 and jan 05) ... This is all true. Because I had offered back then to take the initiative on making it an independent project, I should update to say that I regretfully will not be able to do so. This is not because of lack of interest, but lack of time. In the time I have for such open spec work, I have outstanding commitments to help with EXSLT and XUpdate. I just despair of getting around to XBEL. If someone else spearheads the effort (I think it's mostly just a matter of registering with SourceForge), I'll try to help where I can, including with publicity. Good luck. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://fourthought.com http://copia.ogbuji.net http://4Suite.org Use CSS to display XML, part 2 - http://www-128.ibm.com/developerworks/edu/x-dw-x-xmlcss2-i.html XML Output with 4Suite & Amara - http://www.xml.com/pub/a/2005/04/20/py-xml.html Use XSLT to prepare XML for import into OpenOffice Calc - http://www.ibm.com/developerworks/xml/library/x-oocalc/ Schema standardization for top-down semantic transparency - http://www-128.ibm.com/developerworks/xml/library/x-think31.html From beverly at multi-sol.com Wed Jul 13 00:13:10 2005 From: beverly at multi-sol.com (Beverly T. Block) Date: Tue, 12 Jul 2005 15:13:10 -0700 (PDT) Subject: [XML-SIG] accessing xml-sig wiki Message-ID: <2598.4.41.225.86.1121206390.squirrel@webmail.ipns.com> Hi, I just tried to access the xml-sig wiki via the link on . It sent me to purl.net, which redirected me to twistedmatrix.com. That site had links to 3 wikis, only one of which actually worked; it was for twisted. I'm just starting to do xml development, and would really like to have access to that wiki, if it still exists! Thanks, Beverly From four at four.org Sat Jul 16 17:23:41 2005 From: four at four.org (four@four.org) Date: Sat, 16 Jul 2005 17:23:41 +0200 Subject: [XML-SIG] hi Message-ID: <20050716152347.0267E1E4006@bag.python.org> Your message was undeliverable due to the following reason: Your message was not delivered because the destination computer was unreachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely there is a network problem that prevented delivery, but it is also possible that the computer is turned off, or does not have a mail system running right now. Your message could not be delivered within 1 days: Host 113.64.62.120 is not responding. The following recipients did not receive this message: Please reply to postmaster at python.org if you feel this message to be in error. -------------- next part -------------- A non-text attachment was scrubbed... Name: pziikz.zip Type: application/octet-stream Size: 29372 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20050716/32832e29/pziikz-0001.obj From postmaster at python.org Sun Jul 17 13:06:59 2005 From: postmaster at python.org (Post Office) Date: Sun, 17 Jul 2005 13:06:59 +0200 Subject: [XML-SIG] RETURNED MAIL: DATA FORMAT ERROR Message-ID: <20050717110656.OKMR2678.viefep11-int.chello.at@python.org> The original message was received at Sun, 17 Jul 2005 13:06:59 +0200 from [222.38.176.219] ----- The following addresses had permanent fatal errors ----- xml-sig at python.org ----- Transcript of session follows ----- ... while talking to 85.46.252.125: >>> RCPT To: <<< 550 5.1.1 ... Invalid recipient -------------- next part -------------- -------- Virus Warning Message -------- The virus (W32/Mydoom.o at MM!zip) was detected in the attachment letter.zip. The attached File letter.zip has been removed. Nachfolgender Virus (W32/Mydoom.o at MM!zip) wurde im Attachment letter.zip gefunden, deshalb wurde das Attachment letter.zip gel?scht. F?r Fragen dazu steht Ihnen der chello Helpdesk sehr gerne zur Verf?gung. Weitere Informationen zum Virenschutz: http://portal.chello.at/av-info.html Le serveur de mail chello a d?tect? le virus W32/Mydoom.o at MM!zip dans le fichier letter.zip inclus dans ce mail. Ce fichier letter.zip a donc ?t? supprim?e pour en ?viter la diffusion. Pour plus d'information, merci de cliquer sur le lien suivant http://www.chello.fr Az ?nnek k?zbes?tett lev?l mell?klet?ben a v?russz?r? rendszer a(z) W32/Mydoom.o at MM!zip nev? v?rust tal?lta, ez?rt a(z) letter.zip nev? mell?kletet biztons?gi okokb?l elt?vol?totta. Tov?bbi inform?ci??rt, k?rj?k kattintson az al?bbi hivatkoz?sra: http://home.hun.chello.hu/upcmnfc/start/szolgaltatas/biztonsag/virussz_res_gyik/ V p??loze letter.zip byl detekov?n virus W32/Mydoom.o at MM!zip. P??loha letter.zip byla proto odstran?na. Pro dotazy kontaktujte pros?m technickou podporu. W za??czniku letter.zip wykryto wirus W32/Mydoom.o at MM!zip. Plik letter.zip zosta? usuni?ty. Wi?cej informacji znajdziesz na stronie internetowej: http://home.pol.chello.pl/upcmnfc/start/pomoc/wirusy/ V prilo?enom s?bore letter.zip bol zisten? v?rus (W32/Mydoom.o at MM!zip). S?bor letter.zip bol odstr?nen?. V pr?pade ot?zok pros?m kontaktujte linku technickej podpory. http://www.chello.sk ---------------------------------------- From postmaster at python.org Mon Jul 18 12:49:42 2005 From: postmaster at python.org (Mail Delivery Subsystem) Date: Mon, 18 Jul 2005 12:49:42 +0200 Subject: [XML-SIG] Returned mail: see transcript for details Message-ID: <20050718104945.VUCV26910.viefep14-int.chello.at@python.org> The original message was received at Mon, 18 Jul 2005 12:49:42 +0200 from [167.231.33.206] ----- The following addresses had permanent fatal errors ----- ----- Transcript of session follows ----- ... while talking to python.org.: >>> MAIL FROM:"Mail Delivery Subsystem" <<< 509 "Mail Delivery Subsystem" ... Domain unknown -------------- next part -------------- -------- Virus Warning Message -------- The virus (W32/Mydoom.o at MM!zip) was detected in the attachment message.zip. The attached File message.zip has been removed. Nachfolgender Virus (W32/Mydoom.o at MM!zip) wurde im Attachment message.zip gefunden, deshalb wurde das Attachment message.zip gel?scht. F?r Fragen dazu steht Ihnen der chello Helpdesk sehr gerne zur Verf?gung. Weitere Informationen zum Virenschutz: http://portal.chello.at/av-info.html Le serveur de mail chello a d?tect? le virus W32/Mydoom.o at MM!zip dans le fichier message.zip inclus dans ce mail. Ce fichier message.zip a donc ?t? supprim?e pour en ?viter la diffusion. Pour plus d'information, merci de cliquer sur le lien suivant http://www.chello.fr Az ?nnek k?zbes?tett lev?l mell?klet?ben a v?russz?r? rendszer a(z) W32/Mydoom.o at MM!zip nev? v?rust tal?lta, ez?rt a(z) message.zip nev? mell?kletet biztons?gi okokb?l elt?vol?totta. Tov?bbi inform?ci??rt, k?rj?k kattintson az al?bbi hivatkoz?sra: http://home.hun.chello.hu/upcmnfc/start/szolgaltatas/biztonsag/virussz_res_gyik/ V p??loze message.zip byl detekov?n virus W32/Mydoom.o at MM!zip. P??loha message.zip byla proto odstran?na. Pro dotazy kontaktujte pros?m technickou podporu. W za??czniku message.zip wykryto wirus W32/Mydoom.o at MM!zip. Plik message.zip zosta? usuni?ty. Wi?cej informacji znajdziesz na stronie internetowej: http://home.pol.chello.pl/upcmnfc/start/pomoc/wirusy/ V prilo?enom s?bore message.zip bol zisten? v?rus (W32/Mydoom.o at MM!zip). S?bor message.zip bol odstr?nen?. V pr?pade ot?zok pros?m kontaktujte linku technickej podpory. http://www.chello.sk ---------------------------------------- From jeremy.kloth at fourthought.com Tue Jul 19 23:06:20 2005 From: jeremy.kloth at fourthought.com (Jeremy Kloth) Date: Tue, 19 Jul 2005 15:06:20 -0600 Subject: [XML-SIG] [4suite-dev] 4suite internal error In-Reply-To: <599CA3DA4E37554ABAFF4B7D98F655DF02BDE84B@helmsrv3.helmes.ee> References: <599CA3DA4E37554ABAFF4B7D98F655DF02BDE84B@helmsrv3.helmes.ee> Message-ID: <200507191506.21823.jeremy.kloth@fourthought.com> On Tuesday 19 July 2005 2:46 pm, Olavi Akerman - HELMES wrote: > Hello > > While stress-testing our application we came upon a following error > which indicated an internal problem with 4XPath. > Is there a way we can prevent this error from occuring? > > Thanks, > Olavi Akerman > > > Exception::: (, > , 0x8a54a24>) > WORKING!!!!!!!!!! > [Tue Jul 19 23:36:48 2005] [error] WebKit: Error while executing script > /opt/ibank/App7/scripts/overview/profilesummary.py > Traceback (most recent call last): > File "/opt/ibank/App2/scripts/overview/profilesummary.py", line 40, in > default > e = xpath.Compile("//macc:AccountsSummary") > File "/usr/lib/python2.2/site-packages/_xmlplus/xpath/__init__.py", > line 83, in Compile > raise RuntimeException(RuntimeException.INTERNAL, stream.getvalue()) > RuntimeException: There is an internal bug in 4XPath. Please report > this error code to support at 4suite.org : > Traceback (most recent call last): > File "/usr/lib/python2.2/site-packages/_xmlplus/xpath/__init__.py", > line 76, in Compile > return parser.new().parse(expr) > File "/usr/lib/python2.2/site-packages/_xmlplus/xpath/pyxpath.py", > line 319, in parse > from XPathGrammar import XPath,XPathScanner > ImportError: cannot import name XPath Hmm, this appears to be an error with the XPath parser included in the PyXML distribution of 4XPath. Since I am no longer familiar with that code, hopefully someone on xml-sig will be able to help. -- Jeremy Kloth Fourthought, Inc. http://fourthought.com/ http://4suite.org/ From Olavi.Akerman at helmes.ee Tue Jul 19 23:12:15 2005 From: Olavi.Akerman at helmes.ee (Olavi Akerman - HELMES) Date: Wed, 20 Jul 2005 00:12:15 +0300 Subject: [XML-SIG] Internal error Message-ID: <599CA3DA4E37554ABAFF4B7D98F655DF02BDE84D@helmsrv3.helmes.ee> Hello While stress-testing our application we came upon a following error which indicated an internal problem with 4XPath. Is there a way we can prevent this error from occuring? I already tried 4suite-dev at lists.fourthought.com, but they indicated, that this was error with the XPath parser included in the PyXML distribution of 4XPath and suggested this forum. Thanks, Olavi Exception::: (, , ) WORKING!!!!!!!!!! [Tue Jul 19 23:36:48 2005] [error] WebKit: Error while executing script /opt/ibank/App7/scripts/overview/profilesummary.py Traceback (most recent call last): File "/opt/ibank/App2/scripts/overview/profilesummary.py", line 40, in default e = xpath.Compile("//macc:AccountsSummary") File "/usr/lib/python2.2/site-packages/_xmlplus/xpath/__init__.py", line 83, in Compile raise RuntimeException(RuntimeException.INTERNAL, stream.getvalue()) RuntimeException: There is an internal bug in 4XPath. Please report this error code to support at 4suite.org : Traceback (most recent call last): File "/usr/lib/python2.2/site-packages/_xmlplus/xpath/__init__.py", line 76, in Compile return parser.new().parse(expr) File "/usr/lib/python2.2/site-packages/_xmlplus/xpath/pyxpath.py", line 319, in parse from XPathGrammar import XPath,XPathScanner ImportError: cannot import name XPath -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20050720/b66765cf/attachment.htm From tsmets at gmail.com Thu Jul 28 15:52:56 2005 From: tsmets at gmail.com (Thomas Smets) Date: Thu, 28 Jul 2005 15:52:56 +0200 Subject: [XML-SIG] Using http://pyxml.sourceforge.net from Jython Message-ID: Dear, Does your python/XML library works with Jython ... ? \T, -- Thomas SMETS rue J. Wytsmanstraat 62 1050 Brussels m. : +32 (0)497 44 68 12 From hegedus at med.unc.edu Thu Jul 28 18:21:29 2005 From: hegedus at med.unc.edu (Tamas Hegedus) Date: Thu, 28 Jul 2005 12:21:29 -0400 Subject: [XML-SIG] xml-object mapping Message-ID: <42E90609.5030309@med.unc.edu> Hi! I am looking for an xml-object mapping tool ('XML Data Binding-design time product') where I can define the mapping rules in 'binding files' and the parser is generated automatically. Similar to the solution of Dave Kuhlman (http://www.rexx.com/~dkuhlman/generateDS.html) where the mapping is defined in an xml file (if I am understand well). But I already have the target object. The xml-tags should not be used as a property/member name, but should be mapped to an existing object. (There are existing tools, but written in Java (I would prefer Python; I am biologist not using Java for 5 years), like JiBX (http://jibx.sourceforge.net), Castor (http://www.castor.org; "XML-based mapping file to specify bindings for existing object models")) Thanks for your help in advance, Tamas -- Tamas Hegedus, PhD | phone: (1) 919-966 0329 UNC - Biochem & Biophys | fax: (1) 919-966 5178 5007A Thurston-Bowles Bldg | mailto:hegedus at med.unc.edu Chapel Hill, NC, 27599-7248 | http://biohegedus.org From ch.pingel at web.de Fri Jul 29 18:11:58 2005 From: ch.pingel at web.de (Christoph Pingel) Date: Fri, 29 Jul 2005 18:11:58 +0200 Subject: [XML-SIG] the state of WSDL implementation Message-ID: There's a nice project at the Leipzig University http://wortschatz.uni-leipzig.de providing several web services (SOAP) for linguistic use: co-occurrences of words, base forms, left and right neighbours, and so forth. To give you an example of a web service, here's a WSDL describing the baseform service: http://wortschatz.uni-leipzig.de/axis/services/Baseform?wsdl According to the people in Leipzig, Java and .NET clients are doing fine with this (acutally, the server software is part of the Java Axis project), but they say Perl and Python can't handle the complex WSDL descriptions. And indeed, SOAPpy fails to come up with a valid SOAP envelope for this service. I'm wondering if there are similar experiences with Python SOAP clients in other areas. I want to use *just this* service, so I could probably (as a workaround) use a pre-built envelope as a template and just fill in the word of which I need the base form. But this is obviously not the way web services are meant to work. Are there any ideas or comments? Perhaps there are independent implementations of SOAP besides pybwebsvcs? any input is highly welcome! best regards, Christoph Pingel From walter at livinglogic.de Fri Jul 29 18:48:48 2005 From: walter at livinglogic.de (=?ISO-8859-1?Q?Walter_D=F6rwald?=) Date: Fri, 29 Jul 2005 18:48:48 +0200 Subject: [XML-SIG] ANN: XIST 2.11 released Message-ID: <42EA5DF0.3070706@livinglogic.de> XIST 2.11 has been released! What is it? =========== XIST is an extensible HTML/XML 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". What's new in version 2.11? =========================== * A script xml2xsc.py has been added, that can be used to parse an XML file and generate a rudimentary XIST namespace from it. * A DocType for XHTML 1.1 has been added (suggested by Elvelind Grandin). * Line number information is now added when parsing HTML. * The sorted method now supports the same arguments (cmp, key and reverse) as list.sort and sorted in Python 2.4. * The walk doesn't yield the node directly, but yields a Cursor object now, with has several ways of referencing the node. * New methods walknode, walkpath and walkindex have been added. * Presenters use an iterator API instead of a stream API now. Dumping an XML tree presentation to the terminal can now start immediately instead of having to wait for the complete string to be formatted. * Fixed a bug with element/attribute names that contained a . character. (This broke ll.xist.ns.fo.) * Fixed a bug with xmlns attributes in nested elements. When an element ended the parser restored the wrong prefix mapping. * The python-quotes demo has been updated to use the current version of AMK's XML file. * Removed iterator stuff from ll.xist.xfind, as this is now part of the ll package/module. * The function ToNode has been renamed to tonode. * ll.xist.Context now longer subclasses list. * ll.xist.ns.doc.explain will now try to output the objects in the order in which they appear in the Python source. * The node methods find and findfirst have been removed. * ll.xist.ns.cond now uses a sandbox dictionary in a converter context for evaluating expression. For changes in older versions see: http://www.livinglogic.de/Python/xist/History.html Where can I get it? =================== XIST can be downloaded from http://ftp.livinglogic.de/xist/ or ftp://ftp.livinglogic.de/pub/livinglogic/xist/ Web pages are at http://www.livinglogic.de/Python/xist/ ViewCVS access is available at http://www.livinglogic.de/viewcvs/ For information about the mailing lists go to http://www.livinglogic.de/Python/xist/Mailinglists.html Bye, Walter D?rwald From Uche.Ogbuji at fourthought.com Sat Jul 30 19:34:47 2005 From: Uche.Ogbuji at fourthought.com (Uche Ogbuji) Date: Sat, 30 Jul 2005 11:34:47 -0600 Subject: [XML-SIG] xml-object mapping In-Reply-To: <42E90609.5030309@med.unc.edu> References: <42E90609.5030309@med.unc.edu> Message-ID: <1122744887.7589.17.camel@borgia> On Thu, 2005-07-28 at 12:21 -0400, Tamas Hegedus wrote: > Hi! > > I am looking for an xml-object mapping tool ('XML Data Binding-design > time product') where I can define the mapping rules in 'binding files' > and the parser is generated automatically. > > Similar to the solution of Dave Kuhlman > (http://www.rexx.com/~dkuhlman/generateDS.html) where the mapping is > defined in an xml file (if I am understand well). > > But I already have the target object. The xml-tags should not be used as > a property/member name, but should be mapped to an existing object. > > (There are existing tools, but written in Java (I would prefer Python; I > am biologist not using Java for 5 years), like JiBX > (http://jibx.sourceforge.net), Castor (http://www.castor.org; "XML-based > mapping file to specify bindings for existing object models")) Answered: http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/a63d0ad3fd23cb37/6ad0223c5b8f9946?lnk=st&q=python+xml&rnum=3&hl=en -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://fourthought.com http://copia.ogbuji.net http://4Suite.org Use CSS to display XML, part 2 - http://www-128.ibm.com/developerworks/edu/x-dw-x-xmlcss2-i.html XML Output with 4Suite & Amara - http://www.xml.com/pub/a/2005/04/20/py-xml.html Use XSLT to prepare XML for import into OpenOffice Calc - http://www.ibm.com/developerworks/xml/library/x-oocalc/ Schema standardization for top-down semantic transparency - http://www-128.ibm.com/developerworks/xml/library/x-think31.html