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 |  |  |  | Globals: g_classMap, g_xpathRecognizedNodes

## Classes

class CommentNodeTest(NodeTestBase)

  ### Methods

  __repr__(self)

  ### Methods inherited from class NodeTestBase

  __str__, getQuickKey, match, pprint

  ### Members

  nodeType = 8

  ### Members inherited from class NodeTestBase

  priority
class LocalNameTest(NodeTestBase)

  ### Methods

  __init__(self, name)
  __repr__(self)
  getQuickKey(self, namespaces)
    Overrides: getQuickKey from class NodeTestBase
  match(self, context, node, principalType=1)
    Overrides: match from class NodeTestBase

  ### Methods inherited from class NodeTestBase

  __str__, pprint

  ### Members

  nodeType = 1

  ### Members inherited from class NodeTestBase

  priority
class NamespaceTest(NodeTestBase)

  ### Methods

  __init__(self, prefix)
  __repr__(self)
  getQuickKey(self, namespaces)
    Overrides: getQuickKey from class NodeTestBase
  match(self, context, node, principalType=1)
    Overrides: match from class NodeTestBase

  ### Methods inherited from class NodeTestBase

  __str__, pprint

  ### Members

  nodeType = 1

  ### Members inherited from class NodeTestBase

  priority
class NodeTest(NodeTestBase)

  ### Methods

  __repr__(self)
  match(self, context, node, principalType=1)
    Overrides: match from class NodeTestBase

  ### Methods inherited from class NodeTestBase

  __str__, getQuickKey, pprint

  ### Members inherited from class NodeTestBase

  nodeType, priority
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)

  ### Members

  nodeType = None
  priority = -0.5
class PrincipalTypeTest(NodeTestBase)

  ### Methods

  __repr__(self)
  match(self, context, node, principalType=1)
    Overrides: match from class NodeTestBase

  ### Methods inherited from class NodeTestBase

  __str__, getQuickKey, pprint

  ### Members

  nodeType = 1

  ### Members inherited from class NodeTestBase

  priority
class ProcessingInstructionNodeTest(NodeTestBase)

  ### Methods

  __init__(self, target=None)
  __repr__(self)
  match(self, context, node, principalType=1)
    Overrides: match from class NodeTestBase

  ### Methods inherited from class NodeTestBase

  __str__, getQuickKey, pprint

  ### Members

  nodeType = 7

  ### Members inherited from class NodeTestBase

  priority
class QualifiedNameTest(NodeTestBase)

  ### Methods

  __init__(self, prefix, localName)
  __repr__(self)
  getQuickKey(self, namespaces)
    Overrides: getQuickKey from class NodeTestBase
  match(self, context, node, principalType=1)
    Overrides: match from class NodeTestBase

  ### Methods inherited from class NodeTestBase

  __str__, pprint

  ### Members

  nodeType = 1

  ### Members inherited from class NodeTestBase

  priority
class TextNodeTest(NodeTestBase)

  ### Methods

  __repr__(self)

  ### Methods inherited from class NodeTestBase

  __str__, getQuickKey, match, pprint

  ### Members

  nodeType = 3

  ### Members inherited from class NodeTestBase

  priority

## Functions

ParsedNameTest(name)
ParsedNodeTest(test, literal=None)

## Globals

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}