rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
self.name = tp.getName() + '_Dec'
def fromType(self, myType): """myType -- Type representation """
39da20d30f8670a481f8c7f941b896a2d2c85cbd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/39da20d30f8670a481f8c7f941b896a2d2c85cbd/wsdl2python.py
self.name = tp.getName() + '_Def'
def fromType(self, myType): """myType -- Type representation """
39da20d30f8670a481f8c7f941b896a2d2c85cbd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/39da20d30f8670a481f8c7f941b896a2d2c85cbd/wsdl2python.py
def _elementSimpleType(self, tp, etp): tpc = etp.getTypeclass() self.precede = '%s' % (tpc)
39da20d30f8670a481f8c7f941b896a2d2c85cbd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/39da20d30f8670a481f8c7f941b896a2d2c85cbd/wsdl2python.py
self.precede = '%s' %(etp.getName())
self.precede = '%s' %(etp.getName() + '_Def' )
def _elementComplexType(self, tp, etp):
39da20d30f8670a481f8c7f941b896a2d2c85cbd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/39da20d30f8670a481f8c7f941b896a2d2c85cbd/wsdl2python.py
dt.getDerivation())
dt.getDerivation()\ + '_Def')
self.classdef = '\n\n%sclass %s(%s):' %(ID1, tp.getName() \ + '_Def', dt.getDerivation())
39da20d30f8670a481f8c7f941b896a2d2c85cbd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/39da20d30f8670a481f8c7f941b896a2d2c85cbd/wsdl2python.py
self.initdef += '\n%s%s.__init__(self, name=name, ns=ns, **kw)' % (ID4, dt.getDerivation()) self.initdef += '\n%sself.ofwhat += TCList' % ID4
self.initdef += '\n%s%s.%s.__init__(self, name=name, ns=ns, **kw)' % (ID4, nsp, dt.getDerivation() + '_Def' ) self.initdef += '\n%sself.ofwhat += self.ofwhat + tuple(TCList)' % ID4 self.initdef += '\n%sself.lenofwhat += self.lenofwhat + len(TCList)' % ID4
self.initdef += '\n%s%s.__init__(self, name=name, ns=ns, **kw)' % (ID4, dt.getDerivation())
39da20d30f8670a481f8c7f941b896a2d2c85cbd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/39da20d30f8670a481f8c7f941b896a2d2c85cbd/wsdl2python.py
if namespaceURI != self.reserved_ns[prefix]:
if namespaceURI == self.reserved_ns[prefix]: qualifiedName = '%s:%s' %(prefix,localName) elif namespaceURI is localName is None: self.node = self._dom.createDocument(None,None,None) return else:
def createDocument(self, namespaceURI, localName, doctype=None): prefix = self._soap_env_prefix if namespaceURI != self.reserved_ns[prefix]: raise KeyError, 'only support creation of document in %s' %self.reserved_ns[prefix] qualifiedName = '%s:%s' %(prefix,localName)
563b43470640fd73edf7888a87724ecd47ebb652 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/563b43470640fd73edf7888a87724ecd47ebb652/Utility.py
qualifiedName = '%s:%s' %(prefix,localName)
def createDocument(self, namespaceURI, localName, doctype=None): prefix = self._soap_env_prefix if namespaceURI != self.reserved_ns[prefix]: raise KeyError, 'only support creation of document in %s' %self.reserved_ns[prefix] qualifiedName = '%s:%s' %(prefix,localName)
563b43470640fd73edf7888a87724ecd47ebb652 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/563b43470640fd73edf7888a87724ecd47ebb652/Utility.py
self._setAttributeNS(self._xsi_nsuri, '%s:type' %self._xsi_prefix, value)
xsi_prefix = self.getPrefix(self._xsi_nsuri) self._setAttributeNS(self._xsi_nsuri, '%s:type' %xsi_prefix, value)
def setAttributeType(self, namespaceURI, localName): '''set xsi:type Keyword arguments: namespaceURI -- namespace of attribute value localName -- name of new attribute value
563b43470640fd73edf7888a87724ecd47ebb652 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/563b43470640fd73edf7888a87724ecd47ebb652/Utility.py
self.typecode += '\n%sdef __init__(self):' %(ID1)
self.typecode += '\n%sdef __init__(self, name=None, ns=None):' \ % (ID1)
self.typecode += '\n%sdef __init__(self):' %(ID1)
0985689ec7bf293016071dd2a958894f48142513 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/0985689ec7bf293016071dd2a958894f48142513/wsdl2python.py
l += tp.typecode
if tp.typecode[0][0:3] != 'ZSI': qualifiedtc = tp.typecode[0:] idx = qualifiedtc[0].find('(') qualifiedtc[0] = self.nsh.getAlias(tp.tns) + \ '.' + qualifiedtc[0][0:idx] + \ '_Def' + qualifiedtc[0][idx:] l += qualifiedtc else: l += tp.typecode
self.typecode += '\n%sdef __init__(self, name=None, ns=None): pass' %(ID1) break
0985689ec7bf293016071dd2a958894f48142513 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/0985689ec7bf293016071dd2a958894f48142513/wsdl2python.py
self.typecode += '\n%s%s.typecode = Struct(%s,[%s],pname="%s",aname="_%s",oname="%s xmlns=\\"%s\\"")'\
if namespace == None: namespace = '' if style == 'rpc': namespace = '' self.typecode += '\n%s%s.typecode = Struct(%s,[%s], pname=name, aname="_%%s" %% name, oname="%%s xmlns=\\"%s\\"" %% name )'\
self.typecode += '\n%sdef __init__(self, name=None, ns=None): pass' %(ID1) break
0985689ec7bf293016071dd2a958894f48142513 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/0985689ec7bf293016071dd2a958894f48142513/wsdl2python.py
tcs,message.getName(),message.getName(), message.getName(),namespace)
tcs,namespace)
self.typecode += '\n%sdef __init__(self, name=None, ns=None): pass' %(ID1) break
0985689ec7bf293016071dd2a958894f48142513 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/0985689ec7bf293016071dd2a958894f48142513/wsdl2python.py
self.initdef.set('\n\n%sdef __init__(self, name=None, ns=None):' \
self.initdef.set('\n\n%sdef __init__(self, name=None, ns=None, **kw):' \
self.initdef.set('\n\n%sdef __init__(self, name=None, ns=None):' \ % ID2)
0985689ec7bf293016071dd2a958894f48142513 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/0985689ec7bf293016071dd2a958894f48142513/wsdl2python.py
self.basector.set('\n\n%s%s.__init__(self,pname=name)' % (ID3,tpc))
self.basector.set('\n\n%s%s.__init__(self,pname=name, **kw)' % (ID3,tpc))
self.initdef.set('\n\n%sdef __init__(self, name=None, ns=None):' \ % ID2)
0985689ec7bf293016071dd2a958894f48142513 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/0985689ec7bf293016071dd2a958894f48142513/wsdl2python.py
self.initdef.set('\n\n%sdef __init__(self, name=None, ns=None):' %(ID2))
self.initdef.set('\n\n%sdef __init__(self, name=None, ns=None, **kw):' %(ID2))
self.initdef.set('\n\n%sdef __init__(self, name=None, ns=None):' %(ID2))
0985689ec7bf293016071dd2a958894f48142513 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/0985689ec7bf293016071dd2a958894f48142513/wsdl2python.py
self.basector.set('\n\n%s%s.__init__(self)' % (ID3, typeName)) self.postpend.set('\n%sself.typecode = %s(name=name, ns=ns)' % (ID3, typeName))
self.basector.set('\n\n%s%s.__init__(self, name=name, ns=ns, **kw)' % (ID3, typeName)) self.postpend.set('\n%sself.typecode = %s(name=name, ns=ns, **kw)' % (ID3, typeName))
self.initdef.set('\n\n%sdef __init__(self, name=None, ns=None):' %(ID2))
0985689ec7bf293016071dd2a958894f48142513 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/0985689ec7bf293016071dd2a958894f48142513/wsdl2python.py
else:
elif hasattr(file, 'name'):
def loadFromStream(self, file, name=None): """Return a WSDL instance loaded from a file object.""" document = DOM.loadDocument(file) wsdl = WSDL() if name: wsdl.location = name else: wsdl.location = file.name wsdl.load(document) return wsdl
04e2f3993d7a37e62998063205144655ef8ff47d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/04e2f3993d7a37e62998063205144655ef8ff47d/WSDLTools.py
data = _child_elements(self.ps.body_root)
elt_name = '%s' % self.ps.body_root.localName if elt_name.find('Response') > 0: data = _child_elements(self.ps.body_root) else: data = [self.ps.body_root]
def Receive(self, replytype=None, **kw): '''Parse message, create Python object. if replytype is None, use TC.Any to dynamically parse; otherwise it can be a Python class or the typecode to use in parsing. ''' self.ReceiveSOAP(**kw) if self.ps.IsAFault(): msg = FaultFromFaultMessage(self.ps) raise TypeError("Unexpected...
52be5eea44efc9a6b86874bcf4161b0145a0b94c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/52be5eea44efc9a6b86874bcf4161b0145a0b94c/client.py
clazz = getattr(self.typesmodule, 'type')
clazz = getattr(self.typesmodule, type)
def __parse(self, node, type): try: if hasattr(self.typesmodule, type): clazz = getattr(self.typesmodule, 'type') tc = clazz.typecode return tc.parse(node, self.ps) else: tc = TC.Any(aslist=1) return tc.parse(node, self.ps) except Exception, e: tc = TC.Any(aslist=1) return tc.parse(node, self.ps)
52be5eea44efc9a6b86874bcf4161b0145a0b94c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/52be5eea44efc9a6b86874bcf4161b0145a0b94c/client.py
sock, addr = get_request(self)
sock, addr = SocketServer.TCPServer.get_request(self)
def get_request(self): sock, addr = get_request(self)
edd6ae82ee812a90957cc99a3b0fee5434f7b901 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/edd6ae82ee812a90957cc99a3b0fee5434f7b901/Server.py
class SOAPServer(SocketServer.TCPServer, SOAPServerBase):
class SOAPServer(SOAPServerBase, SocketServer.TCPServer):
def log_message(self, format, *args): if self.server.log: BaseHTTPServer.BaseHTTPRequestHandler.\ log_message (self, format, *args)
edd6ae82ee812a90957cc99a3b0fee5434f7b901 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/edd6ae82ee812a90957cc99a3b0fee5434f7b901/Server.py
class ThreadingSOAPServer(SocketServer.ThreadingTCPServer, SOAPServerBase):
class ThreadingSOAPServer(SOAPServerBase, SocketServer.ThreadingTCPServer):
def __init__(self, addr = ('localhost', 8000), RequestHandler = SOAPRequestHandler, log = 1, encoding = 'UTF-8', config = Config, namespace = None, ssl_context = None):
edd6ae82ee812a90957cc99a3b0fee5434f7b901 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/edd6ae82ee812a90957cc99a3b0fee5434f7b901/Server.py
class SOAPUnixSocketServer(SocketServer.UnixStreamServer, SOAPServerBase):
class SOAPUnixSocketServer(SOAPServerBase, SocketServer.UnixStreamServer):
def __init__(self, addr = ('localhost', 8000), RequestHandler = SOAPRequestHandler, log = 1, encoding = 'UTF-8', config = Config, namespace = None, ssl_context = None):
edd6ae82ee812a90957cc99a3b0fee5434f7b901 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/edd6ae82ee812a90957cc99a3b0fee5434f7b901/Server.py
group.append( self.__adapterWrap( x ) )
t = self.__adapterWrap(x) t._dec.attributes['nillable'] = u"true" group.append( t )
def getModelGroup(self): """returns a model group adapter """
4d8ebba35fff2bb9af80b30200f02500bb52a11d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/4d8ebba35fff2bb9af80b30200f02500bb52a11d/wsdlInterface.py
bti = self.__class__.bti tpc = bti.get_typeclass( self._def.content.\ attributes['itemType'][1], self._def.content.\ attributes['itemType'][0] )
if self._def.content.attributes.has_key('itemType'): bti = self.__class__.bti tpc = bti.get_typeclass( self._def.content.\ attributes['itemType'][1], self._def.content.\ attributes['itemType'][0] )
def getTypeclass(self): """get typeclass for simple type """
4d8ebba35fff2bb9af80b30200f02500bb52a11d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/4d8ebba35fff2bb9af80b30200f02500bb52a11d/wsdlInterface.py
if t[0:4] == 'xsd:':
prefix, localName = SplitQName(t) namespaceURI = self._content.getXMLNS(prefix) if namespaceURI in SCHEMA.XSD_LIST:
def getArrayType(self):
4d8ebba35fff2bb9af80b30200f02500bb52a11d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/4d8ebba35fff2bb9af80b30200f02500bb52a11d/wsdlInterface.py
tns = 'http://www.w3.org/2001/XMLSchema'
def getArrayType(self):
4d8ebba35fff2bb9af80b30200f02500bb52a11d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/4d8ebba35fff2bb9af80b30200f02500bb52a11d/wsdlInterface.py
atype = bti.get_typeclass( t[4:-2], tns )
atype = bti.get_typeclass( localName[:-2], namespaceURI )
def getArrayType(self):
4d8ebba35fff2bb9af80b30200f02500bb52a11d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/4d8ebba35fff2bb9af80b30200f02500bb52a11d/wsdlInterface.py
self.assertEquals( x._getAttr('nonamespaceURI') , '1') self.assertEquals( x._getAttr('NonenamespaceURI') , '2') self.assertEquals( x._getAttr(('http://some/namespace', 'namespaceURIattr1')) , '3') self.assertEquals( x._getAttr(('http://some/other/namespace', 'namespaceURIattr2')) , '4')
self.assertEquals( x._getAttr('nonamespaceURI') , 1) self.assertEquals( x._getAttr('NonenamespaceURI') , 2) self.assertEquals( x._getAttr(('http://some/namespace', 'namespaceURIattr1')) , 3) self.assertEquals( x._getAttr(('http://some/other/namespace', 'namespaceURIattr2')) , 4)
def testInstantiations(self): # string, ENTITY, ID, IDREF, language, Name, NCName, # NMTOKEN, QName, untypedType for t in (stringType, ENTITYType, IDType, IDREFType, languageType, NameType, NCNameType, NMTOKENType, QNameType, untypedType): # First some things that shouldn't be taken as the current type
6f1779a5fcc6109b4303b3cf918a9484d60ac61c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/6f1779a5fcc6109b4303b3cf918a9484d60ac61c/SOAPtest.py
wsdl = GWSDLReader().loadFromURL(path)
wsdl = WSDLReader().loadFromURL(path)
def setUpWsdl(path): """Load a WSDL given a file path or a URL. """ if path[:7] == 'http://': wsdl = GWSDLReader().loadFromURL(path) else: wsdl = GWSDLReader().loadFromFile(path) return wsdl
e1ddf5f3f54242e75b9389db1f984b26e4a06a5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/e1ddf5f3f54242e75b9389db1f984b26e4a06a5f/utils.py
wsdl = GWSDLReader().loadFromFile(path)
wsdl = WSDLReader().loadFromFile(path)
def setUpWsdl(path): """Load a WSDL given a file path or a URL. """ if path[:7] == 'http://': wsdl = GWSDLReader().loadFromURL(path) else: wsdl = GWSDLReader().loadFromFile(path) return wsdl
e1ddf5f3f54242e75b9389db1f984b26e4a06a5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/e1ddf5f3f54242e75b9389db1f984b26e4a06a5f/utils.py
component = SplitQName(i.getTagName())[1]
component = SplitQName(contents[indx].getTagName())[1]
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) content = []
66a932e69cc36cdc5a8aa682d4f81d3154420669 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/66a932e69cc36cdc5a8aa682d4f81d3154420669/XMLSchema.py
raise SchemaError, 'Unknown component (%s)' %(i.getTagName())
raise SchemaError, 'Unknown component (%s)' %(contents[indx].getTagName())
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) content = []
66a932e69cc36cdc5a8aa682d4f81d3154420669 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/66a932e69cc36cdc5a8aa682d4f81d3154420669/XMLSchema.py
'ref':None}
'ref':None, 'minOccurs':'1', 'maxOccurs':'1'}
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
66a932e69cc36cdc5a8aa682d4f81d3154420669 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/66a932e69cc36cdc5a8aa682d4f81d3154420669/XMLSchema.py
raise SchemaError, 'Unknown component (%s)' %(contents[indx].getTagName())
raise SchemaError, 'Unknown component (%s)' %(component)
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) for child in contents: component = SplitQName(child.getTagName())[1] if component == 'annotation': self.annotation = Annotation(self) self.annotation.fromDom(child) break else: return if component == 'restriction': self.content = self._...
66a932e69cc36cdc5a8aa682d4f81d3154420669 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/66a932e69cc36cdc5a8aa682d4f81d3154420669/XMLSchema.py
def _utilized(n, node, other_attrs, unsuppressedPrefixes): '''_utilized(n, node, other_attrs, unsuppressedPrefixes) -> boolean Return true if that nodespace is utilized within the node''' if n.startswith('xmlns:'): n = n[6:] elif n.startswith('xmlns'): n = n[5:] if n == node.prefix or n in unsuppressedPrefixes: return...
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
if n == node.prefix or n in unsuppressedPrefixes: return 1
if (n=="" and node.prefix in [" n == node.prefix or n in unsuppressedPrefixes: return 1
def _utilized(n, node, other_attrs, unsuppressedPrefixes): '''_utilized(n, node, other_attrs, unsuppressedPrefixes) -> boolean Return true if that nodespace is utilized within the node''' if n.startswith('xmlns:'): n = n[6:] elif n.startswith('xmlns'): n = n[5:] if n == node.prefix or n in unsuppressedPrefixes: return...
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
_in_subset = lambda subset, node: not subset or node in subset
def _inclusiveNamespacePrefixes(node, context, unsuppressedPrefixes): '''http://www.w3.org/TR/xml-exc-c14n/ InclusiveNamespaces PrefixList parameter, which lists namespace prefixes that are handled in the manner described by the Canonical XML Recommendation''' inclusive = [] if node.prefix: usedPrefixes = ['xmlns:%s' ...
def _utilized(n, node, other_attrs, unsuppressedPrefixes): '''_utilized(n, node, other_attrs, unsuppressedPrefixes) -> boolean Return true if that nodespace is utilized within the node''' if n.startswith('xmlns:'): n = n[6:] elif n.startswith('xmlns'): n = n[5:] if n == node.prefix or n in unsuppressedPrefixes: return...
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
def __init__(self, node, write, **kw): '''Create and run the implementation.'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
if self.subset: self.comments = kw.get('comments', 1) else: self.comments = kw.get('comments', 0)
self.comments = kw.get('comments', 0)
def __init__(self, node, write, **kw): '''Create and run the implementation.'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
def __init__(self, node, write, **kw): '''Create and run the implementation.'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
self.state = (nsdict, ['xml'], [])
self.state = (nsdict, {'xml':''}, {})
def __init__(self, node, write, **kw): '''Create and run the implementation.'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
if self.unsuppressedPrefixes is not None: self._do_element(node)
if not _inclusive(self): inherited = _inclusiveNamespacePrefixes(node, self._inherit_context(node), self.unsuppressedPrefixes) self._do_element(node, inherited)
def __init__(self, node, write, **kw): '''Create and run the implementation.'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
s = node.data \ .replace("&", "&amp;") \ .replace("<", "&lt;") \ .replace(">", "&gt;") \ .replace("\015", "&
s = string.replace(node.data, "&", "&amp;") s = string.replace(s, "<", "&lt;") s = string.replace(s, ">", "&gt;") s = string.replace(s, "\015", "&
def _do_text(self, node): '''_do_text(self, node) -> None Process a text or CDATA node. Render various special characters as their C14N entity representations.''' if not _in_subset(self.subset, node): return s = node.data \ .replace("&", "&amp;") \ .replace("<", "&lt;") \ .replace(">", "&gt;") \ .replace("\015", "&#xD...
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
s = value \ .replace("&", "&amp;") \ .replace("<", "&lt;") \ .replace('"', '&quot;') \ .replace('\011', '& .replace('\012', '& .replace('\015', '&
s = string.replace(value, "&", "&amp;") s = string.replace(s, "<", "&lt;") s = string.replace(s, '"', '&quot;') s = string.replace(s, '\011', '& s = string.replace(s, '\012', '& s = string.replace(s, '\015', '&
def _do_attr(self, n, value): ''''_do_attr(self, node) -> None Process an attribute.'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
self.state[0], self.state[1][:], self.state[2][:]
self.state[0], self.state[1].copy(), self.state[2].copy()
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
other_attrs = initial_other_attrs[:]
other_attrs = []
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
for a in _attrs(node):
for a in _attrs(node) + initial_other_attrs:
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
if self.unsuppressedPrefixes is None or in_subset: xml_attrs.append(a)
if _inclusive(self) or (in_subset and _in_subset(self.subset, a)): xml_attrs_local[a.nodeName] = a
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
other_attrs.append(a)
if _in_subset(self.subset, a): other_attrs.append(a) xml_attrs.update(xml_attrs_local)
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
if in_subset:
if in_subset:
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
pval = ns_parent.get(n) if n == "xmlns" \ and v in [ XMLNS.BASE, '' ] and pval in [ XMLNS.BASE, '' ]:
if n == "xmlns" and v in [ XMLNS.BASE, '' ] \ and ns_rendered.get('xmlns') in [ XMLNS.BASE, '', None ]:
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
if n == "xmlns:xml" \
if n in ["xmlns:xml", "xml"] \
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
if (v != pval or n not in ns_rendered) \ and (self.unsuppressedPrefixes is None or \
if (n,v) not in ns_rendered.items() \ and (_inclusive(self) or \
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
ns_rendered.append(n) other_attrs.extend(xml_attrs) xml_attrs = []
ns_rendered[n]=v if not _inclusive(self) or _in_subset(self.subset,node.parentNode): other_attrs.extend(xml_attrs_local.values()) else: other_attrs.extend(xml_attrs.values())
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py
self.cb(elt, sw, pyobj, **kw)
self.cb(elt, sw, pyobj, name=name, **kw)
def serialize(self, elt, sw, pyobj, inline=False, name=None, **kw): if inline or self.inline: self.cb(elt, sw, pyobj, **kw) else: objid = _get_idstr(pyobj) n = name or self.pname or ('E' + objid) el = elt.createAppendElement(None, n) el.setAttributeNS(None, 'href', "#%s" %objid) sw.AddCallback(self.cb, elt, sw, pyobj)
7345179294b76759ddb897d4d80aefa2d01212cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/7345179294b76759ddb897d4d80aefa2d01212cc/TCcompound.py
if unique is False and sw.Known(orig or pyobj):
if unique is False and sw.Known(pyobj):
def serialize(self, elt, sw, pyobj, name=None, childnames=None, **kw): debug = self.logger.debugOn() if debug: self.logger.debug("serialize: %r" %pyobj) if self.mutable is False and sw.Known(pyobj): return objid = _get_idstr(pyobj) n = name or self.pname or ('E' + objid) el = elt.createAppendElement(self.nspname, n)
7345179294b76759ddb897d4d80aefa2d01212cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/7345179294b76759ddb897d4d80aefa2d01212cc/TCcompound.py
self.set_attribute_id(el, _get_idstr(pyobj))
self.set_attribute_id(el, objid)
def serialize(self, elt, sw, pyobj, name=None, childnames=None, **kw): debug = self.logger.debugOn() if debug: self.logger.debug("serialize: %r" %pyobj) if self.mutable is False and sw.Known(pyobj): return objid = _get_idstr(pyobj) n = name or self.pname or ('E' + objid) el = elt.createAppendElement(self.nspname, n)
7345179294b76759ddb897d4d80aefa2d01212cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/7345179294b76759ddb897d4d80aefa2d01212cc/TCcompound.py
self.facets = []
def __init__(self, parent): XMLSchemaComponent.__init__(self, parent) self.annotation = None self.content = None self.facets = [] self.attr_content = None
731da17601825e1aaae6186bd45bb1d7b72a0c70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/731da17601825e1aaae6186bd45bb1d7b72a0c70/XMLSchema.py
facets = {}
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) facets = {} indx = 0 num = len(contents) if not num: return
731da17601825e1aaae6186bd45bb1d7b72a0c70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/731da17601825e1aaae6186bd45bb1d7b72a0c70/XMLSchema.py
facets[component] = contents[indx] self.facets.append(facets)
self.facets.append(contents[indx])
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) content = []
731da17601825e1aaae6186bd45bb1d7b72a0c70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/731da17601825e1aaae6186bd45bb1d7b72a0c70/XMLSchema.py
print pyobj == pyobj2, pyobj, pyobj2
self.failUnlessEqual(pyobj["i"], pyobj2.i) self.failUnlessEqual(pyobj["t"], pyobj2.t)
def checkt1(self): for key,val in self.badTests: print "\n", "." * 60, key self.failUnlessRaises(ParseException, ParsedSoap, val) for key,val in self.goodTests: print "\n", "." * 60, key ps = ParsedSoap(val)
c1c6200069e6ca90a6fe85d38d9a3c7df559029f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c1c6200069e6ca90a6fe85d38d9a3c7df559029f/test_t1.py
print 'non-sparse', nsa
self.failUnlessEqual(nsa, [None, None, None, 12, 13, 14, 15, 16, 17])
def checkt1(self): for key,val in self.badTests: print "\n", "." * 60, key self.failUnlessRaises(ParseException, ParsedSoap, val) for key,val in self.goodTests: print "\n", "." * 60, key ps = ParsedSoap(val)
c1c6200069e6ca90a6fe85d38d9a3c7df559029f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c1c6200069e6ca90a6fe85d38d9a3c7df559029f/test_t1.py
print 'sparse', sa
self.failUnlessEqual(sa, [(3, 12), (4, 13), (5, 14), (6, 15), (7, 16), (8, 17)])
def checkt1(self): for key,val in self.badTests: print "\n", "." * 60, key self.failUnlessRaises(ParseException, ParsedSoap, val) for key,val in self.goodTests: print "\n", "." * 60, key ps = ParsedSoap(val)
c1c6200069e6ca90a6fe85d38d9a3c7df559029f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c1c6200069e6ca90a6fe85d38d9a3c7df559029f/test_t1.py
print '=' * 60 for i in [ 0, 12, 4 ] : b = mychoice.parse(elts[i], ps) print 'b=', type(b), b print '=' * 60 print TC.Array('x', TC.Any()).parse(elts[15], ps) print TC.Struct(None, (TC.FPfloat('a'), TC.Decimal('b'), TC.FPdouble('c'))).parse(elts[13],ps)
b = mychoice.parse(elts[0], ps) self.failUnlessEqual(b[0], 'Price') self.failUnlessEqual(b[1], 34) b = mychoice.parse(elts[12], ps) self.failUnlessEqual(b[0], 'uri') self.failUnlessEqual(b[1], u'"http://foo.com/~salz"') b = mychoice.parse(elts[4], ps) self.failUnlessEqual(b[0], 'n3') self.failUnlessEqual(b[1], u'The va...
def checkt1(self): for key,val in self.badTests: print "\n", "." * 60, key self.failUnlessRaises(ParseException, ParsedSoap, val) for key,val in self.goodTests: print "\n", "." * 60, key ps = ParsedSoap(val)
c1c6200069e6ca90a6fe85d38d9a3c7df559029f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c1c6200069e6ca90a6fe85d38d9a3c7df559029f/test_t1.py
z = SoapWriter(sys.stdout, header=ps.header_elements, nsdict=nsdict)
sio = StringIO.StringIO() z = SoapWriter(sio, header=ps.header_elements, nsdict=nsdict)
def checkt1(self): for key,val in self.badTests: print "\n", "." * 60, key self.failUnlessRaises(ParseException, ParsedSoap, val) for key,val in self.goodTests: print "\n", "." * 60, key ps = ParsedSoap(val)
c1c6200069e6ca90a6fe85d38d9a3c7df559029f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c1c6200069e6ca90a6fe85d38d9a3c7df559029f/test_t1.py
print '<!-- s2 -->'
def checkt1(self): for key,val in self.badTests: print "\n", "." * 60, key self.failUnlessRaises(ParseException, ParsedSoap, val) for key,val in self.goodTests: print "\n", "." * 60, key ps = ParsedSoap(val)
c1c6200069e6ca90a6fe85d38d9a3c7df559029f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c1c6200069e6ca90a6fe85d38d9a3c7df559029f/test_t1.py
print '|'+elts[11].getAttributeNS('foo','bar')+'|' print 'Any=', TC.Any().parse(elts[11], ps)
self.failUnlessEqual(TC.Any().parse(elts[11], ps), {'urt-i': 12, 'urt-t': u'rich salz'})
def checkt1(self): for key,val in self.badTests: print "\n", "." * 60, key self.failUnlessRaises(ParseException, ParsedSoap, val) for key,val in self.goodTests: print "\n", "." * 60, key ps = ParsedSoap(val)
c1c6200069e6ca90a6fe85d38d9a3c7df559029f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c1c6200069e6ca90a6fe85d38d9a3c7df559029f/test_t1.py
if self.isSimpleElementDeclaration(op):
simpleType = self.isSimpleElementDeclaration(op) if simpleType:
'\n%sdef %s(self, request):' % \
d9d3337d4084d54d35a9489cf9880e594989841c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/d9d3337d4084d54d35a9489cf9880e594989841c/wsdl2python.py
'\n%sif not type(request) == %s:' %( ID2, self.isSimpleElementDeclaration(op) )
'\n%sif not type(request) == %s:' %( ID2, simpleType)
'\n%sdef %s(self, request):' % \
d9d3337d4084d54d35a9489cf9880e594989841c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/d9d3337d4084d54d35a9489cf9880e594989841c/wsdl2python.py
myBinding['defs'][op.getName()] += '\n%s"""\n' % ID2 myBinding['defs'][op.getName()] += self.messages[inputName].\ docString(typeDict, inputName, True) myBinding['defs'][op.getName()] += '\n' if outputName: myBinding['defs'][op.getName()] += self.messages[outputName].\ docString(typeDict, outputName, False) myBinding['...
'\n%sdef %s(self, request):' % \
d9d3337d4084d54d35a9489cf9880e594989841c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/d9d3337d4084d54d35a9489cf9880e594989841c/wsdl2python.py
if isInput: docList.append('%s@param: request to %s' % (ID2, messageName)) else: docList.append('%s@return: response from %s' % (ID2, messageName))
def docString(self, allTypeDict, messageName, isInput): """Generates a docstring giving the input and output message names, and their associated parameters and parameter sub-fields. """ docList = [] if isInput: docList.append('%s@param: request to %s' % (ID2, messageName)) else: docList.append('%s@return: response from...
d9d3337d4084d54d35a9489cf9880e594989841c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/d9d3337d4084d54d35a9489cf9880e594989841c/wsdl2python.py
docList.append('::') docList.append('\n')
def docString(self, allTypeDict, messageName, isInput): """Generates a docstring giving the input and output message names, and their associated parameters and parameter sub-fields. """ docList = [] if isInput: docList.append('%s@param: request to %s' % (ID2, messageName)) else: docList.append('%s@return: response from...
d9d3337d4084d54d35a9489cf9880e594989841c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/d9d3337d4084d54d35a9489cf9880e594989841c/wsdl2python.py
docList.extend(self.recurseTypeList(allTypeDict, self.typeList, 1, alreadyListed))
paramList = self.recurseTypeList(allTypeDict, self.typeList, 1, alreadyListed) if paramList: if paramList[0].startswith('*Simple*'): startIndex = len('*Simple*') + 1 if isInput: docList.append('%s@param: request is %s\n' % (ID2, paramList[0][startIndex:])) else: docList.append('%s@return: response is %s\n' % (ID2, para...
def docString(self, allTypeDict, messageName, isInput): """Generates a docstring giving the input and output message names, and their associated parameters and parameter sub-fields. """ docList = [] if isInput: docList.append('%s@param: request to %s' % (ID2, messageName)) else: docList.append('%s@return: response from...
d9d3337d4084d54d35a9489cf9880e594989841c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/d9d3337d4084d54d35a9489cf9880e594989841c/wsdl2python.py
indent = ID2 + IDSP2*level strList.append('%s%s: %s' % (indent, item[0], item[1])) if item[2]: strList.append(', optional') strList.append('\n')
if not item[0].startswith('__param'): indent = ID2 + IDSP2*level strList.append('%s%s: %s' % (indent, item[0], item[1])) if item[2]: strList.append(', optional') strList.append('\n') else: return ['*Simple* %s' % item[1]]
def recurseTypeList(self, allTypeDict, typeList, level, alreadyListed): """Recurse through a dictionary of type lists until reach Python types. """ if level > 12: # just in case return strList = [] for item in typeList: if item[0].startswith('_'): indent = ID2 + IDSP2*level strList.append('%s%s: %s' % (indent, item[0]...
d9d3337d4084d54d35a9489cf9880e594989841c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/d9d3337d4084d54d35a9489cf9880e594989841c/wsdl2python.py
self.basector.set('\n\n%s%s.%s.__init__(self)' \ %(ID3, self.nsh.getAlias(nsp), etp.getName() + '_Def')) self.postpend.set('\n%sself.typecode = %s.%s(name=name, ns=ns)' % (ID3, self.nsh.getAlias(nsp), etp.getName() + '_Def'))
typeName = '%s.%s_Def' % (self.nsh.getAlias(nsp), etp.getName()) self.basector.set('\n\n%s%s.__init__(self)' % (ID3, typeName)) self.postpend.set('\n%sself.typecode = %s(name=name, ns=ns)' % (ID3, typeName)) self.typeDoc('', '_' + tp.getName(), typeName)
self.initdef.set('\n\n%sdef __init__(self, name=None, ns=None):' %(ID2))
d9d3337d4084d54d35a9489cf9880e594989841c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/d9d3337d4084d54d35a9489cf9880e594989841c/wsdl2python.py
def __init__(self, targetNamespace=None):
def __init__(self, targetNamespace=None, strict=1):
def __init__(self, targetNamespace=None): self.targetNamespace = targetNamespace or 'urn:this-document.wsdl' self.documentation = '' self.location = None self.document = None self.name = None self.services = Collection(self) self.messages = Collection(self) self.portTypes = Collection(self) self.bindings = Collection(s...
8b2e3c7abb506000f27d21f4941952cd5afd6104 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/8b2e3c7abb506000f27d21f4941952cd5afd6104/WSDLTools.py
self.imports = Collection(self, key=f)
self.imports = Collection(self, key=ns)
def __init__(self, parent=None): """parent -- instance variables: targetNamespace -- schema's declared targetNamespace, or empty string. _imported_schemas -- namespace keyed dict of schema dependencies, if a schema is provided instance will not resolve import statement. _included_schemas -- schemaLocation keyed dict of...
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
if component == 'complexType':
if component == 'attribute': tp = AttributeDeclaration(self) tp.fromDom(node) self.types[tp.getAttribute('name')] = tp elif component == 'attributeGroup': tp = AttributeGroupDefinition(self) tp.fromDom(node) self.types[tp.getAttribute('name')] = tp elif component == 'complexType':
def load(self, node): self.setAttributes(node) self.targetNamespace = self.getTargetNamespace() contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
elif component == 'group': tp = ModelGroupDefinition(self) tp.fromDom(node) self.modelGroups[tp.getAttribute('name')] = tp elif component == 'notation': tp = Notation(self) tp.fromDom(node) self.notations[tp.getAttribute('name')] = tp
def load(self, node): self.setAttributes(node) self.targetNamespace = self.getTargetNamespace() contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
self.content = SimpleType(self)
self.content = AnonymousSimpleType(self)
def fromDom(self, node): """ No list or union support """ self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
self.content = SimpleType(self)
self.content = AnonymousSimpleType(self)
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
annotation?
annotation?, (attribute | attributeGroup)*, anyAttribute?
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
for i in contents:
content = [] for indx in range(len(contents)):
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
if component == 'annotation' and not self.annotation:
if (component == 'annotation') and (not indx):
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
self.annotation.fromDom(i)
self.annotation.fromDom(contents[indx]) elif (component == 'attribute'): if contents[indx].hasattr('name'): content.append(AttributeDeclaration()) elif contents[indx].hasattr('ref'): content.append(AttributeReference()) else: raise SchemaError, 'Unknown attribute type' content[-1].fromDom(contents[indx]) elif (componen...
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
def fromDom(node):
def fromDom(self, node):
def fromDom(node): self.setAttributes(node) contents = self.getContents(node) fields = []
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
def fromDom(node):
def fromDom(self, node):
def fromDom(node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
self.attr_content.append(AttributeGroupDefinition(self))
self.attr_content.append(AttributeGroupReference(self))
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) indx = 0 num = len(contents) #XXX ugly if not num: return component = SplitQName(contents[indx].getTagName())[1] if component == 'annotation': self.annotation = Annotation(self) self.annotation.fromDom(contents[indx]) indx += 1 compone...
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
annotation?, (group | all | choice | sequence)?, (attribute | attributeGroup)*, anyAttribute?
annotation?, (attribute | attributeGroup)*, anyAttribute?
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
contents = {'xsd':['annotation', 'group', 'all', 'choice',\ 'sequence', 'attribute', 'attributeGroup', 'anyAttribute']}
contents = {'xsd':['annotation', 'attribute', 'attributeGroup', 'anyAttribute']} def __init__(self, parent): XMLSchemaComponent.__init__(self, parent) self.annotation = None self.attr_content = None
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
if component == 'all': self.content = All(self) elif component == 'choice': self.content = Choice(self) elif component == 'sequence': self.content = Sequence(self) elif component == 'group': self.content = ModelGroupReference(self) else: raise SchemaError, 'Unknown component (%s)' %(contents[indx].getTagName()) self.c...
content = []
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
self.attr_content.append(AttributeReference(self))
content.append(AttributeReference(self))
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
self.attr_content.append(LocalAttributeDeclaration(self))
content.append(LocalAttributeDeclaration(self))
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
self.attr_content.append(AttributeGroupDefinition(self))
content.append(AttributeGroupReference(self))
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
self.attr_content.append(AttributeWildCard(self))
content.append(AttributeWildCard(self))
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
raise SchemaError, 'Unknown component (%s)' %(contents[indx].getTagName()) self.attr_content[-1].fromDom(contents[indx])
raise SchemaError, 'Unknown component (%s)'\ %(contents[indx].getTagName()) content[-1].fromDom(contents[indx])
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
self.content = []
content = []
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) self.content = [] self.attr_content = []
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py