Mercurial > genshi > mirror
diff markup/path.py @ 145:47bbd9d2a5af trunk
* Fix error in expression evaluation when the expression evaluates to an iterable that does not produce event tuples.
* The first location step in path expressions longer assumes the `descendant::` axis, but rather the `child::` axis.
* Import cleanups.
author | cmlenz |
---|---|
date | Tue, 15 Aug 2006 09:52:47 +0000 |
parents | 8332287b5508 |
children | 9a5aedda1099 |
line wrap: on
line diff
--- a/markup/path.py +++ b/markup/path.py @@ -33,7 +33,7 @@ import re -from markup.core import QName, Stream, START, END, TEXT, COMMENT, PI +from markup.core import Stream, START, END, TEXT, COMMENT, PI __all__ = ['Path', 'PathSyntaxError'] @@ -281,9 +281,7 @@ axis, nodetest, predicates = self._location_step() if not axis: - # The default axis for the first step is "descendant", for other - # steps it's "child" - axis = steps and CHILD or DESCENDANT + axis = CHILD steps.append((axis, nodetest, predicates)) if self.at_end or not self.cur_token.startswith('/'):