示例#1
0
 def build(self):
     """
     Build the schema (object graph) using the root node
     using the factory.
         - Build the graph.
         - Collate the children.
     """
     self.children = BasicFactory.build(self.root, self)
     collated = BasicFactory.collate(self.children)
     self.children = collated[0]
     self.attributes = collated[2]
     self.imports = collated[1]
     self.elements = collated[3]
     self.types = collated[4]
     self.groups = collated[5]
     self.agrps = collated[6]
示例#2
0
            self.aty = aty

    def autoqualified(self):
        aqs = SXAttribute.autoqualified(self)
        aqs.append('aty')
        return aqs

    def description(self):
        d = SXAttribute.description(self)
        d = d + ('aty', )
        return d


#
# Builder function, only builds Attribute when arrayType
# attribute is defined on root.
#
def __fn(x, y):
    ns = (None, "http://schemas.xmlsoap.org/wsdl/")
    aty = y.get('arrayType', ns=ns)
    if aty is None:
        return SXAttribute(x, y)
    else:
        return Attribute(x, y, aty)


#
# Remap <xs:attrbute/> tags to __fn() builder.
#
SXFactory.maptag('attribute', __fn)
示例#3
0
            self.aty = aty[:-2]
        else:
            self.aty = aty
        
    def autoqualified(self):
        aqs = SXAttribute.autoqualified(self)
        aqs.append('aty')
        return aqs
    
    def description(self):
        d = SXAttribute.description(self)
        d = d+('aty',)
        return d

#
# Builder function, only builds Attribute when arrayType
# attribute is defined on root.
#
def __fn(x, y):
    ns = (None, "http://schemas.xmlsoap.org/wsdl/")
    aty = y.get('arrayType', ns=ns)
    if aty is None:
        return SXAttribute(x, y)
    else:
        return Attribute(x, y, aty)

#
# Remap <xs:attrbute/> tags to __fn() builder.
#
SXFactory.maptag('attribute', __fn)