def startElementNS(self, elementName, qName, attrs):
     if self.depth == 0:
         (namespace, localName) = elementName
         if namespace == MathNS:
             self.output = self.mathOutput
             self.depth = 1
     else: self.depth += 1
     ContentFilter.startElementNS(self, elementName, qName, attrs)
Example #2
0
 def startElementNS(self, elementName, qName, attrs):
     if self.depth == 0:
         (namespace, localName) = elementName
         if namespace == MathNS:
             self.output = self.mathOutput
             self.depth = 1
     else:
         self.depth += 1
     ContentFilter.startElementNS(self, elementName, qName, attrs)
Example #3
0
 def endElementNS(self, elementName, qName):
     ContentFilter.endElementNS(self, elementName, qName)
     if self.depth > 0:
         self.depth -= 1
         if self.depth == 0:
             self.output = self.plainOutput
Example #4
0
 def __init__(self, out, mathout):
     ContentFilter.__init__(self, out)
     self.plainOutput = out
     self.mathOutput = mathout
     self.depth = 0
Example #5
0
 def endElementNS(self, elementName, qName):
     ContentFilter.endElementNS(self, elementName, qName)
     if self.depth > 0:
         self.depth -= 1
         if self.depth == 0:
             self.output = self.plainOutput
Example #6
0
 def __init__(self, out, mathout):
     ContentFilter.__init__(self, out)
     self.plainOutput = out
     self.mathOutput = mathout
     self.depth = 0