#include <SchemaParser.h>
Collaboration diagram for SchemaParser:
Public Member Functions | |
Constructors and Destructors | |
SchemaParser (const string &Uri, string tns="", ostream &log=cout) | |
SchemaParser (XmlPullParser *parser, string tns="", ostream &log=cout) | |
~SchemaParser () | |
methods used for parsing | |
bool | parseSchemaTag () |
Various Getter methods | |
const XSDType * | getType (const Qname &type) |
const XSDType * | getType (int id) const |
list< const XSDType * > * | getAllTypes () const |
const Element * | getElement (const Qname &element) const |
const list< Element > | getElements () const |
int | getNumElements () const |
Attribute * | getAttribute (const Qname &attribute) |
const list< Attribute > | getAttributes () const |
int | getNumAttributes () const |
string | getNamespace (void) const |
int | getNumTypes () const |
int | getTypeId (const Qname &, bool create=false) |
bool | isBasicType (int sType) const |
int | getBasicContentType (int typeId) const |
Group * | getGroup (const Qname &name) |
AttributeGroup * | getAttributeGroup (const Qname &name) |
Methods for handling Imports | |
bool | addImports (const std::vector< SchemaParser * > &schemaParsers) |
bool | addImport (string ns, string location="") |
bool | addImport (SchemaParser *sp) |
Miscellaneous Methods | |
bool | finalize (void) |
void | setWarningLevel (unsigned char l) |
|
The constructor for SchemaParser
|
|
The constructor for SchemaParser
|
|
|
|
parseSchemaTag
|
|
getType
|
|
|
|
|
|
|
|
returns the list of all the global elements in the schema
|
|
|
|
getAttribute
|
|
returns a list of global attributes in the schema
|
|
|
|
|
|
|
|
getTypeId :Search for a type ,if not present create one
|
|
isBasicType
|
|
getBasicContentType If the type has a simple content model then this method returns the basic schema type which defines its contents For example calling on a type like below would return Schema::STRING <xsd:complexType> <xsd:simpleContent> <xsd:extension base = "xsd:string"> <xsd:attribute name = "lang" type = "xsd:string"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType>
|
|
getGroup
|
|
getAttributeGroup
|
|
addImports .To add an array of schema parsers for imported schemas
|
|
addImport .Instructs the schema parser to import a namespace
|
|
addImport . imports the namespace of the schemaparser
|
|
finalize : tries to match unresolved types and references with imported schemas you *must* call this to ensure successful type resolution
|
|
setWarningLevel default is 0 . 1 is wanrning level 2 is information level //quite verbose |