Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jan 26, 2015
  1. change coding: utf8 to utf-8

    James Salter authored
Commits on Oct 17, 2013
  1. Switch back to default to ignoring pseudo-elements

    ... rather than rejecting them.
    Fix Kozea/WeasyPrint#128
Commits on Sep 15, 2013
  1. Remove unnecessary check.

  2. @redapple
Commits on Jan 10, 2013

  2. @dangra

    Let extended translators override what XPathExpr class is used

    dangra authored
    GenericTranslator offers an excelent way to support custom selectors
    trough method hooks and allowing to return a *new* XPathExpr from this
    The main problem is that returning extended `XPathExpr` instances fail
    for combiners because `XPathExpr.join()` assume a fixed XPathExpr
    instance attributes (element, path and condition) to copy from `other` to `self`
    `XPathExpr.join()` can be extended in subclass but needs that `left`
    xpath instance to be of the extended class too, and right now we can
    only control `right` xpath type.
    The problem can be mitigated by recasting all xpath returned from
    `GenericTranslator.xpath_element()` that only works because it is the
    only hook that cast `XPathExpr` instances.
    The proposed change allow projects extending GenericTranslator to also
    safely extend `XPathExpr` to correctly support combiners in extended
Commits on Nov 15, 2012
  1. @sjp

    Using string-length() to test for emptiness of text nodes.

    sjp authored
    Whitespace is *not* empty.
  2. @sjp

    Use XPath 'lang()' in XML docs.

    sjp authored
Commits on Jun 29, 2012
  1. Do the right with non-ASCII pseudo-classes. Fix #14

    Make sure that getattr() with a default does not raise an
    UnicodeError or a TypeError on either Py2 or 3.
    Instead, all non-ASCII pseudo-classes are invalid selectors
    (as an inexistant pseudo-class should.)
Commits on Jun 14, 2012
  1. Make pseudo-elements lower-case in the ASCII range.

    Pseudo-classes were already case-insensitive, but the
    lower-casing was moved to the parser.
  2. Add tests for series with whitespace

    Together with the previous 2 commits, this fixes #2 and #7
  3. Workaround element/attribute names with special characters

    For element names, these are equivalent in XPath:
        *[name() = "foo"]
    And for attribute names:
        attribute:*[name() = "foo"]
    The former is faster but some characters are not allowed in it.
    Since I am not sure which characters, only use it for "safe" names
    that match ^[a-zA-Z_][a-zA-Z0-9_.-]*$
    This is overly restrictive, but should cover every name actually used
    in XML, HTML, SVG, etc.
Commits on Jun 7, 2012
Commits on Apr 24, 2012
Commits on Apr 20, 2012
  1. Better test coverage.

Commits on Apr 19, 2012
  1. Fix case-sensitivity issues

    * (Functional) pseudo-classes are always case-insensitive
    * Add the 'xhtml' flag
    * Element names and attribute names are case sensitive
      for HTML, but not XHTML or XML.
  2. @varialus

    Fixed case sensitive matching on lxml stable, but patched for externa…

    varialus authored
    …l cssselect, on Windows with Python 2.7 64-bit.
Commits on Apr 18, 2012
  1. Documentation details.

Something went wrong with that request. Please try again.