I mentioned in another message that process_includes needs fixing. 
It requires lxml (or python-lxml) when there is a namespace
prefix definition in the XML Schema (which I suspect will be most
of the time).  A temporary solution is to require the user to add
the "--no-process-includes" command line flag if lxml is not
installed.  That's not a good solution because the error message
that you get when you fail to do this gives no indication that you
should try the "--no-process-includes" flag.

Here are several possible solutions:

1. Make the default to *not* do include processing (i.e. do not
   call process_includes by default).  The user will then need to add a
   "--process-includes" command line flag in order to perform
   include processing.

2. Keep the current default (specifically, process includes by
   default, turn it off with a "--no-process-includes" command line
   flag), *but* when and if include processing starts, give an
   error message and abort if lxml/python-lxml is not installed. 
   Also, since the namespace handling is only in the more recent
   versions of Lxml, check to make sure that we have Lxml version
   2.0 or greater.

3. If Lxml is *not* installed, give a warning message and
   automatically skip include processing.

I'm voting for option #2.  Option #3 also seems reasonable, but I
worry that it will hide something that the user will expect to
happen.

Is there any discussion?  I'll implement option #2 if I don't
hear any objections in the next day or two.

For anyone who is not familiar with Lxml, Lxml is a replacement for
ElementTree.  Lxml implements the ElementTree API and adds several
features that are not present in ElementTree.  The additional
feature that is important for this discussion is the handling of
namespaces in the most recent versions of lxml.  Lxml also has some
support for XPath and XSLT.  You can find out about Lxml here:

    http://codespeak.net/lxml/

Lxml has become very easy to install.  On Debian GNU/Linux use:

    $ apt-get install python-lxml

or install libxml2 and libxslt and then install Lxml from source.

For MS Windows, there are binary installers at the Lxml Web site.

If you do much XML processing in Python, then looking at Lxml is a
good idea.

- Dave



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to