From jza at openoffice.org Tue May 1 08:31:49 2007 From: jza at openoffice.org (Alexandro Colorado) Date: Tue, 01 May 2007 01:31:49 -0500 Subject: [XML-SIG] Is this support or development? Message-ID: I wonder if this is a support list or a development list, I have been in this list but most of the post seem related to development of frameworks on top of XML. If I have questions regarding the use of the xml modules such as elementTree, SAX, DOM, xerces-type parsers, is this the right list to ask about it? thanks. -- Alexandro Colorado OpenOffice.org Community Contact // Mexico http://www.openoffice.org Twitter: http://www.twitter.com/jza Jabber: jza at jabber.org From martin at v.loewis.de Tue May 1 17:43:37 2007 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Tue, 01 May 2007 17:43:37 +0200 Subject: [XML-SIG] Is this support or development? In-Reply-To: References: Message-ID: <46376029.5070609@v.loewis.de> > If I have questions regarding the use of the xml modules such as > elementTree, SAX, DOM, xerces-type parsers, is this the right list to ask > about it? Yes, that's the right list. Martin From stefan_ml at behnel.de Tue May 1 18:39:25 2007 From: stefan_ml at behnel.de (Stefan Behnel) Date: Tue, 01 May 2007 18:39:25 +0200 Subject: [XML-SIG] link to lxml on the XML software page Message-ID: <46376D3D.7020706@behnel.de> Hi, I would like to see a link to lxml from the Python XML software page http://pyxml.sourceforge.net/topics/software.html It is one of the technically leading XML libraries for Python, so I believe that it deserves a three step link from the Python home page. Something in the lines of ------------------------ lxml_ - a fast, pythonic, ElementTree_ compatible Python wrapper around libxml2_ and libxslt_. lxml supports various XML standards like XPath, XSLT, XMLSchema and RelaxNG. It is a highly flexible framework that provides a Python data binding API and even supports user defined XML APIs. .. _lxml: http://codespeak.net/lxml/ .. _ElementTree: http://effbot.org/zone/element-index.htm .. _libxml2: http://xmlsoft.org/ .. _libxslt: http://xmlsoft.org/XSLT/ ------------------------ Thanks, and best regards, Stefan From ah at hatzis.de Wed May 2 22:22:41 2007 From: ah at hatzis.de (Anastasios Hatzis) Date: Wed, 2 May 2007 22:22:41 +0200 Subject: [XML-SIG] XMI, MOF and UML In-Reply-To: <4634E331.80108@v.loewis.de> References: <200704261358.46211.ah@hatzis.de> <4634E331.80108@v.loewis.de> Message-ID: <200705022222.41616.ah@hatzis.de> On Sunday 29 April 2007 20:25, Martin v. L?wis wrote: > > Have anyone of you already worked on XMI transformation? I'm going to > > re-engineer my lightweight MDA tool pyswarm SDK*), especially adding > > support of XMI formats of other UML tools. Currently the tool does only > > import XMI 2.1 files created with MagicDraw. It seems my plan means > > plenty of work, including UML and MOF implementations. So I wanted to > > know if someone in this list has experience with import/export of XMI > > files and mapping between different XMI versions and the UML or MOF > > versions they are representing. > > Martin Karlsch (www.karlsch.org) has written a framework called Frodo, > which includes XMI support. You should contact him about details. > Martin, thank you for your notice. I will contact Martin Karlsch as soon as I have ordered the mess in my mind. ;) I found his master thesis and (with some surprise) have seen your name along with Markus Hillebrand's. Last week he mentioned such project (I'm sure now that he referred to frodo). However, I had the feeling that probably it is too challenging for my skill level, but I will try to understand the basic principles, at least. BTW, I have replaced PyXML Sax2 reader with xml.dom.minidom from Python standard library, as you suggested on 2007-02-07 in this list. Hasn't been much work to change and the new version (0.7.1) runs fine. I also noticed that with minidom's parse() the generator is ~ 5 times faster than before, where all time-saving seems to be originated from the XML parsing. Many thanks for your advice. Best regards, Anastasios From Ar18 at comcast.net Tue May 8 03:54:02 2007 From: Ar18 at comcast.net (Ar18 at comcast.net) Date: Tue, 08 May 2007 01:54:02 +0000 Subject: [XML-SIG] HTML Processing Message-ID: <050820070154.5731.463FD83A00035D66000016632207021573C8CE9DBE@comcast.net> I would like to investigate (and possibly implement it) the possibility of using Python for processing html pages. The actual work would look something like this: * Retrieve pages from the net that are in any number of formats such as XML, XHML, HTML, HTML, with major errors in it * Create a usable DOM for the files (considering the fact that they may have malformed html) OR... extract the stuff I need directly from the potentially malformed html. * If the DOM route is used, then I would need something to retrieve stuff from certain areas of the DOM. Additional features needed: I wonder, is this a good place to talk about this? I know the goal is XML, but I think this still fits. What libraries should I be looking into to do things like this? I would prefer to look at all the options, if possible. From strangest at comcast.net Tue May 8 04:35:50 2007 From: strangest at comcast.net (Gloria W) Date: Mon, 07 May 2007 22:35:50 -0400 Subject: [XML-SIG] HTML Processing In-Reply-To: <050820070154.5731.463FD83A00035D66000016632207021573C8CE9DBE@comcast.net> References: <050820070154.5731.463FD83A00035D66000016632207021573C8CE9DBE@comcast.net> Message-ID: <463FE206.7000105@comcast.net> Ar18 at comcast.net wrote: > I would like to investigate (and possibly implement it) the possibility of using Python for processing html pages. > > The actual work would look something like this: > * Retrieve pages from the net that are in any number of formats such as XML, XHML, HTML, HTML, with major errors in it > * Create a usable DOM for the files (considering the fact that they may have malformed html) OR... extract the stuff I need directly from the potentially malformed html. > * If the DOM route is used, then I would need something to retrieve stuff from certain areas of the DOM. > Additional features needed: > > I wonder, is this a good place to talk about this? > > I know the goal is XML, but I think this still fits. What libraries should I be looking into to do things like this? I would prefer to look at all the options, if possible. > _______________________________________________ > XML-SIG maillist - XML-SIG at python.org > http://mail.python.org/mailman/listinfo/xml-sig > > I wrote an application to do just this. I found that the existing xml.dom module had some serious bugs, has not been touched since 2004, and had no easy way of creating and inserting subtrees in the DOM, or working with subsets of the DOM. This looks like it was written, then abandoned for some reason. Not sure why. I tried to use the elementree from effbot, but also with no success. It is not DOM compliant, and it's nesting is odd. For example, text appearing after a

... node. I found it very odd, and not useful for DOM manipulation at all. I wrote to Mr. Lundh, and got an indifferent response. I ended up writing my own DOM tree manager, which is DOM 2 compliant for the most part. A range() interface still needs to be fully written, which will allow it to reference anywhere in the tag structure arbitrarily. Right now I limit my DOM referencing to well-defined components of the tags and elements. I have not yet written the code to allow for a completely unlimited referencing of content in any node, and across any range. Once that is added to my module, it will be complete and even more DOM2 compliant. But that functionality is not required for my app, so I may not get the chance to write it. It has the ability to work with any subtree and insert it using array syntax. The nesting is exactly what you'd expect in a DOM structure. If you want this module, and you reach the point where you can help me debug and improve it, then contact me and we shall talk about the details. based on this e-mail, it sounds like you're not yet there. For serving RESTful front end app, I highly recommend CherryPy. Best, Gloria From jcmendez at gmail.com Wed May 9 06:48:39 2007 From: jcmendez at gmail.com (Juan Carlos Mendez) Date: Wed, 9 May 2007 00:48:39 -0400 Subject: [XML-SIG] Question on PyXML Message-ID: Hello everyone. I'm trying to run InkScape in Mac Os X (a vector graphics application). The prepackaged application runs fine, in general. However, many of its modules use a python script named inkex.py, which fails with the message that it requires PyXML. I tried searching for the solution, but it seems to me the XML support in Python has changed a bit and perhaps you can help me understand what the current best solution is. It seems PyXML is deprecated or no longer maintained according to its SourceForge page. I believe Python 2.5 (which is what I'm running on the Mac) has some of the XML support already built in. The inkex.py script tries to import the following: try: import xml.dom.ext import xml.dom.minidom import xml.dom.ext.reader.Sax2 import xml.xpath except: sys.exit('The inkex.py module requires PyXML. Please download the latest version from .') Of these, minidom seems to be present, but the others aren't: Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import xml.dom.ext Traceback (most recent call last): File "", line 1, in ImportError: No module named ext >>> import xml.dom.minidom >>> import xml.dom.ext.reader.Sax2 Traceback (most recent call last): File "", line 1, in ImportError: No module named ext.reader.Sax2 >>> import xml.xpath Traceback (most recent call last): File "", line 1, in ImportError: No module named xpath >>> Any ideas or pointers will be very much appreciated Juan C. From dkuhlman at rexx.com Tue May 15 20:40:12 2007 From: dkuhlman at rexx.com (Dave Kuhlman) Date: Tue, 15 May 2007 11:40:12 -0700 Subject: [XML-SIG] ANN: User methods for generateDS.py Message-ID: <20070515184012.GA19535@cutter.rexx.com> User Methods ============ generateDS.py now has the ability to add user methods to the classes it generates. The user provides definitions (source) for the methods to be added and (for each method) a regular expression to identify the names of classes to which the method should be added. Then, the --user-methods command line flag is used to instruct generateDS.py to add the specified methods to the classes generated in the superclass file. A class variable (_member_data_items) providing information about the member data items of each generated class has also been added. There is a sample file (gends_user_methods.py in the distribution) that provides examples of: - walking the document object tree, - accessing member data items using the _member_data_items class variable, - getting and setting the values of member data items, and - determining the type of member data items. You can read more about this capability in the "User Methods" section of the documentation: http://www.rexx.com/~dkuhlman/generateDS.html#user-methods You can find the latest version here: http://www.rexx.com/~dkuhlman/generateDS-1.10a.tar.gz and at Source Forge: http://sourceforge.net/projects/generateds/ If you consider using this new user methods capability, also think about the ability to generate subclasses of generated classes using the -s command line flag and then manually adding methods to those generated subclasses. In some situation, this might be a better solution. To find out more about generateDS.py, read this: http://www.rexx.com/~dkuhlman/generateDS.html Dave -- Dave Kuhlman http://www.rexx.com/~dkuhlman From martin at v.loewis.de Thu May 17 11:43:19 2007 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Thu, 17 May 2007 11:43:19 +0200 Subject: [XML-SIG] Question on PyXML In-Reply-To: References: Message-ID: <464C23B7.20701@v.loewis.de> > Any ideas or pointers will be very much appreciated You would have to port the application to the standard Python library. That should work fine for most aspects. The only problematic issue is xpath: Python currently does not include an xpath implementation. Depending on what xpath expressions are used, you may be able to reformulate the queries directly in DOM. Regards, Martin From stylusstudio at gmail.com Mon May 21 06:25:48 2007 From: stylusstudio at gmail.com (Stylus Studio) Date: Mon, 21 May 2007 00:25:48 -0400 Subject: [XML-SIG] [Announce] Stylus Studio 2007 Release 2 Now Available Message-ID: <57783b190705202125n657a3b5cg312ee0ee23a05d3@mail.gmail.com> [Announce] Dear XML-SIG @ PYTHON, Stylus Studio 2007 Release 2, is now available for free trial download or online purchase. Here are some of highlights: * Query Plan: A new query plan utility in the XQuery Editor lets you visualize query execution plans and gain insight into how DataDirect XQuery will execute your XQuery application, including seeing the type of SQL statements that are used to access relational data, when XML streaming is being used, which temporary tables are being created, when variables are being called, etc. Query plan support is available for any XQuery that uses the DataDirect XQuery processor. * Support for Grouping Data Sources in XML Publisher: In Stylus Studio 2007 XML Enterprise Suite, Release 2, XML Publisher lets you create more advanced reports through support for grouping data from nodes in one or more data sources. Using the new Create Relationship Dialog Box, you visually define relationships between different data sources, or between different data islands within the same source and then add those relationships to your XML reports using simple drag-and-drop functionality. For more information, visit: http://www.stylusstudio.com/videos/report-generation/xmlpublisher-070504.html * Support for Gigabyte Size XML Files: Stylus Studio 2007 XML Enterprise Suite, Release 2 implements new optimizations that permit the editing of gigabyte-size XML documents. * Bundled DataDirect XML Converters 3.0: DataDirect XML Converters are high-performance Java and .NET components that provide bi-directional, programmatic access to virtually any non-XML file including EDIFACT, X12, IATA, EANCOM and flat files. For more information, visit: http://www.xmlconverters.com * Bundled DataDirect XQuery 3.0: DataDirect XQuery is an implementation of XQuery that can query XML, relational data, SOAP messages, EDI, or a combination of data sources. The latest version, DataDirect XQuery 3.0, is bundled with Stylus Studio 2007 XML Enterprise Suite. For more information, visit: http://www.xquery.com Learn more about the new features at: http://www.stylusstudio.com/xml_product_new_features.html Download a free trial from: http://www.stylusstudio.com/xml_download.html Sincerely, The Stylus Studio Team http://www.stylusstudio.com From info at thegrantinstitute.com Tue May 22 08:07:22 2007 From: info at thegrantinstitute.com (Anthony Jones) Date: 21 May 2007 23:07:22 -0700 Subject: [XML-SIG] Professional Grant Proposal Writing Workshop (June 2007: San Diego State University) Message-ID: <20070521230722.70613275CB461264@thegrantinstitute.com> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20070521/2cfe13b9/attachment.htm From debajit at debajit.com Tue May 22 10:59:11 2007 From: debajit at debajit.com (Debajit Adhikary) Date: Tue, 22 May 2007 04:59:11 -0400 Subject: [XML-SIG] Newbie XML/SAX Parsing questions Message-ID: <110a172d0705220159w44318657p55c087f8979e39b1@mail.gmail.com> I'm new to Python, and am writing an XML parser for RSS feeds. I'd like to have a few things cleared up: * Is PyXML a part of the standard Python distribution? * How can I parse entity references like in the following code:

    >abc<
Could anyone give me any code examples for this? * Is 4suite (4suite.org) better than the XML libraries that are built-in to Python? * How can I install the sax2exts package? ----------------------- I'm using the following code: parser = make_parser() saxRssParser = SaxRssParser() # implementation parser.setContentHandler(saxRssParser) parser.setProperty(handler.property_lexical_handler, saxRssParser) # For cdata etc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20070522/1a05b67c/attachment.html From bortzmeyer at nic.fr Tue May 22 11:19:40 2007 From: bortzmeyer at nic.fr (Stephane Bortzmeyer) Date: Tue, 22 May 2007 11:19:40 +0200 Subject: [XML-SIG] Newbie XML/SAX Parsing questions In-Reply-To: <110a172d0705220159w44318657p55c087f8979e39b1@mail.gmail.com> References: <110a172d0705220159w44318657p55c087f8979e39b1@mail.gmail.com> Message-ID: <20070522091940.GA7721@nic.fr> On Tue, May 22, 2007 at 04:59:11AM -0400, Debajit Adhikary wrote a message of 60 lines which said: > I'm new to Python, and am writing an XML parser for RSS feeds. Why reinventing the wheel? http://feedparser.org/ > * How can I parse entity references like in the following code: > >
>    >abc<
> 
It's the parser's job, not yours. From debajit at debajit.com Tue May 22 12:27:07 2007 From: debajit at debajit.com (Debajit Adhikary) Date: Tue, 22 May 2007 06:27:07 -0400 Subject: [XML-SIG] Newbie XML/SAX Parsing questions In-Reply-To: <20070522091940.GA7721@nic.fr> References: <110a172d0705220159w44318657p55c087f8979e39b1@mail.gmail.com> <20070522091940.GA7721@nic.fr> Message-ID: <110a172d0705220327v68748842j818d9946d317870e@mail.gmail.com> On 5/22/07, Stephane Bortzmeyer wrote: > > On Tue, May 22, 2007 at 04:59:11AM -0400, > Debajit Adhikary wrote > a message of 60 lines which said: > > > I'm new to Python, and am writing an XML parser for RSS feeds. > > Why reinventing the wheel? > > http://feedparser.org/ Thanks :) Feedparser works like a charm. (In any case, I'd managed fix all of the problems I was facing by using ElementTree instead of the SAX parsing that I was doing) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20070522/3e537016/attachment.htm From david.bear at asu.edu Wed May 23 02:25:48 2007 From: david.bear at asu.edu (David Bear) Date: Tue, 22 May 2007 17:25:48 -0700 Subject: [XML-SIG] looking for conversion from dictionary Message-ID: <1504866.pVgtQIKpoQ@teancum> I google for 'convert python dictionary xml' but got way too many hits. Anyone have any pointers for a quick way to have a python dictionary represented as xml? I want to have repr(pythondict) where =keyname, and the contents of the tag is the value. -- David Bear College of Public Programs at Arizona State University From info at thegrantinstitute.com Thu May 24 16:00:06 2007 From: info at thegrantinstitute.com (Anthony Jones) Date: Thu, 24 May 2007 14:00:06 -0000 Subject: [XML-SIG] Professional Grant Proposal Writing Workshop (June 2007: San Diego State University) Message-ID: <20070504135355.A39643B8DE1F2A4B@thegrantinstitute.com> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/xml-sig/attachments/20070524/1c2ea663/attachment.htm