From mjais at gmx-gmbh.de Fri Aug 1 09:12:08 2003 From: mjais at gmx-gmbh.de (Markus Jais) Date: Fri Aug 1 02:10:34 2003 Subject: [XML-SIG] Re: [Tutor] XML documentation In-Reply-To: References: Message-ID: <200308010812.08305.mjais@gmx-gmbh.de> On Jeudi 31 Juillet 2003 17:00, Terry Carroll wrote: > On Sun, 20 Jul 2003 cybersamurai@mac.com wrote: > > I need know here I can find documentation about XML and Python. I know > > How read and write a new XML file but I don't know edit. > > I really liked the O'Reilly book: > > http://www.amazon.com/exec/obidos/tg/detail/-/0596001282 > http://www.oreilly.com/catalog/pythonxml/ I really like "Definitive XML Application Development" by Lars Marius Garshol, Prenctice Hall. It has more than a 1000 pages and most of the code is in Python. it explains the parsers like expat, xmlproc and has very good chaptors on DOM, SAX and more. there are also 3 chapters on Java and XML but most of the book is Python. highly recomended. Markus -- Markus Jais From walter at livinglogic.de Fri Aug 1 15:07:17 2003 From: walter at livinglogic.de (=?ISO-8859-15?Q?Walter_D=F6rwald?=) Date: Fri Aug 1 08:45:07 2003 Subject: [XML-SIG] ANN: XIST 2.2 Message-ID: <3F2A57F5.4020600@livinglogic.de> XIST 2.2 has been released! What is it? =========== 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". What's new in version 2.2? ========================== * Python 2.3 is required now. * Namespaces have been enhanced and are now subclassable, so it's possible to overwrite elements. * Tree traversal has been rewritten to be more flexible. * A namespace for XSL-FO has been added and ll.xist.ns.doc supports conversion to XSL-FO now (the website provides PDF versions of each page done via this feature (and FOP)). * The HTML handling of the HTMLParser has been improved (by using code from PyXML's drv_sgmlop_html) * XIST DOMs now support copy.copy() and copy.deepcopy() * Many other small bugfixes and enhancements. For changes in older versions see: http://www.livinglogic.de/Python/xist/History.html Where can I get it? =================== XIST can be downloaded from 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/ Bye, Walter D?rwald From tony.mcdonald at ncl.ac.uk Fri Aug 1 18:12:23 2003 From: tony.mcdonald at ncl.ac.uk (Tony McDonald) Date: Fri Aug 1 12:12:31 2003 Subject: [XML-SIG] Re: Problems with elementtree and versions of python. In-Reply-To: References: Message-ID: On Thursday, July 31, 2003, at 00:01AM, Fredrik Lundh wrote: > Tony McDonald wrote: > >> I'm having real problems with it though - and I think it's a python >> version >> thing. >> >> Eg using the code from >> http://online.effbot.org/2003_07_01_archive.htm#element-tricks-2 > > it took me a while to figure it out, but it's a bug in the > ElementWrapper > sample, not in the ElementTree library. > > changing the ElementWrapper __getattr__ code from > > def __getattr__(self, tag): > return self._element.findtext(self._ns + tag) > > to > > def __getattr__(self, tag): > if tag.startswith("__"): > raise AttributeError(tag) > return self._element.findtext(self._ns + tag) > > should help. > > > That's great Fredrik, it does the job nicely (and elementree is a very nice piece of software by the way). Thanks again Tone. -- Dr Tony McDonald, Assistant Director, FMSC, http://www.fmcc.org.uk/ The Medical School, University of Newcastle upon Tyne, 0191 245 4223 Project manager, FDTL-4 eportfolios project, http://www.eportfolios.ac.uk/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1156 bytes Desc: not available Url : http://mail.python.org/pipermail/xml-sig/attachments/20030801/60f43292/attachment.bin From uche.ogbuji at fourthought.com Sat Aug 2 05:44:50 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Aug 2 00:44:52 2003 Subject: [XML-SIG] ANN: Anobind 0.5.0 Message-ID: <1059799321.2484.610.camel@localhost.localdomain> http://uche.ogbuji.net/tech/4Suite/anobind Anobind is a Python/XML data binding, which is just a fancy way of saying it's a very Pythonic XML API. You feed Anobind an XML document and it returns a data structure of corresponding Python objects. For example, the document What do you mean "bleh" But I was looking for argument Would become a set of objects so that you could write binding.monty.python.spam In order to get the value "eggs" or binding.monty.python[1].text_content() In order to get the value "But I was looking for argument". There are other such tools for Python, and what makes Anobind unique is that it's driven by a very declarative rules-based system for binding XML to the Python data. One can register rules that are triggered by XPatterns or plain Python code in order to register specialized binding behavior. It also offers XPath support and some support for round-tripping documents. Anobind is open source, provided under the 4Suite variant of the Apache license. It requires Python 2.2.2 and 4Suite 1.0a3. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com XML Data Bindings in Python, Part 2 - http://www.xml.com/pub/a/2003/07/02/py-xml.html Introducing Examplotron - http://www-106.ibm.com/developerworks/xml/library/x-xmptron/ Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.html Python, Web services, and XSLT - http://www-106.ibm.com/developerworks/xml/library/ws-pyth13/ A custom-fit career in app development - http://www.adtmag.com/article.asp?id=7744 From noreply at sourceforge.net Sun Aug 3 14:45:21 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Sun Aug 3 16:45:24 2003 Subject: [XML-SIG] [ pyxml-Bugs-782470 ] getElementsByName fails due to inconsistent case Message-ID: Bugs item #782470, was opened at 2003-08-03 21:45 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=782470&group_id=6473 Category: DOM Group: None Status: Open Resolution: None Priority: 5 Submitted By: John J Lee (jjlee) Assigned to: Nobody/Anonymous (nobody) Summary: getElementsByName fails due to inconsistent case Initial Comment: The attached code snippet explains. I presume the problem is some missing setAttribute* methods in HTMLElement. Actually, it seems odd to implement case normalization in HTMLElement. If somebody can confirm that it's OK to move HTML case normalization into a new class HTMLNamedNodeMap and that case should be *lower*-cased (as per bug 555303), I'll try and make a patch. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=782470&group_id=6473 From julienmotch at skynet.be Mon Aug 4 10:57:17 2003 From: julienmotch at skynet.be (Julien Motch) Date: Mon Aug 4 05:57:19 2003 Subject: [XML-SIG] traversing xml tree is incomplete Message-ID: <1059991024.1649.6.camel@pluton> Hi All, I am new to xml and experiencing problems by traversing an xml tree. The python program is : #audio.py #!/usr/bin/python import sys from xml.dom.ext.reader import Sax2 from xml.dom.NodeFilter import NodeFilter # create Reader object reader = Sax2.Reader() # parse the document doc = reader.fromStream(sys.stdin) walker = doc.createTreeWalker(doc.documentElement, NodeFilter.SHOW_ELEMENT, None, 10) while 1: print walker.currentNode.tagName next = walker.nextNode() if next is None: break it is called as it : cat afxc.xml & ./audio.xml and the afx.xml file is : 26 Mixes for Cash\Disc 1 13 P_KmeuFUQTSj5Tymmor.07xxgyY- Aphex Twin Time To Find Me (AFX Fast Mix) [Seefeel] Raising The Titanic (Big Drum Mix) [Gavin Bryars] Journey (Aphex Twin Care Mix) [Gentle People] Triachus (Mix by Aphex Twin) [Kinesthesia] Heroes (Aphex Twin Remix) [Philip Glass] In The Glitter Part 2 (Aphex Twin Mix) [Buck Tick] Zeroes and Ones (Aphex Twin Reconstruction #2) [Jesus Jones] Ziggy (Aphex Twin Mix #1) [Nav Katze] Your Head My Voice (Voix Revirement) [Saint Etienne] Change (Aphex Twin Mix #2) [Nav Katze] Une Femme N'est Pas Un Homme (Aphex Twin Mix) [The Beatniks] The Beauty of Being Numb Section B (Created by Aphex Twin) [Nine Inch Nails] Let My Fish Loose (Aphex Twin Remix) [Nobukazu Takemura] The output of the program is : CDInfo Title NumTracks IdInfo DiskId Id which is quite strange as it does not print the track and name element . but if I remove the lines : P_KmeuFUQTSj5Tymmor.07xxgyY- the the output seems normal and is : CDInfo Title NumTracks SingleArtistCD Artist Track Name Track Name Track Name Track Name Track Name Track Name Track Name Track Name Track Name Track Name Track Name Track Name Track Name Is it a bug or is my xml file not well formed ? Thanks ,Julien. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/xml-sig/attachments/20030804/e87bc60c/attachment.bin From Alexandre.Tan at nokia.com Wed Aug 6 15:15:50 2003 From: Alexandre.Tan at nokia.com (Alexandre.Tan@nokia.com) Date: Wed Aug 6 07:15:59 2003 Subject: [XML-SIG] newbie question : ImportError: /usr/lib/python2.2/lib-dynload/pyexpat.so: undefined symbol: PyUnicodeUCS4_Decode Message-ID: <58E9549287153543B1D95B91C332BD732666C1@esebe016.ntc.nokia.com> Hello, I have a problem with the following import : (Red Hat 7.3, PyXML-0.7-4, Python2.2) "import xml.parsers.expat" I receive the following message of error : "ImportError: /usr/lib/python2.2/lib-dynload/pyexpat.so: undefined symbol: PyUnicodeUCS4_Decode" I didn't find a thread on this in the Archive. I thank you in advance for any tip that could help me get out of this ... :-) Alexandre Tan From fredrik at pythonware.com Wed Aug 6 14:23:40 2003 From: fredrik at pythonware.com (Fredrik Lundh) Date: Wed Aug 6 07:23:47 2003 Subject: [XML-SIG] Re: newbie question : ImportError:/usr/lib/python2.2/lib-dynload/pyexpat.so: undefined symbol:PyUnicodeUCS4_Decode References: <58E9549287153543B1D95B91C332BD732666C1@esebe016.ntc.nokia.com> Message-ID: Alexandre.Tan@nokia.com wrote: > I have a problem with the following import : (Red Hat 7.3, PyXML-0.7-4, Python2.2) > "import xml.parsers.expat" > > I receive the following message of error : > "ImportError: /usr/lib/python2.2/lib-dynload/pyexpat.so: undefined > symbol: PyUnicodeUCS4_Decode" > > I didn't find a thread on this in the Archive. I thank you in advance > for any tip that could help me get out of this ... :-) the second google hit for "undefined symbol: PyUnicodeUCS4_Decode" is: http://mail.python.org/pipermail/xml-sig/2003-January/008920.html which explains the problem (but in reverse). From brendan at Magma-DA.COM Wed Aug 6 13:22:01 2003 From: brendan at Magma-DA.COM (Brendan Rankin) Date: Wed Aug 6 15:23:07 2003 Subject: [XML-SIG] Problem using xmlrpclib. Message-ID: Hello, I am a complete newbie to xmlrpc and am trying to implement the client side access to a SalesForce.com server. They supply both an XMLRPC and a SOAP API. They have a two step authentication process to get logged in, which goes like this: 1. Login using "https://www.salesforce.com/servlet/servlet.Api". - This returns the following XML fields: 'userID':'' 'server_url': '' 'session_id' : '' - It also returns two "Set-Cookie" fields in the HTML headers (example shown below, not a "real" session_id): header: Set-Cookie: sfdcweb=65.213.42.132.194511060194978591; path=/; max-age=31536000 header: Set-Cookie: sid=; path=/ 2. The next step is to take 'session_id' and 'userID' and pass it along to the server specified by 'server_url', along with whatever API command you'd like to accomplish. I, successfully, receive the login Response, but when I send the next API Request, I consistently get the following error: ----------------------- send: 'POST /servlet/servlet.Api HTTP/1.0\r\nHost: na1-api.salesforce.com\r\nUser-Agent: xmlrpclib.py/1.0.1 (by www.pythonware.com)\r\nContent-Type: text/xml\r\nContent-Length: 522\r\n\r\n' send: "\n\nsfdc.get_server_timestamp\n\n\n\n\nversion \n2.0\n\n\nuserID\n00530000000c4BV\n\n\n< name>session_id\nvwxw8sPENpaDeLJgAQHt32W.W3A.eUH_B.hfo F8sylY9DjH7G27.Am2.dNnSI8zQWR1EFY6Muc1Dg9jOlW0BT.btzKggVlhL \n\n\n\n\n\n" reply: 'HTTP/1.0 200 OK\r\n' header: Server: Resin/2.1.9 header: Content-Type: text/xml; charset=UTF-8 header: Date: Wed, 06 Aug 2003 18:36:19 GMT body: 'faultStringsession ID missing or invalidfaultCode1112 ' Traceback (most recent call last): File "./bin/Python/sforceXMLRPC.py", line 56, in ? transactionServer.sfdc.get_server_timestamp( timestampParams ) File "/usr/lib/python2.3/xmlrpclib.py", line 1029, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.3/xmlrpclib.py", line 1316, in __request verbose=self.__verbose File "/usr/lib/python2.3/xmlrpclib.py", line 1080, in request return self._parse_response(h.getfile(), sock) File "/usr/lib/python2.3/xmlrpclib.py", line 1219, in _parse_response return u.close() File "/usr/lib/python2.3/xmlrpclib.py", line 742, in close raise Fault(**self._stack[0]) xmlrpclib.Fault: ------------------------ I can attribute this problem to two possible issues: 1. Some sort of strange type-mismatch with what SalesForce.com is expecting to see in the session_id field. - Could also be an improperly set field for session_id. 2. My request does not contain the Cookie fields in the HTML headers. Does anyone out there have any further suggestions? Any help would be greatly appreciated! Thank you and Best Regards, - Brendan From mal at lemburg.com Wed Aug 6 23:52:24 2003 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Aug 6 16:52:58 2003 Subject: [XML-SIG] Problem using xmlrpclib. In-Reply-To: References: Message-ID: <3F316A88.3080504@lemburg.com> Brendan Rankin wrote: > Hello, > > I am a complete newbie to xmlrpc and am trying to implement the client side > access to a SalesForce.com server. They supply both an XMLRPC and a SOAP > API. They have a two step authentication process to get logged in, which > goes like this: > > 1. Login using "https://www.salesforce.com/servlet/servlet.Api". > - This returns the following XML fields: > 'userID':'' > 'server_url': '' > 'session_id' : '' > - It also returns two "Set-Cookie" fields in the HTML headers (example > shown below, not a "real" session_id): > header: Set-Cookie: sfdcweb=65.213.42.132.194511060194978591; path=/; > max-age=31536000 > header: Set-Cookie: sid=; path=/ > > 2. The next step is to take 'session_id' and 'userID' and pass it along to > the server specified by 'server_url', along with whatever API command you'd > like to accomplish. > > I, successfully, receive the login Response, but when I send the next API > Request, I consistently get the following error: > ----------------------- > send: 'POST /servlet/servlet.Api HTTP/1.0\r\nHost: > na1-api.salesforce.com\r\nUser-Agent: xmlrpclib.py/1.0.1 (by > www.pythonware.com)\r\nContent-Type: text/xml\r\nContent-Length: > 522\r\n\r\n' > send: " encoding='UTF-8'?>\n\nsfdc.get_server_timestamp hodName>\n\n\n\n\nversion > \n2.0\n\n\nuserID me>\n00530000000c4BV\n\n\n< > name>session_id\nvwxw8sPENpaDeLJgAQHt32W.W3A.eUH_B.hfo > F8sylY9DjH7G27.Am2.dNnSI8zQWR1EFY6Muc1Dg9jOlW0BT.btzKggVlhL > \n\n\n\n\n\n" > reply: 'HTTP/1.0 200 OK\r\n' > header: Server: Resin/2.1.9 > header: Content-Type: text/xml; charset=UTF-8 > header: Date: Wed, 06 Aug 2003 18:36:19 GMT > body: ' ?>faultString ue>session ID missing or > invalidfaultCode1112 > ' > Traceback (most recent call last): > File "./bin/Python/sforceXMLRPC.py", line 56, in ? > transactionServer.sfdc.get_server_timestamp( timestampParams ) > File "/usr/lib/python2.3/xmlrpclib.py", line 1029, in __call__ > return self.__send(self.__name, args) > File "/usr/lib/python2.3/xmlrpclib.py", line 1316, in __request > verbose=self.__verbose > File "/usr/lib/python2.3/xmlrpclib.py", line 1080, in request > return self._parse_response(h.getfile(), sock) > File "/usr/lib/python2.3/xmlrpclib.py", line 1219, in _parse_response > return u.close() > File "/usr/lib/python2.3/xmlrpclib.py", line 742, in close > raise Fault(**self._stack[0]) > xmlrpclib.Fault: > ------------------------ > > I can attribute this problem to two possible issues: > > 1. Some sort of strange type-mismatch with what SalesForce.com is expecting > to see in the session_id field. > - Could also be an improperly set field for session_id. > 2. My request does not contain the Cookie fields in the HTML headers. I suppose it's problem 2 that's causing the error. xmlrpclib doesn't magically do cookie by itself; you have to add support for that to your application layer. > Does anyone out there have any further suggestions? Any help would be > greatly appreciated! > > Thank you and Best Regards, > > - Brendan > > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Aug 06 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ From noreply at sourceforge.net Thu Aug 7 03:40:52 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Aug 7 05:40:55 2003 Subject: [XML-SIG] [ pyxml-Bugs-784653 ] xml.xpath.Evaluate(".//a", xml_node) fails after 0.8 -> 0.8.x Message-ID: Bugs item #784653, was opened at 2003-08-07 11:40 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=784653&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Mateusz Korniak (matkor) Assigned to: Nobody/Anonymous (nobody) Summary: xml.xpath.Evaluate(".//a",xml_node) fails after 0.8 -> 0.8.x Initial Comment: Evaluating path raises exception after upgrade from 0.8 to 0.8.2 / 0.8.3. in really simple xpath which should work IMHO. Testcase included in attachment. Invocation with PyXML 0.8.3 / 0.8.2 : [matkor@appserver ~/dev/abbon/tests]$ ./xpath-bugreport.py xml_node: Traceback (most recent call last): File "./xpath-bugreport.py", line 1436, in ? test(xml_txt,xpath) File "./xpath-bugreport.py", line 10, in test nodes = xml.xpath.Evaluate(xpath,xml_node) File "/usr/lib/python2.2/site-packages/_xmlplus/xpath/__init__.py", line 70, in Evaluate File "/usr/lib/python2.2/site-packages/_xmlplus/xpath/ParsedAbbreviatedRelativeLocationPath.py", line 52, in evaluate File "/usr/lib/python2.2/site-packages/_xmlplus/xpath/Set.py", line 25, in Union TypeError: can only concatenate list (not "EmptyNodeList") to list Invocation with PyXML 0.8 [matkor@appserver ~/dev/abbon/tests]$ ./xpath-bugreport.py xml_node: ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=784653&group_id=6473 From jjl at pobox.com Thu Aug 7 13:58:03 2003 From: jjl at pobox.com (John J Lee) Date: Thu Aug 7 07:58:16 2003 Subject: [XML-SIG] Problem using xmlrpclib. In-Reply-To: <3F316A88.3080504@lemburg.com> Message-ID: On Wed, 6 Aug 2003, M.-A. Lemburg wrote: [...] > > access to a SalesForce.com server. They supply both an XMLRPC and a SOAP > > API. They have a two step authentication process to get logged in, which > > goes like this: > > > > 1. Login using "https://www.salesforce.com/servlet/servlet.Api". > > - This returns the following XML fields: > > 'userID':'' > > 'server_url': '' > > 'session_id' : '' > > - It also returns two "Set-Cookie" fields in the HTML headers (example > > shown below, not a "real" session_id): > > header: Set-Cookie: sfdcweb=65.213.42.132.194511060194978591; path=/; > > max-age=31536000 > > header: Set-Cookie: sid=; path=/ [...] Weird. I suppose they have two separate systems working together, one of which wants to maintain state via XML-RPC, and one via HTTP cookies. If you reckon the cookies have some significant purpose, try my ClientCookie library. Briefly looking at xmlrpclib.py, it's easy to do. You'd need to make your own Transport class to pass (an instance of) to ServerProxy, and trivial Request and Response classes to keep ClientCookie happy: Subclass Transport (or write your class as a mixin, and subclass from both Transport and SafeTransport). Keep a Cookies object somewhere convenient. Override the Transport.request method. In that method, make a Request and a Response object (see below). Call cookies.add_cookie_header(request) just before the self.send_content(...) call, then send the headers: for hdr, value in request.headers.items(): h.putheader(hdr, value) (you could stick all that in a send_cookies method, of course). Call cookies.extract_cookies(request, response) just after the h.getreply(...) call. That should do the trick. For your purposes, Response can just be: class Response: def __init__(self, headers): self.headers = headers def info(self): return self.headers and for Request, you can just borrow urllib2's Request object (the URL to pass to Request constructor -- the only argument you need to bother with, I think -- will just be "http://"+host+"/", I suppose). HTH BTW, use the latest alpha version of ClientCookie -- interface won't change for this simple usage. There is a known bug with proxies fixed (and another whose nature I forget) in an unreleased version, mail me if you run into trouble. John From brendan at Magma-DA.COM Thu Aug 7 17:00:13 2003 From: brendan at Magma-DA.COM (Brendan Rankin) Date: Thu Aug 7 19:01:17 2003 Subject: [XML-SIG] Problem using xmlrpclib. Message-ID: Just forwarding the fact that I solved my problem. I'm now using the API requests that require the login information for both cookies and XMLRPC session_id/userID fields. Thanks to both John Lee and M.A. Lemburg for the confirmation I was looking for. Thanks especially to John Lee for a good suggestion of methodology. Regards, - Brendan -----Original Message----- From: Brendan Rankin [mailto:brendan@magma-da.com] Sent: Thursday, August 07, 2003 3:43 PM To: John J Lee Subject: RE: [XML-SIG] Problem using xmlrpclib. John, It *is* (or was) the problem. I'm now doing *exactly* what you said and everything appears to be functioning. I can access any further API Requests. Actually, it was contained in their documentation, though I still don't understand the need for it. To me, it seems quite redundant. Even stranger is the fact that the SOAP server does not have this requirement. One would think that they would, at the very least, try to be consistent.... Yes, I read the doc headers for the Cookie.py file included with the distro. and it is for servers.... Thanks for the cool ClientCookie class. Saves me a little bit of regexing the headers on my own! Cheers, - Brendan -----Original Message----- From: John J Lee [mailto:jjl@pobox.com] Sent: Thursday, August 07, 2003 3:07 PM To: Brendan Rankin Subject: RE: [XML-SIG] Problem using xmlrpclib. On Thu, 7 Aug 2003, Brendan Rankin wrote: [...] > Also, their error message lead me to believe that it was an XML or XMLRPC > problem (malformed request, etc.), since, I felt than any HTML issues should > have triggered a HTML Protocol Error.... Something like "Missing Cookies, > can't authenticate" would have prevented me from debugging most of the > xmlrpclib. :-) [...] Well, I don't guarantee the missing Cookie header in your requests *is* the problem, but it seems like a reasonable guess. In general, HTTP servers for web sites are usually misconfigured badly enough that you can't rely on an error response to even have a non-200 HTTP response code, so from that PoV, nothing surprises me. One might expect better of an XML-RPC server, it's true! But (to somebody who's never used XML-RPC, anyway), it seems extremely odd in the first place that those Set-Cookie headers are there, and even stranger that they appear to be a necessary part of the XML-RPC interaction... how does the XML-RPC server even get to find out about these cookies?? > P.S.: Are you aware of the Cookie.py file included in the Python distro.? That's for servers, not clients. John From and-xml at doxdesk.com Sun Aug 10 10:51:34 2003 From: and-xml at doxdesk.com (Andrew Clover) Date: Sun Aug 10 06:04:17 2003 Subject: [XML-SIG] Ann: PXTL, the Python XML Templating Language Message-ID: <20030810095134.GA20763@doxdesk.com> PXTL is the Python XML Templating Language, a templating solution for producing XML, HTML and other text-based document types. Yes, sorry - it's another templating language. However, PXTL has some useful characteristics shared by no other Python templating language (that I have met, at least): - templates are pure XML-with-Namespaces documents, allowing authors to take advantage of generic XML authoring, testing and manipulation tools; - code structure is represented by nodes in the document tree: making the document hierarchy and the program hierarchy the same results in templates that are easy to read, write and debug; - powerful Python-style structural tools such as subtemplates and imports allow modular templates to be written. The PXTL language spec has reached revision 1.0, release candidate. Documentation is here: http://doxdesk.com/pxtl/ See the tutorial for syntax examples. The reference implementation of PXTL (version 0.9) is also now available. It is a full DOM-based implementation of XML with following features: - on program error, can write a useful in-depth debugging page for testing, aiding rapid development; - can read and return DOM Document trees, not just serialised text; - works anywhere: pure-Python package compatible with Python 1.5.2 and later (tested up to 2.3), with no non-standard dependencies or reliance on any application framework. The reference implementation is intended for testing, development, batch jobs and interactive use on low-traffic web sites only. An 'optimised' implementation will be included in the package as a drop-in upgrade later in the year, for high-traffic web sites which require only text output. Documentation and download (licence: new-BSD-style) here: http://doxdesk.com/software/py/pxtl.html -- Andrew Clover mailto:and@doxdesk.com http://www.doxdesk.com/ From and-xml at doxdesk.com Sun Aug 10 10:53:19 2003 From: and-xml at doxdesk.com (Andrew Clover) Date: Sun Aug 10 06:06:00 2003 Subject: [XML-SIG] Ann: pxdom, a DOM implementation Message-ID: <20030810095319.GB20763@doxdesk.com> pxdom is a stand-alone pure-Python DOM implementation and non-validating parser, supporting Level 3 Core, XML, Load and Save specifications. pxdom was written to support the needs of PXTL, but is a general-purpose implementation suitable for any DOM-based application. It can be included as a module inside packages that must rely on a fully-working DOM regardless of what version of Python or PyXML is installed. The emphasis of pxdom is on standards compliance. It supports the W3C specifications fully, with only very minor deviations (namely: not all possible invalid Unicode characters are checked for, and it is lenient about what nodes a Document may contain, for whitespace-handling purposes in particular). pxdom passes the DOM L1/2 Core Test Suite. The emphasis of pxdom is *not* on efficiency. General speed and memory usage can be expected to be somewhere between minidom and 4DOM levels, nowhere near cDomlette. Exactly how slow pxdom is remains to be seen; currently it has only been tested with the DOM Test Suite (where it was much slower than minidom) and PXTL (where it was - inexplicably - considerably faster). YMMV. Because of the relatively small number of applications it has been tested with, and above all because the DOM Level 3 spec is still subject to change (though it is now at Last Call), pxdom 0.6 is considered beta software. pxdom is compatible with Python 1.5.2 and later (tested up to 2.3); for correct Unicode support Python 1.6 or later is required. It is available under a new-BSD-style licence from: http://www.doxdesk.com/software/py/pxdom.html -- Andrew Clover mailto:and@doxdesk.com http://www.doxdesk.com/ From Jean-Michel.Bruel at univ-pau.fr Tue Aug 12 17:57:30 2003 From: Jean-Michel.Bruel at univ-pau.fr (Jean-Michel BRUEL) Date: Tue Aug 12 11:00:27 2003 Subject: [XML-SIG] [CFP:] Workshop on UML 2.0 at FMOODS/DAIS 2003 Message-ID: <200308121457.h7CEvUY14456@univ-pau.fr> [Apologizes if you receive multiple copies of this call] -------------------------------------------------------------------------------------------- Call for Papers Workshop on the implications of UML2.0 http://liuppa.univ-pau.fr/WiUML2003/ Held as one of the pre-event of FMOODS'2003 http://fedconf.enst.fr/ Paris, France, November 17, 2003 Topics and goal ----------------------- The goal of this workshop is to promote a forum of discussions between participants that can report on the expected implications of the newly accepted UML2.0 version and also on the foreseen side-effects it will have on the on existing software development approaches based on UML 1.x. More specifically we welcome papers involving the use of formal methods or those dedicated to particular domains (for example distributed systems). Since this year the main conference is emphasizing reconfigurability and component- based design, among other topics, papers that also focus on this area will be particularly welcome for this workshop. Submissions --------------- Researchers and practitioners are invited to submit position papers related to UML 2.0. A position should be 5 to 10 pages long and should be written using the LNCS style format (see http://www.springer.de/comp/lncs/authors.html). Papers should be submitted to bruel@univ-pau.fr either in postscript or pdf. A programme committee will review the submissions and select papers that present relevant and interesting ideas. The selected papers will be published in the workshop proceedings (a publisher has been contacted and the details are under negotiation), and a selection of the best ones will be submitted (after extension) to a Journal Special Issue (also under negotiation). If you have any question please feel free to contact Jean-Michel Bruel. Location/Registration --------------- Information concerning the venue, the registration, or on FMOODS'2003 can be found at http://fedconf.enst.fr/. Important Dates ----------------------- September 30, 2003: Paper submission deadline October 24, 2003: Notification of acceptance October 31, 2003: Camera-ready copy due November 17, 2003: The workshop Organizers --------------- Jean-Michel Bruel (France, contact person) Sophie Dupuy-Chessa (France) Ana Moreira (Portugal) Program Committee (to be completed) --------------- Jean-Michel Bruel (France) Sophie Dupuy-Chessa (France) Robert B. France (USA) Kevin Lano (UK) Yves Ledru (France) Ana Moreira (Portugal) Maria Petrie (USA) Ileana Ober (France) Bernard Rumpe (Germany) Branislav Selic (Canada) Jon Whittle (USA) Yingxu Wang (Canada) From kschenke at users.sourceforge.net Tue Aug 12 21:09:02 2003 From: kschenke at users.sourceforge.net (Ken Schenke) Date: Tue Aug 12 21:09:38 2003 Subject: [XML-SIG] BookmarkBridge Uses XBEL Message-ID: <3F398FAE.70405@users.sourceforge.net> Hi, I am the author of a C++ program called BookmarkBridge, available for Linux and Windows. It is an open source tool hosted by SourceForge at http://bookmarkbridge.sourceforge.net BookmarkBridge merges bookmarks between multiple browsers on a user's PC. Right now it supports Internet Explorer, Mozilla, and Opera. I plan to add support for Konqueror and Galeon in the future. BookmarkBridge stores a copy of the merged bookmarks using the XBEL format. I mention this in the user manual with a link to your site. During development I wrote a couple of Python programs to perform regression testing on the XBEL file produced by the application. Thank you for a well-defined, public file format that enables my application to share information with other applications easily. Ken Schenke BookmarkBridge Author From fdrake at acm.org Wed Aug 13 00:13:31 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Tue Aug 12 23:14:15 2003 Subject: [XML-SIG] BookmarkBridge Uses XBEL In-Reply-To: <3F398FAE.70405@users.sourceforge.net> References: <3F398FAE.70405@users.sourceforge.net> Message-ID: <16185.44251.708648.192645@grendel.zope.com> Ken Schenke writes: > I am the author of a C++ program called BookmarkBridge, available for > Linux and Windows. It is an open source tool hosted by SourceForge at > http://bookmarkbridge.sourceforge.net Cool! I've added a link to the list of software that supports XBEL; the updated list should appear online in a few hours. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From Jason.Jurkowski at usa.xerox.com Wed Aug 13 16:02:25 2003 From: Jason.Jurkowski at usa.xerox.com (Jurkowski, Jason) Date: Wed Aug 13 15:13:46 2003 Subject: [XML-SIG] xml-rpc and http proxy servers Message-ID: i love the simplicity of the xml-rpc interface to the google spelling service (http://google.xmlrpc.com). i find it so much easier to use a small xmlrpclib-based python script to query for spellings instead of pulling up a big, clunky browser and using a web page like dictionary.com. there is a problem though. at work i have to run http through a proxy server. urllib supports proxies fine, however xmlrpclib is run over httplib directly. is there chance xmlrpc lib could be modified to examine and use the http_proxy environment variable like urllib does? the ability of xml-rpc to run through firewalls is one of its greatest strengths :). thanks, jason From rtjohan at syspres.com Thu Aug 14 14:54:14 2003 From: rtjohan at syspres.com (Richard Johannesson) Date: Thu Aug 14 16:58:35 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side Message-ID: <002701c362a6$38f3f0b0$4601a8c0@rjc800> I am laying out a new medium size website that I was hoping I could use Python / XML on the server side. This is a brand new site, no e-commerce at first, but will add later. Site will need the blog, wiki, group calendar, and other basic features. The size of site will initially about 50 pages, but should grow quickly to few thousand pages. Much of the content will be produced by users. So, main concern is being able to apply stylesheets to content to keep a consistent look. Key decisions: - All HTML generation done via XSLT - Have logic done in XSLT where possible - Use Python for glue - Use Postgresql for RDBMS - Use FreeBSD for Servers - Strict separation of content / presentation / logic ? Need to figure out what XML (enabled) database can use from Python Here are the assumptions I'm making: - XML to HTML transformations via XSLT will provide good platform independence. .Net, J2EE, Python all support XSLT. So, if required to move to different platform, this should be possible - XSLT/XML can generate just about any html page a CSS/template engine can - Adding new content using XML/XSLT is less work than using ASP/PHP/JSP etc. Decided to stay away from J2EE / Jboss (overkill/long ramp-up time/slow development). I've been wondering how much extra work I'll have to do in Python if I don't use something like Cocoon. I guess it's possible to use Cocoon with Python. Would anyone recommend using Cocoon or some alternative? Is there much consulting work for XML/Python? Current customers are pretty much exclusively ASP / ASP.net. Thanks in advance for any feedback on the assumptions I'm making above, any comments about Cocoon, or what XML database Python supports. Regards, Richard From dkuhlman at cutter.rexx.com Thu Aug 14 15:57:08 2003 From: dkuhlman at cutter.rexx.com (Dave Kuhlman) Date: Thu Aug 14 17:56:59 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: <002701c362a6$38f3f0b0$4601a8c0@rjc800>; from rtjohan@syspres.com on Thu, Aug 14, 2003 at 01:54:14PM -0700 References: <002701c362a6$38f3f0b0$4601a8c0@rjc800> Message-ID: <20030814145708.A94047@cutter.rexx.com> On Thu, Aug 14, 2003 at 01:54:14PM -0700, Richard Johannesson wrote: > I am laying out a new medium size website that I was hoping I could use > Python / XML on the server side. This is a brand new site, no e-commerce at > first, but will add later. Site will need the blog, wiki, group calendar, > and other basic features. The size of site will initially about 50 pages, > but should grow quickly to few thousand pages. Much of the content will be > produced by users. So, main concern is being able to apply stylesheets to > content to keep a consistent look. > > Key decisions: > - All HTML generation done via XSLT You may also want to consider straight Python. You could use Python code that works from the XML DOM (e.g. minidom). There are also several solutions that will turn an XML document into a specialized DOM where the classes (and the instances that form the DOM tree) reflect the elements and tags in the XML source document. > - Have logic done in XSLT where possible Ha. Ha. Ha. Only a sick pervert would make a joke like that. Can someone who has tried doing logic in XSLT stylesheets give a bit of insight on how to do logic in XSLT? My understanding is that XSLT is good for recursive pattern matching and generation of content from patterns/templates, but not good once you go beyond that. Can someone confirm that or show how complex logic is done in XSLT stylesheets? Would that logic be readable and maintainable? > - Use Python for glue Good idea. Python *is* glue. See "Glue It All Together With Python": http://www.python.org/doc/essays/omg-darpa-mcc-position.html > - Use Postgresql for RDBMS Good idea. There are several implementations of the Python DB API for PostgreSQL. I'm using pyPgSQL myself. It makes database access via SQL pretty easy. > - Use FreeBSD for Servers > - Strict separation of content / presentation / logic > ? Need to figure out what XML (enabled) database can use from Python > > Here are the assumptions I'm making: > - XML to HTML transformations via XSLT will provide good platform > independence. .Net, J2EE, Python all support XSLT. So, if required to move > to different platform, this should be possible Not to try to talk you out of XSLT, but there are other ways to gain platform independence. Python is one good way. > - XSLT/XML can generate just about any html page a CSS/template engine can If you are saying that XSLT is a suitable tool for generating *any* HTML from XML, I'd be skeptical. My belief is that there are complex transformations for which XSLT would *not* be suitable. Again, is there an XSLT expert that can give an evaluation here? > - Adding new content using XML/XSLT is less work than using ASP/PHP/JSP > etc. > > Decided to stay away from J2EE / Jboss (overkill/long ramp-up time/slow > development). > > I've been wondering how much extra work I'll have to do in Python if I don't > use something like Cocoon. I guess it's possible to use Cocoon with Python. > Would anyone recommend using Cocoon or some alternative? > > Is there much consulting work for XML/Python? Current customers are pretty > much exclusively ASP / ASP.net. > > Thanks in advance for any feedback on the assumptions I'm making above, any > comments about Cocoon, or what XML database Python supports. > > Regards, > Richard > > > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig Dave -- Dave Kuhlman dkuhlman@rexx.com http://www.rexx.com/~dkuhlman From rtjohan at syspres.com Thu Aug 14 17:04:59 2003 From: rtjohan at syspres.com (Richard Johannesson) Date: Thu Aug 14 19:09:21 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: <20030814145708.A94047@cutter.rexx.com> Message-ID: <002a01c362b8$7ce3e340$4601a8c0@rjc800> Dave - thanks for the feedback. As you can tell, my understanding of XML/XSLT/Python is limited. I've done simple Python stuff before, but never done any CGI/HTML with Python. Most web work done in ASP for small internal corporate apps. ASP works for small applications, but I'm betting that XML/Python scales better for large systems. Concerned with how to scale website when content and presentation layer are mixed. I'm primarily trying to decide the architecture of site and which technology to use. Will outsource much of the work. So, the primary concern is "can it scale". Can I outsource pieces and reuse as much of the resulting work as possible. Although some of the Python templating solutions probably could handle the presentation layer, using something that's not a standard makes me nervous. Hence the focus on XSLT. If I would have to move to something other than Python, then the XSLT can be reused. >> I am laying out a new medium size website that I was hoping I could use >> Python / XML on the server side. This is a brand new site, no e-commerce at >> first, but will add later. Site will need the blog, wiki, group calendar, >> and other basic features. The size of site will initially about 50 pages, >> but should grow quickly to few thousand pages. Much of the content will be >> produced by users. So, main concern is being able to apply stylesheets to >> content to keep a consistent look. >> >> Key decisions: >> - All HTML generation done via XSLT > >You may also want to consider straight Python. You could use >Python code that works from the XML DOM (e.g. minidom). There are >also several solutions that will turn an XML document into a >specialized DOM where the classes (and the instances that form the >DOM tree) reflect the elements and tags in the XML source document. This might be a good alternative. After dismissing the Java/Cocoon route, I'm looking at the different html/XML libraries available in Python. Trying to decide which ones should be used. >> - Have logic done in XSLT where possible >Ha. Ha. Ha. Only a sick pervert would make a joke like that. > >Can someone who has tried doing logic in XSLT stylesheets give a >bit of insight on how to do logic in XSLT? My understanding is >that XSLT is good for recursive pattern matching and generation of >content from patterns/templates, but not good once you go beyond >that. Can someone confirm that or show how complex logic is done >in XSLT stylesheets? Would that logic be readable and >maintainable? I've just read that this is possible. Not looked into how its done yet. Only done some simple XSLT transformation so far - creating html doc from a few xml docs using XSLT. Thanks for the warning. Theoretically, if the logic can be stored in a language independent format - this sounds ideal. But, most ideal things don't work in reality. Still worth looking into. >> - Use Python for glue >Good idea. Python *is* glue. See "Glue It All Together With >Python": > > http://www.python.org/doc/essays/omg-darpa-mcc-position.html Yup. Looks like the ultimate glue. >> - Use Postgresql for RDBMS >Good idea. There are several implementations of the Python DB API >for PostgreSQL. I'm using pyPgSQL myself. It makes database >access via SQL pretty easy. How do you handle XML data storage? Use XML DB or use RDBMS? I've seen some article that discussed extending Postgresql with custom functions to handle XML. Likely to be too much work. Probably will be pushing for stored procedures PL/pgSQL. I believe there was some development to get Python stored procedure support for PostgreSQL. Last I looked this seemed to have been dropped. Ideally, would be nice to write the stored procedures in Python. Anyone do that successfully? >> - Use FreeBSD for Servers >> - Strict separation of content / presentation / logic >> ? Need to figure out what XML (enabled) database can use from Python >> >> Here are the assumptions I'm making: >> - XML to HTML transformations via XSLT will provide good platform >> independence. .Net, J2EE, Python all support XSLT. So, if required to move >> to different platform, this should be possible >Not to try to talk you out of XSLT, but there are other ways to >gain platform independence. Python is one good way. Just seems that XSLT will provide also language independence. Most major languages support XSLT. Trying to decide if its worth the cost in terms of development time. I was under the impression that developing huge sites is faster when using XSLT. Building the pages in Python seems to have the same scalbility problems that ASP/PHP have since can't enforce content / persentation layer seperation. Is this incorrect? I don't want to force the developers to use something that doesn't make the overall development effort faster. So, if creating a huge site is more maintainable and faster to develop without XSLT I'd drop it in a heart beat. Just what I've read so far is that at this point in time it should be better to use XSLT. That's after some growing pains in getting used to it. Seems also easier to partition the work when using XSLT. >> - XSLT/XML can generate just about any html page a CSS/template engine can >If you are saying that XSLT is a suitable tool for generating *any* >HTML from XML, I'd be skeptical. My belief is that there are >complex transformations for which XSLT would *not* be suitable. >Again, is there an XSLT expert that can give an evaluation here? Yeah, would be great to hear where XSLT would be unsuitable. I'm pretty much so far relying on the O'Reilly XML books - got pretty much all of them. XML Schema, XSLT Cookbook, XSLT, Xpath and Xpointer and Master XML by Sybex + online articles. But the only way to know is to use this stuff for a few years extensively. Would be nice to learn from the masters and avoid the classic mistakes. >> - Adding new content using XML/XSLT is less work than using ASP/PHP/JSP >> >> Decided to stay away from J2EE / Jboss (overkill/long ramp-up time/slow >> development). >> >> I've been wondering how much extra work I'll have to do in Python if I don't >> use something like Cocoon. I guess it's possible to use Cocoon with Python. >> Would anyone recommend using Cocoon or some alternative? >> >> Is there much consulting work for XML/Python? Current customers are pretty >> much exclusively ASP / ASP.net. >> >> Thanks in advance for any feedback on the assumptions I'm making above, any >> comments about Cocoon, or what XML database Python supports. >> >> Regards, >> Richard >> >> > >Dave > >-- >Dave Kuhlman >dkuhlman@rexx.com >http://www.rexx.com/~dkuhlman Would be nice if some best practices could be created on Python / XML. Maybe if we get enough feedback, this might lead to something like that. Just too much confusion out there. One major strength Python has is its documentation. If it would go even further and start capturing best practices - it would be in a league of its own. Make it easier for newcomers to pick-up the language and start implementing things properly. Thanks again, Richard From tpassin at comcast.net Thu Aug 14 23:22:07 2003 From: tpassin at comcast.net (Thomas B. Passin) Date: Thu Aug 14 22:16:38 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side References: <002701c362a6$38f3f0b0$4601a8c0@rjc800> Message-ID: <002901c362d4$06cf8d00$6401a8c0@tbp1> [Richard Johannesson] > I am laying out a new medium size website that I was hoping I could use > Python / XML on the server side. This is a brand new site, no e-commerce at > first, but will add later. Site will need the blog, wiki, group calendar, > and other basic features. The size of site will initially about 50 pages, > but should grow quickly to few thousand pages. Much of the content will be > produced by users. So, main concern is being able to apply stylesheets to > content to keep a consistent look. Why don't you just use Plone? No need to reinvent the wheel. Plone is built on Zope, so there is your Python. It does not use xslt, but its page templates are in ZPT, which is actually an xml-based language. Plone, as a content management system, should do anything you need, and you can always extend it (Python programming and ZPT) as needed. Plone uses an extensive set of skins to get its appearance, and the page layout and appearance can be massively customized if you want. Cheers, Tom P From cstrong at arielpartners.com Thu Aug 14 23:22:21 2003 From: cstrong at arielpartners.com (Craeg K Strong) Date: Thu Aug 14 22:22:58 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: <002a01c362b8$7ce3e340$4601a8c0@rjc800> References: <002a01c362b8$7ce3e340$4601a8c0@rjc800> Message-ID: <3F3C43DD.5020002@arielpartners.com> I went through a similar decision process last November. I wrote up the results here: http://www.arielpartners.com/arielpartners/content/public/topics/technology/technologyReviews/zopeVsCocoon Although it is dated, the basic conclusions are still valid IMO. Both products have gotten significantly better since then. There are also other python-based frameworks I have learned about since that time that probably should have been part of the evaluation, such as Twisted and 4Suite. Hope this helps, --Craeg Richard Johannesson wrote: >>>I am laying out a new medium size website that I was hoping I could use >>>Python / XML on the server side. This is a brand new site, no e-commerce >>> >>> >at > > >>>first, but will add later. Site will need the blog, wiki, group calendar, >>>and other basic features. The size of site will initially about 50 pages, >>>but should grow quickly to few thousand pages. Much of the content will >>> >>> >be > > >>>produced by users. So, main concern is being able to apply stylesheets to >>>content to keep a consistent look. >>> >>>Key decisions: >>> - All HTML generation done via XSLT >>> >>> >>You may also want to consider straight Python. You could use >>Python code that works from the XML DOM (e.g. minidom). There are >>also several solutions that will turn an XML document into a >>specialized DOM where the classes (and the instances that form the >>DOM tree) reflect the elements and tags in the XML source document. >> >> > >This might be a good alternative. After dismissing the Java/Cocoon route, >I'm looking at the different html/XML libraries available in Python. Trying >to decide which ones should be used. > > From rtjohan at syspres.com Thu Aug 14 23:09:28 2003 From: rtjohan at syspres.com (Richard Johannesson) Date: Fri Aug 15 01:13:59 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: <002901c362d4$06cf8d00$6401a8c0@tbp1> Message-ID: <003d01c362eb$68698bd0$4601a8c0@rjc800> Tom - thanks for the feedback. I've read a bit on Zope and seems like it’s a great product. I haven't looked into Plone yet but will be looking into it now. Thanks for the tip. The thing about Zope, my impression is that once you develop the app in Zope your pretty much stuck with that application server. Probably the case with any system, but the thing that's appealing with XML / XSLT from a business point of view at least is that it’s a standard. This might give you flexibility to merge with another website to provide additional service offerings since most major application servers support XML/XLST. If the only companies you can easily merge applications with must be running Zope, this will limit your flexibility and therefore your value. Now, if its easy to integrate Zope applications with applications running on .Net/Jboss/etc then this is not an issue. Part of what I'm trying to figure out is, from the experts that have been in the trenches with these system - what is their experience. Just my impression about Zope is that it's a pretty closed system. If this is incorrect please let me know. I would hate to unfairly dismiss a great platform such as Zope. Any idea how large the websites are that run Plone or Zope? So, number of users that use the website and number of pages that make up the website? I agree, don't reinvent anything. Develop apps as quickly as possible, make system scalable, easy to manage, easy to add functionality, and keep your OS / platform / language options as open as as you can. This is a very messy dynamic optimization problem that depends on lot's of variables. Just trying to nail down as many variables as I can at this point in time. Thanks again, Richard >> I am laying out a new medium size website that I was hoping I could use >> Python / XML on the server side. This is a brand new site, no e-commerce at >> first, but will add later. Site will need the blog, wiki, group calendar, >> and other basic features. The size of site will initially about 50 pages, >> but should grow quickly to few thousand pages. Much of the content will be >> produced by users. So, main concern is being able to apply stylesheets to >> content to keep a consistent look. > >Why don't you just use Plone? No need to reinvent the wheel. Plone is >built on Zope, so there is your Python. It does not use xslt, but its page >templates are in ZPT, which is actually an xml-based language. Plone, as a >content management system, should do anything you need, and you can always >extend it (Python programming and ZPT) as needed. Plone uses an extensive >set of skins to get its appearance, and the page layout and appearance can >be massively customized if you want. > >Cheers, > >Tom P From tpassin at comcast.net Fri Aug 15 02:54:02 2003 From: tpassin at comcast.net (Thomas B. Passin) Date: Fri Aug 15 01:48:26 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side References: <003d01c362eb$68698bd0$4601a8c0@rjc800> Message-ID: <002a01c362f1$a0fb73e0$6401a8c0@tbp1> [Richard Johannesson]> Tom - thanks for the feedback. > > I've read a bit on Zope and seems like it?s a great product. I haven't > looked into Plone yet but will be looking into it now. Thanks for the tip. > > The thing about Zope, my impression is that once you develop the app in Zope > your pretty much stuck with that application server. Well, yes, but if you developed with, say, Cocoon, it would be the same. At least, Plone uses xml page templates, Python, and CSS. Zope is actually very good for integrating with other apps, because it supports FTP, WEBDAV, and XML-RPC out of the box. We integrated it with a java system that got data from somewhere using CORBA. We had the java app run a small server daemon to talk to Zope, and passed XML messages between them. I wrote a simple adapter (in Python) to let Zope run xslt transformations, and created the display that way - our equivalent of "business logic" produced xml, which we transformed to HTML inside of Zope. It is true that Plone does not work that way, but the point is that when you want to extend its functionality and go to integrate it with other systems, all these capabilties are available to you. You really can integrate anything that has a (C-)python wrapper, or is written in Python, directly into Zope (via Exteral Methods), and nearly anything else via XML-RPC or plain message-passing as I described above. Actually, there is now some ability to use perl scripting too. On Windows, there are Windows and COM extensions for Python, so you can make use of that whole area if you like. On the other hand, Zope does not have much in the way of native XML handling yet. You have to work out how to use the Python XML libraries when you want to do XML (aside from the page templates). I have not found this to be a real problem, though. > Probably the case with > any system, but the thing that's appealing with XML / XSLT from a business > point of view at least is that it?s a standard. This might give you > flexibility to merge with another website to provide additional service > offerings since most major application servers support XML/XLST. If the only > companies you can easily merge applications with must be running Zope, this > will limit your flexibility and therefore your value. > > Now, if its easy to integrate Zope applications with applications running on > .Net/Jboss/etc then this is not an issue. (See above) > Part of what I'm trying to figure > out is, from the experts that have been in the trenches with these system - > what is their experience. Just my impression about Zope is that it's a > pretty closed system. On the contrary, it is quite open, depending of course on what you mean by that. The code is open source, and there is a large and active community working on applications, tools, and utilities. Zope is a large and complex system, though, and there can be a real learning curve. Fortunately you can do a lot with very simple means with it - you do not have to use but a fraction of its capabilities - it will bring many more with it but you do not have to do anything special to use them. And, as I have indicated above, you can use it in many ways. It also comes with a very good object database, which in fact can by used separately from Zope if you like. >If this is incorrect please let me know. I would hate > to unfairly dismiss a great platform such as Zope. > > Any idea how large the websites are that run Plone or Zope? So, number of > users that use the website and number of pages that make up the website? > There are some large, active ones. As a point of interest, the CBS-New York site (not Plone) is run by Zope - http://cbsnewyork.com/ You can find some lists of large sites, as I recall. To handle a lot of hits, you have to do some things like put it behind a group of Apache servers. There are some guides on how to do that. Anyway, the upshot of all this is that if you are inclined to Python, and you want a content management site that you will later extend, Plone/Zope would be a really promising starting point. This is getting a bit OT, so maybe we should take it off line if you want more information. Cheers, Tom P From rtjohan at syspres.com Fri Aug 15 00:27:34 2003 From: rtjohan at syspres.com (Richard Johannesson) Date: Fri Aug 15 02:31:58 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: <3F3C43DD.5020002@arielpartners.com> Message-ID: <000301c362f6$51239870$4601a8c0@rjc800> Craeg, Good article you put together - very informative. It definetly helps - now I'll have to take another look at Zope. Does Zope make it as easy to keep a strict seperation between the content / presentation / business logic that Cocoon promises? Were you able to implement the XSLT transformation in Zope with your modifications that Cocoon offers? If you were forced to move to Cocoon - how much recoding would be needed? 20%? 50%? 80%? Did you consider any of the following [+my impressions]: Webware? [very nicely done, concerned not large enough user community - prefer XSLT over PSP] Quixote? [seemed like to choice, but prefer standard markup like XSLT] CherryPy? [prefer XSLT] Spyce? Cheetah? Mod_python? [will use in production release] Albatross? [?] Twisted? [?] Which XML libraries did you decide to use? Pyana? [seems useful] PIRXX? [seems redundant] 4Suite? [top condender] PyXML? [seems like a must] Thanks again, Richard >-----Original Message----- >From: Craeg K Strong [mailto:cstrong@arielpartners.com] >Sent: Thursday, August 14, 2003 7:22 PM >To: xml-sig@python.org >Cc: rtjohan@syspres.com; 'Dave Kuhlman' >Subject: Re: [XML-SIG] Python / XML / XSLT vs. Cocoon for >website server side > > >I went through a similar decision process last November. I >wrote up the >results here: > >http://www.arielpartners.com/arielpartners/content/public/topic >s/technology/technologyReviews/zopeVsCocoon > >Although it is dated, the basic conclusions are still valid >IMO. Both products have gotten significantly better >since then. There are also other python-based frameworks I have >learned about since that time that probably >should have been part of the evaluation, such as Twisted and 4Suite. > >Hope this helps, > >--Craeg From torsten.rueger at hiit.fi Fri Aug 15 12:37:09 2003 From: torsten.rueger at hiit.fi (Torsten Rueger) Date: Fri Aug 15 04:37:15 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: <20030814145708.A94047@cutter.rexx.com> Message-ID: Ahh, the ever burning topic of how to build a web application (dynamic web site). Ok I'll chip in. This one on the negative side, the next on the plus side: >> Key decisions: >> - All HTML generation done via XSLT If pain is what you like, that's the way to go. >> - Have logic done in XSLT where possible You do like. Ahh Ouchh. (Ok I'm joking, all right. You said you never used it and with all the books around what you say is a fair choice) I've only done small-ish (10 pages, 5 posts) application with XSLT (Xalan) and XML database (PDOM http://www.infonyte.com/en/prod_pdom.html). The short summary of that is: it's difficult. Unnecessarily so. Ok, storing xml was easy, but expressing searches in XPath is not straightforward. And XSLT isn't easy. > My understanding is > that XSLT is good for recursive pattern matching and generation of > content from patterns/templates, but not good once you go beyond > that. And that's exactly right. So if your xml structure is not exactly what your page requires, you've got serious work ahead of you. Remembering off course that xml does not have a concept of a reference, so mapping object dependencies into xml is non trivial. But the real problem is XSLT is unreadable. Pages you've written only days ago seem cryptic. Maybe more importantly, graphic designers have no chance of understanding it. And it always assumes the dtd of your xml. Change that and you have some fun debugging. (So if you do go this way, make it your priority to document dtd's) Anyway, as I said, I'll send another more positive mail on what I have found to be beneficial, Torsten From torsten.rueger at hiit.fi Fri Aug 15 13:03:16 2003 From: torsten.rueger at hiit.fi (Torsten Rueger) Date: Fri Aug 15 05:03:21 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: <000301c362f6$51239870$4601a8c0@rjc800> Message-ID: <4F160163-CEFF-11D7-A67B-000A959C1BB0@hiit.fi> I don't know about Zope and many of the other technologies you mention. But I have built three bigger applications (40-70 dynamic pages, 20-30 posts) with the approach I'll outline, and it has worked very well. > Cheetah? That's the way to go. You'll have easy to understand templates, I've even had graphic designers create them. They can learn the concepts of a simple syntax like that easily (couple of days). After that it becomes a matter of documenting your classes and making the api public to the designers. I mean the classes you make available to the templates, often called Business logic or application model. So you use an object model between your gui (templates) and your database. Working without such an object model , which often is the XML way, becomes messy. Then you can use XML as a storage technology, if you want to. That's what I find XML is good for. But you can use YAML or RDBMS, or as I prefer an OODBMS (specifically I prefer the lightweight versions such as DyBase http://www.garret.ru/~knizhnik/dybase.html). If you want to use XML - DB, I'll just chip in that we're currently using Sleepycat from python and that works ok. Even it is a bit big and difficult to install. On the topic of porting, I would estimate that you would off course have to write all code again. but that should be straightforward. But the templates should be much less work, as Java has both WebMacro and Velocity with very similar syntax to Cheetah (not by chance as cheetah is WebMacro inspired). Comparing this approach to my (limited) XML/XSLT experience: Templates: easier to write and much easier to maintain Business/Application logic: In the object model where it belongs vs spread out all over the place Gui Logic: Much cleaner separation. Total effort: Half or one third. just another 2 pence Torsten From amk at amk.ca Fri Aug 15 08:02:36 2003 From: amk at amk.ca (A.M. Kuchling) Date: Fri Aug 15 07:47:48 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: <000301c362f6$51239870$4601a8c0@rjc800> Message-ID: On Friday, August 15, 2003, at 02:27 AM, Richard Johannesson wrote: > Quixote? [seemed like to choice, but prefer standard markup like XSLT] It would be straightforward to use XSLT templates in Quixote; there's no requirement to use PTL. Let's say you have a bunch of data items as XML documents: DATA = {'key1': '; from rtjohan@syspres.com on Thu, Aug 14, 2003 at 11:27:34PM -0700 References: <3F3C43DD.5020002@arielpartners.com> <000301c362f6$51239870$4601a8c0@rjc800> Message-ID: <20030815084011.M9929@redhat.com> On Thu, Aug 14, 2003 at 11:27:34PM -0700, Richard Johannesson wrote: > Which XML libraries did you decide to use? > Pyana? [seems useful] > PIRXX? [seems redundant] > 4Suite? [top condender] > PyXML? [seems like a must] You may want to look at libxml2/libxslt Python too http://xmlsoft.org/python.html Daniel -- Daniel Veillard | Red Hat Network https://rhn.redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From uche.ogbuji at fourthought.com Fri Aug 15 08:11:41 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Fri Aug 15 09:52:36 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: Message from Dave Kuhlman of "Thu, 14 Aug 2003 14:57:08 PDT." <20030814145708.A94047@cutter.rexx.com> Message-ID: <20030815131146.A87C81340B8@borgia.local> > > - Have logic done in XSLT where possible > > Ha. Ha. Ha. Only a sick pervert would make a joke like that. > > Can someone who has tried doing logic in XSLT stylesheets give a > bit of insight on how to do logic in XSLT? My understanding is > that XSLT is good for recursive pattern matching and generation of > content from patterns/templates, but not good once you go beyond > that. Can someone confirm that or show how complex logic is done > in XSLT stylesheets? Would that logic be readable and > maintainable? Depends on just what sort of "logic". Mike Olson, for example, wrote a Web-based cribbage game in XSLT (as a 4Suite demo). I'm seen even more outrageous things. I think that the balance between what should go into the templates and what should go into support code is largely a matter of taste, and XSLT is certainly far more sophisticated than the average templating language. > > Here are the assumptions I'm making: > > - XML to HTML transformations via XSLT will provide good platform > > independence. .Net, J2EE, Python all support XSLT. So, if required to move > > to different platform, this should be possible > > Not to try to talk you out of XSLT, but there are other ways to > gain platform independence. Python is one good way. I think he's including language in his concept of platform, which is not unreasonable. XSLT does have the advantage that it is implemented in many languages. > > - XSLT/XML can generate just about any html page a CSS/template engine can > > If you are saying that XSLT is a suitable tool for generating *any* > HTML from XML, I'd be skeptical. My belief is that there are > complex transformations for which XSLT would *not* be suitable. > Again, is there an XSLT expert that can give an evaluation here? As I mentioned, XSLT is more sophisticated than most other templating tools. Don't forget XSLT's extension framework. I wouldn't say it can generate *any* Web page (way too strong a statement), but I would say it can generate almost any Web page I have personally encountered. > > Is there much consulting work for XML/Python? Current customers are pretty > > much exclusively ASP / ASP.net. I wouldn't say there were many Python/XML customers out there. But as with everything, it depends on where/how you look. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Introducing Anobind - http://www.xml.com/pub/a/2003/08/13/py-xml.html XML Topic Maps by the book - http://www-106.ibm.com/developerworks/xml/library/ x-think19.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml Python, Web services, and XSLT - http://www-106.ibm.com/developerworks/xml/libr ary/ws-pyth13/ Perspective on XML: What is this 'agility'? - http://www.adtmag.com/article.asp ?id=8004 From uche.ogbuji at fourthought.com Fri Aug 15 08:13:41 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Fri Aug 15 09:54:42 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: Message from "Thomas B. Passin" of "Thu, 14 Aug 2003 22:22:07 EDT." <002901c362d4$06cf8d00$6401a8c0@tbp1> Message-ID: <20030815131347.213121340B8@borgia.local> > [Richard Johannesson] > > > I am laying out a new medium size website that I was hoping I could use > > Python / XML on the server side. This is a brand new site, no e-commerce > at > > first, but will add later. Site will need the blog, wiki, group calendar, > > and other basic features. The size of site will initially about 50 pages, > > but should grow quickly to few thousand pages. Much of the content will be > > produced by users. So, main concern is being able to apply stylesheets to > > content to keep a consistent look. > > Why don't you just use Plone? No need to reinvent the wheel. Plone is > built on Zope, so there is your Python. It does not use xslt, but its page > templates are in ZPT, which is actually an xml-based language. Plone, as a > content management system, should do anything you need, and you can always > extend it (Python programming and ZPT) as needed. Plone uses an extensive > set of skins to get its appearance, and the page layout and appearance can > be massively customized if you want. He is trying to avoid framework lock-in, which is why I haven't suggested the 4Suite repository. If you choose Zope/Plone (or Cocoon, for that matter), you'd better be willing to stick with Zope/Plone. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Introducing Anobind - http://www.xml.com/pub/a/2003/08/13/py-xml.html XML Topic Maps by the book - http://www-106.ibm.com/developerworks/xml/library/ x-think19.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml Python, Web services, and XSLT - http://www-106.ibm.com/developerworks/xml/libr ary/ws-pyth13/ Perspective on XML: What is this 'agility'? - http://www.adtmag.com/article.asp ?id=8004 -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Introducing Anobind - http://www.xml.com/pub/a/2003/08/13/py-xml.html XML Topic Maps by the book - http://www-106.ibm.com/developerworks/xml/library/ x-think19.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml Python, Web services, and XSLT - http://www-106.ibm.com/developerworks/xml/libr ary/ws-pyth13/ Perspective on XML: What is this 'agility'? - http://www.adtmag.com/article.asp ?id=8004 From uche.ogbuji at fourthought.com Fri Aug 15 08:18:15 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Fri Aug 15 09:59:35 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: Message from "Richard Johannesson" of "Thu, 14 Aug 2003 23:27:34 PDT." <000301c362f6$51239870$4601a8c0@rjc800> Message-ID: <20030815131820.4C3081340B8@borgia.local> > Craeg, > > Good article you put together - very informative. It definetly helps - now > I'll have to take another look at Zope. > > Does Zope make it as easy to keep a strict seperation between the content / > presentation / business logic that Cocoon promises? Were you able to > implement the XSLT transformation in Zope with your modifications that > Cocoon offers? If you were forced to move to Cocoon - how much recoding > would be needed? 20%? 50%? 80%? > > Did you consider any of the following [+my impressions]: > Webware? [very nicely done, concerned not large enough user community - > prefer XSLT over PSP] > Quixote? [seemed like to choice, but prefer standard markup like XSLT] > CherryPy? [prefer XSLT] > Spyce? > Cheetah? > Mod_python? [will use in production release] > Albatross? [?] > Twisted? [?] I want to point out that 4Suite has a server framework built-in that is heavily XSLT-driven. If you have a strong preference for XSLT, I would recommend trying it. We're just about to announce the 1.0 beta, and it's not as polished as many of the other entrants above, but it's in very active development and you should find good support on the mailing list. It does provide for separation of content and presentation using chained stylesheets. There has been a lot of discussion of that on the mailing list. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Introducing Anobind - http://www.xml.com/pub/a/2003/08/13/py-xml.html XML Topic Maps by the book - http://www-106.ibm.com/developerworks/xml/library/ x-think19.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml Python, Web services, and XSLT - http://www-106.ibm.com/developerworks/xml/libr ary/ws-pyth13/ Perspective on XML: What is this 'agility'? - http://www.adtmag.com/article.asp ?id=8004 -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Introducing Anobind - http://www.xml.com/pub/a/2003/08/13/py-xml.html XML Topic Maps by the book - http://www-106.ibm.com/developerworks/xml/library/ x-think19.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml Python, Web services, and XSLT - http://www-106.ibm.com/developerworks/xml/libr ary/ws-pyth13/ Perspective on XML: What is this 'agility'? - http://www.adtmag.com/article.asp ?id=8004 From jjl at pobox.com Fri Aug 15 18:58:30 2003 From: jjl at pobox.com (John J Lee) Date: Fri Aug 15 12:58:37 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: <002a01c362b8$7ce3e340$4601a8c0@rjc800> Message-ID: On Thu, 14 Aug 2003, Richard Johannesson wrote: [...] > >Can someone who has tried doing logic in XSLT stylesheets give a > >bit of insight on how to do logic in XSLT? My understanding is > >that XSLT is good for recursive pattern matching and generation of > >content from patterns/templates, but not good once you go beyond > >that. Can someone confirm that or show how complex logic is done > >in XSLT stylesheets? Would that logic be readable and > >maintainable? > > I've just read that this is possible. Not looked into how its done yet. Only > done some simple XSLT transformation so far - creating html doc from a few > xml docs using XSLT. Thanks for the warning. Theoretically, if the logic can > be stored in a language independent format - this sounds ideal. But, most [...] What does that L stand for in XSLT? XSLT is a language. The great thing about XSLT is that everybody hates it equally <0.7 wink>. > Just seems that XSLT will provide also language independence. Most major > languages support XSLT. Trying to decide if its worth the cost in terms of All major languages support python, too <0.2 wink>. Surely, XSLT should be used when either: 1. it's clear that the problem nicely fits XSLT's way of doing things 2. it turns out to be necessary in order to interoperate with someone/something who doesn't use Python. Otherwise, use Python. This is just like any other 'little language' -- the 'X' in the name doesn't have magical properties. [If that sounds like a rant, well, maybe it is, but it isn't really directed against anyone here -- just the world in general ;-)] Hmm, maybe there are some circumstances where XSLT has security advantages too (but I think it's Turing-complete, isn't it)? [...] > Would be nice if some best practices could be created on Python / XML. Maybe > if we get enough feedback, this might lead to something like that. Just too > much confusion out there. One major strength Python has is its > documentation. If it would go even further and start capturing best > practices - it would be in a league of its own. Make it easier for newcomers > to pick-up the language and start implementing things properly. s/best practices/rules of thumb/, and I might agree. John From rtjohan at syspres.com Fri Aug 15 11:37:09 2003 From: rtjohan at syspres.com (Richard Johannesson) Date: Fri Aug 15 13:41:36 2003 Subject: [XML-SIG] Python XML / XSLT libraries In-Reply-To: <20030815084011.M9929@redhat.com> Message-ID: <000001c36353$db6bdb20$3d01a8c0@rjc800> Daniel, Thanks for the input - looks like solid libraries. Is there some prior discussion / article that has reviewed the different python XML libraries? What would be considered the heavy duty full-feature XML/XSLT library contenders? - Pyana (v. 0.8.0) - 4Suite (v. 1.26) - libxml2+libxslt - ? Do you use all, or just one of these? My impression is that you would always add PyXML and before adding any one of the ones above. Is this correct? Regards, Richard >-----Original Message----- >From: Daniel Veillard [mailto:veillard@redhat.com] >Sent: Friday, August 15, 2003 5:40 AM >To: Richard Johannesson >Cc: 'Craeg K Strong'; xml-sig@python.org >Subject: Re: [XML-SIG] Python / XML / XSLT vs. Cocoon for >website server side > > >On Thu, Aug 14, 2003 at 11:27:34PM -0700, Richard Johannesson wrote: >> Which XML libraries did you decide to use? >> Pyana? [seems useful] >> PIRXX? [seems redundant] >> 4Suite? [top condender] >> PyXML? [seems like a must] > > You may want to look at libxml2/libxslt Python too > http://xmlsoft.org/python.html > >Daniel > >-- >Daniel Veillard | Red Hat Network https://rhn.redhat.com/ >veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From tpassin at comcast.net Fri Aug 15 19:47:32 2003 From: tpassin at comcast.net (Thomas B. Passin) Date: Fri Aug 15 18:42:16 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side References: <20030815131347.213121340B8@borgia.local> Message-ID: <001e01c3637f$36d15230$6401a8c0@tbp1> [Uche Ogbuji] > > Why don't you just use Plone? No need to reinvent the wheel. Plone is > > built on Zope, so there is your Python. It does not use xslt, but its page > > templates are in ZPT, which is actually an xml-based language. Plone, as a > > content management system, should do anything you need, and you can always > > extend it (Python programming and ZPT) as needed. Plone uses an extensive > > set of skins to get its appearance, and the page layout and appearance can > > be massively customized if you want. > > He is trying to avoid framework lock-in, which is why I haven't suggested the > 4Suite repository. If you choose Zope/Plone (or Cocoon, for that matter), > you'd better be willing to stick with Zope/Plone. Oh, sure, I know, I was just suggesting reconsidering, only because there is a lot to build when you roll your own (as you know better than me!). Cheers, Tom P From uche.ogbuji at fourthought.com Fri Aug 15 22:36:21 2003 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Aug 16 00:05:24 2003 Subject: [XML-SIG] Python XML / XSLT libraries In-Reply-To: Message from "Richard Johannesson" of "Fri, 15 Aug 2003 10:37:09 PDT." <000001c36353$db6bdb20$3d01a8c0@rjc800> Message-ID: <20030816033627.CF1531340B8@borgia.local> > Daniel, > > Thanks for the input - looks like solid libraries. > > Is there some prior discussion / article that has reviewed the different > python XML libraries? > > What would be considered the heavy duty full-feature XML/XSLT library > contenders? > - Pyana (v. 0.8.0) > - 4Suite (v. 1.26) > - libxml2+libxslt > - ? > > Do you use all, or just one of these? My impression is that you would always > add PyXML and before adding any one of the ones above. Is this correct? None of these require PyXML. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Introducing Anobind - http://www.xml.com/pub/a/2003/08/13/py-xml.html XML Topic Maps by the book - http://www-106.ibm.com/developerworks/xml/library/ x-think19.html Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h tml Python, Web services, and XSLT - http://www-106.ibm.com/developerworks/xml/libr ary/ws-pyth13/ Perspective on XML: What is this 'agility'? - http://www.adtmag.com/article.asp ?id=8004 From mike at skew.org Fri Aug 15 23:44:39 2003 From: mike at skew.org (Mike Brown) Date: Sat Aug 16 00:44:38 2003 Subject: [XML-SIG] Python XML / XSLT libraries In-Reply-To: <20030816033627.CF1531340B8@borgia.local> "from Uche Ogbuji at Aug 15, 2003 09:36:21 pm" Message-ID: <200308160444.h7G4idJI080582@chilled.skew.org> > > What would be considered the heavy duty full-feature XML/XSLT library > > contenders? > > - Pyana (v. 0.8.0) > > - 4Suite (v. 1.26) v. 1.26? :) From rtjohan at syspres.com Sat Aug 16 12:42:55 2003 From: rtjohan at syspres.com (Richard Johannesson) Date: Sat Aug 16 14:47:18 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: <001e01c3637f$36d15230$6401a8c0@tbp1> Message-ID: <000e01c36426$35acfc90$3d01a8c0@rjc800> Thanks everyone for the input and warnings about XSLT. Basically at the point where need to give Zope and Webware a try. Will also need to try to generate more substantial html pages using XSLT and try to figure the right balance between speed of development, scalability, and maintainability. Nice to know there is a knowledgable and helpful user community behind Python. Thanks again, Richard From cstrong at arielpartners.com Sat Aug 16 18:17:46 2003 From: cstrong at arielpartners.com (Craeg K Strong) Date: Sat Aug 16 17:18:20 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: <000301c362f6$51239870$4601a8c0@rjc800> References: <000301c362f6$51239870$4601a8c0@rjc800> Message-ID: <3F3E9F7A.4070902@arielpartners.com> I did not consider the other frameworks you mentioned. One of my biggest concerns was a large and active user/contributor base, and copious documentation. Check out the zope.org site, and you will observe new Zope plugins getting created at a rate of several per week. Few other platforms can match that: Perl, PHP, Java, Microsoft. I prefer a real language, so PHP is out. I prefer Python to Perl, so that's out. Java is great for the back-end, but too cumbersome and verbose for the front end. I want to avoid lockin, so Microsoft is out. That leaves Python/Zope by a process of elimination! Here is what I use/recommend today for Zope: - Adaptive Persistence (APE) gets you from Zope to RDBMS, file system, CVS, etc. http://hathaway.freezope.org/Software/Ape - ZopeXMLMethods gives you XPath, XSLT, DTD Validation http://zopexmlmethods.sourceforge.net You can start with bare Zope 2.7 or Plone, depending on your needs. Plone is maturing really rapidly, and the documentation is getting better. This means that the cost vs benefit ratio for adopting Plone is getting more and more favorable. I am still using bare Zope myself, but would probably recommend Plone to my corporate customers. I use Zope Page Templates for all presentation. Many of my web pages have no reusable content to speak of, and they are just straightforward ZPT. However, all reusable pieces of content are in XML, stored under version control in CVS. I grab what I need using ZopeXMLMethods. It enables me to grab pieces from multiple XML sources via XPath and transform them with XSLT. It is a wrapper/adapter that works with most of the XSLT libraries you mentioned (4suite, libxslt, Pyana, Sablotron). Sounds great, what's the catch? Well, there's still lots to do. Here is what I am working on: - extend ZopeXMLMethods to cover other pieces of the XML spectrum (RDF, XInclude) and improve its use of the underlying libraries (especially libxslt) - extend APE to seamlessly adapt to VSS, Clearcase, CVS, etc., provide a layer on top for actual checkin/checkout directly from Zope - work with Norm Walsh to help streamline Docbook/XML (aka Docbook 5.0) for better ease of use - select a technology to adapt from MS Word directly to Docbook/XML and enhance it with the ultimate goal of non-lossy round-trip support (there are many free and commercial candidate technologies) - Create another Zope adapter to the Java-based FO-to-PDF libraries, including FOP and RenderX/XEP. Make this adapter work just like ZopeXMLMethods or Plone Archetypes. I think you see where I am going here. With all of the above, you get Zope as a CMS platform able to consume and produce content in any format, with full standards support (no lock-in). Of course, one must learn Python and ZPT... Incidentally, I recently compared ZPT to JSP/JSTL/JavaServer Faces and was appalled at the cruftiness of the Java solutions. ZPT is *way* cleaner and easier. Learn ZPT and you will understand where JSP technology might be in two years. Hope this helps, --Craeg Richard Johannesson wrote: >Craeg, > >Good article you put together - very informative. It definetly helps - now >I'll have to take another look at Zope. > >Does Zope make it as easy to keep a strict seperation between the content / >presentation / business logic that Cocoon promises? Were you able to >implement the XSLT transformation in Zope with your modifications that >Cocoon offers? If you were forced to move to Cocoon - how much recoding >would be needed? 20%? 50%? 80%? > >Did you consider any of the following [+my impressions]: > Webware? [very nicely done, concerned not large enough user community - >prefer XSLT over PSP] > Quixote? [seemed like to choice, but prefer standard markup like XSLT] > CherryPy? [prefer XSLT] > Spyce? > Cheetah? > Mod_python? [will use in production release] > Albatross? [?] > Twisted? [?] > >Which XML libraries did you decide to use? > Pyana? [seems useful] > PIRXX? [seems redundant] > 4Suite? [top condender] > PyXML? [seems like a must] > >Thanks again, >Richard > > > From noreply at sourceforge.net Sun Aug 17 14:29:33 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Sun Aug 17 16:29:36 2003 Subject: [XML-SIG] [ pyxml-Patches-790226 ] New README file Message-ID: Patches item #790226, was opened at 2003-08-17 15:29 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=306473&aid=790226&group_id=6473 Category: Documentation Group: None Status: Open Resolution: None Priority: 5 Submitted By: neognomic (neognomic) Assigned to: Nobody/Anonymous (nobody) Summary: New README file Initial Comment: ... the " README " file in the source targz is ... outdated. RE: " Recent versions of 4Suite are pyxml-agnostic. So you should be able to use 4Suite's xslt and xpath with or without pyxml. " and " 4Suite is designed to work with PyXML. ... " etc., from recent posts on the mailing list. A new README file is attached. (Adjust it if you want, of course...) Have A Great Day! rj Oh, BTW, using python-2.2.1 here... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=306473&aid=790226&group_id=6473 From jjl at pobox.com Sun Aug 17 22:39:33 2003 From: jjl at pobox.com (John J Lee) Date: Sun Aug 17 16:39:45 2003 Subject: [XML-SIG] Implementing 'live'-ness in a 4DOM fork. Message-ID: I want to implement live collections in a forked 4DOM. OK, 'want' is perhaps the wrong word :-((( This is for use in a JavaScript/DOM/Python binding I'm writing. Does anybody have advice on the simplest approach? I don't think I care about performance -- I'm only doing HTML. I had thought that the simplest way would be to wrap NamedNodeMap, NodeList and HTMLCollection (and HTMLOptionCollection, which doesn't actually exist in 4DOM -- see below) in a wrapper that simply recomputes everything every time an attribute is looked up, then delegates to the standard 4DOM implementation. However, these interfaces represent mutable collections, which is going to mess up that approach: there are methods like NamedNodeMap.removeNamedItem and attributes like HTMLOptionCollection.length (which is *not* readonly). Worse, I presume that when you remove an item from a NamedNodeMap, the node tree gets updated. I'm damned if I can tell from the standard, though. All it says is: | NodeList and NamedNodeMap objects in the DOM are live; that is, | changes to the underlying document structure are reflected in all | relevant NodeList and NamedNodeMap objects. For example, if a DOM | user gets a NodeList object containing the children of an Element, | then subsequently adds more children to that element (or removes | children, or modifies them), those changes are automatically | reflected in the NodeList, without further action on the user's | part. Likewise, changes to a Node in the tree are reflected in all | references to that Node in NodeList and NamedNodeMap objects. That tells me nothing about what happens when you remove a node from a NamedNodeMap. Still, I suppose there is no other sane interpretation than the one I take above -- otherwise, what would happen if you made changes from *both* the node tree *and* a collection reflecting that tree? Given that two-way syncing of state is required between these collections and the node tree, I can't see how to do this nicely with mutation events, because you'd get infinite loops without special precautions. In fact, that might be the least of the problems -- using mutation events to do this looks pretty painful anyway, even without this two-way syncing requirement! I suppose the simplest thing is to reimplement the collections so they don't store any permanent state (which will require changes to all objects that can create collections, too). Slow, but I don't care. BTW, in previous posts here about this, I notice that people have claimed that only getElementsByTagName is affected here (because it has to construct a NodeList that doesn't directly reflect the node tree structure). Looking at the source, though, I see that NodeList, NamedNodeMap and HTMLCollection all call the UserDict / UserList constructors, which create a new dict and a new list respectively. Unless I missed something, that means none of these collections is live. I don't know whether this is considered a feature or a bug by people here, but it could be trivially 'fixed', by just binding to self.data instead of calling the constructor. Also BTW, is the HTML DOM still being used by anyone? I posted a PyXML bug on SF (782470) about HTMLDocument.getElementsByName a while ago -- appears quite broken, and no-one seems worried. I also noticed HTMLOptionsCollection is missing -- is that deliberate? John From mjais at gmx-gmbh.de Mon Aug 18 09:35:07 2003 From: mjais at gmx-gmbh.de (Markus Jais) Date: Mon Aug 18 02:33:33 2003 Subject: [XML-SIG] Python XML / XSLT libraries In-Reply-To: <000001c36353$db6bdb20$3d01a8c0@rjc800> References: <000001c36353$db6bdb20$3d01a8c0@rjc800> Message-ID: <200308180835.07695.mjais@gmx-gmbh.de> On Friday 15 August 2003 19:37, Richard Johannesson wrote: > Daniel, > > Thanks for the input - looks like solid libraries. > > Is there some prior discussion / article that has reviewed the different > python XML libraries? > > What would be considered the heavy duty full-feature XML/XSLT library > contenders? > - Pyana (v. 0.8.0) > - 4Suite (v. 1.26) > - libxml2+libxslt > - ? hi I have not done to much with this libraries yet, but libxslt ist definitely the fastet I used. so if speed is an issue, you might want to use libxslt bindings Markus > > Do you use all, or just one of these? My impression is that you would > always add PyXML and before adding any one of the ones above. Is this > correct? > > Regards, > Richard > > >-----Original Message----- > > From: Daniel Veillard [mailto:veillard@redhat.com] > > >Sent: Friday, August 15, 2003 5:40 AM > >To: Richard Johannesson > >Cc: 'Craeg K Strong'; xml-sig@python.org > >Subject: Re: [XML-SIG] Python / XML / XSLT vs. Cocoon for > >website server side > > > >On Thu, Aug 14, 2003 at 11:27:34PM -0700, Richard Johannesson wrote: > >> Which XML libraries did you decide to use? > >> Pyana? [seems useful] > >> PIRXX? [seems redundant] > >> 4Suite? [top condender] > >> PyXML? [seems like a must] > > > > You may want to look at libxml2/libxslt Python too > > http://xmlsoft.org/python.html > > > >Daniel > > > >-- > >Daniel Veillard | Red Hat Network https://rhn.redhat.com/ > >veillard@redhat.com | libxml GNOME XML XSLT toolkit > > http://xmlsoft.org/ > http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ > > > > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig -- Markus Jais Software Developer GMX Aktiengesellschaft Riesstra?e 17, 80992 M?nchen Phone: +49 89 14 339-514 mailto:mjais@gmx-gmbh.de http://www.gmx.de From and-xml at doxdesk.com Tue Aug 19 05:05:23 2003 From: and-xml at doxdesk.com (Andrew Clover) Date: Tue Aug 19 00:18:29 2003 Subject: [XML-SIG] Implementing 'live'-ness in a 4DOM fork. In-Reply-To: References: Message-ID: <20030819040523.GA12024@doxdesk.com> John J Lee wrote: > Does anybody have advice on the simplest approach? The way live collections are done in pxdom is to give each Element node a sequence number. Every time an element is appended, inserted, removed, replaced or renamed, the number of the parent is incremented, along with the numbers of each of the parent's ancestor nodes. NodeListByTagName then recalculates its internal list only when the node that generated it (a Document or Element) has a higher sequence number than the last time it was calculated. pxdom is a DOM Level 3 Core implementation only; Level 2 HTML would have a few other kinks. In particular, changing attributes on an 'a' element could cause document.links and/or document.anchors to need updating, and smiliarly for NodeLists returned by getElementsByName. > However, these interfaces represent mutable collections This only affects HTMLOptionsCollection.length, I know of no other way such a list can be altered; there seems also to be no spec requirement to implement writing to length (it can raise a NOT_SUPPORTED_ERR). Still, it's not too hard to make this method alter its owner's children. The Python DOM bindings say that a non-readonly NodeList may be written through Python-list-style, however: a. this is silly, and ignored by both 4DOM and minidom; b. it doesn't necessarily apply to HTML[Options]Collections, which aren't NodeLists. > Worse, I presume that when you remove an item from a NamedNodeMap, the > node tree gets updated. Yes. Normally NamedNodeMaps are implemented in such as way that there is only one copy of the information. In pxdom, an Element's *Attribute* methods simply delegate to Element.attributes.*Attribute*. Since it is not possible to create a new NamedNodeMap onto the same information (like it is with getElementsByTagName and NodeList), there is no problem with syncing multiple views onto the same data. > what would happen if you made changes > from *both* the node tree *and* a collection reflecting that tree? Collections are only lists of node references, there is no copying of trees being done. You only have to worry about changes to the collection itself, and the only valid change (that I know of) in DOM Level 2 Core+HTML is HTMLOptionsCollection.length. > BTW, in previous posts here about this, I notice that people have claimed > that only getElementsByTagName is affected here (because it has to > construct a NodeList that doesn't directly reflect the node tree > structure). That's the only method affected in DOM Level 2 Core. There are more in DOM Level 2 HTML and Range, but these are not so commonly used. > I don't know whether this is considered a feature or a bug by people here It's considered a spec compliance issue by me, and listed as such at http://pyxml.sf.net/topics/compliance.html, but it's a deliberate decision as a trade-off for complexity and speed. And it's a decision some other DOM implementations have made too. -- Andrew Clover mailto:and@doxdesk.com http://www.doxdesk.com/ From Nicolas.Chauvat at logilab.fr Tue Aug 19 15:38:26 2003 From: Nicolas.Chauvat at logilab.fr (Nicolas Chauvat) Date: Tue Aug 19 08:39:03 2003 Subject: [XML-SIG] Python / XML / XSLT vs. Cocoon for website server side In-Reply-To: <003d01c362eb$68698bd0$4601a8c0@rjc800> References: <002901c362d4$06cf8d00$6401a8c0@tbp1> <003d01c362eb$68698bd0$4601a8c0@rjc800> Message-ID: <20030819123826.GF25450@logilab.fr> > The thing about Zope, my impression is that once you develop the app in Zope > your pretty much stuck with that application server. Probably the case with Use Plone + Archetypes. We recently extended archetypes so that it can import and export any content type as XML... will be demoed and available this week at logilab.org. Please ask for details, I'm lacking time right now for more writing. -- Nicolas Chauvat http://www.logilab.com - "Mais o? est donc Ornicar ?" - LOGILAB, Paris (France) From jason at museunlimited.com Thu Aug 21 20:43:31 2003 From: jason at museunlimited.com (Jason Thompson) Date: Fri Aug 22 10:53:17 2003 Subject: [XML-SIG] inline html using elemettree Message-ID: <200308211943.31020.jason@museunlimited.com> Here's a newbie question for someone who knows how to use elementtree. I'm currently writing a blog-like system using elementtree to write the posts to xml. It's all working very nicely only the content element I created has to contain html markup. The problem is, when I write this to file using elementtree the html tags are escaped. Is there a way to write the posting to file using elementtree, but maintaining the html markup inside the content tags? e.g.

This is where the html content goes

I've looked through the source code of the ElementTree module, but my newbie eyes can't find a clue as to how to do this. I've also scoured the Web to no avail. Thanks in advance. best, Jason From jjl at pobox.com Wed Aug 20 01:45:46 2003 From: jjl at pobox.com (John J Lee) Date: Fri Aug 22 17:39:49 2003 Subject: [XML-SIG] Implementing 'live'-ness in a 4DOM fork. Message-ID: [sorry for not replying in the same thread -- mail server went down and hasn't forwarded Andrew's reply yet] Andrew Clover wrote: [...] First, many thanks for your reply -- very much appreciated! Your implementation in pxdom of the scheme you describe seems very neat, so maybe I'll do the same. And I get your point about Nodes only appearing in at most one NamedNodeMap, which is clearly an important thing to notice. However, though the ECMAScript bindings don't require being able to 'write through' HTMLCollections by indexing, real JavaScript code (as you're no doubt aware, looking at the JS stuff on your web page) does do this: myselect.options[0] = new Option(); Don't know if the same is true of NodeLists. Hmm. John From jjl at pobox.com Mon Aug 25 18:33:05 2003 From: jjl at pobox.com (John J Lee) Date: Mon Aug 25 12:33:34 2003 Subject: [XML-SIG] Anybody using PyXML (4DOM) HTML DOM? Message-ID: Does anybody use PyXML's (4DOM's) HTML DOM implementation (including the implementors themselves)? A couple of examples where it looks clearly broken, which makes me suspect nobody but me is using it: 1. HTMLDocument.getElementsByTagName doesn't work at all for lower-case attribute values (SF bug 782470): #!/usr/bin/env python from xml.dom.ext.reader import HtmlLib doc = HtmlLib.FromHtml("""
""") # HTMLElement.getAttribute uppercases the name, but it was *stored* # in lower case, so both fail. print repr(doc.getElementsByName("blah")) print repr(doc.getElementsByName("BLAH")) I don't know how this should be fixed: case issues in HTML DOM seem horribly complicated. 2. HTMLInputElement._get_type capitalisation is wrong. xml/dom/html/HTMLInputElement.py says: | def _get_type(self): | return string.capitalize(self.getAttribute('TYPE')) HTML DOM level 2 spec says: | The type of control created (all lower case). See the type attribute ^^^^^^^^^^^^^^ | definition in HTML 4.01. John From jjl at pobox.com Mon Aug 25 19:39:11 2003 From: jjl at pobox.com (John J Lee) Date: Mon Aug 25 13:39:25 2003 Subject: [XML-SIG] Anybody using PyXML (4DOM) HTML DOM? In-Reply-To: Message-ID: On Mon, 25 Aug 2003, John J Lee wrote: [...] > 1. HTMLDocument.getElementsByTagName doesn't work at all for lower-case > attribute values (SF bug 782470): Attribute *names*, I should have said (eg. the 'name' in 'name="blah"' in the example below). Actually, this problem seems to be a parser bug: Sgmlop.HtmlParser does setAttributeNS. If you change that to setAttribute, it works. > #!/usr/bin/env python > > from xml.dom.ext.reader import HtmlLib > > doc = HtmlLib.FromHtml(""" >
> """) > > # HTMLElement.getAttribute uppercases the name, but it was *stored* > # in lower case, so both fail. > print repr(doc.getElementsByName("blah")) > print repr(doc.getElementsByName("BLAH")) [...] John From jeremy.kloth at fourthought.com Mon Aug 25 12:47:43 2003 From: jeremy.kloth at fourthought.com (Jeremy Kloth) Date: Mon Aug 25 13:48:36 2003 Subject: [XML-SIG] Anybody using PyXML (4DOM) HTML DOM? References: Message-ID: <009501c36b30$fcca3b60$f701a8c0@zeus> John J Lee wrote: > Does anybody use PyXML's (4DOM's) HTML DOM implementation (including the > implementors themselves)? To answer for the implementors, we (Fourthought) no longer use 4DOM nor any of its components. We stopped using it shortly after it was added to PyXML for speed/memory issues. It was last updated to the specification *BEFORE* XHTML was incorporated into the HTML DOM spec (late 2000). While there have been some tweaks to get it to work with XHTML, support for it is spotty at best. > A couple of examples where it looks clearly broken, which makes me suspect > nobody but me is using it: The bugs you found are right per the current spec, but as already stated, when using the implemented spec (http://www.w3.org/TR/2000/PR-DOM-Level-2-HTML-20000927) it behaves as expected. Currently I have niether the time nor desire to go through and update it to the most recent spec. If support for the latest specification is what you want/need, you will probably need to update 4DOM's HTML on your own (or find someone to volunteer). Other developers for PyXML may feel differently, though. -- Jeremy Kloth Fourthought, Inc. (http://fourthought.com/) 4Suite XML/RDF Platform (http://4suite.org/) From jeremy.kloth at fourthought.com Mon Aug 25 12:52:48 2003 From: jeremy.kloth at fourthought.com (Jeremy Kloth) Date: Mon Aug 25 13:53:38 2003 Subject: [XML-SIG] Anybody using PyXML (4DOM) HTML DOM? References: Message-ID: <00a101c36b31$b29b7d50$f701a8c0@zeus> John J Lee wrote: > On Mon, 25 Aug 2003, John J Lee wrote: > [...] >> 1. HTMLDocument.getElementsByTagName doesn't work at all for lower-case >> attribute values (SF bug 782470): > > Attribute *names*, I should have said (eg. the 'name' in 'name="blah"' in > the example below). > > Actually, this problem seems to be a parser bug: Sgmlop.HtmlParser does > setAttributeNS. If you change that to setAttribute, it works. > The setAttributeNS method was added to support reading of HTML documents as XML documents. This goes back to the spotty support for XHTML I mentioned in my previous post. Looking at the code, I think this problem can be fixed by overriding setAttributeNS on the HTMLElement much like createElementNS on the HTMLDocument. -- Jeremy Kloth Fourthought, Inc. (http://fourthought.com/) 4Suite XML/RDF Platform (http://4suite.org/) From jjl at pobox.com Mon Aug 25 20:02:28 2003 From: jjl at pobox.com (John J Lee) Date: Mon Aug 25 14:02:49 2003 Subject: [XML-SIG] Anybody using PyXML (4DOM) HTML DOM? In-Reply-To: <00a101c36b31$b29b7d50$f701a8c0@zeus> Message-ID: On Mon, 25 Aug 2003, Jeremy Kloth wrote: > John J Lee wrote: [...] > The setAttributeNS method was added to support reading of HTML documents as > XML documents. This goes back to the spotty support for XHTML I mentioned > in my previous post. Looking at the code, I think this problem can be fixed > by overriding setAttributeNS on the HTMLElement much like createElementNS on > the HTMLDocument. Yes, I agree -- I just realised this and posted another comment on the bug to that effect. Thanks for the info about the status of 4DOM. John From ddooss at wp.pl Tue Aug 26 21:31:42 2003 From: ddooss at wp.pl (Domel) Date: Tue Aug 26 14:55:32 2003 Subject: [XML-SIG] BarML Message-ID: <14026588031.20030826203142@wp.pl> I write new XML language - BarML. BarML is to make Side Navigation Bar like in HTML/XHTML in element with rel attribute (for example . But BarML has more possibilities that element. We can create new folder (for example not only rel="bookmark" ) and named it how we want. We can also create links and maned it how we want too. And all folders and links we can set in bar how we want. Most sides have own navigation and it different that rel value and in BarML there are not this problem. Can I publish my specyfication on your web (like XBEL)? Best wishes, Dominik Tomaszuk From noreply at sourceforge.net Wed Aug 27 05:56:12 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Aug 27 07:56:16 2003 Subject: [XML-SIG] [ pyxml-Bugs-795917 ] Windows installer requires Admin privileges Message-ID: Bugs item #795917, was opened at 2003-08-27 11:56 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=795917&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Sascha Silbe (sascha_silbe) Assigned to: Nobody/Anonymous (nobody) Summary: Windows installer requires Admin privileges Initial Comment: On Windows, Python 2.3 can be installed as a normal user, but the PyXML installer complains about not having Admin privileges and exits. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106473&aid=795917&group_id=6473 From Jean-Michel.Bruel at univ-pau.fr Wed Aug 27 18:17:23 2003 From: Jean-Michel.Bruel at univ-pau.fr (Jean-Michel BRUEL) Date: Wed Aug 27 11:22:38 2003 Subject: [XML-SIG] [UML2003] Call for Participation Message-ID: <200308271517.h7RFHNX09077@univ-pau.fr> [Apologizes if you receive multiple copies of this call] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Call for Participation Sixth International Conference on UML - Modeling Languages and Applications October 20-24, 2003, San Fransisco, USA http://www.umlconference.org Co-sponsored by ACM SIGSOFT and the IEEE Computer Society Corporate Donors: IBM Rational, QSS Group Inc., NASA OSMA SARP KEYNOTE SPEAKERS Peter Coad, Borland Software Corporation Martin Fowler, ThoughtWorks Nicolas Rouquette, NASA JPL COMMITTEE General Chair: Grady Booch, Rational Software Corporation, USA Conference Chair: Jon Whittle, NASA Ames Research Center, USA Program Chair: Perdita Stevens, University of Edinburgh, Scotland The UML conference is the premier venue for exchange of innovative technical ideas and experiences relating to the Unified Modeling Language (UML) and general modeling issues associated with software-intensive systems. UML 2003 takes place at a time when the Object Management Group (OMG) Model Driven Architecture (MDA) initiative is gaining use in industrial systems development. In MDA, models are the key artifacts of software development. In addition, the new UML 2.0 standard is coming into use. UML 2003 will provide a forum for lively and exciting discussions on current modeling issues. The conference will include workshops and tutorials that address topics in UML 2.0, modeling of critical systems, aspect-oriented modeling, real-time and embedded systems modeling, and patterns. See the web page for a list of tutorials and workshops. Workshops and tutorials will be held on Monday and Tuesday, with the conference technical program from Wednesday to Friday. See the web page for the conference schedule and program. There will be opportunities for holding Birds-of-a-Feather sessions during the conference. UML 2003 will be held in the beautiful ocean-side city of San Francisco, California. See the web page for registration information. Early registration ends September 28, 2003. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% From my.future at utoronto.ca Sun Aug 31 05:23:19 2003 From: my.future at utoronto.ca (my.future@utoronto.ca) Date: Sun Aug 31 04:24:05 2003 Subject: [XML-SIG] autoreply Message-ID: <20030831082329Z930395-4558+10@bureau10.utcc.utoronto.ca> Your message has been filed for future reading. http://myfuture.utoronto.ca From fredrik at pythonware.com Sun Aug 31 12:58:05 2003 From: fredrik at pythonware.com (Fredrik Lundh) Date: Sun Aug 31 05:58:15 2003 Subject: [XML-SIG] Re: inline html using elemettree References: <200308211943.31020.jason@museunlimited.com> Message-ID: Jason Thompson WROTE: > I'm currently writing a blog-like system using elementtree to write the posts > to xml. It's all working very nicely only the content element I created has > to contain html markup. The problem is, when I write this to file using > elementtree the html tags are escaped. Is there a way to write the posting to > file using elementtree, but maintaining the html markup inside the content > tags? > > e.g. >

This is where the html content goes

you cannot embed arbitrary HTML inside an XML document without ending up with invalid XML. if you cannot guarantee that the HTML is well-formed, you have to escape it (this is how it's usually done in RSS, for example). from elementtree.ElementTree import Element content = Element("content") content.text = html_as_text if you can guarantee that the HTML is well-formed, parse it to XML, and embed the resulting XML structure: from elementtree.ElementTree import Element, XML content = Element("content") content.append(XML(html_as_text)) note that you can use the ElementTidy extension to convert arbitrary HTML to well-formed (X)HTML; for details, see: http://effbot.org/zone/element-tidylib.htm