Exemplo n.º 1
0
 def __init__(self, schema, xstq=True):
     """
     @param schema: A schema object
     @type schema: L{xsd.schema.Schema}
     @param xstq: The B{x}ml B{s}chema B{t}ype B{q}ualified flag indicates
         that the I{xsi:type} attribute values should be qualified by namespace.
     @type xstq: bool
     """
     Core.__init__(self)
     self.schema = schema
     self.xstq = xstq
     self.resolver = GraphResolver(self.schema)
Exemplo n.º 2
0
 def __init__(self, schema, xstq=True):
     """
     @param schema: A schema object
     @type schema: L{xsd.schema.Schema}
     @param xstq: The B{x}ml B{s}chema B{t}ype B{q}ualified flag indicates
         that the I{xsi:type} attribute values should be qualified by namespace.
     @type xstq: bool
     """
     Core.__init__(self)
     self.schema = schema
     self.xstq = xstq
     self.resolver = GraphResolver(self.schema)
Exemplo n.º 3
0
 def process(self, value, tag=None):
     """
     Process (marshal) the tag with the specified value using the
     optional type information.
     @param value: The value (content) of the XML node.
     @type value: (L{Object}|any)
     @param tag: The (optional) tag name for the value.  The default is
         value.__class__.__name__
     @type tag: str
     @return: An xml node.
     @rtype: L{Element}
     """
     content = Content(tag=tag, value=value)
     result = Core.process(self, content)
     return result