Package pyxsd :: Package elementRepresentatives :: Module extension
[hide private]
[frames] | no frames]

Source Code for Module pyxsd.elementRepresentatives.extension

 1   
 2   
 3  from elementRepresentative import ElementRepresentative 
 4   
 5  #============================================================ 
 6  # 
7 -class Extension(ElementRepresentative):
8 """ 9 The class for the Extension tag. Subclass of *ElementRepresentative*. 10 """ 11
12 - def __init__(self, xsdElement, parent):
13 """ 14 See *ElementRepresentative* for documentation. 15 """ 16 ElementRepresentative.__init__(self, xsdElement, parent) 17 18 self.addSuperClassName(self.tagAttributes['base'])
19 20 21 #============================================================ 22 #
23 - def getName(self):
24 """ 25 Makes a name like this- `ContainingTypeName`|restiction. 26 The name on this class is used for almost nothing. 27 """ 28 29 contName = self.getContainingTypeName() 30 31 name = contName + '|extension' 32 33 return name
34 35 #============================================================ 36 #
37 - def addBaseToComplexType(self):
38 """ 39 Used by complexContent. Adds its base to the complexType. 40 """ 41 baseType = self.getFromName(self.tagAttributes['base']) 42 if not baseType: 43 print self.name, self.base
44