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)
Exemple #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)
Exemple #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
Exemple #4
0
 def __init__(self, out, mathout):
     ContentFilter.__init__(self, out)
     self.plainOutput = out
     self.mathOutput = mathout
     self.depth = 0
Exemple #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
Exemple #6
0
 def __init__(self, out, mathout):
     ContentFilter.__init__(self, out)
     self.plainOutput = out
     self.mathOutput = mathout
     self.depth = 0