@param schema: The containing schema. @type schema: L{schema.Schema} @param root: The xml root node. @type root: L{Element}
(self, schema, root)
| 84 | d.append(item) |
| 85 | |
| 86 | def __init__(self, schema, root): |
| 87 | """ |
| 88 | @param schema: The containing schema. |
| 89 | @type schema: L{schema.Schema} |
| 90 | @param root: The xml root node. |
| 91 | @type root: L{Element} |
| 92 | """ |
| 93 | self.schema = schema |
| 94 | self.root = root |
| 95 | self.id = objid(self) |
| 96 | self.name = root.get('name') |
| 97 | self.qname = (self.name, schema.tns[1]) |
| 98 | self.min = root.get('minOccurs') |
| 99 | self.max = root.get('maxOccurs') |
| 100 | self.type = root.get('type') |
| 101 | self.ref = root.get('ref') |
| 102 | self.form_qualified = schema.form_qualified |
| 103 | self.nillable = False |
| 104 | self.default = root.get('default') |
| 105 | self.rawchildren = [] |
| 106 | self.cache = {} |
| 107 | |
| 108 | def attributes(self, filter=Filter()): |
| 109 | """ |