📄 traverseschema.hpp
字号:
/** * Return the local for a given rawname string * * caller allocated, caller managed (cacm) */ const XMLCh* getLocalPart(const XMLCh* const rawName); /** * Process a 'ref' of an Element declaration */ SchemaElementDecl* processElementDeclRef(const DOMElement* const elem, const XMLCh* const refName); void processElemDeclAttrs(const DOMElement* const elem, SchemaElementDecl* const elemDecl, const XMLCh*& valConstraint, bool isTopLevel = false); void processElemDeclIC(DOMElement* const elem, SchemaElementDecl* const elemDecl); bool checkElemDeclValueConstraint(const DOMElement* const elem, SchemaElementDecl* const elemDecl, const XMLCh* const valConstraint, ComplexTypeInfo* const typeInfo, DatatypeValidator* const validator); /** * Process a 'ref' of an Attribute declaration */ void processAttributeDeclRef(const DOMElement* const elem, ComplexTypeInfo* const typeInfo, const XMLCh* const refName, const XMLCh* const useVal, const XMLCh* const defaultVal, const XMLCh* const fixedVal); /** * Process a 'ref' on a group */ XercesGroupInfo* processGroupRef(const DOMElement* const elem, const XMLCh* const refName); /** * Process a 'ref' on a attributeGroup */ XercesAttGroupInfo* processAttributeGroupRef(const DOMElement* const elem, const XMLCh* const refName, ComplexTypeInfo* const typeInfo); /** * Parse block & final items */ int parseBlockSet(const DOMElement* const elem, const int blockType, const bool isRoot = false); int parseFinalSet(const DOMElement* const elem, const int finalType, const bool isRoot = false); /** * Return true if a name is an identity constraint, otherwise false */ bool isIdentityConstraintName(const XMLCh* const constraintName); /** * If 'typeStr' belongs to a different schema, return that schema URI, * otherwise return 0; */ const XMLCh* checkTypeFromAnotherSchema(const DOMElement* const elem, const XMLCh* const typeStr); /** * Return the datatype validator for a given element type attribute if * the type is a simple type */ DatatypeValidator* getElementTypeValidator(const DOMElement* const elem, const XMLCh* const typeStr, bool& noErrorDetected, const XMLCh* const otherSchemaURI); /** * Return the complexType info for a given element type attribute if * the type is a complex type */ ComplexTypeInfo* getElementComplexTypeInfo(const DOMElement* const elem, const XMLCh* const typeStr, const XMLCh* const otherSchemaURI); /** * Return global schema element declaration for a given element name */ SchemaElementDecl* getGlobalElemDecl(const DOMElement* const elem, const XMLCh* const name); /** * Check validity constraint of a substitutionGroup attribute in * an element declaration */ bool isSubstitutionGroupValid(const DOMElement* const elem, const SchemaElementDecl* const elemDecl, const ComplexTypeInfo* const typeInfo, const DatatypeValidator* const validator, const XMLCh* const elemName, const bool toEmit = true); bool isSubstitutionGroupCircular(SchemaElementDecl* const elemDecl, SchemaElementDecl* const subsElemDecl); void processSubstitutionGroup(const DOMElement* const elem, SchemaElementDecl* const elemDecl, ComplexTypeInfo*& typeInfo, DatatypeValidator*& validator, const XMLCh* const subsElemQName); /** * Create a 'SchemaElementDecl' object and add it to SchemaGrammar */ SchemaElementDecl* createSchemaElementDecl(const DOMElement* const elem, const XMLCh* const name, bool& isDuplicate, const XMLCh*& valConstraint, const bool topLevel); /** * Return the value of a given attribute name from an element node */ const XMLCh* getElementAttValue(const DOMElement* const elem, const XMLCh* const attName, const bool toTrim = false); void checkMinMax(ContentSpecNode* const specNode, const DOMElement* const elem, const int allContext = Not_All_Context); /** * Process complex content for a complexType */ void processComplexContent(const DOMElement* const elem, const XMLCh* const typeName, const DOMElement* const childElem, ComplexTypeInfo* const typeInfo, const XMLCh* const baseLocalPart, const bool isMixed, const bool isBaseAnyType = false); /** * Process "base" information for a complexType */ void processBaseTypeInfo(const DOMElement* const elem, const XMLCh* const baseName, const XMLCh* const localPart, const XMLCh* const uriStr, ComplexTypeInfo* const typeInfo); /** * Check if base is from another schema */ bool isBaseFromAnotherSchema(const XMLCh* const baseURI); /** * Get complexType infp from another schema */ ComplexTypeInfo* getTypeInfoFromNS(const DOMElement* const elem, const XMLCh* const uriStr, const XMLCh* const localPart); DatatypeValidator* getAttrDatatypeValidatorNS(const DOMElement* const elem, const XMLCh* localPart, const XMLCh* typeURI); /** * Returns true if a DOM Element is an attribute or attribute group */ bool isAttrOrAttrGroup(const DOMElement* const elem); /** * Process attributes of a complex type */ void processAttributes(const DOMElement* const elem, const DOMElement* const attElem, ComplexTypeInfo* const typeInfo, const bool isBaseAnyType = false); /** * Generate a name for an anonymous type */ const XMLCh* genAnonTypeName(const XMLCh* const prefix); void defaultComplexTypeInfo(ComplexTypeInfo* const typeInfo); /** * Resolve a schema location attribute value to an input source. * Caller to delete the returned object. */ InputSource* resolveSchemaLocation ( const XMLCh* const loc , const XMLResourceIdentifier::ResourceIdentifierType resourceIdentitiferType , const XMLCh* const nameSpace=0 ); void restoreSchemaInfo(SchemaInfo* const toRestore, SchemaInfo::ListType const aListType = SchemaInfo::INCLUDE, const int saveScope = Grammar::TOP_LEVEL_SCOPE); void popCurrentTypeNameStack(); /** * Check whether a mixed content is emptiable or not. * Needed to validate element constraint values (defualt, fixed) */ bool emptiableParticle(const ContentSpecNode* const specNode); void checkFixedFacet(const DOMElement* const, const XMLCh* const, const DatatypeValidator* const, unsigned int&); void buildValidSubstitutionListF(const DOMElement* const elem, SchemaElementDecl* const, SchemaElementDecl* const); void buildValidSubstitutionListB(const DOMElement* const elem, SchemaElementDecl* const, SchemaElementDecl* const); void checkEnumerationRequiredNotation(const DOMElement* const elem, const XMLCh* const name, const XMLCh* const typeStr); void processElements(const DOMElement* const elem, ComplexTypeInfo* const baseTypeInfo, ComplexTypeInfo* const newTypeInfo); void processElements(const DOMElement* const elem, XercesGroupInfo* const fromGroup, ComplexTypeInfo* const typeInfo); void copyGroupElements(const DOMElement* const elem, XercesGroupInfo* const fromGroup, XercesGroupInfo* const toGroup, ComplexTypeInfo* const typeInfo); void copyAttGroupAttributes(const DOMElement* const elem, XercesAttGroupInfo* const fromAttGroup, XercesAttGroupInfo* const toAttGroup, ComplexTypeInfo* const typeInfo); void checkForEmptyTargetNamespace(const DOMElement* const elem); /** * Attribute wild card intersection. * * Note: * The first parameter will be the result of the intersection, so * we need to make sure that first parameter is a copy of the * actual attribute definition we need to intersect with. * * What we need to wory about is: type, defaultType, namespace, * and URI. All remaining data members should be the same. */ void attWildCardIntersection(SchemaAttDef* const resultWildCart, const SchemaAttDef* const toCompareWildCard); /** * Attribute wild card union. * * Note: * The first parameter will be the result of the union, so * we need to make sure that first parameter is a copy of the * actual attribute definition we need to intersect with. * * What we need to wory about is: type, defaultType, namespace, * and URI. All remaining data members should be the same. */ void attWildCardUnion(SchemaAttDef* const resultWildCart, const SchemaAttDef* const toCompareWildCard); void copyWildCardData(const SchemaAttDef* const srcWildCard, SchemaAttDef* const destWildCard); /** * Check that the attributes of a type derived by restriction satisfy * the constraints of derivation valid restriction */ void checkAttDerivationOK(const DOMElement* const elem, const ComplexTypeInfo* const baseTypeInfo, const ComplexTypeInfo* const childTypeInfo); void checkAttDerivationOK(const DOMElement* const elem, const XercesAttGroupInfo* const baseAttGrpInfo, const XercesAttGroupInfo* const childAttGrpInfo); /** * Check whether a namespace value is valid with respect to wildcard * constraint */ bool wildcardAllowsNamespace(const SchemaAttDef* const baseAttWildCard, const unsigned int nameURI); /** * Check whether a namespace constraint is an intensional subset of * another namespace constraint */ bool isWildCardSubset(const SchemaAttDef* const baseAttWildCard, const SchemaAttDef* const childAttWildCard); bool openRedefinedSchema(const DOMElement* const redefineElem); /** * The purpose of this method is twofold: * 1. To find and appropriately modify all information items * in redefinedSchema with names that are redefined by children of * redefineElem. * 2. To make sure the redefine element represented by * redefineElem is valid as far as content goes and with regard to * properly referencing components to be redefined. * * No traversing is done here!
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -