xml schema
by francisfortier
JavaScript
Schema = function() {
this.globalTypes = new NodeCollection();
this.globalElements = new NodeCollection();
this.globalAttributes = new NodeCollection();
};
Schema.prototype = {
validate: function(dom) {
},
load: function(dom) {
}
};
AbstractNode = function() {
};
AbstractNode.prototype = {
/**
* @returns {Boolean} false if a error
*/
validate: function(dom, scope) {}
};
Element = function() {};
Element.prototype = $.extend(new AbstractNode(), {});
ComplexType = function() {};
ComplexType.prototype = $.extend(new AbstractNode(), {});
Sequence = function() {};
Sequence.prototype = $.extend(new AbstractNode(), {});
QName = function() {};
NodeCollection = function() {};
NodeCollection.prototype = $.extend(new Array(), {
get: function(qname) {
}
});
XML = '<?xml version="1.0"?> \
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> \
\
<xs:element name="note"> \
<xs:complexType> \
<xs:sequence> \
<xs:element name="to" type="xs:string"/> \
<xs:element name="from" type="xs:string"/> \
<xs:element name="heading" type="xs:string"/> \
<xs:element name="body" type="xs:string"/> \
</xs:sequence> \
</xs:complexType> \
</xs:element> \
\
</xs:schema>';