def asLDML(self, sax, currcontext = None) : if not currcontext and self.context : sax.startElement('x', AttributesImpl({})) if self.context.context : sax.startElement('context', AttributesImpl({})) sax.characters(self.context.context) sax.endElement('context') currcontext = self.context tag = 'reset' if self.relation == 'r' else self.relation sax.startElement(tag, AttributesImpl({})) if self.special : sax.startElement(self.special, AttributesImpl({})) sax.endElement(self.special) else : sax.characters(self.string) sax.endElement(tag) if currcontext and (not self.child or self.child.context != currcontext) : if self.context.extend : sax.startElement('extend', AttributesImpl({})) sax.characters(self.context.extend) sax.endElement('extend') sax.endElement('x') currcontext = self.context if self.child : self.child.asLDML(sax, currcontext)
def asLDML(self, sax, currcontext=None): if not currcontext and self.context: sax.startElement('x', AttributesImpl({})) if self.context.context: sax.startElement('context', AttributesImpl({})) sax.characters(self.context.context) sax.endElement('context') currcontext = self.context tag = 'reset' if self.relation == 'r' else self.relation sax.startElement(tag, AttributesImpl({})) if self.special: sax.startElement(self.special, AttributesImpl({})) sax.endElement(self.special) else: sax.characters(self.string) sax.endElement(tag) if currcontext and (not self.child or self.child.context != currcontext): if self.context.extend: sax.startElement('extend', AttributesImpl({})) sax.characters(self.context.extend) sax.endElement('extend') sax.endElement('x') currcontext = self.context if self.child: self.child.asLDML(sax, currcontext)
def asLDML(self, sax) : sax.startElement('collation', AttributesImpl({'type' : self.type} if self.type else {})) if len(self.settings) > 0 : sax.startElement('settings', AttributesImpl(self.settings)) sax.endElement('settings') sax.startElement('rules', AttributesImpl({})) for r in self.rules : r.asLDML(sax) sax.endElement('rules') sax.endElement('collation')
def asLDML(self, sax): sax.startElement( 'collation', AttributesImpl({'type': self.type} if self.type else {})) if len(self.settings) > 0: sax.startElement('settings', AttributesImpl(self.settings)) sax.endElement('settings') sax.startElement('rules', AttributesImpl({})) for r in self.rules: r.asLDML(sax) sax.endElement('rules') sax.endElement('collation')
def asLDML(self, sax) : sax.startElement('collations', AttributesImpl({})) for c in self.collations : c.asLDML(sax) sax.endElement('collations')
def asLDML(self, sax): sax.startElement('collations', AttributesImpl({})) for c in self.collations: c.asLDML(sax) sax.endElement('collations')