Mercurial > genshi > mirror
comparison genshi/path.py @ 369:0d749146842c stable-0.3.x
Ported [444] to 0.3.x.
author | cmlenz |
---|---|
date | Wed, 22 Nov 2006 21:00:43 +0000 |
parents | 240179cd1251 |
children |
comparison
equal
deleted
inserted
replaced
368:94ff33bfe515 | 369:0d749146842c |
---|---|
543 return data[0] in namespace | 543 return data[0] in namespace |
544 def __repr__(self): | 544 def __repr__(self): |
545 return '%s:*' % self.prefix | 545 return '%s:*' % self.prefix |
546 | 546 |
547 class LocalNameTest(object): | 547 class LocalNameTest(object): |
548 """Node test that matches any event with the given prinipal type and | 548 """Node test that matches any event with the given principal type and |
549 local name. | 549 local name. |
550 """ | 550 """ |
551 __slots__ = ['principal_type', 'name'] | 551 __slots__ = ['principal_type', 'name'] |
552 def __init__(self, principal_type, name): | 552 def __init__(self, principal_type, name): |
553 self.principal_type = principal_type | 553 self.principal_type = principal_type |
560 return data[0].localname == self.name | 560 return data[0].localname == self.name |
561 def __repr__(self): | 561 def __repr__(self): |
562 return self.name | 562 return self.name |
563 | 563 |
564 class QualifiedNameTest(object): | 564 class QualifiedNameTest(object): |
565 """Node test that matches any event with the given prinipal type and | 565 """Node test that matches any event with the given principal type and |
566 qualified name. | 566 qualified name. |
567 """ | 567 """ |
568 __slots__ = ['principal_type', 'prefix', 'name'] | 568 __slots__ = ['principal_type', 'prefix', 'name'] |
569 def __init__(self, principal_type, prefix, name): | 569 def __init__(self, principal_type, prefix, name): |
570 self.principal_type = principal_type | 570 self.principal_type = principal_type |