4Suite API Documentation: Ft.Xml.ThirdParty.Xvif.FragmentFilter

4Suite™ API Documentation

# ► Module Ft.Xml.ThirdParty.Xvif.FragmentFilter

# $Header: /var/local/cvsroot/4Suite/Ft/Xml/ThirdParty/Xvif/FragmentFilter.py,v 1.3 2004/10/12 22:59:14 uogbuji Exp $

Classes: ApplyTo, Attribute, Chars, Element, FilterContext, FragmentFilter, FragmentRule, FragmentRules, Produce, PseudoMatch, RulesLoader, Skip |  |  |  | Globals: InvalidFragmentException, InvalidRuleException, XMLNS_NAMESPACE, ascii_letters, ascii_lowercase, ascii_uppercase, digits, hexdigits, letters, lowercase, octdigits, printable, punctuation, uppercase, whitespace

## Classes

class ApplyTo(Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback)
  <!ELEMENT applyTo (element | attribute +)>

  ### Methods

  __init__(self)
    Overrides: __init__ from class _Callback
  endElementNS(self, rules, (uri, name), qname)
    Overrides: endElementNS from class _Callback
  match(self, uri, name, ruleClass)

  ### Methods inherited from class Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback

  append(self, child)
  characters(self, content)
  startElementNS(self, rulesLoader, name, qname, attrs)
class Attribute(Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback)
  <!ELEMENT attribute EMPTY> <!ATTLIST attribute nsURI CDATA "" localName CDATA #REQUIRED prefix CDATA #IMPLIED content CDATA #IMPLIED >

  ### Methods

  __init__(self)
    Overrides: __init__ from class _Callback
  endElementNS(self, rules, (nsURI, localName), qName)
    Overrides: endElementNS from class _Callback
  getProduceAttribute(self, filter, content, attrs, brk)
  produce(self, filter, content, brk)
  set_localName(self, rules, value)
  set_nsURI(self, rules, value)
  set_prefix(self, rules, value)

  ### Methods inherited from class Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback

  append(self, child)
  characters(self, content)
  startElementNS(self, rulesLoader, name, qname, attrs)
class Chars(Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback)
  <!ELEMENT chars EMPTY> <!ATTLIST chars before CDATA #IMPLIED after CDATA #IMPLIED >

  ### Methods

  __init__(self)
    Overrides: __init__ from class _Callback
  getProduceAttribute(self, filter, content, attrs, brk)
  produce(self, filter, content, brk)
  set_after(self, rules, value)
  set_before(self, rules, value)

  ### Methods inherited from class Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback

  append(self, child)
  characters(self, content)
  endElementNS(self, rulesLoader, name, qname)
  startElementNS(self, rulesLoader, name, qname, attrs)
class Element(Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback)
  <!ELEMENT element (attribute*)> <!ATTLIST element nsURI CDATA "" localName CDATA #REQUIRED prefix CDATA #IMPLIED before CDATA #IMPLIED after CDATA #IMPLIED beforeInside CDATA #IMPLIED afterInside CDATA #IMPLIED >

  ### Methods

  __init__(self)
    Overrides: __init__ from class _Callback
  endElementNS(self, rules, (nsURI, localName), qName)
    Overrides: endElementNS from class _Callback
  getProduceAttribute(self, filter, content, attrs, brk)
  produce(self, filter, content, brk)
  set_localName(self, rules, value)
  set_nsURI(self, rules, value)
  set_prefix(self, rules, value)

  ### Methods inherited from class Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback

  append(self, child)
  characters(self, content)
  startElementNS(self, rulesLoader, name, qname, attrs)
class FilterContext

  ### Methods

  __init__(self)
  appendContent(self, content)
  appendTemporaryPrefix(self, prefix)
  setAttrs(self, attrs)
  setMatch(self)
  setRule(self, rule)
class FragmentFilter(xml.sax.saxutils.XMLFilterBase)

  ### Methods

  __init__(self, rules)
    Overrides: __init__ from class XMLFilterBase
  characters(self, content)
    Overrides: characters from class XMLFilterBase
  context(self)
  endAttribute(self)
  endElementNS(self, (uri, name), qname)
    Overrides: endElementNS from class XMLFilterBase
  endPrefixMapping(self, prefix)
    Overrides: endPrefixMapping from class XMLFilterBase
  findPrefix(self, uri)
  popContext(self)
  pushContext(self, ctx=None)
  startAttribute(self, uri, name, prefix, content, attrs, brk=0)
  startElementNS(self, (uri, name), qname, attrs)
    Overrides: startElementNS from class XMLFilterBase
  startPrefixMapping(self, prefix, uri)
    Overrides: startPrefixMapping from class XMLFilterBase

  ### Methods inherited from class xml.sax.saxutils.XMLFilterBase

  endDocument, endElement, error, fatalError, getFeature, getProperty, ignorableWhitespace, notationDecl, parse, processingInstruction, resolveEntity, setDocumentLocator, setFeature, setLocale, setProperty, skippedEntity, startDocument, startElement, unparsedEntityDecl, warning

  ### Methods inherited from class xml.sax.saxlib.XMLFilter

  getParent, setParent

  ### Methods inherited from class xml.sax.xmlreader.XMLReader

  getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler
class FragmentRule(Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback)
  <!ELEMENT fragmentRule (applyTo, produce)> <!ATTLIST fragmentRule pattern CDATA #REQUIRED repeat (true | false) "false" skipFirst (true | false) "true" ??? break (true | false) "true" ??? split (true | false) "false">

  ### Methods

  __init__(self)
    Overrides: __init__ from class _Callback
  append(self, child)
    Overrides: append from class _Callback
  fragment(self, filter, match)
  getFragmentedAttributes(self, filter, match, attrs)
  getMatch(self, content)
  match(self, uri, name, ruleClass)
  set_break(self, rules, value)
  set_pattern(self, rules, value)
  set_repeat(self, rules, value)
  set_skipFirst(self, rules, value)
  set_split(self, rules, value)

  ### Methods inherited from class Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback

  characters(self, content)
  endElementNS(self, rulesLoader, name, qname)
  startElementNS(self, rulesLoader, name, qname, attrs)
class FragmentRules(Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback)
  <!ELEMENT fragmentRules (fragmentRule+)> <!ATTLIST fragmentRules xmlns CDATA "http://simonstl.com/ns/fragments/">

  ### Methods

  __init__(self)
    Overrides: __init__ from class _Callback
  match(self, uri, name, ruleClass)

  ### Methods inherited from class Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback

  append(self, child)
  characters(self, content)
  endElementNS(self, rulesLoader, name, qname)
  startElementNS(self, rulesLoader, name, qname, attrs)
class Produce(Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback)
  <!ELEMENT produce (element | attribute | skip | chars)+>

  ### Methods

  __init__(self)
    Overrides: __init__ from class _Callback
  fragment(self, filter, match, skipFirst, repeat, brk)
  getFragmentedAttributes(self, filter, match, attrs, skipFirst, repeat, brk)

  ### Methods inherited from class Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback

  append(self, child)
  characters(self, content)
  endElementNS(self, rulesLoader, name, qname)
  startElementNS(self, rulesLoader, name, qname, attrs)
class PseudoMatch

  ### Methods

  __init__(self, values)
  group(self, id)
class RulesLoader(xml.sax.handler.ContentHandler, Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback)

  ### Methods

  __init__(self, xmlReader=None)
    Overrides: __init__ from class ContentHandler
  __str__(self)
  append(self, child)
    Overrides: append from class _Callback
  appendMe(self)
  appendStack(self, element)
  characters(self, content)
    Overrides: characters from class ContentHandler
  endDocument(self)
    Overrides: endDocument from class ContentHandler
  endElementNS(self, (uri, name), qname)
    Overrides: endElementNS from class ContentHandler
  match(self, uri, name, matchClass)
  previousElement(self)
  startElementNS(self, (uri, name), qname, attrs)
    Overrides: startElementNS from class ContentHandler
  unKnownElement(self, uri, name)

  ### Methods inherited from class xml.sax.handler.ContentHandler

  endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping

  ### Members

  callbacks = {'http://simonstl.com/ns/fragments/': {'applyTo': <class Ft.Xml.ThirdParty.Xvif.FragmentFilter.ApplyTo>, 'attribute': <class Ft.Xml.ThirdParty.Xvif.FragmentFilter.Attribute>, 'chars': <class Ft.Xml.ThirdParty.Xvif.FragmentFilter.Chars>, 'element': <class Ft.Xml.ThirdParty.Xvif.FragmentFilter.Element>, 'fragmentRule': <class Ft.Xml.ThirdParty.Xvif.FragmentFilter.FragmentRule>, 'fragmentRules': <class Ft.Xml.ThirdParty.Xvif.FragmentFilter.FragmentRules>, 'produce': <class Ft.Xml.ThirdParty.Xvif.FragmentFilter.Produce>, 'skip': <class Ft.Xml.ThirdParty.Xvif.FragmentFilter.Skip>}}
class Skip(Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback)
  <!ELEMENT skip EMPTY> <!ATTLIST skip before CDATA #IMPLIED after CDATA #IMPLIED >

  ### Methods

  __init__(self)
    Overrides: __init__ from class _Callback
  getProduceAttribute(self, filter, content, attrs, brk)
  produce(self, filter, content, brk)

  ### Methods inherited from class Ft.Xml.ThirdParty.Xvif.FragmentFilter._Callback

  append(self, child)
  characters(self, content)
  endElementNS(self, rulesLoader, name, qname)
  startElementNS(self, rulesLoader, name, qname, attrs)

## Globals

InvalidFragmentException = 'InvalidFragmentException'
InvalidRuleException = 'InvalidRulesException'
XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'
ascii_letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
digits = '0123456789'
hexdigits = '0123456789abcdefABCDEF'
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
lowercase = 'abcdefghijklmnopqrstuvwxyz'
octdigits = '01234567'
printable = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c'
punctuation = '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'
uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
whitespace = '\t\n\x0b\x0c\r '