📄 abstractdomparser.hpp
字号:
* @return The state of the create comment node flag. * @see #setCreateCommentNodes */ bool getCreateCommentNodes()const; /** * Get the 'calculate src offset flag' * * This method returns the state of the parser's src offset calculation * when parsing an XML document. * * @return true, if the parser is currently configured to * calculate src offsets, false otherwise. * * @see #setCalculateSrcOfs */ bool getCalculateSrcOfs() const; /** * Get the 'force standard uri flag' * * This method returns the state if the parser forces standard uri * * @return true, if the parser is currently configured to * force standard uri, i.e. malformed uri will be rejected. * * @see #setStandardUriConformant */ bool getStandardUriConformant() const; /** * This method returns the installed PSVI handler. Suitable * for 'lvalue' usages. * * @return The pointer to the installed PSVI handler object. */ PSVIHandler* getPSVIHandler(); /** * This method returns the installed PSVI handler. Suitable * for 'rvalue' usages. * * @return A const pointer to the installed PSVI handler object. */ const PSVIHandler* getPSVIHandler() const; /** Get the 'associate schema info' flag * * This method returns the flag that specifies whether * the parser is storing schema informations in the element * and attribute nodes in the DOM tree being produced. * * @return The state of the associate schema info flag. * @see #setCreateSchemaInfo */ bool getCreateSchemaInfo() const; /** Get the 'generate synthetic annotations' flag * * @return true, if the parser is currently configured to * generate synthetic annotations, false otherwise. * A synthetic XSAnnotation is created when a schema * component has non-schema attributes but has no * child annotations so that the non-schema attributes * can be recovered under PSVI. * * @see #setGenerateSyntheticAnnotations */ bool getGenerateSyntheticAnnotations() const; /** Get the 'validate annotations' flag * * @return true, if the parser is currently configured to * validate annotations, false otherwise. * * @see #setValidateAnnotations */ bool getValidateAnnotations() const; /** Get the 'ignore annotations' flag * * @return true, if the parser is currently configured to * ignore annotations, false otherwise. * * @see #setIgnoreAnnotations */ bool getIgnoreAnnotations() const; /** Get the 'disable default entity resolution' flag * * @return true, if the parser is currently configured to * not perform default entity resolution, false otherwise. * * @see #setDisableDefaultEntityResolution */ bool getDisableDefaultEntityResolution() const; /** Get the 'skip DTD validation' flag * * @return true, if the parser is currently configured to * skip DTD validation, false otherwise. * * @see #setSkipDTDValidation */ bool getSkipDTDValidation() const; //@} // ----------------------------------------------------------------------- // Setter methods // ----------------------------------------------------------------------- /** @name Setter methods */ //@{ /** set the 'generate synthetic annotations' flag * * @param newValue The value for specifying whether Synthetic Annotations * should be generated or not. * A synthetic XSAnnotation is created when a schema * component has non-schema attributes but has no * child annotations so that the non-schema attributes * can be recovered under PSVI. * * @see #getGenerateSyntheticAnnotations */ void setGenerateSyntheticAnnotations(const bool newValue); /** set the 'validlate annotations' flag * * @param newValue The value for specifying whether Annotations * should be validated or not. * * @see #getValidateAnnotations */ void setValidateAnnotations(const bool newValue); /** Set the 'do namespaces' flag * * This method allows users to enable or disable the parser's * namespace processing. When set to true, parser starts enforcing * all the constraints and rules specified by the NameSpace * specification. * * The parser's default state is: false. * * @param newState The value specifying whether NameSpace rules should * be enforced or not. * * @see #getDoNamespaces */ void setDoNamespaces(const bool newState); /** Set the 'exit on first error' flag * * This method allows users to set the parser's behaviour when it * encounters the first fatal error. If set to true, the parser * will exit at the first fatal error. If false, then it will * report the error and continue processing. * * The default value is 'true' and the parser exits on the * first fatal error. * * @param newState The value specifying whether the parser should * continue or exit when it encounters the first * fatal error. * * @see #getExitOnFirstFatalError */ void setExitOnFirstFatalError(const bool newState); /** * This method allows users to set the parser's behaviour when it * encounters a validtion constraint error. If set to true, and the * the parser will treat validation error as fatal and will exit depends on the * state of "getExitOnFirstFatalError". If false, then it will * report the error and continue processing. * * Note: setting this true does not mean the validation error will be printed with * the word "Fatal Error". It is still printed as "Error", but the parser * will exit if "setExitOnFirstFatalError" is set to true. * * <p>The default value is 'false'.</p> * * @param newState If true, the parser will exit if "setExitOnFirstFatalError" * is set to true. * * @see #getValidationConstraintFatal * @see #setExitOnFirstFatalError */ void setValidationConstraintFatal(const bool newState); /** Set the 'include entity references' flag * * This method allows the user to specify whether the parser should * create entity reference nodes in the DOM tree being produced. * When the 'create' flag is * true, the parser will create EntityReference nodes in the DOM tree. * The EntityReference nodes and their child nodes will be read-only. * When the 'create' flag is false, no EntityReference nodes will be created. * <p>The replacement text * of the entity is included in either case, either as a * child of the Entity Reference node or in place at the location * of the reference. * <p>The default value is 'true'. * * @param create The new state of the create entity reference nodes * flag. * @see #getCreateEntityReferenceNodes */ void setCreateEntityReferenceNodes(const bool create); /** Set the 'include ignorable whitespace' flag * * This method allows the user to specify whether a validating parser * should include ignorable whitespaces as text nodes. It has no effect * on non-validating parsers which always include non-markup text. * <p>When set to true (also the default), ignorable whitespaces will be * added to the DOM tree as text nodes. The method * DOMText::isIgnorableWhitespace() will return true for those text * nodes only. * <p>When set to false, all ignorable whitespace will be discarded and * no text node is added to the DOM tree. Note: applications intended * to process the "xml:space" attribute should not set this flag to false. * And this flag also overrides any schema datateye whitespace facets, * that is, all ignorable whitespace will be discarded even though * 'preserve' is set in schema datatype whitespace facets. * * @param include The new state of the include ignorable whitespace * flag. * * @see #getIncludeIgnorableWhitespace */ void setIncludeIgnorableWhitespace(const bool include); /** * This method allows users to set the validation scheme to be used * by this parser. The value is one of the ValSchemes enumerated values * defined by this class: * * <br> Val_Never - turn off validation * <br> Val_Always - turn on validation * <br> Val_Auto - turn on validation if any internal/external * DTD subset have been seen * * <p>The parser's default state is: Val_Never.</p> * * @param newScheme The new validation scheme to use. * * @see #getValidationScheme */ void setValidationScheme(const ValSchemes newScheme); /** Set the 'do schema' flag * * This method allows users to enable or disable the parser's * schema processing. When set to false, parser will not process * any schema found. * * The parser's default state is: false. * * Note: If set to true, namespace processing must also be turned on. * * @param newState The value specifying whether schema support should * be enforced or not. * * @see #getDoSchema */ void setDoSchema(const bool newState); /** * This method allows the user to turn full Schema constraint checking on/off. * Only takes effect if Schema validation is enabled. * If turned off, partial constraint checking is done. * * Full schema constraint checking includes those checking that may * be time-consuming or memory intensive. Currently, particle unique * attribution constraint checking and particle derivation resriction checking * are controlled by this option. * * The parser's default state is: false. * * @param schemaFullChecking True to turn on full schema constraint checking. * * @see #getValidationSchemaFullChecking */ void setValidationSchemaFullChecking(const bool schemaFullChecking); /** * This method allows users to enable or disable the parser's identity * constraint checks. * * <p>By default, the parser does identity constraint checks. * The default value is true.</p> * * @param newState The value specifying whether the parser should * do identity constraint checks or not in the * input XML document. * * @see #getIdentityConstraintChecking */ void setIdentityConstraintChecking(const bool newState); /** * This method allows the user to specify a list of schemas to use. * If the targetNamespace of a schema specified using this method matches * the targetNamespace of a schema occuring in the instance document in * the schemaLocation attribute, or if the targetNamespace matches the * namespace attribute of the "import" element, the schema specified by the * user using this method will be used (i.e., the schemaLocation attribute * in the instance document or on the "import" element will be effectively ignored). * * If this method is called more than once, only the last one takes effect. * * The syntax is the same as for schemaLocation attributes in instance * documents: e.g, "http://www.example.com file_name.xsd". The user can * specify more than one XML Schema in the list. * * @param schemaLocation the list of schemas to use * * @see #getExternalSchemaLocation */ void setExternalSchemaLocation(const XMLCh* const schemaLocation); /** * This method is same as setExternalSchemaLocation(const XMLCh* const). * It takes native char string as parameter * * @param schemaLocation the list of schemas to use * * @see #setExternalSchemaLocation(const XMLCh* const) */ void setExternalSchemaLocation(const char* const schemaLocation); /** * This method allows the user to specify the no target namespace XML * Schema Location externally. If specified, the instance document's * noNamespaceSchemaLocation attribute will be effectively ignored. * * If this method is called more than once, only the last one takes effect. * * The syntax is the same as for the noNamespaceSchemaLocation attribute * that may occur in an instance document: e.g."file_name.xsd". * * @param noNamespaceSchemaLocation the XML Schema Location with no target namespace * * @see #getExternalNoNamespaceSchemaLocation */ void setExternalNoNamespaceSchemaLocation(const XMLCh* const noNamespaceSchemaLocation); /** * This method is same as setExternalNoNamespaceSchemaLocation(const XMLCh* const). * It takes native char string as parameter
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -