def visit_attribute_group(self, node, parent): """ Definition:: <attributeGroup id = ID name = NCName ref = QName {any attributes with non-schema Namespace...}> Content: (annotation?), ((attribute | attributeGroup)*, anyAttribute?)) </attributeGroup> :param node: The XML node :type node: lxml.etree._Element :param parent: The parent XML node :type parent: lxml.etree._Element """ ref = self.process_reference(node) if ref: return ref qname = qname_attr(node, "name", self.document._target_namespace) annotation, children = self._pop_annotation(list(node)) attributes = self._process_attributes(node, children) attribute_group = xsd_elements.AttributeGroup(qname, attributes) self.register_attribute_group(qname, attribute_group)
def visit_attribute_group(self, node, parent): """ <attributeGroup id = ID name = NCName ref = QName {any attributes with non-schema Namespace...}> Content: (annotation?), ((attribute | attributeGroup)*, anyAttribute?)) </attributeGroup> """ ref = self.process_reference(node) if ref: return ref qname = qname_attr(node, 'name', self.document._target_namespace) annotation, children = self._pop_annotation(node.getchildren()) attributes = self._process_attributes(node, children) attribute_group = xsd_elements.AttributeGroup(qname, attributes) self.document.register_attribute_group(qname, attribute_group)