27 #include "../../common/StringUtils.h"
28 #include "../../xml/Reader.h"
29 #include "../../xsd/Annotated.h"
30 #include "../../xsd/Identifiable.h"
31 #include "../../xsd/Occurs.h"
32 #include "../../xsd/QName.h"
46 if(pos != std::string::npos)
47 identifiable->
setId(
new std::string(reader.
getAttr(pos)));
68 if(pos != std::string::npos)
73 if(pos != std::string::npos)
79 std::vector<std::string> tokens;
81 assert(tokens.size() >= 2);
88 if(name ==
"minExclusive")
90 if(name ==
"minInclusive")
92 if(name ==
"maxExclusive")
94 if(name ==
"maxInclusive")
96 if(name ==
"totalDigits")
98 if(name ==
"fractionDigits")
102 if(name ==
"minLength")
104 if(name ==
"maxLength")
106 if(name ==
"enumeration")
108 if(name ==
"whiteSpace")
Specifies the maximum number of digits allowed.
Defines a list of acceptable values.
A base class for XSD classes that have occurs attributes.
This class models a XML reader object.
Specifies the exact number of characters or list items allowed.
TESERIALIZATIONEXPORT te::xsd::Annotation * ReadAnnotation(te::xml::Reader &reader)
void ReadAnnotated(te::xsd::Annotated *annotated, te::xml::Reader &reader)
FacetType
It enumerates the available facet types.
void setAnnotation(Annotation *ann)
It sets the associated annotation.
Specifies the lower bounds for numeric values. (>)
Defines the exact sequence of characters that are acceptable.
Specifies the upper bounds for numeric values. (<=)
void setMinOccurs(unsigned int minOccurs)
It sets the minOccurs value.
void ReadIdentifiable(te::xsd::Identifiable *identifiable, te::xml::Reader &reader)
A base class for XSD classes that must provide a unique ID property.
void Tokenize(const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=" ")
It tokenizes a given string with a delimiter of your own choice.
Specifies the minimum number of characters or list items allowed.
A class that models a XSD annotation element.
Support for Annotation serialization.
te::xsd::QName * CreateQName(const std::string &name)
static const unsigned int unbounded
Identifer for "unbounded" max values.
A class to be used to represent XML qualified names.
void ReadOccurs(te::xsd::Occurs *occurs, te::xml::Reader &reader)
Utility methods for Schema serialization.
te::xsd::FacetType GetFacetType(const std::string &name)
void setMaxOccurs(unsigned int maxOccurs)
It sets the maxOccurs value.
Specifies the lower bounds for numeric values. (>=)
Specifies the maximum number of characters or list items allowed.
Specifies how white space (line feeds, tabs, spaces and carriage returns) is handled.
A base class for XSD classes that may allow annotation.
Specifies the maximum number of decimal places allowed.
virtual NodeType getNodeType() const =0
It return the type of node read.
virtual std::string getElementLocalName() const =0
It returns the local part of the element name in the case of an element node.
virtual boost::int32_t getAttrAsInt32(const std::string &name) const
It returns the attribute value in the case of an element node with valid attributes.
virtual std::size_t getAttrPosition(const std::string &name) const =0
It returns the attribute position.
void setId(std::string *id)
it sets the id.
Specifies the upper bounds for numeric values. (<)
virtual std::string getAttr(const std::string &name) const =0
It returns the attribute value in the case of an element node with valid attributes.