<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.python.lxml.devel">
    <title>gmane.comp.python.lxml.devel</title>
    <link>http://blog.gmane.org/gmane.comp.python.lxml.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6411"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6410"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6409"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6408"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6407"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6406"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6405"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6404"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6403"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6402"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6401"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6400"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6399"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6398"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6397"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6396"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6395"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6394"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6393"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6392"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6411">
    <title>xml install problems</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6411</link>
    <description>&lt;pre&gt;Hi,
I am try to install xml on centos6.2 with command:
pip-python install xml==2.3

it gives me this error:

Downloading/unpacking lxml==2.3
  Running setup.py egg_info for package lxml
    Building lxml version 2.3.
    Building with Cython 0.14.1.
    Using build configuration of libxslt 1.1.26
    Building against libxml2/libxslt in the following directory: /usr/lib64
Installing collected packages: lxml
  Running setup.py install for lxml
    Building lxml version 2.3.
    Building with Cython 0.14.1.
    Using build configuration of libxslt 1.1.26
    Building against libxml2/libxslt in the following directory: /usr/lib64
    building 'lxml.etree' extension
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv
-DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/libxml2
-I/usr/include/python2.6 -c src/lxml/lxml.etree.c -o
build/temp.linux-x86_64-2.6/src/lxml/lxml.etree.o -w
    {standard input}: Assembler messages:
    {standard input}:150508: Warning: end of file not at end of a line;
newline inserted
    gcc: Internal error: Killed (program cc1)
    Please submit a full bug report.
    See &amp;lt;http://bugzilla.redhat.com/bugzilla&amp;gt; for instructions.
    error: command 'gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import
setuptools;__file__='/root/build/lxml/setup.py';execfile(__file__)" install
--single-version-externally-managed --record
/tmp/pip-g_IvOB-record/install-record.txt:
    Building lxml version 2.3.

Building with Cython 0.14.1.

Using build configuration of libxslt 1.1.26

Building against libxml2/libxslt in the following directory: /usr/lib64

running install

running build

running build_py

running build_ext

building 'lxml.etree' extension

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv
-DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/libxml2
-I/usr/include/python2.6 -c src/lxml/lxml.etree.c -o
build/temp.linux-x86_64-2.6/src/lxml/lxml.etree.o -w

{standard input}: Assembler messages:

{standard input}:150508: Warning: end of file not at end of a line; newline
inserted

gcc: Internal error: Killed (program cc1)

Please submit a full bug report.

See &amp;lt;http://bugzilla.redhat.com/bugzilla&amp;gt; for instructions.

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import
setuptools;__file__='/root/build/lxml/setup.py';execfile(__file__)" install
--single-version-externally-managed --record
/tmp/pip-g_IvOB-record/install-record.txt failed with error code 1
Storing complete log in /root/.pip/pip.log

I already installed libxml2-devel and libxslt-devel, can some body tell me
what's going on?

thanks in adv

Regards

&lt;/pre&gt;</description>
    <dc:creator>William Herry</dc:creator>
    <dc:date>2012-05-25T01:40:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6410">
    <title>gpx tostring for xml newbe</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6410</link>
    <description>&lt;pre&gt;I wanted to do some analyzing of Garmin gpx track and waypoint files. So 
I thought of diving into lxml and start with pretty printing a garmin 
file. Garmin writes all info on a single line which is not pretty. When 
split into lines a waypoint looks like:
&amp;lt;wpt lat="52.151006" lon="15.373755"&amp;gt;
&amp;lt;ele&amp;gt;14.742697&amp;lt;/ele&amp;gt;
&amp;lt;time&amp;gt;2012-05-19T20:23:15Z&amp;lt;/time&amp;gt;
&amp;lt;name&amp;gt;Gazon&amp;lt;/name&amp;gt;
&amp;lt;sym&amp;gt;Park&amp;lt;/sym&amp;gt;
&amp;lt;extensions&amp;gt;
&amp;lt;wptx1:WaypointExtension&amp;gt;
&amp;lt;wptx1:Samples&amp;gt;3&amp;lt;/wptx1:Samples&amp;gt;
&amp;lt;/wptx1:WaypointExtension&amp;gt;
&amp;lt;/extensions&amp;gt;
&amp;lt;/wpt&amp;gt;

when I do:

wpt = '{%s}wpt' % xmlns

     waypoints = root.findall(wpt)

for point in waypoints:

print point.get('lon'), point.get('lat')

         print etree.tostring(point, pretty_print=True, with_tail=False)

I get a lot of info from the beginning of the file between "&amp;lt;wpt" and 
"lat=".

&amp;lt;wpt xmlns="http://www.topografix.com/GPX/1/1" 
xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" 
xmlns:wptx1="http://www.garmin.com/xmlschemas/WaypointExtension/v1" 
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" lat="52.151006" 
lon="15.373755"&amp;gt;
&amp;lt;ele&amp;gt;14.742697&amp;lt;/ele&amp;gt;
&amp;lt;time&amp;gt;2012-05-19T20:23:15Z&amp;lt;/time&amp;gt;
&amp;lt;name&amp;gt;Gazon&amp;lt;/name&amp;gt;
&amp;lt;sym&amp;gt;Park&amp;lt;/sym&amp;gt;
&amp;lt;extensions&amp;gt;
&amp;lt;wptx1:WaypointExtension&amp;gt;
&amp;lt;wptx1:Samples&amp;gt;3&amp;lt;/wptx1:Samples&amp;gt;
&amp;lt;/wptx1:WaypointExtension&amp;gt;
&amp;lt;/extensions&amp;gt;
&amp;lt;/wpt&amp;gt;

Why is that and how to avoid?

Thanks for helping this xml and lxml newbe,
Janwillem

_________________________________________________________________
Mailing list for the lxml Python XML toolkit - http://lxml.de/
lxml&amp;lt; at &amp;gt;lxml.de
https://mailman-mail5.webfaction.com/listinfo/lxml
&lt;/pre&gt;</description>
    <dc:creator>janwillem</dc:creator>
    <dc:date>2012-05-20T12:35:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6409">
    <title>Re-announcing SOX: Sequential Output of XML</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6409</link>
    <description>&lt;pre&gt;A correspondent has kindly pointed out that the Creative Commons
BY-NC-ND license does not allow anyone to actually use this
module.  I've changed the license to BY-NC.

John Shipman (john&amp;lt; at &amp;gt;nmt.edu), Applications Specialist
New Mexico Tech Computer Center, Speare 146, Socorro, NM 87801
(575) 835-5735, http://www.nmt.edu/~john
   ``Let's go outside and commiserate with nature.''  --Dave Farber

---------- Forwarded message ----------
Date: Thu, 17 May 2012 21:06:05 -0600 (MDT)
From: John W. Shipman &amp;lt;john&amp;lt; at &amp;gt;nmt.edu&amp;gt;
To: lxml-dev &amp;lt;lxml&amp;lt; at &amp;gt;lxml.de&amp;gt;
Cc: John Shipman &amp;lt;john&amp;lt; at &amp;gt;nmt.edu&amp;gt;
Subject: Announcing SOX: Sequential Output of XML

My CGI script that generates a huge XHTML table has been running
into storage limitations because it uses lxml to build the table.

So I build a Python module that applications can use to generate
any XML content as a stream, so you can generate arbitrarily
large XML files with a trivial amount of storage:

     http://www.nmt.edu/tcc/projects/sox/

Features:

- Like Fredrik Lundh's builder.py module, it takes very little
   code to generate a lot of XML.  If you're unfamiliar with this
   little gem, see here:

     http://effbot.org/zone/element-builder.htm

- The module insures that every start tag has a matching end tag.

Feel free to try this package out (Creative Commons BY-NC-ND
license).  I would greatly appreciate any feedback.

Best regards,
John Shipman (john&amp;lt; at &amp;gt;nmt.edu), Applications Specialist
New Mexico Tech Computer Center, Speare 146, Socorro, NM 87801
(575) 835-5735, http://www.nmt.edu/~john
   ``Let's go outside and commiserate with nature.''  --Dave Farber
_________________________________________________________________
Mailing list for the lxml Python XML toolkit - http://lxml.de/
lxml&amp;lt; at &amp;gt;lxml.de
https://mailman-mail5.webfaction.com/listinfo/lxml
&lt;/pre&gt;</description>
    <dc:creator>John W. Shipman</dc:creator>
    <dc:date>2012-05-18T18:50:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6408">
    <title>Re: Announcing SOX: Sequential Output of XML</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6408</link>
    <description>&lt;pre&gt;
I have been thinking about similar issues and wondering
about producing very large documents using generators.

The WSGI spec allows clients to return a generator allowing 
applications to generate partial content when it needs to sent.

It might be an interesting exercise to map your library to 
a protocol such that routines could return portions of
documents as elements to be iterated over.





_________________________________________________________________
Mailing list for the lxml Python XML toolkit - http://lxml.de/
lxml&amp;lt; at &amp;gt;lxml.de
https://mailman-mail5.webfaction.com/listinfo/lxml
&lt;/pre&gt;</description>
    <dc:creator>kristian kvilekval</dc:creator>
    <dc:date>2012-05-18T17:44:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6407">
    <title>Re: Announcing SOX: Sequential Output of XML</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6407</link>
    <description>&lt;pre&gt;
This sounds interesting, though the license you've picked seems to
prevent anyone actually using your software:

"No Derivative Works — You may not alter, transform, or build upon this work."

http://creativecommons.org/licenses/by-nc-nd/3.0/

CC licenses are not designed for software, I suggest choosing
something more appropriate, perhaps a liberal license such as BSD/MIT
(this tends to be most appropriate for libraries and is used by lxml)
or the GPL.

Laurence
_________________________________________________________________
Mailing list for the lxml Python XML toolkit - http://lxml.de/
lxml&amp;lt; at &amp;gt;lxml.de
https://mailman-mail5.webfaction.com/listinfo/lxml
&lt;/pre&gt;</description>
    <dc:creator>Laurence Rowe</dc:creator>
    <dc:date>2012-05-18T12:06:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6406">
    <title>Announcing SOX: Sequential Output of XML</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6406</link>
    <description>&lt;pre&gt;My CGI script that generates a huge XHTML table has been running
into storage limitations because it uses lxml to build the table.

So I build a Python module that applications can use to generate
any XML content as a stream, so you can generate arbitrarily
large XML files with a trivial amount of storage:

     http://www.nmt.edu/tcc/projects/sox/

Features:

- Like Fredrik Lundh's builder.py module, it takes very little
   code to generate a lot of XML.  If you're unfamiliar with this
   little gem, see here:

     http://effbot.org/zone/element-builder.htm

- The module insures that every start tag has a matching end tag.

Feel free to try this package out (Creative Commons BY-NC-ND
license).  I would greatly appreciate any feedback.

Best regards,
John Shipman (john&amp;lt; at &amp;gt;nmt.edu), Applications Specialist
New Mexico Tech Computer Center, Speare 146, Socorro, NM 87801
(575) 835-5735, http://www.nmt.edu/~john
   ``Let's go outside and commiserate with nature.''  --Dave Farber
_________________________________________________________________
Mailing list for the lxml Python XML toolkit - http://lxml.de/
lxml&amp;lt; at &amp;gt;lxml.de
https://mailman-mail5.webfaction.com/listinfo/lxml
&lt;/pre&gt;</description>
    <dc:creator>John W. Shipman</dc:creator>
    <dc:date>2012-05-18T03:06:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6405">
    <title>lxml.get_include() does not return system libxml paths</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6405</link>
    <description>&lt;pre&gt;Hi Stefan,

we submitted a patch (that is currently sitting in git trunk) for distributing pxd interface files with lxml (including the static Windows package), to simplify writing cython code that class the lxml Cython API interface.

Unfortunately, we're not quite there yet, because lxml.get_include() still does not return the system include path for libxml (/usr/include/libxml2 or the like), in the cases in which the system ones were used (I think it does work in the case where libxml header files are being shipped within the lxml static package, like on Windows; I can't verify since there is no static Windows package for 2.4 yet).

This means that each and every users of the lxml Cython API must include a build system that duplicates lxml's one build system and finds the system libxml include path.

I was trying to get to a point where a lxml Cython API user should only call lxml.get_include() and get a list of pxd/h directories to be used for both cythoning (pxd) and compiling (h) the extension. Do you think it makes sense to get there?

Thanks!
&lt;/pre&gt;</description>
    <dc:creator>Giovanni Bajo</dc:creator>
    <dc:date>2012-05-17T12:59:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6404">
    <title>Custom XPath functions and "self" (or ".")</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6404</link>
    <description>&lt;pre&gt;If I create a custom XPath function and use it in my XSL sheet using
`self`, `self::node()`, `.` or `current()` as the nodeset passed in,
for example:

&amp;lt;xsl:if test="custom:my-func(.)"&amp;gt;...

... the list of nodes is empty within the XPath function. If I use the
name of the node referenced by `self` then everything works as
expected and a list of nodes is passed into the function.

I've created a testcase to explain better than I can in an email:
http://pastebin.com/5jkBhRSD

Is this the expected behaviour?

&lt;/pre&gt;</description>
    <dc:creator>Phillip B Oldham</dc:creator>
    <dc:date>2012-05-12T18:21:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6403">
    <title>Re: Better error messages from XSL translations?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6403</link>
    <description>&lt;pre&gt;That's wonderful - exactly what I was looking for!

Thank you very much for your speedy response!

On 11 May 2012 19:39, Dirk Rothe &amp;lt;d.rothe&amp;lt; at &amp;gt;semantics.de&amp;gt; wrote:



&lt;/pre&gt;</description>
    <dc:creator>Phillip B Oldham</dc:creator>
    <dc:date>2012-05-12T07:36:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6402">
    <title>Re: Better error messages from XSL translations?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6402</link>
    <description>&lt;pre&gt;Am 11.05.2012, 20:05 Uhr, schrieb Phillip B Oldham  
&amp;lt;phillip.oldham&amp;lt; at &amp;gt;gmail.com&amp;gt;:


Try this (untested) code:

try:
   # transform
except etree.XSLTApplyError, e:
     for msg in e.error_log.filter_from_warnings():
         print msg.domain_name, msg.message, msg.level_name, msg.type_name

         # a xslt tree does not need to come from a file
         if not '&amp;lt;string&amp;gt;' in msg.filename:
             print msg.filename
             print msg.line

--dirk
_________________________________________________________________
Mailing list for the lxml Python XML toolkit - http://lxml.de/
lxml&amp;lt; at &amp;gt;lxml.de
https://mailman-mail5.webfaction.com/listinfo/lxml
&lt;/pre&gt;</description>
    <dc:creator>Dirk Rothe</dc:creator>
    <dc:date>2012-05-11T18:39:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6401">
    <title>Better error messages from XSL translations?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6401</link>
    <description>&lt;pre&gt;Is there any way to get better error messages when performing XSL
translations? For instance, a line number or even a specific filename?

&lt;/pre&gt;</description>
    <dc:creator>Phillip B Oldham</dc:creator>
    <dc:date>2012-05-11T18:05:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6400">
    <title>Re: Future of XSL-FO (fwd)</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6400</link>
    <description>&lt;pre&gt;Le 09/05/2012 21:20, John W. Shipman a écrit :


I don’t know about XSL-FO but I can answer on CSS for print.

Traditional web browsers can print, but they are typically not very good 
at choosing page breaks for example. They also support few 
print-specific features (see below).

As Jean said, there are project such as wkhtmltopdf that wrap browser 
engines so that you can get a PDF without clicking through a user 
interface, but they suffer from the same problems. (For WebKit, see 
http://www.webkit.org/projects/printing/index.html )

Engines that are built specifically for print will have better results. 
PrinceXML and Antenna House Formatter are the two I heard of most. For 
some time now I’ve been working on WeasyPrint, an open source alternative.

http://weasyprint.org/

WeasyPrint is a much younger project but we (Kozea) are improving it 
fast. The layout engine is in Python so it should be easier to hack on 
than, say, WebKit. We’ve been using it in production for several months, 
mostly on HTML generated by Jinja2 and/or docutils.

I am very interested on how WeasyPrint could be improved for your use 
case. Please do not hesitate to contact me about this.



&amp;lt; at &amp;gt;media can be used to apply rules conditionally to address those 
differences. Media types such as "&amp;lt; at &amp;gt;media print { ... }" have been 
supported since forever by most CSS engines. Media queries allow more 
complex tests. They are more recent but also well-supported nowadays.

&amp;lt; at &amp;gt;media is nothing more than a conditional. The author still has to write 
appropriate rules to get the rendering they want.



CSS3 has a "Paged Media" module that defines page size and page-break 
control, basic page headers and footers, and page counters. The counters 
are typically used in a footer to get something like "Page X of Y".

This module is well-supported by print-oriented engines, but not by web 
browsers.

http://dev.w3.org/csswg/css3-page/


The "Generated Content for Paged Media" module (GCPM) has many ideas for 
stuff like footnotes, positioning and cross-references with dynamic page 
numbers; but I don’t know about implementations or how experimental they 
are.

http://dev.w3.org/csswg/css3-gcpm/


A table of content would require some HTML markup (added by a 
pre-processor?) but GCPM’s cross-references could help get page numbers 
right.



The 'white-space' property lets you choose from a number of behaviors. 
'white-space: pre-wrap' will preserve the code’s white space but also 
break lines that are too wide. However, such non-forced breaks will not 
be marked in any visible way. You’ll have to get creative, maybe by 
adding (logical) line numbers.

http://www.w3.org/TR/CSS21/text.html#white-space-prop

&lt;/pre&gt;</description>
    <dc:creator>Simon Sapin</dc:creator>
    <dc:date>2012-05-10T13:25:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6399">
    <title>Re: XPathFunctionError on second call with user functions</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6399</link>
    <description>&lt;pre&gt;Le 10/05/2012 11:59, Simon Sapin a écrit :

In case it helps, here are the version numbers:

Python              : sys.version_info(major=3, minor=2, micro=3, 
releaselevel='final', serial=0)
lxml.etree          : (2, 3, 4, 0)
libxml used         : (2, 7, 8)
libxml compiled     : (2, 7, 8)
libxslt used        : (1, 1, 26)
libxslt compiled    : (1, 1, 26)


This is on Linux x64 and the random string is always 4 bytes long. I’ve 
seen similar issues that were caused by a 32bit vs. 64bit bug where 
sizeof(int) (8 in 64bit) in was used instead of sizeof(int32) or similar.

&lt;/pre&gt;</description>
    <dc:creator>Simon Sapin</dc:creator>
    <dc:date>2012-05-10T11:45:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6398">
    <title>XPathFunctionError on second call with user functions</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6398</link>
    <description>&lt;pre&gt;Hi,

When using a custom XPath function (as lxml.cssselect does for 
lower-case) I get a strange XPathFunctionError error when using a 
compiled XPath object more than once.

Here is a minimal test case:


from lxml import etree, html

def _make_lower_case(context, s):
     return s.lower()

ns = etree.FunctionNamespace('http://codespeak.net/lxml/css/')
ns.prefix = 'css'
ns['lower-case'] = _make_lower_case

#doc = html.parse('/home/simon/css3-backgrounds.html')
doc = html.parse('http://www.w3.org/TR/css3-background/')

expr = etree.XPath('//*[css:lower-case(name(.)) = "li"]')
print('first call')
expr(doc)
print('second call')
expr(doc)
print('third call')
expr(doc)


And the output I get with lxml 2.3.4:

first call
second call
Traceback (most recent call last):
   File "xpath_lower.py", line 20, in &amp;lt;module&amp;gt;
     expr(doc)
   File "xpath.pxi", line 466, in lxml.etree.XPath.__call__ 
(src/lxml/lxml.etree.c:119238)
   File "xpath.pxi", line 235, in 
lxml.etree._XPathEvaluatorBase._handle_result (src/lxml/lxml.etree.c:117011)
   File "lxml.etree.pyx", line 280, in 
lxml.etree._ExceptionContext._raise_if_stored (src/lxml/lxml.etree.c:7454)
lxml.etree.XPathFunctionError: XPath function 
'{b'\xd0\x85?\x01'}b'lower-case'' not found


Note that the '\xd0\x85?\x01' string looks random and changes every time 
I run the script.

Is something wrong in my code?


Regards,
&lt;/pre&gt;</description>
    <dc:creator>Simon Sapin</dc:creator>
    <dc:date>2012-05-10T09:59:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6397">
    <title>Re: Future of XSL-FO (fwd)</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6397</link>
    <description>&lt;pre&gt;Hi John

To get good print layout from CSS, you need a print-oriented renderer.
The best one currently is http://princexml.com/ , not open source.

There is a webkit-based project with similar aims:
  http://code.google.com/p/wkhtmltopdf/

Here is a project that wraps wkhtmltopdf to handle more book production tasks:
  https://github.com/esetera/Objavi

&lt;/pre&gt;</description>
    <dc:creator>Jean Jordaan</dc:creator>
    <dc:date>2012-05-10T05:27:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6396">
    <title>Future of XSL-FO (fwd)</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6396</link>
    <description>&lt;pre&gt;Sorry, sent this one to the old lxml mailing list.

John Shipman (john&amp;lt; at &amp;gt;nmt.edu), Applications Specialist
New Mexico Tech Computer Center, Speare 146, Socorro, NM 87801
(575) 835-5735, http://www.nmt.edu/~john
   ``Let's go outside and commiserate with nature.''  --Dave Farber

---------- Forwarded message ----------
Date: Wed, 9 May 2012 11:51:00 -0600 (MDT)
From: John W. Shipman &amp;lt;john&amp;lt; at &amp;gt;nmt.edu&amp;gt;
To: Carlos Araya &amp;lt;carlos.araya&amp;lt; at &amp;gt;gmail.com&amp;gt;
Cc: lxml-dev &amp;lt;lxml-dev&amp;lt; at &amp;gt;codespeak.net&amp;gt;,
     docbook-apps mailing list &amp;lt;docbook-apps&amp;lt; at &amp;gt;lists.oasis-open.org&amp;gt;
Subject: Future of XSL-FO

On Tue, 8 May 2012, Carlos Araya wrote:

+--
| Just curious as to why you think xsl-fo is a dead standard?
+--

A colleague (who does not wish to be quoted) says there's not
much action on the committee anymore.  Although it is still
officially supported, it seems moribund.

I was sort of hoping that the committee was working on adding
critical features not in the current standard that modern book
designers appreciate, e.g., constraints about positioning content
on facing pages, or text floated on both sides of a figure, or a
page model not as primitive as the five-region simple-page-master
model.  Apparently not.

I've heard a few people over the past few years insisting that
the replacement for XSL-FO (within W3C) is to use the "&amp;lt; at &amp;gt;media
print" feature of the CSS standard.  If I read that correctly,
that means that in order most ordinary people to get a decent
print rendering of their web page, the following must hold:

   (1) The page author has to write the CSS to define how to
       render it on a fixed page size;

   (2) Their browser supports the "&amp;lt; at &amp;gt;media print" rule and
       renders it correctly.

Then the user prints it using the browser's print function.

Am I right?  Is this practical?  Do browsers do the right thing?
Will this eventually obviate the need for XSL-FO?  What replaces
the Modular Style Sheets in my DocBook toolchain?

What about the important differences between Web and print
rendering?  Will there be a table of contents?  Will that and
cross-references display page numbers instead of useless,
unclickable underlining?  How does that work in CSS?

One of my pet peeves is Web pages that can't be printed because
they contain program source code with lines way too wide to fit
on the page.  Will CSS render such pages with the pages wrapped
and not truncated?  If they do, will I be able to tell the
hard line breaks from cases where the line got wrapped?

Best regards,
John Shipman (john&amp;lt; at &amp;gt;nmt.edu), Applications Specialist
New Mexico Tech Computer Center, Speare 146, Socorro, NM 87801
(575) 835-5735, http://www.nmt.edu/~john
   ``Let's go outside and commiserate with nature.''  --Dave Farber
_________________________________________________________________
Mailing list for the lxml Python XML toolkit - http://lxml.de/
lxml&amp;lt; at &amp;gt;lxml.de
https://mailman-mail5.webfaction.com/listinfo/lxml
&lt;/pre&gt;</description>
    <dc:creator>John W. Shipman</dc:creator>
    <dc:date>2012-05-09T19:20:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6395">
    <title>[lxml-dev] Future of XSL-FO</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6395</link>
    <description>&lt;pre&gt;
+--
| Just curious as to why you think xsl-fo is a dead standard?
+--

A colleague (who does not wish to be quoted) says there's not
much action on the committee anymore.  Although it is still
officially supported, it seems moribund.

I was sort of hoping that the committee was working on adding
critical features not in the current standard that modern book
designers appreciate, e.g., constraints about positioning content
on facing pages, or text floated on both sides of a figure, or a
page model not as primitive as the five-region simple-page-master
model.  Apparently not.

I've heard a few people over the past few years insisting that
the replacement for XSL-FO (within W3C) is to use the "&amp;lt; at &amp;gt;media
print" feature of the CSS standard.  If I read that correctly,
that means that in order most ordinary people to get a decent
print rendering of their web page, the following must hold:

   (1) The page author has to write the CSS to define how to
       render it on a fixed page size;

   (2) Their browser supports the "&amp;lt; at &amp;gt;media print" rule and
       renders it correctly.

Then the user prints it using the browser's print function.

Am I right?  Is this practical?  Do browsers do the right thing?
Will this eventually obviate the need for XSL-FO?  What replaces
the Modular Style Sheets in my DocBook toolchain?

What about the important differences between Web and print
rendering?  Will there be a table of contents?  Will that and
cross-references display page numbers instead of useless,
unclickable underlining?  How does that work in CSS?

One of my pet peeves is Web pages that can't be printed because
they contain program source code with lines way too wide to fit
on the page.  Will CSS render such pages with the pages wrapped
and not truncated?  If they do, will I be able to tell the
hard line breaks from cases where the line got wrapped?

Best regards,
John Shipman (john&amp;lt; at &amp;gt;nmt.edu), Applications Specialist
New Mexico Tech Computer Center, Speare 146, Socorro, NM 87801
(575) 835-5735, http://www.nmt.edu/~john
   ``Let's go outside and commiserate with nature.''  --Dave Farber
&lt;/pre&gt;</description>
    <dc:creator>John W. Shipman</dc:creator>
    <dc:date>2012-05-09T17:51:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6394">
    <title>Re: [lxml-dev] XSL-FO generation tool available</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6394</link>
    <description>&lt;pre&gt;
Reportlab (rml or platypus in particular) would be my suggestion.

cheers,

Chris

&lt;/pre&gt;</description>
    <dc:creator>Chris Withers</dc:creator>
    <dc:date>2012-05-09T06:07:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6393">
    <title>Re: [lxml-dev] XML too big for memory</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6393</link>
    <description>&lt;pre&gt;just fyi, the lxml ml moved to 
https://mailman-mail5.webfaction.com/listinfo/lxml or lxml&amp;lt; at &amp;gt;lxml.de
&lt;/pre&gt;</description>
    <dc:creator>Ronny Pfannschmidt</dc:creator>
    <dc:date>2012-05-09T07:23:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6392">
    <title>[lxml-dev] XSL-FO generation tool available</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6392</link>
    <description>&lt;pre&gt;I've just put the finishing touches on a Python module to assist
in the programmatic construction of XSL-FO files.  It's built on
top of lxml:

     http://www.nmt.edu/tcc/projects/fohelpers

If you find this useful or have any comments, I'd like to hear
about it.  I realize XSL-FO is a dead standard, but so long as
DocBook and DITA are around, it'll be supported.  Can anyone
suggest a better route from Python to PDF?

Best regards,
John Shipman (john&amp;lt; at &amp;gt;nmt.edu), Applications Specialist
New Mexico Tech Computer Center, Speare 146, Socorro, NM 87801
(575) 835-5735, http://www.nmt.edu/~john
   ``Let's go outside and commiserate with nature.''  --Dave Farber
&lt;/pre&gt;</description>
    <dc:creator>John W. Shipman</dc:creator>
    <dc:date>2012-05-08T21:17:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.lxml.devel/6391">
    <title>[lxml-dev] XML too big for memory</title>
    <link>http://permalink.gmane.org/gmane.comp.python.lxml.devel/6391</link>
    <description>&lt;pre&gt;I have a CGI application that pulls data from a database and
builds an XHTML table displaying the results.  I'm currently
using lxml.

My problem is that the Web server has limited space, and some
queries generate a table that won't fit in that memory.

Has anyone written something like SAX, only for output?  I
have in mind something that serializes XML to an output file,
writing an element to that file as soon as it is complete.
So the primitives would be something like:

   - Constructor: designate the destination for the output
   - Start an element: writes the start tag, remembers it on
     a stack
   - Emit content
   - End an element: writes the end tag and pops the stack

Surely someone has already written something like this. If
so, please let me know.

Best regards,
John Shipman (john&amp;lt; at &amp;gt;nmt.edu), Applications Specialist
New Mexico Tech Computer Center, Speare 146, Socorro, NM 87801
(575) 835-5735, http://www.nmt.edu/~john
   ``Let's go outside and commiserate with nature.''  --Dave Farber
&lt;/pre&gt;</description>
    <dc:creator>John W. Shipman</dc:creator>
    <dc:date>2012-05-08T21:14:31</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.python.lxml.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.python.lxml.devel</link>
  </textinput>
</rdf:RDF>

