XQuilla/docs/dom3-api/classxercesc_1_1DOMConfiguration.html

326 lines
25 KiB
HTML
Raw Normal View History

2020-02-17 21:05:20 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>XQilla DOM Level 3 API: xercesc::DOMConfiguration Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li id="current"><a href="classes.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul></div>
<div class="nav">
<a class="el" href="namespacexercesc.html">xercesc</a>::<a class="el" href="classxercesc_1_1DOMConfiguration.html">DOMConfiguration</a></div>
<h1>xercesc::DOMConfiguration Class Reference</h1><!-- doxytag: class="xercesc::DOMConfiguration" -->The <a class="el" href="classxercesc_1_1DOMConfiguration.html">DOMConfiguration</a> interface represents the configuration of a document and maintains a table of recognized parameters.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="DOMConfiguration_8hpp-source.html">DOMConfiguration.hpp</a>&gt;</code>
<p>
<a href="classxercesc_1_1DOMConfiguration-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxercesc_1_1DOMConfiguration.html#62e7cd90090e47b0084ab872ac5ecaae">setParameter</a> (const XMLCh *name, const void *value)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the value of a parameter. <a href="#62e7cd90090e47b0084ab872ac5ecaae"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxercesc_1_1DOMConfiguration.html#20a093954d089cee96a04318ace33ff2">getParameter</a> (const XMLCh *name) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the value of a parameter if known. <a href="#20a093954d089cee96a04318ace33ff2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxercesc_1_1DOMConfiguration.html#a50d41245f94f5d5b338219f7f75c005">canSetParameter</a> (const XMLCh *name, const void *value) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if setting a parameter to a specific value is supported. <a href="#a50d41245f94f5d5b338219f7f75c005"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Destructor</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxercesc_1_1DOMConfiguration.html#e5da7bb1ca8475d71596b1aa1771b6fc">~DOMConfiguration</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <a href="#e5da7bb1ca8475d71596b1aa1771b6fc"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Hidden constructors</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classxercesc_1_1DOMConfiguration.html#09be28924fe48cc06e65b0365bd0d1eb">DOMConfiguration</a> ()</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The <a class="el" href="classxercesc_1_1DOMConfiguration.html">DOMConfiguration</a> interface represents the configuration of a document and maintains a table of recognized parameters.
<p>
using the configuration, it is possible to change Document.normalizeDocument behavior, such as replacing CDATASection nodes with Text nodes or specifying the type of the schema that must be used when the validation of the Document is requested. <a class="el" href="classxercesc_1_1DOMConfiguration.html">DOMConfiguration</a> objects are also used in [DOM Level 3 Load and Save] in the <a class="el" href="classxercesc_1_1DOMBuilder.html">DOMBuilder</a> and <a class="el" href="classxercesc_1_1DOMWriter.html">DOMWriter</a> interfaces.<p>
The <a class="el" href="classxercesc_1_1DOMConfiguration.html">DOMConfiguration</a> distinguish two types of parameters: boolean (boolean parameters) and DOMUserData (parameters). The names used by the <a class="el" href="classxercesc_1_1DOMConfiguration.html">DOMConfiguration</a> object are defined throughout the DOM Level 3 specifications. Names are case-insensitives. To avoid possible conflicts, as a convention, names referring to boolean parameters and parameters defined outside the DOM specification should be made unique. Names are recommended to follow the XML name production rule but it is not enforced by the DOM implementation. DOM Level 3 Core Implementations are required to recognize all boolean parameters and parameters defined in this specification. Each boolean parameter state or parameter value may then be supported or not by the implementation. Refer to their definition to know if a state or a value must be supported or not.<p>
Note: Parameters are similar to features and properties used in SAX2 [SAX].<p>
Issue DOMConfiguration-1: Can we rename boolean parameters to "flags"?<p>
Issue DOMConfiguration-2: Are boolean parameters and parameters within the same scope for uniqueness? Which exception should be raised by setBooleanParameter("error-handler", true)?<p>
The following list of parameters defined in the DOM:<p>
"error-handler" [required] A <a class="el" href="classxercesc_1_1DOMErrorHandler.html">DOMErrorHandler</a> object. If an error is encountered in the document, the implementation will call back the <a class="el" href="classxercesc_1_1DOMErrorHandler.html">DOMErrorHandler</a> registered using this parameter. When called, DOMError.relatedData will contain the closest node to where the error occured. If the implementation is unable to determine the node where the error occurs, DOMError.relatedData will contain the Document node. Mutations to the document from within an error handler will result in implementation dependent behaviour.<p>
Issue DOMConfiguration-4: Should we say non "readonly" operations are implementation dependent instead? Resolution: Removed: "or re-invoking a validation operation".<p>
"schema-type" [optional] A DOMString object containing an absolute URI and representing the type of the schema language used to validate a document against. Note that no lexical checking is done on the absolute URI. If this parameter is not set, a default value may be provided by the implementation, based on the schema languages supported and on the schema language used at load time.<p>
Note: For XML Schema [XML Schema Part 1], applications must use the value "http://www.w3.org/2001/XMLSchema". For XML DTD [XML 1.0], applications must use the value "http://www.w3.org/TR/REC-xml". Other schema languages are outside the scope of the W3C and therefore should recommend an absolute URI in order to use this method.<p>
"schema-location" [optional] A DOMString object containing a list of URIs, separated by white spaces (characters matching the nonterminal production S defined in section 2.3 [XML 1.0]), that represents the schemas against which validation should occur. The types of schemas referenced in this list must match the type specified with schema-type, otherwise the behaviour of an implementation is undefined. If the schema type is XML Schema [XML Schema Part 1], only one of the XML Schemas in the list can be with no namespace. If validation occurs against a namespace aware schema, i.e. XML Schema, and the targetNamespace of a schema (specified using this property) matches the targetNamespace of a schema occurring in the instance document, i.e in schemaLocation attribute, the schema specified by the user using this property will be used (i.e., in XML Schema the schemaLocation attribute in the instance document or on the import element will be effectively ignored).<p>
Note: It is illegal to set the schema-location parameter if the schema-type parameter value is not set. It is strongly recommended that DOMInputSource.baseURI will be set, so that an implementation can successfully resolve any external entities referenced.<p>
The following list of boolean parameters (features) defined in the DOM:<p>
"canonical-form"<p>
true [optional] Canonicalize the document according to the rules specified in [Canonical XML]. Note that this is limited to what can be represented in the DOM. In particular, there is no way to specify the order of the attributes in the DOM.<p>
Issue normalizationFeature-14: What happen to other features? are they ignored? if yes, how do you know if a feature is ignored?<p>
false [required] (default) Do not canonicalize the document.<p>
"cdata-sections"<p>
true [required] (default) Keep CDATASection nodes in the document.<p>
Issue normalizationFeature-11: Name does not work really well in this case. ALH suggests renaming this to "cdata-sections". It works for both load and save. Resolution: Renamed as suggested. (Telcon 27 Jan 2002).<p>
false [required] Transform CDATASection nodes in the document into Text nodes. The new Text node is then combined with any adjacent Text node.<p>
"comments"<p>
true [required] (default) Keep Comment nodes in the document.<p>
false [required] Discard Comment nodes in the Document.<p>
"datatype-normalization"<p>
true [required] Exposed normalized values in the tree.<p>
Issue normalizationFeature-8: We should define "datatype normalization". Resolution: DTD normalization always apply because it's part of XML 1.0. Clarify the spec. (Telcon 27 Jan 2002).<p>
false [required] (default) Do not perform normalization on the tree.<p>
"discard-default-content"<p>
true [required] (default) Use whatever information available to the implementation (i.e. XML schema, DTD, the specified flag on Attr nodes, and so on) to decide what attributes and content should be discarded or not. Note that the specified flag on Attr nodes in itself is not always reliable, it is only reliable when it is set to false since the only case where it can be set to false is if the attribute was created by the implementation. The default content won't be removed if an implementation does not have any information available.<p>
Issue normalizationFeature-2: How does exactly work? What's the comment about level 1 implementations? Resolution: Remove "Level 1" (Telcon 16 Jan 2002).<p>
false [required] Keep all attributes and all content.<p>
"entities"<p>
true [required] Keep EntityReference and Entity nodes in the document.<p>
Issue normalizationFeature-9: How does that interact with expand-entity-references? ALH suggests consolidating the two to a single feature called "entity-references" that is used both for load and save. Resolution: Consolidate both features into a single feature called 'entities'. (Telcon 27 Jan 2002).<p>
false [required] (default) Remove all EntityReference and Entity nodes from the document, putting the entity expansions directly in their place. Text nodes are into "normal" form. Only EntityReference nodes to non-defined entities are kept in the document.<p>
"infoset"<p>
true [required] Only keep in the document the information defined in the XML Information Set [XML Information set]. This forces the following features to false: namespace-declarations, validate-if-schema, entities, datatype-normalization, cdata-sections. This forces the following features to true: whitespace-in-element-content, comments, namespaces. Other features are not changed unless explicity specified in the description of the features. Note that querying this feature with getFeature returns true only if the individual features specified above are appropriately set.<p>
Issue normalizationFeature-12: Name doesn't work well here. ALH suggests renaming this to limit-to-infoset or match-infoset, something like that. Resolution: Renamed 'infoset' (Telcon 27 Jan 2002).<p>
false Setting infoset to false has no effect.<p>
Issue normalizationFeature-13: Shouldn't we change this to setting the relevant options back to their default value? Resolution: No, this is more like a convenience function, it's better to keep it simple. (F2F 28 Feb 2002).<p>
"namespaces"<p>
true [required] (default) Perform the namespace processing as defined in [XML Namespaces].<p>
false [optional] Do not perform the namespace processing.<p>
"namespace-declarations"<p>
true [required] (default) Include namespace declaration attributes, specified or defaulted from the schema or the DTD, in the document. See also the section Declaring Namespaces in [XML Namespaces].<p>
false [required] Discard all namespace declaration attributes. The Namespace prefixes are retained even if this feature is set to false.<p>
"normalize-characters"<p>
true [optional] Perform the W3C Text Normalization of the characters [CharModel] in the document.<p>
false [required] (default) Do not perform character normalization.<p>
"split-cdata-sections"<p>
true [required] (default) Split CDATA sections containing the CDATA section termination marker ']]&gt;'. When a CDATA section is split a warning is issued.<p>
false [required] Signal an error if a CDATASection contains an unrepresentable character.<p>
"validate"<p>
true [optional] Require the validation against a schema (i.e. XML schema, DTD, any other type or representation of schema) of the document as it is being normalized as defined by [XML 1.0]. If validation errors are found, or no schema was found, the error handler is notified. Note also that normalized values will not be exposed to the schema in used unless the feature datatype-normalization is true.<p>
Note: validate-if-schema and validate are mutually exclusive, setting one of them to true will set the other one to false.<p>
false [required] (default) Only XML 1.0 non-validating processing must be done. Note that validation might still happen if validate-if-schema is true.<p>
"validate-if-schema"<p>
true [optional] Enable validation only if a declaration for the document element can be found (independently of where it is found, i.e. XML schema, DTD, or any other type or representation of schema). If validation errors are found, the error handler is notified. Note also that normalized values will not be exposed to the schema in used unless the feature datatype-normalization is true.<p>
Note: validate-if-schema and validate are mutually exclusive, setting one of them to true will set the other one to false.<p>
false [required] (default) No validation should be performed if the document has a schema. Note that validation must still happen if validate is true.<p>
"whitespace-in-element-content"<p>
true [required] (default) Keep all white spaces in the document.<p>
Issue normalizationFeature-15: How does this feature interact with "validate" and Text.isWhitespaceInElementContent. Resolution: issue no longer relevant (f2f october 2002).<p>
false [optional] Discard white space in element content while normalizing. The implementation is expected to use the isWhitespaceInElementContent flag on Text nodes to determine if a text node should be written out or not.<p>
The resolutions of entities is done using Document.baseURI. However, when the features "LS-Load" or "LS-Save" defined in [DOM Level 3 Load and Save] are supported by the DOM implementation, the parameter "entity-resolver" can also be used on <a class="el" href="classxercesc_1_1DOMConfiguration.html">DOMConfiguration</a> objects attached to Document nodes. If this parameter is set, Document.normalizeDocument will invoke the entity resolver instead of using Document.baseURI.
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="09be28924fe48cc06e65b0365bd0d1eb"></a><!-- doxytag: member="xercesc::DOMConfiguration::DOMConfiguration" ref="09be28924fe48cc06e65b0365bd0d1eb" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">xercesc::DOMConfiguration::DOMConfiguration </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline, protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="e5da7bb1ca8475d71596b1aa1771b6fc"></a><!-- doxytag: member="xercesc::DOMConfiguration::~DOMConfiguration" ref="e5da7bb1ca8475d71596b1aa1771b6fc" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual xercesc::DOMConfiguration::~DOMConfiguration </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Destructor.
<p>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a50d41245f94f5d5b338219f7f75c005"></a><!-- doxytag: member="xercesc::DOMConfiguration::canSetParameter" ref="a50d41245f94f5d5b338219f7f75c005" args="(const XMLCh *name, const void *value) const =0" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual bool xercesc::DOMConfiguration::canSetParameter </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const XMLCh *&nbsp;</td>
<td class="mdname" nowrap> <em>name</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>const void *&nbsp;</td>
<td class="mdname" nowrap> <em>value</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"> const<code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Check if setting a parameter to a specific value is supported.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>The name of the parameter to check. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>An object. if null, the returned value is true. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>true if the parameter could be successfully set to the specified value, or false if the parameter is not recognized or the requested value is not supported. This does not change the current value of the parameter itself. </dd></dl>
<dl compact><dt><b>Since:</b></dt><dd>DOM level 3 </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="20a093954d089cee96a04318ace33ff2"></a><!-- doxytag: member="xercesc::DOMConfiguration::getParameter" ref="20a093954d089cee96a04318ace33ff2" args="(const XMLCh *name) const =0" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual const void* xercesc::DOMConfiguration::getParameter </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const XMLCh *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>name</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const<code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Return the value of a parameter if known.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>The name of the parameter. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The current object associated with the specified parameter or null if no object has been associated or if the parameter is not supported. </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxercesc_1_1DOMException.html">DOMException</a></em>&nbsp;</td><td>(NOT_FOUND_ERR) Raised when the i boolean parameter name is not recognized. </td></tr>
</table>
</dl>
<dl compact><dt><b>Since:</b></dt><dd>DOM level 3 </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="62e7cd90090e47b0084ab872ac5ecaae"></a><!-- doxytag: member="xercesc::DOMConfiguration::setParameter" ref="62e7cd90090e47b0084ab872ac5ecaae" args="(const XMLCh *name, const void *value)=0" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual void xercesc::DOMConfiguration::setParameter </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const XMLCh *&nbsp;</td>
<td class="mdname" nowrap> <em>name</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>const void *&nbsp;</td>
<td class="mdname" nowrap> <em>value</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set the value of a parameter.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>The name of the parameter to set. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>The new value or null if the user wishes to unset the parameter. While the type of the value parameter is defined as <code>DOMUserData</code>, the object type must match the type defined by the definition of the parameter. For example, if the parameter is "error-handler", the value must be of type <code><a class="el" href="classxercesc_1_1DOMErrorHandler.html">DOMErrorHandler</a></code> </td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxercesc_1_1DOMException.html">DOMException</a></em>&nbsp;</td><td>(NOT_SUPPORTED_ERR) Raised when the parameter name is recognized but the requested value cannot be set. </td></tr>
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxercesc_1_1DOMException.html">DOMException</a></em>&nbsp;</td><td>(NOT_FOUND_ERR) Raised when the parameter name is not recognized. </td></tr>
</table>
</dl>
<dl compact><dt><b>Since:</b></dt><dd>DOM level 3 </dd></dl>
</td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="DOMConfiguration_8hpp-source.html">DOMConfiguration.hpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 12 00:19:02 2006 for XQilla DOM Level 3 API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>