Mercurial > genshi > genshi-test
comparison markup/template.py @ 139:54131cbb91a5
Implement position reporting for XPath syntax errors. Closes #20.
author | cmlenz |
---|---|
date | Wed, 09 Aug 2006 12:25:02 +0000 |
parents | df44110ca91d |
children | a2edde90ad24 |
comparison
equal
deleted
inserted
replaced
138:d91e1e822969 | 139:54131cbb91a5 |
---|---|
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), |