예제 #1
0
 def schema(self):
     """Return schema element (used for XSD validation)."""
     schema_el = self.root.xpath(
         '/wsdl:definitions/wsdl:types/xsd:schema',
         namespaces=NS_MAP,
     )[0]
     return element_as_tree(schema_el)
예제 #2
0
파일: wsdl.py 프로젝트: thedrow/rinse
 def schema(self):
     """Return schema element (used for XSD validation)."""
     if self._schema is None:
         schema_el = self.root.xpath(
             '/wsdl:definitions/wsdl:types/xsd:schema', namespaces=NS_MAP,
         )[0]
         self._schema = element_as_tree(schema_el)
     return self._schema
예제 #3
0
파일: xsd.py 프로젝트: vidyarani-dg/rinse
 def __init__(self, schema_root):
     """XSDValidator init."""
     self.root = element_as_tree(schema_root)
     self.schema = etree.XMLSchema(self.root)
예제 #4
0
파일: xsd.py 프로젝트: 2tg67eHE4xWE/rinse
 def __init__(self, schema_root):
     """XSDValidator init."""
     self.root = element_as_tree(schema_root)
     self.schema = etree.XMLSchema(self.root)