Mercurial > genshi > mirror
comparison markup/template.py @ 139:8332287b5508 trunk
Implement position reporting for XPath syntax errors. Closes #20.
author | cmlenz |
---|---|
date | Wed, 09 Aug 2006 12:25:02 +0000 |
parents | d681d2c3cd8d |
children | c1f4390d50f8 |
comparison
equal
deleted
inserted
replaced
138:8ad716b4180d | 139:8332287b5508 |
---|---|
428 | 428 |
429 ATTRIBUTE = 'path' | 429 ATTRIBUTE = 'path' |
430 | 430 |
431 def __init__(self, value, filename=None, lineno=-1, offset=-1): | 431 def __init__(self, value, filename=None, lineno=-1, offset=-1): |
432 Directive.__init__(self, None, filename, lineno, offset) | 432 Directive.__init__(self, None, filename, lineno, offset) |
433 self.path = Path(value) | 433 self.path = Path(value, filename, lineno) |
434 self.stream = [] | 434 self.stream = [] |
435 | 435 |
436 def __call__(self, stream, ctxt, directives): | 436 def __call__(self, stream, ctxt, directives): |
437 self.stream = list(stream) | 437 self.stream = list(stream) |
438 ctxt._match_templates.append((self.path.test(ignore_context=True), | 438 ctxt._match_templates.append((self.path.test(ignore_context=True), |