1 from elementRepresentative import ElementRepresentative
2
3
4
5 -class Pattern(ElementRepresentative):
6 """
7 The class for the pattern tag. Subclass of *ElementRepresentative*.
8 """
10 """
11 See *ElementRepresentative* for documentation.
12 """
13 ElementRepresentative.__init__(self, xsdElement, parent)
14
15 self.value = self.xsdElement.get('value')
16
17 self.getContainingType().patterns.append(self.value)
18
19
20
21
23 """
24 Makes a name like this- `ContainingTypeName`|pattern|`an id number`.
25 The name on this class is used for almost nothing.
26 """
27 patNum = len(self.getContainingType().patterns) + 1
28 return "%s|pattern|%i" % (self.getContainingTypeName(),
29 patNum)
30