def visit_union(self, node, parent): """Defines a collection of multiple simpleType definitions. Definition:: <union id = ID memberTypes = List of QNames {any attributes with non-schema Namespace}...> Content: (annotation?, (simpleType*)) </union> :param node: The XML node :type node: lxml.etree._Element :param parent: The parent XML node :type parent: lxml.etree._Element """ # TODO members = node.get("memberTypes") types = [] if members: for member in members.split(): qname = as_qname(member, node.nsmap) xsd_type = self._get_type(qname) types.append(xsd_type) else: annotation, types = self._pop_annotation(list(node)) types = [self.visit_simple_type(t, node) for t in types] return xsd_types.UnionType(types)
def visit_union(self, node, parent): """Defines a collection of multiple simpleType definitions. <union id = ID memberTypes = List of QNames {any attributes with non-schema Namespace}...> Content: (annotation?, (simpleType*)) </union> """ # TODO members = node.get('memberTypes') default_namespace = node.nsmap.get(None) types = [] if members: for member in members.split(): qname = as_qname( member, node.nsmap, default_namespace or self.document._target_namespace) xsd_type = self._get_type(qname) types.append(xsd_type) else: annotation, types = self._pop_annotation(node.getchildren()) types = [self.visit_simple_type(t, node) for t in types] return xsd_types.UnionType(types)
def visit_union(self, node, parent): """ <union id = ID memberTypes = List of QNames {any attributes with non-schema Namespace}...> Content: (annotation?, (simpleType*)) </union> """ return xsd_types.UnionType([])
def visit_union(self, node, parent): """Defines a collection of multiple simpleType definitions. <union id = ID memberTypes = List of QNames {any attributes with non-schema Namespace}...> Content: (annotation?, (simpleType*)) </union> """ # TODO return xsd_types.UnionType([])