예제 #1
0
파일: visitor.py 프로젝트: leomarp/Test2
    def visit_any(self, node, parent):
        """

        Definition::

            <any
              id = ID
              maxOccurs = (nonNegativeInteger | unbounded) : 1
              minOccurs = nonNegativeInteger : 1
              namespace = "(##any | ##other) |
                List of (anyURI | (##targetNamespace |  ##local))) : ##any
              processContents = (lax | skip | strict) : strict
              {any attributes with non-schema Namespace...}>
            Content: (annotation?)
            </any>

        :param node: The XML node
        :type node: lxml.etree._Element
        :param parent: The parent XML node
        :type parent: lxml.etree._Element

        """
        min_occurs, max_occurs = _process_occurs_attrs(node)
        process_contents = node.get("processContents", "strict")
        return xsd_elements.Any(
            max_occurs=max_occurs,
            min_occurs=min_occurs,
            process_contents=process_contents,
        )
예제 #2
0
 def visit_any(self, node, parent):
     """
         <any
           id = ID
           maxOccurs = (nonNegativeInteger | unbounded) : 1
           minOccurs = nonNegativeInteger : 1
           namespace = "(##any | ##other) |
             List of (anyURI | (##targetNamespace |  ##local))) : ##any
           processContents = (lax | skip | strict) : strict
           {any attributes with non-schema Namespace...}>
         Content: (annotation?)
         </any>
     """
     min_occurs, max_occurs = _process_occurs_attrs(node)
     return xsd_elements.Any(max_occurs=max_occurs, min_occurs=min_occurs)