Home | Trees | Indices | Help |
|
---|
|
object --+ | SchemaBase
|
|||
|
__init__(self) Creates the instances that are in the tree. |
||
|
getAttributesFromTag(self,
elementTag) Adds attributes to the _attribs_ dictionary in the instance. |
||
|
descAttributes(self) Returns a dictionary of the descriptor attributes. |
||
|
descAttributeNames(self) Returns a list that has all of the names of attribute descriptors. |
||
|
checkAttributes(self,
usedAttrs,
elementTag) Checks to see that required attributes are used in the xml, and does other such checks on the attributes. |
||
Inherited from |
|
|||
|
makeInstanceFromTag(cls,
elementTag) A classmethod. |
||
|
addAttributesTo(cls,
instance,
elementTag) A classmethod. |
||
|
addElementsTo(cls,
instance,
elementTag) A classmethod. |
||
|
addValueTo(cls,
instance,
elementTag) Checks to see if the tag has a value, and assigns it to the element instance if it does. |
||
|
checkElementOrderInChoice(cls,
elemDescriptor,
subElements) A classmethod. |
||
|
checkElementOrderInSequence(cls,
descriptors,
subElements) A classmethodChecks the element order in sequence fields to make sure that the order specified in the schema is preserved in the xml. |
||
|
consume(cls,
dname,
subElements) A classmethod. |
||
|
primitiveValueFor(cls,
subElCls,
subElement) A classmethod. |
||
|
addBaseDescriptors(cls) Adds attribute descriptors from classes that are bases to the current class. |
|
|||
|
dumpCls(cls) For debugging purposes only. |
|
|||
Inherited from |
|
Creates the instances that are in the tree. These objects are initialized from within SchemaBase. No parameters
|
A classmethod. It takes in a schema type class and its corresponding xml element. It then instanciates the class. It adds a name from the name in the xml element, and then it hands the instance and the element to other methods to add attributes, elements, and values to this instance. It adds these according to the schema classes, and not the element. A non-fatal (when possible) error is raised when the xml element does not correspond to the schema class. Parameters:
|
A classmethod. Called by makeInstanceFromTag(). Adds attributes according to the schema by calling getAttributesFromTag(). The attributes are then checked. parameters:
|
Adds attributes to the _attribs_ dictionary in the instance. Only attributes in the type classes are added. All of the attribute values are validated against descriptors in the Attribute class in ElementRepresentatives. The only exception to this proceedure is for namespace and schemaLocation tags, as the program currently does not have any mechanism to actually check these. Parameters:
|
A classmethod. Checks order on the child elements, with different functions for Parameters:
|
Checks to see if the tag has a value, and assigns it to the element instance if it does.
Uses the ElementTree function Parameters:
|
A classmethod. Checks to see that elements in a choice field, which is specified in the schema, follow the rules of such a field. Gets minOccurs and maxOccurs from the choice element in the schema, and checks the number of elements from there. Parameters:
|
A classmethodChecks the element order in sequence fields to make sure that the order specified in the schema is preserved in the xml. Raises non-fatal errors when a problem is found. Checks minOccurs and maxOccurs on each element as well. Parameters:
|
A classmethod. Used to check the number of times an element type in the schema is used with the xml elements. Used by checkElementOrderInSequence(). Parameters:
|
A classmethod. Used to check and assign primitive values to an instance. called by addElementsTo(). NOTE: this class may not work correctly for all elements with primitive data types. If you find an error in this method or any other error in the program, please submit this error and the appropiate correction on the pyXSD website. Parameters:
|
Adds attribute descriptors from classes that are bases to the current class. Does this recursively down the list of bases. Everything returned as a dictionary. A classmethod. Parameters:
|
Returns a dictionary of the descriptor attributes. These attributes are from the schema and use descriptors, which are specified in the Attribute class in elementReprsentatives, that help check element attribute values. Uses lazy evulation by storing the descriptor attributes in a variable called '_descAttrs_', which it returns if this variable is specified. No parameters. |
|
Checks to see that required attributes are used in the xml, and does other such checks on the attributes. Note: the attribute descriptors check the values in element attributes. Parameters:
|
For debugging purposes only. Prints out the contents of a class. A staticmethod. parameters:
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0alpha3 on Thu Sep 07 21:19:40 2006 | http://epydoc.sourceforge.net |