4Suite
™
API Documentation
►
Module
Ft
.
Xml
.
XPath
.ParsedNodeTest
A parsed token that represents a node test.
Copyright 2004 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/
Classes:
CommentNodeTest
,
LocalNameTest
,
NamespaceTest
,
NodeTest
,
NodeTestBase
,
PrincipalTypeTest
,
ProcessingInstructionNodeTest
,
QualifiedNameTest
,
TextNodeTest
Functions:
ParsedNameTest
,
ParsedNodeTest
Fields:
g_classMap
,
g_xpathRecognizedNodes
Classes
class
CommentNodeTest
(
NodeTestBase
)
Methods
__repr__
(
self
)
Methods inherited from class
NodeTestBase
__str__
,
getQuickKey
,
match
,
pprint
Fields
nodeType
= 8
Fields
class
LocalNameTest
(
NodeTestBase
)
Methods
__init__
(
self
,
name
)
__repr__
(
self
)
getQuickKey
(
self
,
namespaces
)
match
(
self
,
context
,
node
,
principalType
=1
)
Methods inherited from class
NodeTestBase
__str__
,
pprint
Fields
nodeType
= 1
Fields
class
NamespaceTest
(
NodeTestBase
)
Methods
__init__
(
self
,
prefix
)
__repr__
(
self
)
getQuickKey
(
self
,
namespaces
)
match
(
self
,
context
,
node
,
principalType
=1
)
Methods inherited from class
NodeTestBase
__str__
,
pprint
Fields
nodeType
= 1
Fields
class
NodeTest
(
NodeTestBase
)
Methods
__repr__
(
self
)
match
(
self
,
context
,
node
,
principalType
=1
)
Methods inherited from class
NodeTestBase
__str__
,
getQuickKey
,
pprint
Fields
class
NodeTestBase
Methods
__str__
(
self
)
getQuickKey
(
self
,
namespaces
)
Returns a tuple that indicates the expected node type and, if applicable, the expected name.
match
(
self
,
context
,
node
,
principalType
=1
)
The principalType is discussed in section [2.3 Node Tests] of the XPath 1.0 spec. Only attribute and namespace axes differ from the default of elements.
pprint
(
self
,
indent
)
Fields
nodeType
= None
priority
= -0.5
class
PrincipalTypeTest
(
NodeTestBase
)
Methods
__repr__
(
self
)
match
(
self
,
context
,
node
,
principalType
=1
)
Methods inherited from class
NodeTestBase
__str__
,
getQuickKey
,
pprint
Fields
nodeType
= 1
Fields
class
ProcessingInstructionNodeTest
(
NodeTestBase
)
Methods
__init__
(
self
,
target
=None
)
__repr__
(
self
)
match
(
self
,
context
,
node
,
principalType
=1
)
Methods inherited from class
NodeTestBase
__str__
,
getQuickKey
,
pprint
Fields
nodeType
= 7
Fields
class
QualifiedNameTest
(
NodeTestBase
)
Methods
__init__
(
self
,
prefix
,
localName
)
__repr__
(
self
)
getQuickKey
(
self
,
namespaces
)
match
(
self
,
context
,
node
,
principalType
=1
)
Methods inherited from class
NodeTestBase
__str__
,
pprint
Fields
nodeType
= 1
Fields
class
TextNodeTest
(
NodeTestBase
)
Methods
__repr__
(
self
)
Methods inherited from class
NodeTestBase
__str__
,
getQuickKey
,
match
,
pprint
Fields
nodeType
= 3
Fields
Functions
ParsedNameTest
(
name
)
ParsedNodeTest
(
test
,
literal
=None
)
Fields
g_classMap
= {'comment': <class Ft.Xml.XPath.ParsedNodeTest.CommentNodeTest>, 'node': <class Ft.Xml.XPath.ParsedNodeTest.NodeTest>, 'processing-instruction': <class Ft.Xml.XPath.ParsedNodeTest.ProcessingInstructionNodeTest>, 'text': <class Ft.Xml.XPath.ParsedNodeTest.TextNodeTest>}
g_xpathRecognizedNodes
= {1: True, 2: True, 3: True, 7: True, 8: True, 9: True, 13: True}