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

Source Code for Module pyxsd.elementRepresentatives.sequence

 1  from elementRepresentative import ElementRepresentative 
 2   
 3  #============================================================ 
 4  # 
5 -class Sequence(ElementRepresentative):
6 """ 7 The class for the sequence tag. Subclass of *ElementRepresentative*. 8 """
9 - def __init__(self, xsdElement, parent):
10 """ 11 Adds itself to the sequencesOrChoices list in its containing complexType. 12 Makes a blank list for element children. 13 Uses the ER '__init__`. 14 See *ElementRepresentative* for more documentation. 15 """ 16 self. elements = [] 17 18 ElementRepresentative.__init__(self, xsdElement, parent) 19 20 self.getContainingType().sequencesOrChoices.append(self)
21 22 #============================================================ 23 #
24 - def getName(self):
25 """ 26 Makes a name like this- sequence`some id number`. 27 """ 28 choiceNum = len(self.getContainingType().sequencesOrChoices) + 1 29 30 name = "sequence%i" % choiceNum 31 32 return name
33